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
00057 typedef struct {
00059 uint16_t size;
00060
00062 uint16_t reservedWord;
00063
00064
00066 uint8_t isBigEndian;
00067
00069 uint8_t charsetFamily;
00070
00072 uint8_t sizeofUChar;
00073
00075 uint8_t reservedByte;
00076
00078 uint8_t dataFormat[4];
00079
00081 uint8_t formatVersion[4];
00082 uint8_t dataVersion[4];
00083 } UDataInfo;
00084
00085
00086
00090 typedef struct UDataMemory UDataMemory;
00091
00105 typedef UBool
00106 UDataMemoryIsAcceptable(void *context,
00107 const char *type, const char *name,
00108 const UDataInfo *pInfo);
00109
00110
00118 U_CAPI UDataMemory * U_EXPORT2
00119 udata_open(const char *path, const char *type, const char *name,
00120 UErrorCode *pErrorCode);
00121
00180 U_CAPI UDataMemory * U_EXPORT2
00181 udata_openChoice(const char *path, const char *type, const char *name,
00182 UDataMemoryIsAcceptable *isAcceptable, void *context,
00183 UErrorCode *pErrorCode);
00184
00191 U_CAPI void U_EXPORT2
00192 udata_close(UDataMemory *pData);
00193
00199 U_CAPI const void * U_EXPORT2
00200 udata_getMemory(UDataMemory *pData);
00201
00220 U_CAPI void U_EXPORT2
00221 udata_getInfo(UDataMemory *pData, UDataInfo *pInfo);
00222
00262 U_CAPI void U_EXPORT2
00263 udata_setCommonData(const void *data, UErrorCode *err);
00264
00265 U_CDECL_END
00266
00267 #endif