ICU 4.8.1.1
4.8.1.1
|
00001 /* 00002 ******************************************************************************* 00003 * 00004 * Copyright (C) 2003-2010, International Business Machines 00005 * Corporation and others. All Rights Reserved. 00006 * 00007 ******************************************************************************* 00008 * file name: usprep.h 00009 * encoding: US-ASCII 00010 * tab size: 8 (not used) 00011 * indentation:4 00012 * 00013 * created on: 2003jul2 00014 * created by: Ram Viswanadha 00015 */ 00016 00017 #ifndef __USPREP_H__ 00018 #define __USPREP_H__ 00019 00025 #include "unicode/utypes.h" 00026 #include "unicode/localpointer.h" 00027 00060 #if !UCONFIG_NO_IDNA 00061 00062 #include "unicode/parseerr.h" 00063 00068 typedef struct UStringPrepProfile UStringPrepProfile; 00069 00070 00077 #define USPREP_DEFAULT 0x0000 00078 00085 #define USPREP_ALLOW_UNASSIGNED 0x0001 00086 00093 typedef enum UStringPrepProfileType { 00098 USPREP_RFC3491_NAMEPREP, 00103 USPREP_RFC3530_NFS4_CS_PREP, 00108 USPREP_RFC3530_NFS4_CS_PREP_CI, 00113 USPREP_RFC3530_NFS4_CIS_PREP, 00118 USPREP_RFC3530_NFS4_MIXED_PREP_PREFIX, 00123 USPREP_RFC3530_NFS4_MIXED_PREP_SUFFIX, 00128 USPREP_RFC3722_ISCSI, 00133 USPREP_RFC3920_NODEPREP, 00138 USPREP_RFC3920_RESOURCEPREP, 00143 USPREP_RFC4011_MIB, 00148 USPREP_RFC4013_SASLPREP, 00153 USPREP_RFC4505_TRACE, 00158 USPREP_RFC4518_LDAP, 00164 USPREP_RFC4518_LDAP_CI 00165 } UStringPrepProfileType; 00166 00182 U_STABLE UStringPrepProfile* U_EXPORT2 00183 usprep_open(const char* path, 00184 const char* fileName, 00185 UErrorCode* status); 00186 00198 U_STABLE UStringPrepProfile* U_EXPORT2 00199 usprep_openByType(UStringPrepProfileType type, 00200 UErrorCode* status); 00201 00207 U_STABLE void U_EXPORT2 00208 usprep_close(UStringPrepProfile* profile); 00209 00210 #if U_SHOW_CPLUSPLUS_API 00211 00212 U_NAMESPACE_BEGIN 00213 00223 U_DEFINE_LOCAL_OPEN_POINTER(LocalUStringPrepProfilePointer, UStringPrepProfile, usprep_close); 00224 00225 U_NAMESPACE_END 00226 00227 #endif 00228 00258 U_STABLE int32_t U_EXPORT2 00259 usprep_prepare( const UStringPrepProfile* prep, 00260 const UChar* src, int32_t srcLength, 00261 UChar* dest, int32_t destCapacity, 00262 int32_t options, 00263 UParseError* parseError, 00264 UErrorCode* status ); 00265 00266 00267 #endif /* #if !UCONFIG_NO_IDNA */ 00268 00269 #endif