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
00033 #if !UCONFIG_NO_FORMATTING
00034
00039 enum UCurrencyUsage {
00046 UCURR_USAGE_STANDARD=0,
00052 UCURR_USAGE_CASH=1,
00057 UCURR_USAGE_COUNT=2
00058 };
00059 typedef enum UCurrencyUsage UCurrencyUsage;
00060
00076 U_STABLE int32_t U_EXPORT2
00077 ucurr_forLocale(const char* locale,
00078 UChar* buff,
00079 int32_t buffCapacity,
00080 UErrorCode* ec);
00081
00088 typedef enum UCurrNameStyle {
00094 UCURR_SYMBOL_NAME,
00095
00101 UCURR_LONG_NAME
00102 } UCurrNameStyle;
00103
00104 #if !UCONFIG_NO_SERVICE
00105
00108 typedef const void* UCurrRegistryKey;
00109
00121 U_STABLE UCurrRegistryKey U_EXPORT2
00122 ucurr_register(const UChar* isoCode,
00123 const char* locale,
00124 UErrorCode* status);
00136 U_STABLE UBool U_EXPORT2
00137 ucurr_unregister(UCurrRegistryKey key, UErrorCode* status);
00138 #endif
00139
00157 U_STABLE const UChar* U_EXPORT2
00158 ucurr_getName(const UChar* currency,
00159 const char* locale,
00160 UCurrNameStyle nameStyle,
00161 UBool* isChoiceFormat,
00162 int32_t* len,
00163 UErrorCode* ec);
00164
00181 U_STABLE const UChar* U_EXPORT2
00182 ucurr_getPluralName(const UChar* currency,
00183 const char* locale,
00184 UBool* isChoiceFormat,
00185 const char* pluralCount,
00186 int32_t* len,
00187 UErrorCode* ec);
00188
00199 U_STABLE int32_t U_EXPORT2
00200 ucurr_getDefaultFractionDigits(const UChar* currency,
00201 UErrorCode* ec);
00202
00213 U_STABLE int32_t U_EXPORT2
00214 ucurr_getDefaultFractionDigitsForUsage(const UChar* currency,
00215 const UCurrencyUsage usage,
00216 UErrorCode* ec);
00217
00228 U_STABLE double U_EXPORT2
00229 ucurr_getRoundingIncrement(const UChar* currency,
00230 UErrorCode* ec);
00231
00242 U_STABLE double U_EXPORT2
00243 ucurr_getRoundingIncrementForUsage(const UChar* currency,
00244 const UCurrencyUsage usage,
00245 UErrorCode* ec);
00246
00253 typedef enum UCurrCurrencyType {
00258 UCURR_ALL = INT32_MAX,
00267 UCURR_COMMON = 1,
00275 UCURR_UNCOMMON = 2,
00281 UCURR_DEPRECATED = 4,
00287 UCURR_NON_DEPRECATED = 8
00288 } UCurrCurrencyType;
00289
00299 U_STABLE UEnumeration * U_EXPORT2
00300 ucurr_openISOCurrencies(uint32_t currType, UErrorCode *pErrorCode);
00301
00328 U_STABLE UBool U_EXPORT2
00329 ucurr_isAvailable(const UChar* isoCode,
00330 UDate from,
00331 UDate to,
00332 UErrorCode* errorCode);
00333
00348 U_STABLE int32_t U_EXPORT2
00349 ucurr_countCurrencies(const char* locale,
00350 UDate date,
00351 UErrorCode* ec);
00352
00372 U_STABLE int32_t U_EXPORT2
00373 ucurr_forLocaleAndDate(const char* locale,
00374 UDate date,
00375 int32_t index,
00376 UChar* buff,
00377 int32_t buffCapacity,
00378 UErrorCode* ec);
00379
00396 U_STABLE UEnumeration* U_EXPORT2
00397 ucurr_getKeywordValuesForLocale(const char* key,
00398 const char* locale,
00399 UBool commonlyUsed,
00400 UErrorCode* status);
00401
00411 U_STABLE int32_t U_EXPORT2
00412 ucurr_getNumericCode(const UChar* currency);
00413
00414 #endif
00415
00416 #endif