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