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
00058 typedef struct {
00060 uint16_t size;
00061
00063 uint16_t reservedWord;
00064
00065
00067 uint8_t isBigEndian;
00068
00070 uint8_t charsetFamily;
00071
00073 uint8_t sizeofUChar;
00074
00076 uint8_t reservedByte;
00077
00079 uint8_t dataFormat[4];
00080
00082 uint8_t formatVersion[4];
00083 uint8_t dataVersion[4];
00084 } UDataInfo;
00085
00086
00087
00092 typedef struct UDataMemory UDataMemory;
00093
00107 typedef UBool
00108 UDataMemoryIsAcceptable(void *context,
00109 const char *type, const char *name,
00110 const UDataInfo *pInfo);
00111
00112
00120 U_CAPI UDataMemory * U_EXPORT2
00121 udata_open(const char *path, const char *type, const char *name,
00122 UErrorCode *pErrorCode);
00123
00182 U_CAPI UDataMemory * U_EXPORT2
00183 udata_openChoice(const char *path, const char *type, const char *name,
00184 UDataMemoryIsAcceptable *isAcceptable, void *context,
00185 UErrorCode *pErrorCode);
00186
00193 U_CAPI void U_EXPORT2
00194 udata_close(UDataMemory *pData);
00195
00201 U_CAPI const void * U_EXPORT2
00202 udata_getMemory(UDataMemory *pData);
00203
00222 U_CAPI void U_EXPORT2
00223 udata_getInfo(UDataMemory *pData, UDataInfo *pInfo);
00224
00257 U_CAPI void U_EXPORT2
00258 udata_setCommonData(const void *data, UErrorCode *err);
00259
00260
00283 U_CAPI void U_EXPORT2
00284 udata_setAppData(const char *path, const void *data, UErrorCode *err);
00285
00286 U_CDECL_END
00287
00288 #endif