00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __UDATA_H__
00018 #define __UDATA_H__
00019
00020 #include "unicode/utypes.h"
00021
00022 U_CDECL_BEGIN
00023
00039 #ifndef U_HIDE_INTERNAL_API
00040
00044 #define U_TREE_SEPARATOR '-'
00045
00050 #define U_TREE_SEPARATOR_STRING "-"
00051
00056 #define U_TREE_ENTRY_SEP_CHAR '/'
00057
00062 #define U_TREE_ENTRY_SEP_STRING "/"
00063
00068 #define U_ICUDATA_ALIAS "ICUDATA"
00069
00070 #endif
00071
00105 typedef struct {
00108 uint16_t size;
00109
00112 uint16_t reservedWord;
00113
00114
00117 uint8_t isBigEndian;
00118
00121 uint8_t charsetFamily;
00122
00125 uint8_t sizeofUChar;
00126
00129 uint8_t reservedByte;
00130
00133 uint8_t dataFormat[4];
00134
00137 uint8_t formatVersion[4];
00138
00141 uint8_t dataVersion[4];
00142 } UDataInfo;
00143
00144
00145
00150 typedef struct UDataMemory UDataMemory;
00151
00165 typedef UBool U_CALLCONV
00166 UDataMemoryIsAcceptable(void *context,
00167 const char *type, const char *name,
00168 const UDataInfo *pInfo);
00169
00170
00192 U_STABLE UDataMemory * U_EXPORT2
00193 udata_open(const char *path, const char *type, const char *name,
00194 UErrorCode *pErrorCode);
00195
00244 U_STABLE UDataMemory * U_EXPORT2
00245 udata_openChoice(const char *path, const char *type, const char *name,
00246 UDataMemoryIsAcceptable *isAcceptable, void *context,
00247 UErrorCode *pErrorCode);
00248
00256 U_STABLE void U_EXPORT2
00257 udata_close(UDataMemory *pData);
00258
00265 U_STABLE const void * U_EXPORT2
00266 udata_getMemory(UDataMemory *pData);
00267
00286 U_STABLE void U_EXPORT2
00287 udata_getInfo(UDataMemory *pData, UDataInfo *pInfo);
00288
00323 U_STABLE void U_EXPORT2
00324 udata_setCommonData(const void *data, UErrorCode *err);
00325
00326
00351 U_STABLE void U_EXPORT2
00352 udata_setAppData(const char *packageName, const void *data, UErrorCode *err);
00353
00359 typedef enum UDataFileAccess {
00361 UDATA_FILES_FIRST,
00363 UDATA_ONLY_PACKAGES,
00366 UDATA_PACKAGES_FIRST,
00368 UDATA_NO_FILES,
00370 UDATA_DEFAULT_ACCESS = UDATA_FILES_FIRST,
00371 UDATA_FILE_ACCESS_COUNT
00372 } UDataFileAccess;
00373
00384 U_STABLE void U_EXPORT2
00385 udata_setFileAccess(UDataFileAccess access, UErrorCode *status);
00386
00387 U_CDECL_END
00388
00389 #endif