ICU 56.1  56.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
udata.h
Go to the documentation of this file.
1 /*
2 ******************************************************************************
3 *
4 * Copyright (C) 1999-2014, International Business Machines
5 * Corporation and others. All Rights Reserved.
6 *
7 ******************************************************************************
8 * file name: udata.h
9 * encoding: US-ASCII
10 * tab size: 8 (not used)
11 * indentation:4
12 *
13 * created on: 1999oct25
14 * created by: Markus W. Scherer
15 */
16 
17 #ifndef __UDATA_H__
18 #define __UDATA_H__
19 
20 #include "unicode/utypes.h"
21 #include "unicode/localpointer.h"
22 
24 
40 #ifndef U_HIDE_INTERNAL_API
41 
45 #define U_TREE_SEPARATOR '-'
46 
51 #define U_TREE_SEPARATOR_STRING "-"
52 
57 #define U_TREE_ENTRY_SEP_CHAR '/'
58 
63 #define U_TREE_ENTRY_SEP_STRING "/"
64 
69 #define U_ICUDATA_ALIAS "ICUDATA"
70 
71 #endif /* U_HIDE_INTERNAL_API */
72 
111 typedef struct {
114  uint16_t size;
115 
118  uint16_t reservedWord;
119 
120  /* platform data properties */
123  uint8_t isBigEndian;
124 
127  uint8_t charsetFamily;
128 
131  uint8_t sizeofUChar;
132 
135  uint8_t reservedByte;
136 
139  uint8_t dataFormat[4];
140 
143  uint8_t formatVersion[4];
144 
147  uint8_t dataVersion[4];
148 } UDataInfo;
149 
150 /* API for reading data -----------------------------------------------------*/
151 
156 typedef struct UDataMemory UDataMemory;
157 
171 typedef UBool U_CALLCONV
173  const char *type, const char *name,
174  const UDataInfo *pInfo);
175 
176 
198 U_STABLE UDataMemory * U_EXPORT2
199 udata_open(const char *path, const char *type, const char *name,
200  UErrorCode *pErrorCode);
201 
250 U_STABLE UDataMemory * U_EXPORT2
251 udata_openChoice(const char *path, const char *type, const char *name,
252  UDataMemoryIsAcceptable *isAcceptable, void *context,
253  UErrorCode *pErrorCode);
254 
262 U_STABLE void U_EXPORT2
263 udata_close(UDataMemory *pData);
264 
265 #if U_SHOW_CPLUSPLUS_API
266 
268 
279 
281 
282 #endif
283 
293 U_STABLE const void * U_EXPORT2
295 
314 U_STABLE void U_EXPORT2
315 udata_getInfo(UDataMemory *pData, UDataInfo *pInfo);
316 
360 U_STABLE void U_EXPORT2
361 udata_setCommonData(const void *data, UErrorCode *err);
362 
363 
391 U_STABLE void U_EXPORT2
392 udata_setAppData(const char *packageName, const void *data, UErrorCode *err);
393 
399 typedef enum UDataFileAccess {
414 
425 U_STABLE void U_EXPORT2
427 
429 
430 #endif