00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef _UCURR_H_
00010 #define _UCURR_H_
00011
00012 #include "unicode/utypes.h"
00013 #include "unicode/uenum.h"
00014
00035 #if !UCONFIG_NO_FORMATTING
00036
00041 enum UCurrencyUsage {
00048 UCURR_USAGE_STANDARD=0,
00054 UCURR_USAGE_CASH=1,
00055 #ifndef U_HIDE_DEPRECATED_API
00056
00060 UCURR_USAGE_COUNT=2
00061 #endif // U_HIDE_DEPRECATED_API
00062 };
00064 typedef enum UCurrencyUsage UCurrencyUsage;
00065
00081 U_STABLE int32_t U_EXPORT2
00082 ucurr_forLocale(const char* locale,
00083 UChar* buff,
00084 int32_t buffCapacity,
00085 UErrorCode* ec);
00086
00093 typedef enum UCurrNameStyle {
00099 UCURR_SYMBOL_NAME,
00100
00106 UCURR_LONG_NAME,
00107
00116 UCURR_NARROW_SYMBOL_NAME
00117 } UCurrNameStyle;
00118
00119 #if !UCONFIG_NO_SERVICE
00120
00123 typedef const void* UCurrRegistryKey;
00124
00136 U_STABLE UCurrRegistryKey U_EXPORT2
00137 ucurr_register(const UChar* isoCode,
00138 const char* locale,
00139 UErrorCode* status);
00151 U_STABLE UBool U_EXPORT2
00152 ucurr_unregister(UCurrRegistryKey key, UErrorCode* status);
00153 #endif
00154
00172 U_STABLE const UChar* U_EXPORT2
00173 ucurr_getName(const UChar* currency,
00174 const char* locale,
00175 UCurrNameStyle nameStyle,
00176 UBool* isChoiceFormat,
00177 int32_t* len,
00178 UErrorCode* ec);
00179
00196 U_STABLE const UChar* U_EXPORT2
00197 ucurr_getPluralName(const UChar* currency,
00198 const char* locale,
00199 UBool* isChoiceFormat,
00200 const char* pluralCount,
00201 int32_t* len,
00202 UErrorCode* ec);
00203
00221 U_STABLE int32_t U_EXPORT2
00222 ucurr_getDefaultFractionDigits(const UChar* currency,
00223 UErrorCode* ec);
00224
00242 U_STABLE int32_t U_EXPORT2
00243 ucurr_getDefaultFractionDigitsForUsage(const UChar* currency,
00244 const UCurrencyUsage usage,
00245 UErrorCode* ec);
00246
00257 U_STABLE double U_EXPORT2
00258 ucurr_getRoundingIncrement(const UChar* currency,
00259 UErrorCode* ec);
00260
00271 U_STABLE double U_EXPORT2
00272 ucurr_getRoundingIncrementForUsage(const UChar* currency,
00273 const UCurrencyUsage usage,
00274 UErrorCode* ec);
00275
00282 typedef enum UCurrCurrencyType {
00287 UCURR_ALL = INT32_MAX,
00296 UCURR_COMMON = 1,
00304 UCURR_UNCOMMON = 2,
00310 UCURR_DEPRECATED = 4,
00316 UCURR_NON_DEPRECATED = 8
00317 } UCurrCurrencyType;
00318
00328 U_STABLE UEnumeration * U_EXPORT2
00329 ucurr_openISOCurrencies(uint32_t currType, UErrorCode *pErrorCode);
00330
00357 U_STABLE UBool U_EXPORT2
00358 ucurr_isAvailable(const UChar* isoCode,
00359 UDate from,
00360 UDate to,
00361 UErrorCode* errorCode);
00362
00377 U_STABLE int32_t U_EXPORT2
00378 ucurr_countCurrencies(const char* locale,
00379 UDate date,
00380 UErrorCode* ec);
00381
00401 U_STABLE int32_t U_EXPORT2
00402 ucurr_forLocaleAndDate(const char* locale,
00403 UDate date,
00404 int32_t index,
00405 UChar* buff,
00406 int32_t buffCapacity,
00407 UErrorCode* ec);
00408
00425 U_STABLE UEnumeration* U_EXPORT2
00426 ucurr_getKeywordValuesForLocale(const char* key,
00427 const char* locale,
00428 UBool commonlyUsed,
00429 UErrorCode* status);
00430
00440 U_STABLE int32_t U_EXPORT2
00441 ucurr_getNumericCode(const UChar* currency);
00442
00443 #endif
00444
00445 #endif