1 /* 2 ******************************************************************************* 3 * 4 * Copyright (C) 2000-2007, International Business Machines 5 * Corporation and others. All Rights Reserved. 6 * 7 ******************************************************************************* 8 * file name: makeconv.h 9 * encoding: US-ASCII 10 * tab size: 8 (not used) 11 * indentation:4 12 * 13 * created on: 2000nov01 14 * created by: Markus W. Scherer 15 */ 16 17 #ifndef __MAKECONV_H__ 18 #define __MAKECONV_H__ 19 20 #include "unicode/utypes.h" 21 #include "ucnv_bld.h" 22 #include "unewdata.h" 23 #include "ucm.h" 24 25 /* exports from makeconv.c */ 26 U_CFUNC UBool VERBOSE; 27 U_CFUNC UBool SMALL; 28 29 /* converter table type for writing */ 30 enum { 31 TABLE_NONE, 32 TABLE_BASE, 33 TABLE_EXT, 34 TABLE_BASE_AND_EXT 35 }; 36 37 /* abstract converter generator struct, C++ - style */ 38 struct NewConverter; 39 typedef struct NewConverter NewConverter; 40 41 struct NewConverter { 42 void 43 (*close)(NewConverter *cnvData); 44 45 /** is this byte sequence valid? */ 46 UBool 47 (*isValid)(NewConverter *cnvData, 48 const uint8_t *bytes, int32_t length); 49 50 UBool 51 (*addTable)(NewConverter *cnvData, UCMTable *table, UConverterStaticData *staticData); 52 53 uint32_t 54 (*write)(NewConverter *cnvData, const UConverterStaticData *staticData, 55 UNewDataMemory *pData, int32_t tableType); 56 }; 57 58 #endif /* __MAKECONV_H__ */ 59