]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/UnicodeCollationEng.h
Add doxygen style comments for functions in English module.
[mirror_edk2.git] / MdeModulePkg / Universal / Disk / UnicodeCollation / EnglishDxe / UnicodeCollationEng.h
CommitLineData
f42be642 1/** @file\r
2 Head file for Unicode Collation Protocol (English)\r
adbcbf8f 3\r
f42be642 4Copyright (c) 2006 - 2008, Intel Corporation. <BR>\r
adbcbf8f 5All rights reserved. This program and the accompanying materials\r
6are licensed and made available under the terms and conditions of the BSD License\r
7which accompanies this distribution. The full text of the license may be found at\r
8http://opensource.org/licenses/bsd-license.php\r
9\r
10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
f42be642 13**/\r
adbcbf8f 14\r
15#ifndef _UNICODE_COLLATION_ENG_H\r
16#define _UNICODE_COLLATION_ENG_H\r
17\r
18\r
ed7748fe 19\r
adbcbf8f 20#include <Uefi.h>\r
21\r
ed7748fe 22\r
adbcbf8f 23#include <Protocol/UnicodeCollation.h>\r
ed7748fe 24\r
adbcbf8f 25#include <Library/DebugLib.h>\r
26#include <Library/UefiDriverEntryPoint.h>\r
27#include <Library/UefiBootServicesTableLib.h>\r
2d9a7522 28#include <Library/PcdLib.h>\r
adbcbf8f 29\r
30//\r
31// Defines\r
32//\r
33#define CHAR_FAT_VALID 0x01\r
34\r
35#define ToUpper(a) (CHAR16) (a <= 0xFF ? mEngUpperMap[a] : a)\r
36#define ToLower(a) (CHAR16) (a <= 0xFF ? mEngLowerMap[a] : a)\r
37\r
38//\r
39// Prototypes\r
40//\r
61e33430 41/**\r
42 Performs a case-insensitive comparison of two Null-terminated Unicode \r
43 strings.\r
44\r
45 @param This Protocol instance pointer.\r
46 @param Str1 A pointer to a Null-terminated Unicode string.\r
47 @param Str2 A pointer to a Null-terminated Unicode string.\r
48\r
49 @retval 0 Str1 is equivalent to Str2\r
50 @retval > 0 Str1 is lexically greater than Str2\r
51 @retval < 0 Str1 is lexically less than Str2\r
52\r
53**/\r
adbcbf8f 54INTN\r
55EFIAPI\r
56EngStriColl (\r
57 IN EFI_UNICODE_COLLATION_PROTOCOL *This,\r
61e33430 58 IN CHAR16 *Str1,\r
59 IN CHAR16 *Str2\r
adbcbf8f 60 )\r
61;\r
62\r
61e33430 63/**\r
64 Performs a case-insensitive comparison of a Null-terminated Unicode \r
65 pattern string and a Null-terminated Unicode string.\r
66\r
67 @param This Protocol instance pointer.\r
68 @param String A pointer to a Null-terminated Unicode string.\r
69 @param Pattern A pointer to a Null-terminated Unicode pattern string.\r
70\r
71 @retval TRUE Pattern was found in String.\r
72 @retval FALSE Pattern was not found in String.\r
73\r
74**/\r
adbcbf8f 75BOOLEAN\r
76EFIAPI\r
77EngMetaiMatch (\r
78 IN EFI_UNICODE_COLLATION_PROTOCOL *This,\r
79 IN CHAR16 *String,\r
80 IN CHAR16 *Pattern\r
81 )\r
82;\r
83\r
61e33430 84/**\r
85 Converts all the Unicode characters in a Null-terminated Unicode string to \r
86 lower case Unicode characters.\r
87\r
88 @param This Protocol instance pointer.\r
89 @param Str A pointer to a Null-terminated Unicode string.\r
90\r
91**/\r
adbcbf8f 92VOID\r
93EFIAPI\r
94EngStrLwr (\r
95 IN EFI_UNICODE_COLLATION_PROTOCOL *This,\r
96 IN OUT CHAR16 *Str\r
97 )\r
98;\r
99\r
61e33430 100/**\r
101 Converts all the Unicode characters in a Null-terminated Unicode string to upper\r
102 case Unicode characters.\r
103\r
104 @param This Protocol instance pointer.\r
105 @param Str A pointer to a Null-terminated Unicode string.\r
106\r
107**/\r
adbcbf8f 108VOID\r
109EFIAPI\r
110EngStrUpr (\r
111 IN EFI_UNICODE_COLLATION_PROTOCOL *This,\r
112 IN OUT CHAR16 *Str\r
113 )\r
114;\r
115\r
61e33430 116/**\r
117 Converts an 8.3 FAT file name in an OEM character set to a Null-terminated \r
118 Unicode string.\r
119\r
120 @param This Protocol instance pointer.\r
121 @param FatSize The size of the string Fat in bytes.\r
122 @param Fat A pointer to a Null-terminated string that contains an 8.3 file\r
123 name using an OEM character set.\r
124 @param String A pointer to a Null-terminated Unicode string. The string must\r
125 be preallocated to hold FatSize Unicode characters.\r
126\r
127**/\r
adbcbf8f 128VOID\r
129EFIAPI\r
130EngFatToStr (\r
131 IN EFI_UNICODE_COLLATION_PROTOCOL *This,\r
132 IN UINTN FatSize,\r
133 IN CHAR8 *Fat,\r
134 OUT CHAR16 *String\r
135 )\r
136;\r
137\r
61e33430 138/**\r
139 Converts a Null-terminated Unicode string to legal characters in a FAT \r
140 filename using an OEM character set. \r
141\r
142 @param This Protocol instance pointer.\r
143 @param String A pointer to a Null-terminated Unicode string. The string must\r
144 be preallocated to hold FatSize Unicode characters.\r
145 @param FatSize The size of the string Fat in bytes.\r
146 @param Fat A pointer to a Null-terminated string that contains an 8.3 file\r
147 name using an OEM character set.\r
148\r
149 @retval TRUE Fat is a Long File Name\r
150 @retval FALSE Fat is an 8.3 file name\r
151\r
152**/\r
adbcbf8f 153BOOLEAN\r
154EFIAPI\r
155EngStrToFat (\r
156 IN EFI_UNICODE_COLLATION_PROTOCOL *This,\r
157 IN CHAR16 *String,\r
158 IN UINTN FatSize,\r
159 OUT CHAR8 *Fat\r
160 )\r
161;\r
162\r
61e33430 163/**\r
164 The user Entry Point for English module.\r
165 \r
166 This function initializes unicode character mapping and then installs Unicode\r
167 Collation & Unicode Collation 2 Protocols based on the feature flags. \r
168\r
169 @param ImageHandle The firmware allocated handle for the EFI image. \r
170 @param SystemTable A pointer to the EFI System Table.\r
171 \r
172 @retval EFI_SUCCESS The entry point is executed successfully.\r
173 @retval other Some error occurs when executing this entry point.\r
174\r
175**/\r
adbcbf8f 176EFI_STATUS\r
177EFIAPI\r
178InitializeUnicodeCollationEng (\r
179 IN EFI_HANDLE ImageHandle,\r
180 IN EFI_SYSTEM_TABLE *SystemTable\r
181 )\r
182;\r
183\r
184#endif\r