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 };
00063 typedef enum UCurrencyUsage UCurrencyUsage;
00064
00080 U_STABLE int32_t U_EXPORT2
00081 ucurr_forLocale(const char* locale,
00082 UChar* buff,
00083 int32_t buffCapacity,
00084 UErrorCode* ec);
00085
00092 typedef enum UCurrNameStyle {
00098 UCURR_SYMBOL_NAME,
00099
00105 UCURR_LONG_NAME
00106 } UCurrNameStyle;
00107
00108 #if !UCONFIG_NO_SERVICE
00109
00112 typedef const void* UCurrRegistryKey;
00113
00125 U_STABLE UCurrRegistryKey U_EXPORT2
00126 ucurr_register(const UChar* isoCode,
00127 const char* locale,
00128 UErrorCode* status);
00140 U_STABLE UBool U_EXPORT2
00141 ucurr_unregister(UCurrRegistryKey key, UErrorCode* status);
00142 #endif
00143
00161 U_STABLE const UChar* U_EXPORT2
00162 ucurr_getName(const UChar* currency,
00163 const char* locale,
00164 UCurrNameStyle nameStyle,
00165 UBool* isChoiceFormat,
00166 int32_t* len,
00167 UErrorCode* ec);
00168
00185 U_STABLE const UChar* U_EXPORT2
00186 ucurr_getPluralName(const UChar* currency,
00187 const char* locale,
00188 UBool* isChoiceFormat,
00189 const char* pluralCount,
00190 int32_t* len,
00191 UErrorCode* ec);
00192
00203 U_STABLE int32_t U_EXPORT2
00204 ucurr_getDefaultFractionDigits(const UChar* currency,
00205 UErrorCode* ec);
00206
00217 U_STABLE int32_t U_EXPORT2
00218 ucurr_getDefaultFractionDigitsForUsage(const UChar* currency,
00219 const UCurrencyUsage usage,
00220 UErrorCode* ec);
00221
00232 U_STABLE double U_EXPORT2
00233 ucurr_getRoundingIncrement(const UChar* currency,
00234 UErrorCode* ec);
00235
00246 U_STABLE double U_EXPORT2
00247 ucurr_getRoundingIncrementForUsage(const UChar* currency,
00248 const UCurrencyUsage usage,
00249 UErrorCode* ec);
00250
00257 typedef enum UCurrCurrencyType {
00262 UCURR_ALL = INT32_MAX,
00271 UCURR_COMMON = 1,
00279 UCURR_UNCOMMON = 2,
00285 UCURR_DEPRECATED = 4,
00291 UCURR_NON_DEPRECATED = 8
00292 } UCurrCurrencyType;
00293
00303 U_STABLE UEnumeration * U_EXPORT2
00304 ucurr_openISOCurrencies(uint32_t currType, UErrorCode *pErrorCode);
00305
00332 U_STABLE UBool U_EXPORT2
00333 ucurr_isAvailable(const UChar* isoCode,
00334 UDate from,
00335 UDate to,
00336 UErrorCode* errorCode);
00337
00352 U_STABLE int32_t U_EXPORT2
00353 ucurr_countCurrencies(const char* locale,
00354 UDate date,
00355 UErrorCode* ec);
00356
00376 U_STABLE int32_t U_EXPORT2
00377 ucurr_forLocaleAndDate(const char* locale,
00378 UDate date,
00379 int32_t index,
00380 UChar* buff,
00381 int32_t buffCapacity,
00382 UErrorCode* ec);
00383
00400 U_STABLE UEnumeration* U_EXPORT2
00401 ucurr_getKeywordValuesForLocale(const char* key,
00402 const char* locale,
00403 UBool commonlyUsed,
00404 UErrorCode* status);
00405
00415 U_STABLE int32_t U_EXPORT2
00416 ucurr_getNumericCode(const UChar* currency);
00417
00418 #endif
00419
00420 #endif