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/parseerr.h"
00026 #include <stdarg.h>
00202 U_CAPI int32_t U_EXPORT2
00203 u_formatMessage(const char *locale,
00204 const UChar *pattern,
00205 int32_t patternLength,
00206 UChar *result,
00207 int32_t resultLength,
00208 UErrorCode *status,
00209 ...);
00210
00229 U_CAPI int32_t U_EXPORT2
00230 u_vformatMessage( const char *locale,
00231 const UChar *pattern,
00232 int32_t patternLength,
00233 UChar *result,
00234 int32_t resultLength,
00235 va_list ap,
00236 UErrorCode *status);
00237
00254 U_CAPI void U_EXPORT2
00255 u_parseMessage( const char *locale,
00256 const UChar *pattern,
00257 int32_t patternLength,
00258 const UChar *source,
00259 int32_t sourceLength,
00260 UErrorCode *status,
00261 ...);
00262
00279 U_CAPI void U_EXPORT2
00280 u_vparseMessage(const char *locale,
00281 const UChar *pattern,
00282 int32_t patternLength,
00283 const UChar *source,
00284 int32_t sourceLength,
00285 va_list ap,
00286 UErrorCode *status);
00287
00308 U_CAPI int32_t U_EXPORT2
00309 u_formatMessageWithError( const char *locale,
00310 const UChar *pattern,
00311 int32_t patternLength,
00312 UChar *result,
00313 int32_t resultLength,
00314 UParseError *parseError,
00315 UErrorCode *status,
00316 ...);
00317
00337 U_CAPI int32_t U_EXPORT2
00338 u_vformatMessageWithError( const char *locale,
00339 const UChar *pattern,
00340 int32_t patternLength,
00341 UChar *result,
00342 int32_t resultLength,
00343 UParseError* parseError,
00344 va_list ap,
00345 UErrorCode *status);
00346
00365 U_CAPI void U_EXPORT2
00366 u_parseMessageWithError(const char *locale,
00367 const UChar *pattern,
00368 int32_t patternLength,
00369 const UChar *source,
00370 int32_t sourceLength,
00371 UParseError *parseError,
00372 UErrorCode *status,
00373 ...);
00374
00393 U_CAPI void U_EXPORT2
00394 u_vparseMessageWithError(const char *locale,
00395 const UChar *pattern,
00396 int32_t patternLength,
00397 const UChar *source,
00398 int32_t sourceLength,
00399 va_list ap,
00400 UParseError *parseError,
00401 UErrorCode* status);
00402
00403
00408 typedef void* UMessageFormat;
00409
00410
00423 U_CAPI UMessageFormat* U_EXPORT2
00424 umsg_open( const UChar *pattern,
00425 int32_t patternLength,
00426 const char *locale,
00427 UParseError *parseError,
00428 UErrorCode *status);
00429
00436 U_CAPI void U_EXPORT2
00437 umsg_close(UMessageFormat* format);
00438
00447 U_CAPI UMessageFormat U_EXPORT2
00448 umsg_clone(const UMessageFormat *fmt,
00449 UErrorCode *status);
00450
00458 U_CAPI void U_EXPORT2
00459 umsg_setLocale(UMessageFormat *fmt,
00460 const char* locale);
00461
00469 U_CAPI const char* U_EXPORT2
00470 umsg_getLocale(UMessageFormat *fmt);
00471
00484 U_CAPI void U_EXPORT2
00485 umsg_applyPattern( UMessageFormat *fmt,
00486 const UChar* pattern,
00487 int32_t patternLength,
00488 UParseError* parseError,
00489 UErrorCode* status);
00490
00502 U_CAPI int32_t U_EXPORT2
00503 umsg_toPattern(UMessageFormat *fmt,
00504 UChar* result,
00505 int32_t resultLength,
00506 UErrorCode* status);
00507
00523 U_CAPI int32_t U_EXPORT2
00524 umsg_format( UMessageFormat *fmt,
00525 UChar *result,
00526 int32_t resultLength,
00527 UErrorCode *status,
00528 ...);
00529
00545 U_CAPI int32_t U_EXPORT2
00546 umsg_vformat( UMessageFormat *fmt,
00547 UChar *result,
00548 int32_t resultLength,
00549 va_list ap,
00550 UErrorCode *status);
00551
00566 U_CAPI void U_EXPORT2
00567 umsg_parse( UMessageFormat *fmt,
00568 const UChar *source,
00569 int32_t sourceLength,
00570 int32_t *count,
00571 UErrorCode *status,
00572 ...);
00573
00589 U_CAPI void U_EXPORT2
00590 umsg_vparse(UMessageFormat *fmt,
00591 const UChar *source,
00592 int32_t sourceLength,
00593 int32_t *count,
00594 va_list ap,
00595 UErrorCode *status);
00596
00597 #endif
00598
00599 #endif