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
00108 #ifndef U_HIDE_DRAFT_API
00109 ,
00118 UCURR_NARROW_SYMBOL_NAME
00119 #endif // U_HIDE_DRAFT_API
00120 } UCurrNameStyle;
00121
00122 #if !UCONFIG_NO_SERVICE
00123
00126 typedef const void* UCurrRegistryKey;
00127
00139 U_STABLE UCurrRegistryKey U_EXPORT2
00140 ucurr_register(const UChar* isoCode,
00141 const char* locale,
00142 UErrorCode* status);
00154 U_STABLE UBool U_EXPORT2
00155 ucurr_unregister(UCurrRegistryKey key, UErrorCode* status);
00156 #endif
00157
00175 U_STABLE const UChar* U_EXPORT2
00176 ucurr_getName(const UChar* currency,
00177 const char* locale,
00178 UCurrNameStyle nameStyle,
00179 UBool* isChoiceFormat,
00180 int32_t* len,
00181 UErrorCode* ec);
00182
00199 U_STABLE const UChar* U_EXPORT2
00200 ucurr_getPluralName(const UChar* currency,
00201 const char* locale,
00202 UBool* isChoiceFormat,
00203 const char* pluralCount,
00204 int32_t* len,
00205 UErrorCode* ec);
00206
00217 U_STABLE int32_t U_EXPORT2
00218 ucurr_getDefaultFractionDigits(const UChar* currency,
00219 UErrorCode* ec);
00220
00231 U_STABLE int32_t U_EXPORT2
00232 ucurr_getDefaultFractionDigitsForUsage(const UChar* currency,
00233 const UCurrencyUsage usage,
00234 UErrorCode* ec);
00235
00246 U_STABLE double U_EXPORT2
00247 ucurr_getRoundingIncrement(const UChar* currency,
00248 UErrorCode* ec);
00249
00260 U_STABLE double U_EXPORT2
00261 ucurr_getRoundingIncrementForUsage(const UChar* currency,
00262 const UCurrencyUsage usage,
00263 UErrorCode* ec);
00264
00271 typedef enum UCurrCurrencyType {
00276 UCURR_ALL = INT32_MAX,
00285 UCURR_COMMON = 1,
00293 UCURR_UNCOMMON = 2,
00299 UCURR_DEPRECATED = 4,
00305 UCURR_NON_DEPRECATED = 8
00306 } UCurrCurrencyType;
00307
00317 U_STABLE UEnumeration * U_EXPORT2
00318 ucurr_openISOCurrencies(uint32_t currType, UErrorCode *pErrorCode);
00319
00346 U_STABLE UBool U_EXPORT2
00347 ucurr_isAvailable(const UChar* isoCode,
00348 UDate from,
00349 UDate to,
00350 UErrorCode* errorCode);
00351
00366 U_STABLE int32_t U_EXPORT2
00367 ucurr_countCurrencies(const char* locale,
00368 UDate date,
00369 UErrorCode* ec);
00370
00390 U_STABLE int32_t U_EXPORT2
00391 ucurr_forLocaleAndDate(const char* locale,
00392 UDate date,
00393 int32_t index,
00394 UChar* buff,
00395 int32_t buffCapacity,
00396 UErrorCode* ec);
00397
00414 U_STABLE UEnumeration* U_EXPORT2
00415 ucurr_getKeywordValuesForLocale(const char* key,
00416 const char* locale,
00417 UBool commonlyUsed,
00418 UErrorCode* status);
00419
00429 U_STABLE int32_t U_EXPORT2
00430 ucurr_getNumericCode(const UChar* currency);
00431
00432 #endif
00433
00434 #endif