ICU 4.8.1.1  4.8.1.1
ucurr.h
Go to the documentation of this file.
00001 /*
00002 **********************************************************************
00003 * Copyright (c) 2002-2011, International Business Machines
00004 * Corporation and others.  All Rights Reserved.
00005 **********************************************************************
00006 */
00007 #ifndef _UCURR_H_
00008 #define _UCURR_H_
00009 
00010 #include "unicode/utypes.h"
00011 #include "unicode/uenum.h"
00012 
00018 #if !UCONFIG_NO_FORMATTING
00019 
00052 U_STABLE int32_t U_EXPORT2
00053 ucurr_forLocale(const char* locale,
00054                 UChar* buff,
00055                 int32_t buffCapacity,
00056                 UErrorCode* ec);
00057 
00064 typedef enum UCurrNameStyle {
00070     UCURR_SYMBOL_NAME,
00071 
00077     UCURR_LONG_NAME
00078 } UCurrNameStyle;
00079 
00080 #if !UCONFIG_NO_SERVICE
00081 
00084 typedef const void* UCurrRegistryKey;
00085 
00097 U_STABLE UCurrRegistryKey U_EXPORT2
00098 ucurr_register(const UChar* isoCode, 
00099                    const char* locale,  
00100                    UErrorCode* status);
00112 U_STABLE UBool U_EXPORT2
00113 ucurr_unregister(UCurrRegistryKey key, UErrorCode* status);
00114 #endif /* UCONFIG_NO_SERVICE */
00115 
00133 U_STABLE const UChar* U_EXPORT2
00134 ucurr_getName(const UChar* currency,
00135               const char* locale,
00136               UCurrNameStyle nameStyle,
00137               UBool* isChoiceFormat,
00138               int32_t* len,
00139               UErrorCode* ec);
00140 
00157 U_STABLE const UChar* U_EXPORT2
00158 ucurr_getPluralName(const UChar* currency,
00159                     const char* locale,
00160                     UBool* isChoiceFormat,
00161                     const char* pluralCount,
00162                     int32_t* len,
00163                     UErrorCode* ec);
00164 
00174 U_STABLE int32_t U_EXPORT2
00175 ucurr_getDefaultFractionDigits(const UChar* currency,
00176                                UErrorCode* ec);
00177 
00187 U_STABLE double U_EXPORT2
00188 ucurr_getRoundingIncrement(const UChar* currency,
00189                            UErrorCode* ec);
00190 
00197 typedef enum UCurrCurrencyType {
00202     UCURR_ALL = INT32_MAX,
00211     UCURR_COMMON = 1,
00219     UCURR_UNCOMMON = 2,
00225     UCURR_DEPRECATED = 4,
00231     UCURR_NON_DEPRECATED = 8
00232 } UCurrCurrencyType;
00233 
00243 U_STABLE UEnumeration * U_EXPORT2
00244 ucurr_openISOCurrencies(uint32_t currType, UErrorCode *pErrorCode);
00245 
00272 U_DRAFT UBool U_EXPORT2
00273 ucurr_isAvailable(const UChar* isoCode, 
00274              UDate from, 
00275              UDate to, 
00276              UErrorCode* errorCode);
00277 
00278 
00293 U_STABLE int32_t U_EXPORT2
00294 ucurr_countCurrencies(const char* locale, 
00295                  UDate date, 
00296                  UErrorCode* ec); 
00297 
00317 U_STABLE int32_t U_EXPORT2 
00318 ucurr_forLocaleAndDate(const char* locale, 
00319                 UDate date, 
00320                 int32_t index,
00321                 UChar* buff, 
00322                 int32_t buffCapacity, 
00323                 UErrorCode* ec); 
00324 
00341 U_STABLE UEnumeration* U_EXPORT2
00342 ucurr_getKeywordValuesForLocale(const char* key,
00343                                 const char* locale,
00344                                 UBool commonlyUsed,
00345                                 UErrorCode* status);
00346 
00347 #endif /* #if !UCONFIG_NO_FORMATTING */
00348 
00349 #endif
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Defines