ICU 54.1 54.1

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files

- File List
- Globals

All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
umsg.h
Go to the documentation of this file.
1 /********************************************************************
2 * COPYRIGHT:
3 * Copyright (c) 1997-2011, International Business Machines Corporation and
4 * others. All Rights Reserved.
5 * Copyright (C) 2010 , Yahoo! Inc.
6 ********************************************************************
7 *
8 * file name: umsg.h
9 * encoding: US-ASCII
10 * tab size: 8 (not used)
11 * indentation:4
12 *
13 * Change history:
14 *
15 * 08/5/2001 Ram Added C wrappers for C++ API.
16 ********************************************************************/
17
18 #ifndef UMSG_H
19 #define UMSG_H
20
21 #include "unicode/utypes.h"
22
23 #if !UCONFIG_NO_FORMATTING
24
25 #include "unicode/localpointer.h"
26 #include "unicode/uloc.h"
27 #include "unicode/parseerr.h"
28 #include <stdarg.h>
29
176 U_STABLE int32_t U_EXPORT2
177 u_formatMessage(const char *locale,
178 const UChar *pattern,
179 int32_t patternLength,
180 UChar *result,
181 int32_t resultLength,
182 UErrorCode *status,
183 ...);
184
203 U_STABLE int32_t U_EXPORT2
204 u_vformatMessage( const char *locale,
205 const UChar *pattern,
206 int32_t patternLength,
207 UChar *result,
208 int32_t resultLength,
209 va_list ap,
210 UErrorCode *status);
211
228 U_STABLE void U_EXPORT2
229 u_parseMessage( const char *locale,
230 const UChar *pattern,
231 int32_t patternLength,
232 const UChar *source,
233 int32_t sourceLength,
234 UErrorCode *status,
235 ...);
236
253 U_STABLE void U_EXPORT2
254 u_vparseMessage(const char *locale,
255 const UChar *pattern,
256 int32_t patternLength,
257 const UChar *source,
258 int32_t sourceLength,
259 va_list ap,
260 UErrorCode *status);
261
282 U_STABLE int32_t U_EXPORT2
283 u_formatMessageWithError( const char *locale,
284 const UChar *pattern,
285 int32_t patternLength,
286 UChar *result,
287 int32_t resultLength,
288 UParseError *parseError,
289 UErrorCode *status,
290 ...);
291
311 U_STABLE int32_t U_EXPORT2
312 u_vformatMessageWithError( const char *locale,
313 const UChar *pattern,
314 int32_t patternLength,
315 UChar *result,
316 int32_t resultLength,
317 UParseError* parseError,
318 va_list ap,
319 UErrorCode *status);
320
339 U_STABLE void U_EXPORT2
340 u_parseMessageWithError(const char *locale,
341 const UChar *pattern,
342 int32_t patternLength,
343 const UChar *source,
344 int32_t sourceLength,
345 UParseError *parseError,
346 UErrorCode *status,
347 ...);
348
367 U_STABLE void U_EXPORT2
368 u_vparseMessageWithError(const char *locale,
369 const UChar *pattern,
370 int32_t patternLength,
371 const UChar *source,
372 int32_t sourceLength,
373 va_list ap,
374 UParseError *parseError,
375 UErrorCode* status);
376
377 /*----------------------- New experimental API --------------------------- */
382 typedef void* UMessageFormat;
383
384
397 U_STABLE UMessageFormat* U_EXPORT2
398 umsg_open( const UChar *pattern,
399 int32_t patternLength,
400 const char *locale,
401 UParseError *parseError,
402 UErrorCode *status);
403
410 U_STABLE void U_EXPORT2
411 umsg_close(UMessageFormat* format);
412
413 #if U_SHOW_CPLUSPLUS_API
414
415 U_NAMESPACE_BEGIN
416
426 U_DEFINE_LOCAL_OPEN_POINTER(LocalUMessageFormatPointer, UMessageFormat, umsg_close);
427
428 U_NAMESPACE_END
429
430 #endif
431
440 U_STABLE UMessageFormat U_EXPORT2
441 umsg_clone(const UMessageFormat *fmt,
442 UErrorCode *status);
443
451 U_STABLE void U_EXPORT2
452 umsg_setLocale(UMessageFormat *fmt,
453 const char* locale);
454
462 U_STABLE const char* U_EXPORT2
463 umsg_getLocale(const UMessageFormat *fmt);
464
477 U_STABLE void U_EXPORT2
478 umsg_applyPattern( UMessageFormat *fmt,
479 const UChar* pattern,
480 int32_t patternLength,
481 UParseError* parseError,
482 UErrorCode* status);
483
495 U_STABLE int32_t U_EXPORT2
496 umsg_toPattern(const UMessageFormat *fmt,
497 UChar* result,
498 int32_t resultLength,
499 UErrorCode* status);
500
516 U_STABLE int32_t U_EXPORT2
517 umsg_format( const UMessageFormat *fmt,
518 UChar *result,
519 int32_t resultLength,
520 UErrorCode *status,
521 ...);
522
538 U_STABLE int32_t U_EXPORT2
539 umsg_vformat( const UMessageFormat *fmt,
540 UChar *result,
541 int32_t resultLength,
542 va_list ap,
543 UErrorCode *status);
544
559 U_STABLE void U_EXPORT2
560 umsg_parse( const UMessageFormat *fmt,
561 const UChar *source,
562 int32_t sourceLength,
563 int32_t *count,
564 UErrorCode *status,
565 ...);
566
582 U_STABLE void U_EXPORT2
583 umsg_vparse(const UMessageFormat *fmt,
584 const UChar *source,
585 int32_t sourceLength,
586 int32_t *count,
587 va_list ap,
588 UErrorCode *status);
589
590
614 U_STABLE int32_t U_EXPORT2
615 umsg_autoQuoteApostrophe(const UChar* pattern,
616 int32_t patternLength,
617 UChar* dest,
618 int32_t destCapacity,
619 UErrorCode* ec);
620
621 #endif /* #if !UCONFIG_NO_FORMATTING */
622
623 #endif