00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef URES_H
00023 #define URES_H
00024
00025 #include "unicode/utypes.h"
00026 #include "unicode/uloc.h"
00027
00169 struct UResourceBundle;
00170
00171 typedef struct UResourceBundle UResourceBundle;
00172
00173 typedef enum {
00174 RES_NONE=-1,
00175 RES_STRING=0,
00176 RES_BINARY=1,
00177 RES_TABLE=2,
00178
00179 RES_INT=7,
00180 RES_ARRAY=8,
00181
00182 RES_INT_VECTOR=14,
00183 RES_RESERVED=15
00184 } UResType;
00185
00216 U_CAPI UResourceBundle* U_EXPORT2 ures_open(const char* path,
00217 const char* locale,
00218 UErrorCode* status);
00219
00220
00240 U_CAPI UResourceBundle* U_EXPORT2 ures_openW(const wchar_t* path,
00241 const char* locale,
00242 UErrorCode* status);
00243
00244 U_CAPI UResourceBundle* U_EXPORT2 ures_openU(const UChar* path,
00245 const char* locale,
00246 UErrorCode* status);
00247
00248 #ifdef ICU_URES_USE_DEPRECATES
00249
00265 U_CAPI const UChar* U_EXPORT2 ures_get(const UResourceBundle* resourceBundle,
00266 const char* resourceTag,
00267 UErrorCode* status);
00268
00269
00288 U_CAPI const UChar* U_EXPORT2 ures_getArrayItem(const UResourceBundle* resourceBundle,
00289 const char* resourceTag,
00290 int32_t resourceIndex,
00291 UErrorCode* status);
00292
00293
00313 U_CAPI const UChar* U_EXPORT2 ures_get2dArrayItem(const UResourceBundle* resourceBundle,
00314 const char* resourceTag,
00315 int32_t rowIndex,
00316 int32_t columnIndex,
00317 UErrorCode* status);
00318
00337 U_CAPI const UChar* U_EXPORT2 ures_getTaggedArrayItem(const UResourceBundle* resourceBundle,
00338 const char* resourceTag,
00339 const char* itemTag,
00340 UErrorCode* status);
00341 #endif
00342
00362 U_CAPI int32_t U_EXPORT2 ures_countArrayItems(const UResourceBundle* resourceBundle,
00363 const char* resourceKey,
00364 UErrorCode* err);
00378 U_CAPI void U_EXPORT2 ures_close(UResourceBundle* resourceBundle);
00379
00398 U_CAPI const char* U_EXPORT2 ures_getVersionNumber(const UResourceBundle* resourceBundle);
00399
00400 U_CAPI void U_EXPORT2 ures_getVersion(const UResourceBundle* resB, UVersionInfo versionInfo);
00401
00409 U_CAPI const char* ures_getLocale(const UResourceBundle* resourceBundle, UErrorCode* status);
00410
00411
00413 U_CAPI void ures_openFillIn(UResourceBundle *r, const char* path,
00414 const char* localeID, UErrorCode* status);
00415
00428 U_CAPI const UChar* U_EXPORT2 ures_getString(const UResourceBundle* resourceBundle, int32_t* len,
00429 UErrorCode* status);
00430
00444 U_CAPI const uint8_t* U_EXPORT2 ures_getBinary(const UResourceBundle* resourceBundle, int32_t* len,
00445 UErrorCode* status);
00446
00458 U_CAPI uint32_t U_EXPORT2 ures_getInt(const UResourceBundle* resourceBundle, UErrorCode *status);
00459
00468 U_CAPI int32_t U_EXPORT2 ures_getSize(UResourceBundle *resourceBundle);
00469
00477 U_CAPI UResType U_EXPORT2 ures_getType(UResourceBundle *resourceBundle);
00478
00487 U_CAPI const char * U_EXPORT2 ures_getKey(UResourceBundle *resB);
00488
00489
00490
00491
00492
00499 U_CAPI void U_EXPORT2 ures_resetIterator(UResourceBundle *resourceBundle);
00500
00508 U_CAPI UBool U_EXPORT2 ures_hasNext(UResourceBundle *resourceBundle);
00509
00521 U_CAPI UResourceBundle* U_EXPORT2 ures_getNextResource(UResourceBundle *resourceBundle, UResourceBundle *fillIn, UErrorCode *status);
00522
00534 U_CAPI const UChar* U_EXPORT2 ures_getNextString(UResourceBundle *resourceBundle, int32_t* len, const char ** key, UErrorCode *status);
00535
00547 U_CAPI UResourceBundle* U_EXPORT2 ures_getByIndex(const UResourceBundle *resourceBundle, int32_t indexR, UResourceBundle *fillIn, UErrorCode *status);
00548
00559 U_CAPI const UChar* U_EXPORT2 ures_getStringByIndex(const UResourceBundle *resB, int32_t indexS, int32_t* len, UErrorCode *status);
00560
00573 U_CAPI UResourceBundle* U_EXPORT2 ures_getByKey(const UResourceBundle *resourceBundle, const char* key, UResourceBundle *fillIn, UErrorCode *status);
00574
00586 U_CAPI const UChar* U_EXPORT2 ures_getStringByKey(const UResourceBundle *resB, const char* key, int32_t* len, UErrorCode *status);
00587
00588 U_CFUNC const char* ures_getName(const UResourceBundle* resB);
00589 U_CFUNC const char* ures_getPath(const UResourceBundle* resB);
00590 U_CFUNC const char* ures_getTag(const UResourceBundle* resB);
00591
00592 #endif
00593