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 TO_UPPER(a) (CHAR16) (a <= 0xFF ? mEngUpperMap[a] : a)
36 #define TO_LOWER(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
,
63 Performs a case-insensitive comparison of a Null-terminated Unicode
64 pattern string and a Null-terminated Unicode string.
66 @param This Protocol instance pointer.
67 @param String A pointer to a Null-terminated Unicode string.
68 @param Pattern A pointer to a Null-terminated Unicode pattern string.
70 @retval TRUE Pattern was found in String.
71 @retval FALSE Pattern was not found in String.
77 IN EFI_UNICODE_COLLATION_PROTOCOL
*This
,
83 Converts all the Unicode characters in a Null-terminated Unicode string to
84 lower case Unicode characters.
86 @param This Protocol instance pointer.
87 @param Str A pointer to a Null-terminated Unicode string.
93 IN EFI_UNICODE_COLLATION_PROTOCOL
*This
,
98 Converts all the Unicode characters in a Null-terminated Unicode string to upper
99 case Unicode characters.
101 @param This Protocol instance pointer.
102 @param Str A pointer to a Null-terminated Unicode string.
108 IN EFI_UNICODE_COLLATION_PROTOCOL
*This
,
113 Converts an 8.3 FAT file name in an OEM character set to a Null-terminated
116 @param This Protocol instance pointer.
117 @param FatSize The size of the string Fat in bytes.
118 @param Fat A pointer to a Null-terminated string that contains an 8.3 file
119 name using an OEM character set.
120 @param String A pointer to a Null-terminated Unicode string. The string must
121 be preallocated to hold FatSize Unicode characters.
127 IN EFI_UNICODE_COLLATION_PROTOCOL
*This
,
134 Converts a Null-terminated Unicode string to legal characters in a FAT
135 filename using an OEM character set.
137 @param This Protocol instance pointer.
138 @param String A pointer to a Null-terminated Unicode string. The string must
139 be preallocated to hold FatSize Unicode characters.
140 @param FatSize The size of the string Fat in bytes.
141 @param Fat A pointer to a Null-terminated string that contains an 8.3 file
142 name using an OEM character set.
144 @retval TRUE Fat is a Long File Name
145 @retval FALSE Fat is an 8.3 file name
151 IN EFI_UNICODE_COLLATION_PROTOCOL
*This
,
158 The user Entry Point for English module.
160 This function initializes unicode character mapping and then installs Unicode
161 Collation & Unicode Collation 2 Protocols based on the feature flags.
163 @param ImageHandle The firmware allocated handle for the EFI image.
164 @param SystemTable A pointer to the EFI System Table.
166 @retval EFI_SUCCESS The entry point is executed successfully.
167 @retval other Some error occurs when executing this entry point.
172 InitializeUnicodeCollationEng (
173 IN EFI_HANDLE ImageHandle
,
174 IN EFI_SYSTEM_TABLE
*SystemTable