ICU 56.1: usprep.h Source File

ICU 56.1 56.1

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files

- File List
- Globals

usprep.h
Go to the documentation of this file.
1 /*
2 *******************************************************************************
3 *
4 * Copyright (C) 2003-2014, International Business Machines
5 * Corporation and others. All Rights Reserved.
6 *
7 *******************************************************************************
8 * file name: usprep.h
9 * encoding: US-ASCII
10 * tab size: 8 (not used)
11 * indentation:4
12 *
13 * created on: 2003jul2
14 * created by: Ram Viswanadha
15 */
16
17 #ifndef __USPREP_H__
18 #define __USPREP_H__
19
25 #include "unicode/utypes.h"
26 #include "unicode/localpointer.h"
27
60 #if !UCONFIG_NO_IDNA
61
62 #include "unicode/parseerr.h"
63
68 typedef struct UStringPrepProfile UStringPrepProfile;
69
70
77 #define USPREP_DEFAULT 0x0000
78
85 #define USPREP_ALLOW_UNASSIGNED 0x0001
86
93 typedef enum UStringPrepProfileType {
98 USPREP_RFC3491_NAMEPREP,
103 USPREP_RFC3530_NFS4_CS_PREP,
108 USPREP_RFC3530_NFS4_CS_PREP_CI,
113 USPREP_RFC3530_NFS4_CIS_PREP,
118 USPREP_RFC3530_NFS4_MIXED_PREP_PREFIX,
123 USPREP_RFC3530_NFS4_MIXED_PREP_SUFFIX,
128 USPREP_RFC3722_ISCSI,
133 USPREP_RFC3920_NODEPREP,
138 USPREP_RFC3920_RESOURCEPREP,
143 USPREP_RFC4011_MIB,
148 USPREP_RFC4013_SASLPREP,
153 USPREP_RFC4505_TRACE,
158 USPREP_RFC4518_LDAP,
164 USPREP_RFC4518_LDAP_CI
165 } UStringPrepProfileType;
166
182 U_STABLE UStringPrepProfile* U_EXPORT2
183 usprep_open(const char* path,
184 const char* fileName,
185 UErrorCode* status);
186
198 U_STABLE UStringPrepProfile* U_EXPORT2
199 usprep_openByType(UStringPrepProfileType type,
200 UErrorCode* status);
201
207 U_STABLE void U_EXPORT2
208 usprep_close(UStringPrepProfile* profile);
209
210 #if U_SHOW_CPLUSPLUS_API
211
212 U_NAMESPACE_BEGIN
213
223 U_DEFINE_LOCAL_OPEN_POINTER(LocalUStringPrepProfilePointer, UStringPrepProfile, usprep_close);
224
225 U_NAMESPACE_END
226
227 #endif
228
258 U_STABLE int32_t U_EXPORT2
259 usprep_prepare( const UStringPrepProfile* prep,
260 const UChar* src, int32_t srcLength,
261 UChar* dest, int32_t destCapacity,
262 int32_t options,
263 UParseError* parseError,
264 UErrorCode* status );
265
266
267 #endif /* #if !UCONFIG_NO_IDNA */
268
269 #endif
USPREP_RFC3530_NFS4_MIXED_PREP_SUFFIX
RFC3530 nfs4_mixed_prep for suffix.
Definition: usprep.h:123
USPREP_RFC3530_NFS4_MIXED_PREP_PREFIX
RFC3530 nfs4_mixed_prep for prefix.
Definition: usprep.h:118
USPREP_RFC4013_SASLPREP
RFC4013 SASLprep.
Definition: usprep.h:148
UStringPrepProfile
struct UStringPrepProfile UStringPrepProfile
StringPrep API implements the StingPrep framework as described by RFC 3454.
Definition: usprep.h:68
usprep_openByType
UStringPrepProfile * usprep_openByType(UStringPrepProfileType type, UErrorCode *status)
Creates a StringPrep profile for the specified profile type.
usprep_prepare
int32_t usprep_prepare(const UStringPrepProfile *prep, const UChar *src, int32_t srcLength, UChar *dest, int32_t destCapacity, int32_t options, UParseError *parseError, UErrorCode *status)
Prepare the input buffer for use in applications with the given profile.
LocalUStringPrepProfilePointer
"Smart pointer" class, closes a UStringPrepProfile via usprep_close().
U_NAMESPACE_BEGIN
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
Definition: uversion.h:129
USPREP_RFC3530_NFS4_CS_PREP
RFC3530 nfs4_cs_prep.
Definition: usprep.h:103
U_DEFINE_LOCAL_OPEN_POINTER
#define U_DEFINE_LOCAL_OPEN_POINTER(LocalPointerClassName, Type, closeFunction)
"Smart pointer" definition macro, deletes objects via the closeFunction.
Definition: localpointer.h:535
USPREP_RFC4011_MIB
RFC4011 Policy MIB Stringprep.
Definition: usprep.h:143
localpointer.h
C++ API: "Smart pointers" for use with and in ICU4C C++ code.
USPREP_RFC3530_NFS4_CS_PREP_CI
RFC3530 nfs4_cs_prep with case insensitive option.
Definition: usprep.h:108
usprep_close
void usprep_close(UStringPrepProfile *profile)
Closes the profile.
USPREP_RFC3530_NFS4_CIS_PREP
RFC3530 nfs4_cis_prep.
Definition: usprep.h:113
USPREP_RFC4518_LDAP
RFC4518 LDAP.
Definition: usprep.h:158
UChar
uint16_t UChar
Define UChar to be UCHAR_TYPE, if that is #defined (for example, to char16_t), or wchar_t if that is ...
Definition: umachine.h:312
U_NAMESPACE_END
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
Definition: uversion.h:130
parseerr.h
C API: Parse Error Information.
usprep_open
UStringPrepProfile * usprep_open(const char *path, const char *fileName, UErrorCode *status)
Creates a StringPrep profile from the data file.
UErrorCode
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers...
Definition: utypes.h:476
USPREP_RFC3920_NODEPREP
RFC3920 XMPP Nodeprep.
Definition: usprep.h:133
USPREP_RFC3722_ISCSI
RFC3722 iSCSI.
Definition: usprep.h:128
UParseError
A UParseError struct is used to returned detailed information about parsing errors.
Definition: parseerr.h:56
utypes.h
Basic definitions for ICU, for both C and C++ APIs.
USPREP_RFC4505_TRACE
RFC4505 trace.
Definition: usprep.h:153
USPREP_RFC3920_RESOURCEPREP
RFC3920 XMPP Resourceprep.
Definition: usprep.h:138
UStringPrepProfileType
UStringPrepProfileType
enums for the standard stringprep profile types supported by usprep_openByType.
Definition: usprep.h:93
USPREP_RFC3491_NAMEPREP
RFC3491 Nameprep.
Definition: usprep.h:98
USPREP_RFC4518_LDAP_CI
RFC4518 LDAP for case ignore, numeric and stored prefix matching rules.
Definition: usprep.h:164
U_STABLE
#define U_STABLE
This is used to declare a function as a stable public ICU C API.
Definition: umachine.h:109