2 Head file for Unicode Collation Protocol (English)
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
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.
15 #ifndef _UNICODE_COLLATION_ENG_H
16 #define _UNICODE_COLLATION_ENG_H
23 #include <Protocol/UnicodeCollation.h>
25 #include <Library/DebugLib.h>
26 #include <Library/UefiDriverEntryPoint.h>
27 #include <Library/UefiBootServicesTableLib.h>
28 #include <Library/PcdLib.h>
33 #define CHAR_FAT_VALID 0x01
35 #define ToUpper(a) (CHAR16) (a <= 0xFF ? mEngUpperMap[a] : a)
36 #define ToLower(a) (CHAR16) (a <= 0xFF ? mEngLowerMap[a] : a)
42 Performs a case-insensitive comparison of two Null-terminated Unicode
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.
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
57 IN EFI_UNICODE_COLLATION_PROTOCOL
*This
,
64 Performs a case-insensitive comparison of a Null-terminated Unicode
65 pattern string and a Null-terminated Unicode string.
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.
71 @retval TRUE Pattern was found in String.
72 @retval FALSE Pattern was not found in String.
78 IN EFI_UNICODE_COLLATION_PROTOCOL
*This
,
85 Converts all the Unicode characters in a Null-terminated Unicode string to
86 lower case Unicode characters.
88 @param This Protocol instance pointer.
89 @param Str A pointer to a Null-terminated Unicode string.
95 IN EFI_UNICODE_COLLATION_PROTOCOL
*This
,
101 Converts all the Unicode characters in a Null-terminated Unicode string to upper
102 case Unicode characters.
104 @param This Protocol instance pointer.
105 @param Str A pointer to a Null-terminated Unicode string.
111 IN EFI_UNICODE_COLLATION_PROTOCOL
*This
,
117 Converts an 8.3 FAT file name in an OEM character set to a Null-terminated
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.
131 IN EFI_UNICODE_COLLATION_PROTOCOL
*This
,
139 Converts a Null-terminated Unicode string to legal characters in a FAT
140 filename using an OEM character set.
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.
149 @retval TRUE Fat is a Long File Name
150 @retval FALSE Fat is an 8.3 file name
156 IN EFI_UNICODE_COLLATION_PROTOCOL
*This
,
164 The user Entry Point for English module.
166 This function initializes unicode character mapping and then installs Unicode
167 Collation & Unicode Collation 2 Protocols based on the feature flags.
169 @param ImageHandle The firmware allocated handle for the EFI image.
170 @param SystemTable A pointer to the EFI System Table.
172 @retval EFI_SUCCESS The entry point is executed successfully.
173 @retval other Some error occurs when executing this entry point.
178 InitializeUnicodeCollationEng (
179 IN EFI_HANDLE ImageHandle
,
180 IN EFI_SYSTEM_TABLE
*SystemTable