]> git.saurik.com Git - apple/icu.git/blob - icuSources/test/cintltst/nfsprep.h
ICU-66108.tar.gz
[apple/icu.git] / icuSources / test / cintltst / nfsprep.h
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, International Business Machines
7 * Corporation and others. All Rights Reserved.
8 *
9 *******************************************************************************
10 * file name: nfsprep.h
11 * encoding: UTF-8
12 * tab size: 8 (not used)
13 * indentation:4
14 *
15 * created on: 2003jul11
16 * created by: Ram Viswanadha
17 */
18 #ifndef _NFSPREP_H
19 #define _NFSPREP_H
20
21 #include "unicode/utypes.h"
22
23 #if !UCONFIG_NO_IDNA
24
25 #include "unicode/ustring.h"
26 #include "unicode/usprep.h"
27 #include <stdlib.h>
28 #include <string.h>
29
30
31 /* this enum must be kept in syn with NFS4DataFileNames array in nfsprep.c */
32 enum NFS4ProfileState{
33 NFS4_CS_PREP_CS,
34 NFS4_CS_PREP_CI,
35 NFS4_CIS_PREP,
36 NFS4_MIXED_PREP_PREFIX,
37 NFS4_MIXED_PREP_SUFFIX
38 };
39
40 typedef enum NFS4ProfileState NFS4ProfileState;
41
42 /**
43 * Prepares the source UTF-8 string for use in file names and
44 * returns UTF-8 string on output.
45 * @param src
46 * @param srcLen
47 * @param dest
48 * @param destCapacity
49 * @param state
50 * @param parseError
51 * @param status
52 */
53 int32_t
54 nfs4_prepare(const char* src, int32_t srcLength,
55 char* dest, int32_t destCapacity,
56 NFS4ProfileState state,
57 UParseError* parseError,
58 UErrorCode* status);
59
60 /**
61 * @param dest
62 * @param destCapacity
63 * @param src
64 * @param srcLen
65 * @param state
66 * @param parseError
67 * @param status
68 */
69 int32_t
70 nfs4_mixed_prepare( const char* src, int32_t srcLength,
71 char* dest, int32_t destCapacity,
72 UParseError* parseError,
73 UErrorCode* status);
74
75 /**
76 * @param dest
77 * @param destCapacity
78 * @param src
79 * @param srcLen
80 * @param state
81 * @param parseError
82 * @param status
83 */
84 int32_t
85 nfs4_cis_prepare( const char* src, int32_t srcLength,
86 char* dest, int32_t destCapacity,
87 UParseError* parseError,
88 UErrorCode* status);
89
90 /**
91 * @param dest
92 * @param destCapacity
93 * @param src
94 * @param srcLen
95 * @param state
96 * @param parseError
97 * @param status
98 */
99 int32_t
100 nfs4_cs_prepare( const char* src, int32_t srcLength,
101 char* dest, int32_t destCapacity,
102 UBool isCaseSensitive,
103 UParseError* parseError,
104 UErrorCode* status);
105 #endif
106
107 #endif
108 /*
109 * Hey, Emacs, please set the following:
110 *
111 * Local Variables:
112 * indent-tabs-mode: nil
113 * End:
114 *
115 */