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 
00386 U_CAPI void U_EXPORT2 
00387 u_vparseMessageWithError(const char  *locale,
00388                          const UChar *pattern,
00389                          int32_t     patternLength,
00390                          const UChar *source,
00391                          int32_t     sourceLength,
00392                          va_list     ap,
00393                          UParseError *error,
00394                          UErrorCode* status);
00395 
00396 /*----------------------- New experimental API --------------------------- */
00397 
00398 typedef void* UMessageFormat;
00399 
00400 
00413 U_CAPI UMessageFormat* U_EXPORT2 
00414 umsg_open(  const UChar     *pattern,
00415             int32_t         patternLength,
00416             const  char     *locale,
00417             UParseError     *parseError,
00418             UErrorCode      *status);
00419 
00426 U_CAPI void U_EXPORT2 
00427 umsg_close(UMessageFormat* format);
00428 
00437 U_CAPI UMessageFormat U_EXPORT2 
00438 umsg_clone(const UMessageFormat *fmt,
00439            UErrorCode *status);
00446 U_CAPI void  U_EXPORT2 
00447 umsg_setLocale(UMessageFormat *fmt,
00448                const char* locale);
00449 
00456 U_CAPI const char*  U_EXPORT2 
00457 umsg_getLocale(UMessageFormat *fmt);
00458 
00471 U_CAPI void  U_EXPORT2 
00472 umsg_applyPattern( UMessageFormat *fmt,
00473                    const UChar* pattern,
00474                    int32_t patternLength,
00475                    UParseError* parseError,
00476                    UErrorCode* status);
00477 
00488 U_CAPI int32_t  U_EXPORT2 
00489 umsg_toPattern(UMessageFormat *fmt,
00490                UChar* result, 
00491                int32_t resultLength,
00492                UErrorCode* status);
00493 
00509 U_CAPI int32_t U_EXPORT2 
00510 umsg_format(    UMessageFormat *fmt,
00511                 UChar          *result,
00512                 int32_t        resultLength,
00513                 UErrorCode     *status,
00514                 ...);
00515 
00530 U_CAPI int32_t U_EXPORT2 
00531 umsg_vformat(   UMessageFormat *fmt,
00532                 UChar          *result,
00533                 int32_t        resultLength,
00534                 va_list        ap,
00535                 UErrorCode     *status);
00536 
00551 U_CAPI void U_EXPORT2 
00552 umsg_parse( UMessageFormat *fmt,
00553             const UChar    *source,
00554             int32_t        sourceLength,
00555             int32_t        *count,
00556             UErrorCode     *status,
00557             ...);
00558 
00573 U_CAPI void U_EXPORT2 
00574 umsg_vparse(UMessageFormat *fmt,
00575             const UChar    *source,
00576             int32_t        sourceLength,
00577             int32_t        *count,
00578             va_list        ap,
00579             UErrorCode     *status);
00580 #endif

Generated on Mon Dec 3 19:00:25 2001 for ICU 2.0 by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001