ICU 49.1.1  49.1.1
ucnvsel.h
Go to the documentation of this file.
1 /*
2 *******************************************************************************
3 *
4 * Copyright (C) 2008-2011, International Business Machines
5 * Corporation, Google and others. All Rights Reserved.
6 *
7 *******************************************************************************
8 */
9 /*
10  * Author : eldawy@google.com (Mohamed Eldawy)
11  * ucnvsel.h
12  *
13  * Purpose: To generate a list of encodings capable of handling
14  * a given Unicode text
15  *
16  * Started 09-April-2008
17  */
18 
19 #ifndef __ICU_UCNV_SEL_H__
20 #define __ICU_UCNV_SEL_H__
21 
22 #include "unicode/utypes.h"
23 
24 #if !UCONFIG_NO_CONVERSION
25 
26 #include "unicode/uset.h"
27 #include "unicode/utf16.h"
28 #include "unicode/uenum.h"
29 #include "unicode/ucnv.h"
30 #include "unicode/localpointer.h"
31 
47 struct UConverterSelector;
48 typedef struct UConverterSelector UConverterSelector;
73 U_STABLE UConverterSelector* U_EXPORT2
74 ucnvsel_open(const char* const* converterList, int32_t converterListSize,
75  const USet* excludedCodePoints,
76  const UConverterUnicodeSet whichSet, UErrorCode* status);
77 
91 U_STABLE void U_EXPORT2
92 ucnvsel_close(UConverterSelector *sel);
93 
94 #if U_SHOW_CPLUSPLUS_API
95 
97 
107 U_DEFINE_LOCAL_OPEN_POINTER(LocalUConverterSelectorPointer, UConverterSelector, ucnvsel_close);
108 
110 
111 #endif
112 
128 U_STABLE UConverterSelector* U_EXPORT2
129 ucnvsel_openFromSerialized(const void* buffer, int32_t length, UErrorCode* status);
130 
145 U_STABLE int32_t U_EXPORT2
146 ucnvsel_serialize(const UConverterSelector* sel,
147  void* buffer, int32_t bufferCapacity, UErrorCode* status);
148 
163 U_STABLE UEnumeration * U_EXPORT2
164 ucnvsel_selectForString(const UConverterSelector* sel,
165  const UChar *s, int32_t length, UErrorCode *status);
166 
181 U_STABLE UEnumeration * U_EXPORT2
182 ucnvsel_selectForUTF8(const UConverterSelector* sel,
183  const char *s, int32_t length, UErrorCode *status);
184 
185 #endif /* !UCONFIG_NO_CONVERSION */
186 
187 #endif /* __ICU_UCNV_SEL_H__ */