]> git.proxmox.com Git - mirror_edk2.git/blame - EdkCompatibilityPkg/Foundation/Efi/Protocol/UnicodeCollation/UnicodeCollation.h
Update the copyright notice format
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Efi / Protocol / UnicodeCollation / UnicodeCollation.h
CommitLineData
3eb9473e 1/*++\r
2\r
f57387d5
HT
3Copyright (c) 2004, Intel Corporation. All rights reserved.<BR>\r
4This program and the accompanying materials \r
3eb9473e 5are licensed and made available under the terms and conditions of the BSD License \r
6which accompanies this distribution. The full text of the license may be found at \r
7http://opensource.org/licenses/bsd-license.php \r
8 \r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
11\r
12Module Name:\r
13\r
14 UnicodeCollation.h\r
15\r
16Abstract:\r
17\r
18 Unicode Collation protocol that follows the EFI 1.0 specification.\r
19\r
20--*/\r
21\r
22#ifndef _UNICODE_COLLATION_H_\r
23#define _UNICODE_COLLATION_H_\r
24\r
25#define EFI_UNICODE_COLLATION_PROTOCOL_GUID \\r
26 { \\r
7ccf38a3 27 0x1d85cd7f, 0xf43d, 0x11d2, {0x9a, 0xc, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} \\r
3eb9473e 28 }\r
29\r
30EFI_FORWARD_DECLARATION (EFI_UNICODE_COLLATION_PROTOCOL);\r
31\r
32//\r
33// Protocol data structures and defines\r
34//\r
35#define EFI_UNICODE_BYTE_ORDER_MARK ((CHAR16)(0xfeff))\r
36#define EFI_UNICODE_BYTE_ORDER_MARK_REVERSE ((CHAR16)(0xfffe))\r
37\r
38//\r
39// Protocol member functions\r
40//\r
41typedef\r
42INTN\r
43(EFIAPI *EFI_UNICODE_COLLATION_STRICOLL) (\r
44 IN EFI_UNICODE_COLLATION_PROTOCOL * This,\r
45 IN CHAR16 *Str1,\r
46 IN CHAR16 *Str2\r
47 )\r
48/*++\r
49\r
50 Routine Description:\r
51 Performs a case-insensitive comparison of two Null-terminated Unicode \r
52 strings.\r
53\r
54 Arguments:\r
55 This - Protocol instance pointer.\r
56 Str1 - A pointer to a Null-terminated Unicode string.\r
57 Str2 - A pointer to a Null-terminated Unicode string.\r
58\r
59 Returns:\r
60 0 - Str1 is equivalent to Str2\r
61 > 0 - Str1 is lexically greater than Str2\r
62 < 0 - Str1 is lexically less than Str2\r
63\r
64--*/\r
65;\r
66\r
67typedef\r
68BOOLEAN\r
69(EFIAPI *EFI_UNICODE_COLLATION_METAIMATCH) (\r
70 IN EFI_UNICODE_COLLATION_PROTOCOL * This,\r
71 IN CHAR16 *String,\r
72 IN CHAR16 *Pattern\r
73 )\r
74/*++\r
75\r
76 Routine Description:\r
77 Performs a case-insensitive comparison of a Null-terminated Unicode \r
78 pattern string and a Null-terminated Unicode string.\r
79\r
80 Arguments:\r
81 This - Protocol instance pointer.\r
82 String - A pointer to a Null-terminated Unicode string.\r
83 Pattern - A pointer to a Null-terminated Unicode pattern string.\r
84\r
85 Returns:\r
86 TRUE - Pattern was found in String.\r
87 FALSE - Pattern was not found in String.\r
88\r
89--*/\r
90;\r
91\r
92typedef\r
93VOID\r
94(EFIAPI *EFI_UNICODE_COLLATION_STRLWR) (\r
95 IN EFI_UNICODE_COLLATION_PROTOCOL * This,\r
96 IN OUT CHAR16 *Str\r
97 )\r
98/*++\r
99\r
100 Routine Description:\r
101 Converts all the Unicode characters in a Null-terminated Unicode string to \r
102 lower case Unicode characters.\r
103\r
104 Arguments:\r
105 This - Protocol instance pointer.\r
106 String - A pointer to a Null-terminated Unicode string.\r
107\r
108 Returns:\r
109 NONE\r
110\r
111--*/\r
112;\r
113\r
114typedef\r
115VOID\r
116(EFIAPI *EFI_UNICODE_COLLATION_STRUPR) (\r
117 IN EFI_UNICODE_COLLATION_PROTOCOL * This,\r
118 IN OUT CHAR16 *Str\r
119 )\r
120/*++\r
121\r
122 Routine Description:\r
123 Converts all the Unicode characters in a Null-terminated Unicode string to upper\r
124 case Unicode characters.\r
125 \r
126 Arguments:\r
127 This - Protocol instance pointer.\r
128 String - A pointer to a Null-terminated Unicode string.\r
129\r
130 Returns:\r
131 NONE\r
132\r
133--*/\r
134;\r
135\r
136typedef\r
137VOID\r
138(EFIAPI *EFI_UNICODE_COLLATION_FATTOSTR) (\r
139 IN EFI_UNICODE_COLLATION_PROTOCOL * This,\r
140 IN UINTN FatSize,\r
141 IN CHAR8 *Fat,\r
142 OUT CHAR16 *String\r
143 )\r
144/*++\r
145\r
146 Routine Description:\r
147 Converts an 8.3 FAT file name in an OEM character set to a Null-terminated \r
148 Unicode string.\r
149 \r
150 Arguments:\r
151 This - Protocol instance pointer.\r
152 FatSize - The size of the string Fat in bytes.\r
153 Fat - A pointer to a Null-terminated string that contains an 8.3 file\r
154 name using an OEM character set.\r
155 String - A pointer to a Null-terminated Unicode string. The string must\r
156 be preallocated to hold FatSize Unicode characters.\r
157 Returns:\r
158 NONE\r
159\r
160--*/\r
161;\r
162\r
163typedef\r
164BOOLEAN\r
165(EFIAPI *EFI_UNICODE_COLLATION_STRTOFAT) (\r
166 IN EFI_UNICODE_COLLATION_PROTOCOL * This,\r
167 IN CHAR16 *String,\r
168 IN UINTN FatSize,\r
169 OUT CHAR8 *Fat\r
170 )\r
171/*++\r
172\r
173 Routine Description:\r
174 Converts a Null-terminated Unicode string to legal characters in a FAT \r
175 filename using an OEM character set. \r
176\r
177 Arguments:\r
178 This - Protocol instance pointer.\r
179 String - A pointer to a Null-terminated Unicode string. The string must\r
180 be preallocated to hold FatSize Unicode characters.\r
181 FatSize - The size of the string Fat in bytes.\r
182 Fat - A pointer to a Null-terminated string that contains an 8.3 file\r
183 name using an OEM character set.\r
184 Returns:\r
185 TRUE - Fat is a Long File Name\r
186 FALSE - Fat is an 8.3 file name\r
187\r
188--*/\r
189;\r
190\r
e5bce275 191struct _EFI_UNICODE_COLLATION_PROTOCOL {\r
3eb9473e 192 //\r
193 // general\r
194 //\r
195 EFI_UNICODE_COLLATION_STRICOLL StriColl;\r
196 EFI_UNICODE_COLLATION_METAIMATCH MetaiMatch;\r
197 EFI_UNICODE_COLLATION_STRLWR StrLwr;\r
198 EFI_UNICODE_COLLATION_STRUPR StrUpr;\r
199\r
200 //\r
201 // for supporting fat volumes\r
202 //\r
203 EFI_UNICODE_COLLATION_FATTOSTR FatToStr;\r
204 EFI_UNICODE_COLLATION_STRTOFAT StrToFat;\r
205\r
206 CHAR8 *SupportedLanguages;\r
e5bce275 207};\r
3eb9473e 208\r
209extern EFI_GUID gEfiUnicodeCollationProtocolGuid;\r
210\r
211#endif\r