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

- File List
- Globals

# umsg.h

Go to the documentation of this file.

    00001 /********************************************************************
    00002  * COPYRIGHT:
    00003  * Copyright (c) 1997-2010, International Business Machines Corporation and
    00004  * others. All Rights Reserved.
    00005  * Copyright (C) 2010 , Yahoo! Inc.
    00006  ********************************************************************
    00007  *
    00008  *   file name:  umsg.h
    00009  *   encoding:   US-ASCII
    00010  *   tab size:   8 (not used)
    00011  *   indentation:4
    00012  *
    00013  *   Change history:
    00014  *
    00015  *   08/5/2001  Ram         Added C wrappers for C++ API.
    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/localpointer.h"
    00027 #include "unicode/uloc.h"
    00028 #include "unicode/parseerr.h"
    00029 #include <stdarg.h>
    00262 U_STABLE int32_t U_EXPORT2
    00263 u_formatMessage(const char  *locale,
    00264                  const UChar *pattern,
    00265                 int32_t     patternLength,
    00266                 UChar       *result,
    00267                 int32_t     resultLength,
    00268                 UErrorCode  *status,
    00269                 ...);
    00270
    00289 U_STABLE int32_t U_EXPORT2
    00290 u_vformatMessage(   const char  *locale,
    00291                     const UChar *pattern,
    00292                     int32_t     patternLength,
    00293                     UChar       *result,
    00294                     int32_t     resultLength,
    00295                     va_list     ap,
    00296                     UErrorCode  *status);
    00297
    00314 U_STABLE void U_EXPORT2
    00315 u_parseMessage( const char   *locale,
    00316                 const UChar  *pattern,
    00317                 int32_t      patternLength,
    00318                 const UChar  *source,
    00319                 int32_t      sourceLength,
    00320                 UErrorCode   *status,
    00321                 ...);
    00322
    00339 U_STABLE void U_EXPORT2
    00340 u_vparseMessage(const char  *locale,
    00341                 const UChar *pattern,
    00342                 int32_t     patternLength,
    00343                 const UChar *source,
    00344                 int32_t     sourceLength,
    00345                 va_list     ap,
    00346                 UErrorCode  *status);
    00347
    00368 U_STABLE int32_t U_EXPORT2
    00369 u_formatMessageWithError(   const char    *locale,
    00370                             const UChar   *pattern,
    00371                             int32_t       patternLength,
    00372                             UChar         *result,
    00373                             int32_t       resultLength,
    00374                             UParseError   *parseError,
    00375                             UErrorCode    *status,
    00376                             ...);
    00377
    00397 U_STABLE int32_t U_EXPORT2
    00398 u_vformatMessageWithError(  const char   *locale,
    00399                             const UChar  *pattern,
    00400                             int32_t      patternLength,
    00401                             UChar        *result,
    00402                             int32_t      resultLength,
    00403                             UParseError* parseError,
    00404                             va_list      ap,
    00405                             UErrorCode   *status);
    00406
    00425 U_STABLE void U_EXPORT2
    00426 u_parseMessageWithError(const char  *locale,
    00427                         const UChar *pattern,
    00428                         int32_t     patternLength,
    00429                         const UChar *source,
    00430                         int32_t     sourceLength,
    00431                         UParseError *parseError,
    00432                         UErrorCode  *status,
    00433                         ...);
    00434
    00453 U_STABLE void U_EXPORT2
    00454 u_vparseMessageWithError(const char  *locale,
    00455                          const UChar *pattern,
    00456                          int32_t     patternLength,
    00457                          const UChar *source,
    00458                          int32_t     sourceLength,
    00459                          va_list     ap,
    00460                          UParseError *parseError,
    00461                          UErrorCode* status);
    00462
    00463 /*----------------------- New experimental API --------------------------- */
    00468 typedef void* UMessageFormat;
    00469
    00470
    00483 U_STABLE UMessageFormat* U_EXPORT2
    00484 umsg_open(  const UChar     *pattern,
    00485             int32_t         patternLength,
    00486             const  char     *locale,
    00487             UParseError     *parseError,
    00488             UErrorCode      *status);
    00489
    00496 U_STABLE void U_EXPORT2
    00497 umsg_close(UMessageFormat* format);
    00498
    00499 #if U_SHOW_CPLUSPLUS_API
    00500
    00501 U_NAMESPACE_BEGIN
    00502
    00512 U_DEFINE_LOCAL_OPEN_POINTER(LocalUMessageFormatPointer, UMessageFormat, umsg_close);
    00513
    00514 U_NAMESPACE_END
    00515
    00516 #endif
    00517
    00526 U_STABLE UMessageFormat U_EXPORT2
    00527 umsg_clone(const UMessageFormat *fmt,
    00528            UErrorCode *status);
    00529
    00537 U_STABLE void  U_EXPORT2
    00538 umsg_setLocale(UMessageFormat *fmt,
    00539                const char* locale);
    00540
    00548 U_STABLE const char*  U_EXPORT2
    00549 umsg_getLocale(const UMessageFormat *fmt);
    00550
    00563 U_STABLE void  U_EXPORT2
    00564 umsg_applyPattern( UMessageFormat *fmt,
    00565                    const UChar* pattern,
    00566                    int32_t patternLength,
    00567                    UParseError* parseError,
    00568                    UErrorCode* status);
    00569
    00581 U_STABLE int32_t  U_EXPORT2
    00582 umsg_toPattern(const UMessageFormat *fmt,
    00583                UChar* result,
    00584                int32_t resultLength,
    00585                UErrorCode* status);
    00586
    00602 U_STABLE int32_t U_EXPORT2
    00603 umsg_format(    const UMessageFormat *fmt,
    00604                 UChar          *result,
    00605                 int32_t        resultLength,
    00606                 UErrorCode     *status,
    00607                 ...);
    00608
    00624 U_STABLE int32_t U_EXPORT2
    00625 umsg_vformat(   const UMessageFormat *fmt,
    00626                 UChar          *result,
    00627                 int32_t        resultLength,
    00628                 va_list        ap,
    00629                 UErrorCode     *status);
    00630
    00645 U_STABLE void U_EXPORT2
    00646 umsg_parse( const UMessageFormat *fmt,
    00647             const UChar    *source,
    00648             int32_t        sourceLength,
    00649             int32_t        *count,
    00650             UErrorCode     *status,
    00651             ...);
    00652
    00668 U_STABLE void U_EXPORT2
    00669 umsg_vparse(const UMessageFormat *fmt,
    00670             const UChar    *source,
    00671             int32_t        sourceLength,
    00672             int32_t        *count,
    00673             va_list        ap,
    00674             UErrorCode     *status);
    00675
    00676
    00700 U_STABLE int32_t U_EXPORT2
    00701 umsg_autoQuoteApostrophe(const UChar* pattern,
    00702                          int32_t patternLength,
    00703                          UChar* dest,
    00704                          int32_t destCapacity,
    00705                          UErrorCode* ec);
    00706
    00707 #endif /* #if !UCONFIG_NO_FORMATTING */
    00708
    00709 #endif

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Defines