ICU 62.1  62.1
usprep.h
Go to the documentation of this file.
1 // © 2016 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html
3 /*
4  *******************************************************************************
5  *
6  * Copyright (C) 2003-2014, International Business Machines
7  * Corporation and others. All Rights Reserved.
8  *
9  *******************************************************************************
10  * file name: usprep.h
11  * encoding: UTF-8
12  * tab size: 8 (not used)
13  * indentation:4
14  *
15  * created on: 2003jul2
16  * created by: Ram Viswanadha
17  */
18 
19 #ifndef __USPREP_H__
20 #define __USPREP_H__
21 
27 #include "unicode/utypes.h"
28 #include "unicode/localpointer.h"
29 
62 #if !UCONFIG_NO_IDNA
63 
64 #include "unicode/parseerr.h"
65 
71 
72 
79 #define USPREP_DEFAULT 0x0000
80 
87 #define USPREP_ALLOW_UNASSIGNED 0x0001
88 
95 typedef enum UStringPrepProfileType {
168 
184 U_STABLE UStringPrepProfile* U_EXPORT2
185 usprep_open(const char* path,
186  const char* fileName,
187  UErrorCode* status);
188 
200 U_STABLE UStringPrepProfile* U_EXPORT2
202  UErrorCode* status);
203 
209 U_STABLE void U_EXPORT2
211 
212 #if U_SHOW_CPLUSPLUS_API
213 
215 
226 
228 
229 #endif
230 
260 U_STABLE int32_t U_EXPORT2
262  const UChar* src, int32_t srcLength,
263  UChar* dest, int32_t destCapacity,
264  int32_t options,
265  UParseError* parseError,
266  UErrorCode* status );
267 
268 
269 #endif /* #if !UCONFIG_NO_IDNA */
270 
271 #endif
usprep_openByType
UStringPrepProfile * usprep_openByType(UStringPrepProfileType type, UErrorCode *status)
Creates a StringPrep profile for the specified profile type.
USPREP_RFC3530_NFS4_MIXED_PREP_PREFIX
@ USPREP_RFC3530_NFS4_MIXED_PREP_PREFIX
RFC3530 nfs4_mixed_prep for prefix.
Definition: usprep.h:120
USPREP_RFC3530_NFS4_CIS_PREP
@ USPREP_RFC3530_NFS4_CIS_PREP
RFC3530 nfs4_cis_prep.
Definition: usprep.h:115
parseerr.h
C API: Parse Error Information.
USPREP_RFC3722_ISCSI
@ USPREP_RFC3722_ISCSI
RFC3722 iSCSI.
Definition: usprep.h:130
USPREP_RFC4011_MIB
@ USPREP_RFC4011_MIB
RFC4011 Policy MIB Stringprep.
Definition: usprep.h:145
USPREP_RFC3530_NFS4_MIXED_PREP_SUFFIX
@ USPREP_RFC3530_NFS4_MIXED_PREP_SUFFIX
RFC3530 nfs4_mixed_prep for suffix.
Definition: usprep.h:125
USPREP_RFC4518_LDAP
@ USPREP_RFC4518_LDAP
RFC4518 LDAP.
Definition: usprep.h:160
utypes.h
Basic definitions for ICU, for both C and C++ APIs.
USPREP_RFC4013_SASLPREP
@ USPREP_RFC4013_SASLPREP
RFC4013 SASLprep.
Definition: usprep.h:150
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.
USPREP_RFC3920_NODEPREP
@ USPREP_RFC3920_NODEPREP
RFC3920 XMPP Nodeprep.
Definition: usprep.h:135
UParseError
A UParseError struct is used to returned detailed information about parsing errors.
Definition: parseerr.h:58
UErrorCode
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers,...
Definition: utypes.h:396
UStringPrepProfile
struct UStringPrepProfile UStringPrepProfile
StringPrep API implements the StingPrep framework as described by RFC 3454.
Definition: usprep.h:70
LocalUStringPrepProfilePointer
usprep_open
UStringPrepProfile * usprep_open(const char *path, const char *fileName, UErrorCode *status)
Creates a StringPrep profile from the data file.
USPREP_RFC3530_NFS4_CS_PREP
@ USPREP_RFC3530_NFS4_CS_PREP
RFC3530 nfs4_cs_prep.
Definition: usprep.h:105
U_DEFINE_LOCAL_OPEN_POINTER
#define U_DEFINE_LOCAL_OPEN_POINTER(LocalPointerClassName, Type, closeFunction)
Definition: localpointer.h:487
USPREP_RFC3530_NFS4_CS_PREP_CI
@ USPREP_RFC3530_NFS4_CS_PREP_CI
RFC3530 nfs4_cs_prep with case insensitive option.
Definition: usprep.h:110
localpointer.h
C++ API: "Smart pointers" for use with and in ICU4C C++ code.
usprep_close
void usprep_close(UStringPrepProfile *profile)
Closes the profile.
U_STABLE
#define U_STABLE
This is used to declare a function as a stable public ICU C API.
Definition: umachine.h:111
USPREP_RFC3920_RESOURCEPREP
@ USPREP_RFC3920_RESOURCEPREP
RFC3920 XMPP Resourceprep.
Definition: usprep.h:140
UChar
uint16_t UChar
Definition: umachine.h:353
USPREP_RFC4505_TRACE
@ USPREP_RFC4505_TRACE
RFC4505 trace.
Definition: usprep.h:155
U_NAMESPACE_END
#define U_NAMESPACE_END
Definition: uversion.h:138
U_NAMESPACE_BEGIN
#define U_NAMESPACE_BEGIN
Definition: uversion.h:137
USPREP_RFC4518_LDAP_CI
@ USPREP_RFC4518_LDAP_CI
RFC4518 LDAP for case ignore, numeric and stored prefix matching rules.
Definition: usprep.h:166
USPREP_RFC3491_NAMEPREP
@ USPREP_RFC3491_NAMEPREP
RFC3491 Nameprep.
Definition: usprep.h:100
UStringPrepProfileType
UStringPrepProfileType
enums for the standard stringprep profile types supported by usprep_openByType.
Definition: usprep.h:95