00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef UMSG_H
00020 #define UMSG_H
00021
00022 #include "unicode/utypes.h"
00023
00024 #if !UCONFIG_NO_FORMATTING
00025
00026 #include "unicode/uloc.h"
00027 #include "unicode/parseerr.h"
00028 #include <stdarg.h>
00219 U_STABLE int32_t U_EXPORT2
00220 u_formatMessage(const char *locale,
00221 const UChar *pattern,
00222 int32_t patternLength,
00223 UChar *result,
00224 int32_t resultLength,
00225 UErrorCode *status,
00226 ...);
00227
00246 U_STABLE int32_t U_EXPORT2
00247 u_vformatMessage( const char *locale,
00248 const UChar *pattern,
00249 int32_t patternLength,
00250 UChar *result,
00251 int32_t resultLength,
00252 va_list ap,
00253 UErrorCode *status);
00254
00271 U_STABLE void U_EXPORT2
00272 u_parseMessage( const char *locale,
00273 const UChar *pattern,
00274 int32_t patternLength,
00275 const UChar *source,
00276 int32_t sourceLength,
00277 UErrorCode *status,
00278 ...);
00279
00296 U_STABLE void U_EXPORT2
00297 u_vparseMessage(const char *locale,
00298 const UChar *pattern,
00299 int32_t patternLength,
00300 const UChar *source,
00301 int32_t sourceLength,
00302 va_list ap,
00303 UErrorCode *status);
00304
00325 U_STABLE int32_t U_EXPORT2
00326 u_formatMessageWithError( const char *locale,
00327 const UChar *pattern,
00328 int32_t patternLength,
00329 UChar *result,
00330 int32_t resultLength,
00331 UParseError *parseError,
00332 UErrorCode *status,
00333 ...);
00334
00354 U_STABLE int32_t U_EXPORT2
00355 u_vformatMessageWithError( const char *locale,
00356 const UChar *pattern,
00357 int32_t patternLength,
00358 UChar *result,
00359 int32_t resultLength,
00360 UParseError* parseError,
00361 va_list ap,
00362 UErrorCode *status);
00363
00382 U_STABLE void U_EXPORT2
00383 u_parseMessageWithError(const char *locale,
00384 const UChar *pattern,
00385 int32_t patternLength,
00386 const UChar *source,
00387 int32_t sourceLength,
00388 UParseError *parseError,
00389 UErrorCode *status,
00390 ...);
00391
00410 U_STABLE void U_EXPORT2
00411 u_vparseMessageWithError(const char *locale,
00412 const UChar *pattern,
00413 int32_t patternLength,
00414 const UChar *source,
00415 int32_t sourceLength,
00416 va_list ap,
00417 UParseError *parseError,
00418 UErrorCode* status);
00419
00420
00425 typedef void* UMessageFormat;
00426
00427
00440 U_STABLE UMessageFormat* U_EXPORT2
00441 umsg_open( const UChar *pattern,
00442 int32_t patternLength,
00443 const char *locale,
00444 UParseError *parseError,
00445 UErrorCode *status);
00446
00453 U_STABLE void U_EXPORT2
00454 umsg_close(UMessageFormat* format);
00455
00464 U_STABLE UMessageFormat U_EXPORT2
00465 umsg_clone(const UMessageFormat *fmt,
00466 UErrorCode *status);
00467
00475 U_STABLE void U_EXPORT2
00476 umsg_setLocale(UMessageFormat *fmt,
00477 const char* locale);
00478
00486 U_STABLE const char* U_EXPORT2
00487 umsg_getLocale(const UMessageFormat *fmt);
00488
00501 U_STABLE void U_EXPORT2
00502 umsg_applyPattern( UMessageFormat *fmt,
00503 const UChar* pattern,
00504 int32_t patternLength,
00505 UParseError* parseError,
00506 UErrorCode* status);
00507
00519 U_STABLE int32_t U_EXPORT2
00520 umsg_toPattern(const UMessageFormat *fmt,
00521 UChar* result,
00522 int32_t resultLength,
00523 UErrorCode* status);
00524
00540 U_STABLE int32_t U_EXPORT2
00541 umsg_format( const UMessageFormat *fmt,
00542 UChar *result,
00543 int32_t resultLength,
00544 UErrorCode *status,
00545 ...);
00546
00562 U_STABLE int32_t U_EXPORT2
00563 umsg_vformat( const UMessageFormat *fmt,
00564 UChar *result,
00565 int32_t resultLength,
00566 va_list ap,
00567 UErrorCode *status);
00568
00583 U_STABLE void U_EXPORT2
00584 umsg_parse( const UMessageFormat *fmt,
00585 const UChar *source,
00586 int32_t sourceLength,
00587 int32_t *count,
00588 UErrorCode *status,
00589 ...);
00590
00606 U_STABLE void U_EXPORT2
00607 umsg_vparse(const UMessageFormat *fmt,
00608 const UChar *source,
00609 int32_t sourceLength,
00610 int32_t *count,
00611 va_list ap,
00612 UErrorCode *status);
00613
00614
00638 U_STABLE int32_t U_EXPORT2
00639 umsg_autoQuoteApostrophe(const UChar* pattern,
00640 int32_t patternLength,
00641 UChar* dest,
00642 int32_t destCapacity,
00643 UErrorCode* ec);
00644
00645 #endif
00646
00647 #endif