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/localpointer.h"
00026 #include "unicode/uloc.h"
00027 #include "unicode/parseerr.h"
00028 #include <stdarg.h>
00029
00176 U_STABLE int32_t U_EXPORT2
00177 u_formatMessage(const char *locale,
00178 const UChar *pattern,
00179 int32_t patternLength,
00180 UChar *result,
00181 int32_t resultLength,
00182 UErrorCode *status,
00183 ...);
00184
00203 U_STABLE int32_t U_EXPORT2
00204 u_vformatMessage( const char *locale,
00205 const UChar *pattern,
00206 int32_t patternLength,
00207 UChar *result,
00208 int32_t resultLength,
00209 va_list ap,
00210 UErrorCode *status);
00211
00228 U_STABLE void U_EXPORT2
00229 u_parseMessage( const char *locale,
00230 const UChar *pattern,
00231 int32_t patternLength,
00232 const UChar *source,
00233 int32_t sourceLength,
00234 UErrorCode *status,
00235 ...);
00236
00253 U_STABLE void U_EXPORT2
00254 u_vparseMessage(const char *locale,
00255 const UChar *pattern,
00256 int32_t patternLength,
00257 const UChar *source,
00258 int32_t sourceLength,
00259 va_list ap,
00260 UErrorCode *status);
00261
00282 U_STABLE int32_t U_EXPORT2
00283 u_formatMessageWithError( const char *locale,
00284 const UChar *pattern,
00285 int32_t patternLength,
00286 UChar *result,
00287 int32_t resultLength,
00288 UParseError *parseError,
00289 UErrorCode *status,
00290 ...);
00291
00311 U_STABLE int32_t U_EXPORT2
00312 u_vformatMessageWithError( const char *locale,
00313 const UChar *pattern,
00314 int32_t patternLength,
00315 UChar *result,
00316 int32_t resultLength,
00317 UParseError* parseError,
00318 va_list ap,
00319 UErrorCode *status);
00320
00339 U_STABLE void U_EXPORT2
00340 u_parseMessageWithError(const char *locale,
00341 const UChar *pattern,
00342 int32_t patternLength,
00343 const UChar *source,
00344 int32_t sourceLength,
00345 UParseError *parseError,
00346 UErrorCode *status,
00347 ...);
00348
00367 U_STABLE void U_EXPORT2
00368 u_vparseMessageWithError(const char *locale,
00369 const UChar *pattern,
00370 int32_t patternLength,
00371 const UChar *source,
00372 int32_t sourceLength,
00373 va_list ap,
00374 UParseError *parseError,
00375 UErrorCode* status);
00376
00377
00382 typedef void* UMessageFormat;
00383
00384
00397 U_STABLE UMessageFormat* U_EXPORT2
00398 umsg_open( const UChar *pattern,
00399 int32_t patternLength,
00400 const char *locale,
00401 UParseError *parseError,
00402 UErrorCode *status);
00403
00410 U_STABLE void U_EXPORT2
00411 umsg_close(UMessageFormat* format);
00412
00413 #if U_SHOW_CPLUSPLUS_API
00414
00415 U_NAMESPACE_BEGIN
00416
00426 U_DEFINE_LOCAL_OPEN_POINTER(LocalUMessageFormatPointer, UMessageFormat, umsg_close);
00427
00428 U_NAMESPACE_END
00429
00430 #endif
00431
00440 U_STABLE UMessageFormat U_EXPORT2
00441 umsg_clone(const UMessageFormat *fmt,
00442 UErrorCode *status);
00443
00451 U_STABLE void U_EXPORT2
00452 umsg_setLocale(UMessageFormat *fmt,
00453 const char* locale);
00454
00462 U_STABLE const char* U_EXPORT2
00463 umsg_getLocale(const UMessageFormat *fmt);
00464
00477 U_STABLE void U_EXPORT2
00478 umsg_applyPattern( UMessageFormat *fmt,
00479 const UChar* pattern,
00480 int32_t patternLength,
00481 UParseError* parseError,
00482 UErrorCode* status);
00483
00495 U_STABLE int32_t U_EXPORT2
00496 umsg_toPattern(const UMessageFormat *fmt,
00497 UChar* result,
00498 int32_t resultLength,
00499 UErrorCode* status);
00500
00516 U_STABLE int32_t U_EXPORT2
00517 umsg_format( const UMessageFormat *fmt,
00518 UChar *result,
00519 int32_t resultLength,
00520 UErrorCode *status,
00521 ...);
00522
00538 U_STABLE int32_t U_EXPORT2
00539 umsg_vformat( const UMessageFormat *fmt,
00540 UChar *result,
00541 int32_t resultLength,
00542 va_list ap,
00543 UErrorCode *status);
00544
00559 U_STABLE void U_EXPORT2
00560 umsg_parse( const UMessageFormat *fmt,
00561 const UChar *source,
00562 int32_t sourceLength,
00563 int32_t *count,
00564 UErrorCode *status,
00565 ...);
00566
00582 U_STABLE void U_EXPORT2
00583 umsg_vparse(const UMessageFormat *fmt,
00584 const UChar *source,
00585 int32_t sourceLength,
00586 int32_t *count,
00587 va_list ap,
00588 UErrorCode *status);
00589
00590
00614 U_STABLE int32_t U_EXPORT2
00615 umsg_autoQuoteApostrophe(const UChar* pattern,
00616 int32_t patternLength,
00617 UChar* dest,
00618 int32_t destCapacity,
00619 UErrorCode* ec);
00620
00621 #endif
00622
00623 #endif