ucnv_err.h

Go to the documentation of this file.
00001 /*
00002 **********************************************************************
00003 *   Copyright (C) 1999-2005, International Business Machines
00004 *   Corporation and others.  All Rights Reserved.
00005 **********************************************************************
00006  *
00007  *
00008  *   ucnv_err.h:
00009  */
00010 
00083 #ifndef UCNV_ERR_H
00084 #define UCNV_ERR_H
00085 
00086 #include "unicode/utypes.h"
00087 
00088 #if !UCONFIG_NO_CONVERSION
00089 
00091 struct UConverter;
00092 
00094 typedef struct UConverter UConverter;
00095 
00100 #define UCNV_SUB_STOP_ON_ILLEGAL "i"
00101 
00106 #define UCNV_SKIP_STOP_ON_ILLEGAL "i"
00107 
00112 #define UCNV_ESCAPE_ICU       NULL
00113 
00117 #define UCNV_ESCAPE_JAVA      "J"
00118 
00123 #define UCNV_ESCAPE_C         "C"
00124 
00129 #define UCNV_ESCAPE_XML_DEC   "D"
00130 
00135 #define UCNV_ESCAPE_XML_HEX   "X"
00136 
00140 #define UCNV_ESCAPE_UNICODE   "U"
00141 
00148 typedef enum {
00149     UCNV_UNASSIGNED = 0,  
00151     UCNV_ILLEGAL = 1,     
00159     UCNV_IRREGULAR = 2,   
00164     UCNV_RESET = 3,       
00167     UCNV_CLOSE = 4,        
00169     UCNV_CLONE = 5         
00178 } UConverterCallbackReason;
00179 
00180 
00185 typedef struct {
00186     uint16_t size;              
00187     UBool flush;                
00188     UConverter *converter;      
00189     const UChar *source;        
00190     const UChar *sourceLimit;   
00191     char *target;               
00192     const char *targetLimit;    
00193     int32_t *offsets;           
00194 } UConverterFromUnicodeArgs;
00195 
00196 
00201 typedef struct {
00202     uint16_t size;              
00203     UBool flush;                
00204     UConverter *converter;      
00205     const char *source;         
00206     const char *sourceLimit;    
00207     UChar *target;              
00208     const UChar *targetLimit;   
00209     int32_t *offsets;           
00210 } UConverterToUnicodeArgs;
00211 
00212 
00227 U_STABLE void U_EXPORT2 UCNV_FROM_U_CALLBACK_STOP (
00228                   const void *context,
00229                   UConverterFromUnicodeArgs *fromUArgs,
00230                   const UChar* codeUnits,
00231                   int32_t length,
00232                   UChar32 codePoint,
00233                   UConverterCallbackReason reason,
00234                   UErrorCode * err);
00235 
00236 
00237 
00251 U_STABLE void U_EXPORT2 UCNV_TO_U_CALLBACK_STOP (
00252                   const void *context,
00253                   UConverterToUnicodeArgs *toUArgs,
00254                   const char* codeUnits,
00255                   int32_t length,
00256                   UConverterCallbackReason reason,
00257                   UErrorCode * err);
00258 
00278 U_STABLE void U_EXPORT2 UCNV_FROM_U_CALLBACK_SKIP (
00279                   const void *context,
00280                   UConverterFromUnicodeArgs *fromUArgs,
00281                   const UChar* codeUnits,
00282                   int32_t length,
00283                   UChar32 codePoint,
00284                   UConverterCallbackReason reason,
00285                   UErrorCode * err);
00286 
00308 U_STABLE void U_EXPORT2 UCNV_FROM_U_CALLBACK_SUBSTITUTE (
00309                   const void *context,
00310                   UConverterFromUnicodeArgs *fromUArgs,
00311                   const UChar* codeUnits,
00312                   int32_t length,
00313                   UChar32 codePoint,
00314                   UConverterCallbackReason reason,
00315                   UErrorCode * err);
00316 
00364 U_STABLE void U_EXPORT2 UCNV_FROM_U_CALLBACK_ESCAPE (
00365                   const void *context,
00366                   UConverterFromUnicodeArgs *fromUArgs,
00367                   const UChar* codeUnits,
00368                   int32_t length,
00369                   UChar32 codePoint,
00370                   UConverterCallbackReason reason,
00371                   UErrorCode * err);
00372 
00373 
00392 U_STABLE void U_EXPORT2 UCNV_TO_U_CALLBACK_SKIP (
00393                   const void *context,
00394                   UConverterToUnicodeArgs *toUArgs,
00395                   const char* codeUnits,
00396                   int32_t length,
00397                   UConverterCallbackReason reason,
00398                   UErrorCode * err);
00399 
00418 U_STABLE void U_EXPORT2 UCNV_TO_U_CALLBACK_SUBSTITUTE (
00419                   const void *context,
00420                   UConverterToUnicodeArgs *toUArgs,
00421                   const char* codeUnits,
00422                   int32_t length,
00423                   UConverterCallbackReason reason,
00424                   UErrorCode * err);
00425 
00444 U_STABLE void U_EXPORT2 UCNV_TO_U_CALLBACK_ESCAPE (
00445                   const void *context,
00446                   UConverterToUnicodeArgs *toUArgs,
00447                   const char* codeUnits,
00448                   int32_t length,
00449                   UConverterCallbackReason reason,
00450                   UErrorCode * err);
00451 
00452 #endif
00453 
00454 #endif
00455 
00456 /*UCNV_ERR_H*/ 

Generated on Mon Aug 13 07:17:24 2007 for ICU 3.6 by  doxygen 1.5.2