Main Page   Class Hierarchy   Alphabetical List   Data Structures   File List   Data Fields   Globals  

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 
00058 typedef struct {
00060     uint16_t size;
00061 
00063     uint16_t reservedWord;
00064 
00065     /* platform data properties */
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 /* API for reading data -----------------------------------------------------*/
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

Generated on Sun Mar 3 16:06:51 2002 for ICU 2.0 by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002