Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Search  

udata.h

Go to the documentation of this file.
00001 /*
00002 ******************************************************************************
00003 *
00004 *   Copyright (C) 1999-2001, International Business Machines
00005 *   Corporation and others.  All Rights Reserved.
00006 *
00007 ******************************************************************************
00008 *   file name:  udata.h
00009 *   encoding:   US-ASCII
00010 *   tab size:   8 (not used)
00011 *   indentation:4
00012 *
00013 *   created on: 1999oct25
00014 *   created by: Markus W. Scherer
00015 */
00016 
00017 #ifndef __UDATA_H__
00018 #define __UDATA_H__
00019 
00020 #include "unicode/utypes.h"
00021 
00022 U_CDECL_BEGIN
00023 
00071 typedef struct {
00074     uint16_t size;
00075 
00078     uint16_t reservedWord;
00079 
00080     /* platform data properties */
00083     uint8_t isBigEndian;
00084 
00087     uint8_t charsetFamily;
00088 
00091     uint8_t sizeofUChar;
00092 
00095     uint8_t reservedByte;
00096 
00099     uint8_t dataFormat[4];
00100 
00103     uint8_t formatVersion[4];
00104 
00107     uint8_t dataVersion[4];
00108 } UDataInfo;
00109 
00110 /* API for reading data -----------------------------------------------------*/
00111 
00116 typedef struct UDataMemory UDataMemory;
00117 
00131 typedef UBool U_CALLCONV
00132 UDataMemoryIsAcceptable(void *context,
00133                         const char *type, const char *name,
00134                         const UDataInfo *pInfo);
00135 
00136 
00156 U_CAPI UDataMemory * U_EXPORT2
00157 udata_open(const char *path, const char *type, const char *name,
00158            UErrorCode *pErrorCode);
00159 
00218 U_CAPI UDataMemory * U_EXPORT2
00219 udata_openChoice(const char *path, const char *type, const char *name,
00220                  UDataMemoryIsAcceptable *isAcceptable, void *context,
00221                  UErrorCode *pErrorCode);
00222 
00230 U_CAPI void U_EXPORT2
00231 udata_close(UDataMemory *pData);
00232 
00239 U_CAPI const void * U_EXPORT2
00240 udata_getMemory(UDataMemory *pData);
00241 
00260 U_CAPI void U_EXPORT2
00261 udata_getInfo(UDataMemory *pData, UDataInfo *pInfo);
00262 
00295 U_CAPI void U_EXPORT2
00296 udata_setCommonData(const void *data, UErrorCode *err);
00297 
00298 
00321 U_CAPI void U_EXPORT2
00322 udata_setAppData(const char *path, const void *data, UErrorCode *err);
00323 
00324 U_CDECL_END
00325 
00326 #endif

Generated on Wed Dec 18 16:49:54 2002 for ICU 2.4 by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001