Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Search  

umsg.h

Go to the documentation of this file.
00001 /*
00002 *******************************************************************************
00003 * Copyright (C) 1996-2001, International Business Machines Corporation and others. All Rights Reserved.
00004 *******************************************************************************
00005 *
00006 *   file name:  umsg.h
00007 *   encoding:   US-ASCII
00008 *   tab size:   8 (not used)
00009 *   indentation:4
00010 *
00011 *   Change history:
00012 *
00013 *   08/5/2001  Ram         Added C wrappers for C++ API.
00014 *                          
00015 *
00016 */
00017 
00018 #ifndef UMSG_H
00019 #define UMSG_H
00020 
00021 #include "unicode/utypes.h"
00022 #include "unicode/parseerr.h"
00023 #include <stdarg.h>
00199 U_CAPI int32_t U_EXPORT2 
00200 u_formatMessage(const char  *locale,
00201                  const UChar *pattern,
00202                 int32_t     patternLength,
00203                 UChar       *result,
00204                 int32_t     resultLength,
00205                 UErrorCode  *status,
00206                 ...);
00207 
00225 U_CAPI int32_t U_EXPORT2 
00226 u_vformatMessage(   const char  *locale,
00227                     const UChar *pattern,
00228                     int32_t     patternLength,
00229                     UChar       *result,
00230                     int32_t     resultLength,
00231                     va_list     ap,
00232                     UErrorCode  *status);
00233 
00250 U_CAPI void U_EXPORT2 
00251 u_parseMessage( const char   *locale,
00252                 const UChar  *pattern,
00253                 int32_t      patternLength,
00254                 const UChar  *source,
00255                 int32_t      sourceLength,
00256                 UErrorCode   *status,
00257                 ...);
00258 
00274 U_CAPI void U_EXPORT2 
00275 u_vparseMessage(const char  *locale,
00276                 const UChar *pattern,
00277                 int32_t     patternLength,
00278                 const UChar *source,
00279                 int32_t     sourceLength,
00280                 va_list     ap,
00281                 UErrorCode  *status);
00282 
00303 U_CAPI int32_t U_EXPORT2 
00304 u_formatMessageWithError(   const char    *locale,
00305                             const UChar   *pattern,
00306                             int32_t       patternLength,
00307                             UChar         *result,
00308                             int32_t       resultLength,
00309                             UParseError   *parseError,
00310                             UErrorCode    *status,
00311                             ...);
00312 
00331 U_CAPI int32_t U_EXPORT2 
00332 u_vformatMessageWithError(  const char   *locale,
00333                             const UChar  *pattern,
00334                             int32_t      patternLength,
00335                             UChar        *result,
00336                             int32_t      resultLength,
00337                             UParseError* parseError,
00338                             va_list      ap,
00339                             UErrorCode   *status);
00340 
00359 U_CAPI void U_EXPORT2 
00360 u_parseMessageWithError(const char  *locale,
00361                         const UChar *pattern,
00362                         int32_t     patternLength,
00363                         const UChar *source,
00364                         int32_t     sourceLength,
00365                         UParseError *error,
00366                         UErrorCode  *status,
00367                         ...);
00368 
00387 U_CAPI void U_EXPORT2 
00388 u_vparseMessageWithError(const char  *locale,
00389                          const UChar *pattern,
00390                          int32_t     patternLength,
00391                          const UChar *source,
00392                          int32_t     sourceLength,
00393                          va_list     ap,
00394                          UParseError *error,
00395                          UErrorCode* status);
00396 
00397 /*----------------------- New experimental API --------------------------- */
00398 
00399 typedef void* UMessageFormat;
00400 
00401 
00414 U_CAPI UMessageFormat* U_EXPORT2 
00415 umsg_open(  const UChar     *pattern,
00416             int32_t         patternLength,
00417             const  char     *locale,
00418             UParseError     *parseError,
00419             UErrorCode      *status);
00420 
00427 U_CAPI void U_EXPORT2 
00428 umsg_close(UMessageFormat* format);
00429 
00438 U_CAPI UMessageFormat U_EXPORT2 
00439 umsg_clone(const UMessageFormat *fmt,
00440            UErrorCode *status);
00441 
00448 U_CAPI void  U_EXPORT2 
00449 umsg_setLocale(UMessageFormat *fmt,
00450                const char* locale);
00451 
00459 U_CAPI const char*  U_EXPORT2 
00460 umsg_getLocale(UMessageFormat *fmt);
00461 
00474 U_CAPI void  U_EXPORT2 
00475 umsg_applyPattern( UMessageFormat *fmt,
00476                    const UChar* pattern,
00477                    int32_t patternLength,
00478                    UParseError* parseError,
00479                    UErrorCode* status);
00480 
00492 U_CAPI int32_t  U_EXPORT2 
00493 umsg_toPattern(UMessageFormat *fmt,
00494                UChar* result, 
00495                int32_t resultLength,
00496                UErrorCode* status);
00497 
00513 U_CAPI int32_t U_EXPORT2 
00514 umsg_format(    UMessageFormat *fmt,
00515                 UChar          *result,
00516                 int32_t        resultLength,
00517                 UErrorCode     *status,
00518                 ...);
00519 
00534 U_CAPI int32_t U_EXPORT2 
00535 umsg_vformat(   UMessageFormat *fmt,
00536                 UChar          *result,
00537                 int32_t        resultLength,
00538                 va_list        ap,
00539                 UErrorCode     *status);
00540 
00555 U_CAPI void U_EXPORT2 
00556 umsg_parse( UMessageFormat *fmt,
00557             const UChar    *source,
00558             int32_t        sourceLength,
00559             int32_t        *count,
00560             UErrorCode     *status,
00561             ...);
00562 
00577 U_CAPI void U_EXPORT2 
00578 umsg_vparse(UMessageFormat *fmt,
00579             const UChar    *source,
00580             int32_t        sourceLength,
00581             int32_t        *count,
00582             va_list        ap,
00583             UErrorCode     *status);
00584 #endif

Generated on Thu Aug 15 14:13:31 2002 for ICU 2.2 by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001