Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

ucnv_err.h

Go to the documentation of this file.
00001 /*
00002 **********************************************************************
00003 *   Copyright (C) 1999-2001, International Business Machines
00004 *   Corporation and others.  All Rights Reserved.
00005 **********************************************************************
00006  *
00007  *
00008  *   ucnv_err.h:
00009  */
00052 /* This file isn't designed to be included all by itself. */
00053 #ifndef UCNV_H
00054 # include "unicode/ucnv.h"
00055  /* and the rest of this file will be ignored. */
00056 #endif
00057 
00058 #ifndef UCNV_ERR_H
00059 #define UCNV_ERR_H
00060 
00061 #include "unicode/utypes.h"
00062 
00063 
00068 #define UCNV_SUB_STOP_ON_ILLEGAL "i"
00069 #define UCNV_SKIP_STOP_ON_ILLEGAL "i"
00070 
00075 #define UCNV_ESCAPE_ICU       NULL
00076 #define UCNV_ESCAPE_JAVA      "J"
00077 #define UCNV_ESCAPE_C         "C"
00078 #define UCNV_ESCAPE_XML_DEC   "D"
00079 #define UCNV_ESCAPE_XML_HEX   "X"
00080 #define UCNV_ESCAPE_UNICODE   "U"
00081 
00086 typedef enum {
00087     UCNV_UNASSIGNED = 0,  
00089     UCNV_ILLEGAL = 1,     
00097     UCNV_IRREGULAR = 2,   
00102     UCNV_RESET = 3,       
00105     UCNV_CLOSE = 4        
00107 } UConverterCallbackReason;
00108 
00109 
00114 typedef struct {
00115     uint16_t size;
00116     UBool flush;
00117     UConverter *converter;
00118     const UChar *source;
00119     const UChar *sourceLimit;
00120     char *target;
00121     const char *targetLimit;
00122     int32_t *offsets;  /* *offset = blah ; offset++; */
00123 } UConverterFromUnicodeArgs;
00124 
00125 
00130 typedef struct {
00131     uint16_t size;
00132     UBool flush;
00133     UConverter *converter;
00134     const char *source;
00135     const char *sourceLimit;
00136     UChar *target;
00137     const UChar *targetLimit;
00138     int32_t *offsets;
00139 } UConverterToUnicodeArgs;
00140 
00141 
00148 U_CAPI void U_EXPORT2 UCNV_FROM_U_CALLBACK_STOP (
00149                   const void *context,
00150                   UConverterFromUnicodeArgs *fromUArgs,
00151                   const UChar* codeUnits,
00152                   int32_t length,
00153                   UChar32 codePoint,
00154                   UConverterCallbackReason reason,
00155                   UErrorCode * err);
00156 
00157 
00158 
00166 U_CAPI void U_EXPORT2 UCNV_TO_U_CALLBACK_STOP (
00167                   const void *context,
00168                   UConverterToUnicodeArgs *fromUArgs,
00169                   const char* codeUnits,
00170                   int32_t length,
00171                   UConverterCallbackReason reason,
00172                   UErrorCode * err);
00173 
00186 U_CAPI void U_EXPORT2 UCNV_FROM_U_CALLBACK_SKIP (
00187                   const void *context,
00188                   UConverterFromUnicodeArgs *fromUArgs,
00189                   const UChar* codeUnits,
00190                   int32_t length,
00191                   UChar32 codePoint,
00192                   UConverterCallbackReason reason,
00193                   UErrorCode * err);
00194 
00209 U_CAPI void U_EXPORT2 UCNV_FROM_U_CALLBACK_SUBSTITUTE (
00210                   const void *context,
00211                   UConverterFromUnicodeArgs *fromUArgs,
00212                   const UChar* codeUnits,
00213                   int32_t length,
00214                   UChar32 codePoint,
00215                   UConverterCallbackReason reason,
00216                   UErrorCode * err);
00217 
00258 U_CAPI void U_EXPORT2 UCNV_FROM_U_CALLBACK_ESCAPE (
00259                   const void *context,
00260                   UConverterFromUnicodeArgs *fromUArgs,
00261                   const UChar* codeUnits,
00262                   int32_t length,
00263                   UChar32 codePoint,
00264                   UConverterCallbackReason reason,
00265                   UErrorCode * err);
00266 
00267 
00280 U_CAPI void U_EXPORT2 UCNV_TO_U_CALLBACK_SKIP (
00281                   const void *context,
00282                   UConverterToUnicodeArgs *fromUArgs,
00283                   const char* codeUnits,
00284                   int32_t length,
00285                   UConverterCallbackReason reason,
00286                   UErrorCode * err);
00287 
00299 U_CAPI void U_EXPORT2 UCNV_TO_U_CALLBACK_SUBSTITUTE (
00300                   const void *context,
00301                   UConverterToUnicodeArgs *fromUArgs,
00302                   const char* codeUnits,
00303                   int32_t length,
00304                   UConverterCallbackReason reason,
00305                   UErrorCode * err);
00306 
00315 U_CAPI void U_EXPORT2 UCNV_TO_U_CALLBACK_ESCAPE (
00316                   const void *context,
00317                   UConverterToUnicodeArgs *fromUArgs,
00318                   const char* codeUnits,
00319                   int32_t length,
00320                   UConverterCallbackReason reason,
00321                   UErrorCode * err);
00322 
00323 #endif
00324 
00325 /*UCNV_ERR_H*/ 

Generated on Sun May 22 20:17:38 2005 for ICU 2.1 by  doxygen 1.4.2