00001
00002
00003
00004
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
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_STABLE UBool U_EXPORT2
00273 ucurr_isAvailable(const UChar* isoCode,
00274 UDate from,
00275 UDate to,
00276 UErrorCode* errorCode);
00277
00292 U_STABLE int32_t U_EXPORT2
00293 ucurr_countCurrencies(const char* locale,
00294 UDate date,
00295 UErrorCode* ec);
00296
00316 U_STABLE int32_t U_EXPORT2
00317 ucurr_forLocaleAndDate(const char* locale,
00318 UDate date,
00319 int32_t index,
00320 UChar* buff,
00321 int32_t buffCapacity,
00322 UErrorCode* ec);
00323
00340 U_STABLE UEnumeration* U_EXPORT2
00341 ucurr_getKeywordValuesForLocale(const char* key,
00342 const char* locale,
00343 UBool commonlyUsed,
00344 UErrorCode* status);
00345
00346 #ifndef U_HIDE_DRAFT_API
00347
00356 U_DRAFT int32_t U_EXPORT2
00357 ucurr_getNumericCode(const UChar* currency);
00358 #endif
00359
00360 #endif
00361
00362 #endif