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