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
00197 U_STABLE const UChar* U_EXPORT2
00198 ucurr_getPluralName(const UChar* currency,
00199 const char* locale,
00200 UBool* isChoiceFormat,
00201 const char* pluralCount,
00202 int32_t* len,
00203 UErrorCode* ec);
00204
00222 U_STABLE int32_t U_EXPORT2
00223 ucurr_getDefaultFractionDigits(const UChar* currency,
00224 UErrorCode* ec);
00225
00243 U_STABLE int32_t U_EXPORT2
00244 ucurr_getDefaultFractionDigitsForUsage(const UChar* currency,
00245 const UCurrencyUsage usage,
00246 UErrorCode* ec);
00247
00258 U_STABLE double U_EXPORT2
00259 ucurr_getRoundingIncrement(const UChar* currency,
00260 UErrorCode* ec);
00261
00272 U_STABLE double U_EXPORT2
00273 ucurr_getRoundingIncrementForUsage(const UChar* currency,
00274 const UCurrencyUsage usage,
00275 UErrorCode* ec);
00276
00283 typedef enum UCurrCurrencyType {
00288 UCURR_ALL = INT32_MAX,
00297 UCURR_COMMON = 1,
00305 UCURR_UNCOMMON = 2,
00311 UCURR_DEPRECATED = 4,
00317 UCURR_NON_DEPRECATED = 8
00318 } UCurrCurrencyType;
00319
00329 U_STABLE UEnumeration * U_EXPORT2
00330 ucurr_openISOCurrencies(uint32_t currType, UErrorCode *pErrorCode);
00331
00358 U_STABLE UBool U_EXPORT2
00359 ucurr_isAvailable(const UChar* isoCode,
00360 UDate from,
00361 UDate to,
00362 UErrorCode* errorCode);
00363
00378 U_STABLE int32_t U_EXPORT2
00379 ucurr_countCurrencies(const char* locale,
00380 UDate date,
00381 UErrorCode* ec);
00382
00402 U_STABLE int32_t U_EXPORT2
00403 ucurr_forLocaleAndDate(const char* locale,
00404 UDate date,
00405 int32_t index,
00406 UChar* buff,
00407 int32_t buffCapacity,
00408 UErrorCode* ec);
00409
00426 U_STABLE UEnumeration* U_EXPORT2
00427 ucurr_getKeywordValuesForLocale(const char* key,
00428 const char* locale,
00429 UBool commonlyUsed,
00430 UErrorCode* status);
00431
00441 U_STABLE int32_t U_EXPORT2
00442 ucurr_getNumericCode(const UChar* currency);
00443
00444 #endif
00445
00446 #endif