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

ucnv_err.h

Go to the documentation of this file.
00001 /*
00002 **********************************************************************
00003 *   Copyright (C) 1999, 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 
00066 typedef enum {
00067     UCNV_UNASSIGNED = 0,  /* The code point is unassigned */
00068     UCNV_ILLEGAL = 1,     /* The code point is illegal, for example, 
00069                              \x81\x2E is illegal in SJIS because \x2E
00070                              is not a valid trail byte for the \x81 
00071                              lead byte. */
00072     UCNV_IRREGULAR = 2,   /* The codepoint is not a regular sequence in 
00073                              the encoding. For example, \xC0\xE1 would
00074                              be irregular in UTF-8 because \x61 represents
00075                              the same character. */
00076     UCNV_RESET = 3,       /* The callback is called with this reason when a
00077                              'reset' has occured. Callback should reset all
00078                              state. */
00079     UCNV_CLOSE = 4        /* Called when the converter is closed. The
00080                              callback should release any allocated memory.*/
00081 } UConverterCallbackReason;
00082 
00083 
00087 typedef struct {
00088         uint16_t size;
00089         UBool flush;
00090         UConverter *converter;
00091         const UChar *source;
00092         const UChar *sourceLimit;
00093         char *target;
00094         const char *targetLimit;
00095         int32_t *offsets;  /* *offset = blah ; offset++; */
00096 } UConverterFromUnicodeArgs;
00097 
00098 
00102 typedef struct {
00103         uint16_t size;
00104         UBool flush;
00105         UConverter *converter;
00106         const char *source;
00107         const char *sourceLimit;
00108         UChar *target;
00109         const UChar *targetLimit;
00110         int32_t *offsets;
00111 } UConverterToUnicodeArgs;
00112 
00113 
00120 U_CAPI void U_EXPORT2 UCNV_FROM_U_CALLBACK_STOP (
00121                   void *context,
00122                   UConverterFromUnicodeArgs *fromUArgs,
00123                   const UChar* codeUnits,
00124                   int32_t length,
00125                   UChar32 codePoint,
00126                   UConverterCallbackReason reason,
00127                                   UErrorCode * err);
00128 
00129 
00130 
00137 U_CAPI void U_EXPORT2 UCNV_TO_U_CALLBACK_STOP (
00138                   void *context,
00139                   UConverterToUnicodeArgs *fromUArgs,
00140                   const char* codeUnits,
00141                   int32_t length,
00142                   UConverterCallbackReason reason,
00143                                   UErrorCode * err);
00144 
00151 U_CAPI void U_EXPORT2 UCNV_FROM_U_CALLBACK_SKIP (
00152                   void *context,
00153                   UConverterFromUnicodeArgs *fromUArgs,
00154                   const UChar* codeUnits,
00155                   int32_t length,
00156                   UChar32 codePoint,
00157                   UConverterCallbackReason reason,
00158                                   UErrorCode * err);
00159 
00169 U_CAPI void U_EXPORT2 UCNV_FROM_U_CALLBACK_SUBSTITUTE (
00170                   void *context,
00171                   UConverterFromUnicodeArgs *fromUArgs,
00172                   const UChar* codeUnits,
00173                   int32_t length,
00174                   UChar32 codePoint,
00175                   UConverterCallbackReason reason,
00176                                   UErrorCode * err);
00177 
00190 U_CAPI void U_EXPORT2 UCNV_FROM_U_CALLBACK_ESCAPE (
00191                   void *context,
00192                   UConverterFromUnicodeArgs *fromUArgs,
00193                   const UChar* codeUnits,
00194                   int32_t length,
00195                   UChar32 codePoint,
00196                   UConverterCallbackReason reason,
00197                                   UErrorCode * err);
00198 
00199 
00206 U_CAPI void U_EXPORT2 UCNV_TO_U_CALLBACK_SKIP (
00207                   void *context,
00208                   UConverterToUnicodeArgs *fromUArgs,
00209                   const char* codeUnits,
00210                   int32_t length,
00211                   UConverterCallbackReason reason,
00212                                   UErrorCode * err);
00213 
00220 U_CAPI void U_EXPORT2 UCNV_TO_U_CALLBACK_SUBSTITUTE (
00221                   void *context,
00222                   UConverterToUnicodeArgs *fromUArgs,
00223                   const char* codeUnits,
00224                   int32_t length,
00225                   UConverterCallbackReason reason,
00226                                   UErrorCode * err);
00227 
00236 U_CAPI void U_EXPORT2 UCNV_TO_U_CALLBACK_ESCAPE (
00237                   void *context,
00238                   UConverterToUnicodeArgs *fromUArgs,
00239                   const char* codeUnits,
00240                   int32_t length,
00241                   UConverterCallbackReason reason,
00242                                   UErrorCode * err);
00243 
00244 #endif
00245 
00246 /*UCNV_ERR_H*/ 

Generated at Fri Dec 15 12:12:36 2000 for ICU 1.7 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000