ICU 73.2  73.2
ucnvsel.h
Go to the documentation of this file.
00001 // © 2016 and later: Unicode, Inc. and others.
00002 // License & terms of use: http://www.unicode.org/copyright.html
00003 /*
00004 *******************************************************************************
00005 *
00006 *   Copyright (C) 2008-2011, International Business Machines
00007 *   Corporation, Google and others.  All Rights Reserved.
00008 *
00009 *******************************************************************************
00010 */
00011 /*
00012  * Author : eldawy@google.com (Mohamed Eldawy)
00013  * ucnvsel.h
00014  *
00015  * Purpose: To generate a list of encodings capable of handling
00016  * a given Unicode text
00017  *
00018  * Started 09-April-2008
00019  */
00020 
00021 #ifndef __ICU_UCNV_SEL_H__
00022 #define __ICU_UCNV_SEL_H__
00023 
00024 #include "unicode/utypes.h"
00025 
00026 #if !UCONFIG_NO_CONVERSION
00027 
00028 #include "unicode/uset.h"
00029 #include "unicode/utf16.h"
00030 #include "unicode/uenum.h"
00031 #include "unicode/ucnv.h"
00032 
00033 #if U_SHOW_CPLUSPLUS_API
00034 #include "unicode/localpointer.h"
00035 #endif   // U_SHOW_CPLUSPLUS_API
00036 
00049 struct UConverterSelector;
00054 typedef struct UConverterSelector UConverterSelector;
00079 U_CAPI UConverterSelector* U_EXPORT2
00080 ucnvsel_open(const char* const*  converterList, int32_t converterListSize,
00081              const USet* excludedCodePoints,
00082              const UConverterUnicodeSet whichSet, UErrorCode* status);
00083 
00097 U_CAPI void U_EXPORT2
00098 ucnvsel_close(UConverterSelector *sel);
00099 
00100 #if U_SHOW_CPLUSPLUS_API
00101 
00102 U_NAMESPACE_BEGIN
00103 
00113 U_DEFINE_LOCAL_OPEN_POINTER(LocalUConverterSelectorPointer, UConverterSelector, ucnvsel_close);
00114 
00115 U_NAMESPACE_END
00116 
00117 #endif
00118 
00134 U_CAPI UConverterSelector* U_EXPORT2
00135 ucnvsel_openFromSerialized(const void* buffer, int32_t length, UErrorCode* status);
00136 
00151 U_CAPI int32_t U_EXPORT2
00152 ucnvsel_serialize(const UConverterSelector* sel,
00153                   void* buffer, int32_t bufferCapacity, UErrorCode* status);
00154 
00169 U_CAPI UEnumeration * U_EXPORT2
00170 ucnvsel_selectForString(const UConverterSelector* sel,
00171                         const UChar *s, int32_t length, UErrorCode *status);
00172 
00187 U_CAPI UEnumeration * U_EXPORT2
00188 ucnvsel_selectForUTF8(const UConverterSelector* sel,
00189                       const char *s, int32_t length, UErrorCode *status);
00190 
00191 #endif  /* !UCONFIG_NO_CONVERSION */
00192 
00193 #endif  /* __ICU_UCNV_SEL_H__ */