00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef UMSG_H
00019 #define UMSG_H
00020
00021 #include "unicode/utypes.h"
00022
00023 #if !UCONFIG_NO_FORMATTING
00024
00025 #include "unicode/uloc.h"
00026 #include "unicode/parseerr.h"
00027 #include <stdarg.h>
00203 U_CAPI int32_t U_EXPORT2
00204 u_formatMessage(const char *locale,
00205 const UChar *pattern,
00206 int32_t patternLength,
00207 UChar *result,
00208 int32_t resultLength,
00209 UErrorCode *status,
00210 ...);
00211
00230 U_CAPI int32_t U_EXPORT2
00231 u_vformatMessage( const char *locale,
00232 const UChar *pattern,
00233 int32_t patternLength,
00234 UChar *result,
00235 int32_t resultLength,
00236 va_list ap,
00237 UErrorCode *status);
00238
00255 U_CAPI void U_EXPORT2
00256 u_parseMessage( const char *locale,
00257 const UChar *pattern,
00258 int32_t patternLength,
00259 const UChar *source,
00260 int32_t sourceLength,
00261 UErrorCode *status,
00262 ...);
00263
00280 U_CAPI void U_EXPORT2
00281 u_vparseMessage(const char *locale,
00282 const UChar *pattern,
00283 int32_t patternLength,
00284 const UChar *source,
00285 int32_t sourceLength,
00286 va_list ap,
00287 UErrorCode *status);
00288
00309 U_CAPI int32_t U_EXPORT2
00310 u_formatMessageWithError( const char *locale,
00311 const UChar *pattern,
00312 int32_t patternLength,
00313 UChar *result,
00314 int32_t resultLength,
00315 UParseError *parseError,
00316 UErrorCode *status,
00317 ...);
00318
00338 U_CAPI int32_t U_EXPORT2
00339 u_vformatMessageWithError( const char *locale,
00340 const UChar *pattern,
00341 int32_t patternLength,
00342 UChar *result,
00343 int32_t resultLength,
00344 UParseError* parseError,
00345 va_list ap,
00346 UErrorCode *status);
00347
00366 U_CAPI void U_EXPORT2
00367 u_parseMessageWithError(const char *locale,
00368 const UChar *pattern,
00369 int32_t patternLength,
00370 const UChar *source,
00371 int32_t sourceLength,
00372 UParseError *parseError,
00373 UErrorCode *status,
00374 ...);
00375
00394 U_CAPI void U_EXPORT2
00395 u_vparseMessageWithError(const char *locale,
00396 const UChar *pattern,
00397 int32_t patternLength,
00398 const UChar *source,
00399 int32_t sourceLength,
00400 va_list ap,
00401 UParseError *parseError,
00402 UErrorCode* status);
00403
00404
00409 typedef void* UMessageFormat;
00410
00411
00424 U_CAPI UMessageFormat* U_EXPORT2
00425 umsg_open( const UChar *pattern,
00426 int32_t patternLength,
00427 const char *locale,
00428 UParseError *parseError,
00429 UErrorCode *status);
00430
00437 U_CAPI void U_EXPORT2
00438 umsg_close(UMessageFormat* format);
00439
00448 U_CAPI UMessageFormat U_EXPORT2
00449 umsg_clone(const UMessageFormat *fmt,
00450 UErrorCode *status);
00451
00459 U_CAPI void U_EXPORT2
00460 umsg_setLocale(UMessageFormat *fmt,
00461 const char* locale);
00462
00470 U_CAPI const char* U_EXPORT2
00471 umsg_getLocale(UMessageFormat *fmt);
00472
00485 U_CAPI void U_EXPORT2
00486 umsg_applyPattern( UMessageFormat *fmt,
00487 const UChar* pattern,
00488 int32_t patternLength,
00489 UParseError* parseError,
00490 UErrorCode* status);
00491
00503 U_CAPI int32_t U_EXPORT2
00504 umsg_toPattern(UMessageFormat *fmt,
00505 UChar* result,
00506 int32_t resultLength,
00507 UErrorCode* status);
00508
00524 U_CAPI int32_t U_EXPORT2
00525 umsg_format( UMessageFormat *fmt,
00526 UChar *result,
00527 int32_t resultLength,
00528 UErrorCode *status,
00529 ...);
00530
00546 U_CAPI int32_t U_EXPORT2
00547 umsg_vformat( UMessageFormat *fmt,
00548 UChar *result,
00549 int32_t resultLength,
00550 va_list ap,
00551 UErrorCode *status);
00552
00567 U_CAPI void U_EXPORT2
00568 umsg_parse( UMessageFormat *fmt,
00569 const UChar *source,
00570 int32_t sourceLength,
00571 int32_t *count,
00572 UErrorCode *status,
00573 ...);
00574
00590 U_CAPI void U_EXPORT2
00591 umsg_vparse(UMessageFormat *fmt,
00592 const UChar *source,
00593 int32_t sourceLength,
00594 int32_t *count,
00595 va_list ap,
00596 UErrorCode *status);
00597
00598
00605 U_CAPI const char* U_EXPORT2
00606 umsg_getLocaleByType(const UMessageFormat *fmt,
00607 ULocDataLocaleType type,
00608 UErrorCode* status);
00609
00610 #endif
00611
00612 #endif