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
00264 U_CAPI const UChar* U_EXPORT2 ures_get(const UResourceBundle* resourceBundle,
00265 const char* resourceTag,
00266 UErrorCode* status);
00267
00268
00287 U_CAPI const UChar* U_EXPORT2 ures_getArrayItem(const UResourceBundle* resourceBundle,
00288 const char* resourceTag,
00289 int32_t resourceIndex,
00290 UErrorCode* status);
00291
00292
00312 U_CAPI const UChar* U_EXPORT2 ures_get2dArrayItem(const UResourceBundle* resourceBundle,
00313 const char* resourceTag,
00314 int32_t rowIndex,
00315 int32_t columnIndex,
00316 UErrorCode* status);
00317
00336 U_CAPI const UChar* U_EXPORT2 ures_getTaggedArrayItem(const UResourceBundle* resourceBundle,
00337 const char* resourceTag,
00338 const char* itemTag,
00339 UErrorCode* status);
00340
00341
00361 U_CAPI int32_t U_EXPORT2 ures_countArrayItems(const UResourceBundle* resourceBundle,
00362 const char* resourceKey,
00363 UErrorCode* err);
00377 U_CAPI void U_EXPORT2 ures_close(UResourceBundle* resourceBundle);
00378
00397 U_CAPI const char* U_EXPORT2 ures_getVersionNumber(const UResourceBundle* resourceBundle);
00398
00399 U_CAPI void U_EXPORT2 ures_getVersion(const UResourceBundle* resB, UVersionInfo versionInfo);
00400
00408 U_CAPI const char* ures_getLocale(const UResourceBundle* resourceBundle, UErrorCode* status);
00409
00410
00412 U_CAPI void ures_openFillIn(UResourceBundle *r, const char* path,
00413 const char* localeID, UErrorCode* status);
00414
00427 U_CAPI const UChar* U_EXPORT2 ures_getString(const UResourceBundle* resourceBundle, int32_t* len,
00428 UErrorCode* status);
00429
00443 U_CAPI const uint8_t* U_EXPORT2 ures_getBinary(const UResourceBundle* resourceBundle, int32_t* len,
00444 UErrorCode* status);
00445
00457 U_CAPI uint32_t U_EXPORT2 ures_getInt(const UResourceBundle* resourceBundle, UErrorCode *status);
00458
00467 U_CAPI int32_t U_EXPORT2 ures_getSize(UResourceBundle *resourceBundle);
00468
00476 U_CAPI UResType U_EXPORT2 ures_getType(UResourceBundle *resourceBundle);
00477
00486 U_CAPI const char * U_EXPORT2 ures_getKey(UResourceBundle *resB);
00487
00488
00489
00490
00491
00498 U_CAPI void U_EXPORT2 ures_resetIterator(UResourceBundle *resourceBundle);
00499
00507 U_CAPI UBool U_EXPORT2 ures_hasNext(UResourceBundle *resourceBundle);
00508
00520 U_CAPI UResourceBundle* U_EXPORT2 ures_getNextResource(UResourceBundle *resourceBundle, UResourceBundle *fillIn, UErrorCode *status);
00521
00533 U_CAPI const UChar* U_EXPORT2 ures_getNextString(UResourceBundle *resourceBundle, int32_t* len, const char ** key, UErrorCode *status);
00534
00546 U_CAPI UResourceBundle* U_EXPORT2 ures_getByIndex(const UResourceBundle *resourceBundle, int32_t indexR, UResourceBundle *fillIn, UErrorCode *status);
00547
00558 U_CAPI const UChar* U_EXPORT2 ures_getStringByIndex(const UResourceBundle *resB, int32_t indexS, int32_t* len, UErrorCode *status);
00559
00572 U_CAPI UResourceBundle* U_EXPORT2 ures_getByKey(const UResourceBundle *resourceBundle, const char* key, UResourceBundle *fillIn, UErrorCode *status);
00573
00585 U_CAPI const UChar* U_EXPORT2 ures_getStringByKey(const UResourceBundle *resB, const char* key, int32_t* len, UErrorCode *status);
00586
00587 U_CFUNC const char* ures_getName(const UResourceBundle* resB);
00588 U_CFUNC const char* ures_getPath(const UResourceBundle* resB);
00589 U_CFUNC const char* ures_getTag(const UResourceBundle* resB);
00590
00591 #endif
00592