43 BOOLEAN Iso639Language;
47 Status =
gBS->LocateHandleBuffer (
54 if (EFI_ERROR (Status)) {
58 Iso639Language = (BOOLEAN)(ProtocolGuid == &gEfiUnicodeCollationProtocolGuid);
61 ReturnStatus = EFI_UNSUPPORTED;
62 for (Index = 0; Index < NumHandles; Index++) {
66 Status =
gBS->OpenProtocol (
72 EFI_OPEN_PROTOCOL_GET_PROTOCOL
74 if (EFI_ERROR (Status)) {
83 Uci->SupportedLanguages,
85 (Language ==
NULL) ?
"" : Language,
89 if (BestLanguage !=
NULL) {
91 mUnicodeCollationInterface = Uci;
97 if (Language !=
NULL) {
126 Status = EFI_UNSUPPORTED;
133 &gEfiUnicodeCollation2ProtocolGuid,
141 if (EFI_ERROR (Status)) {
144 &gEfiUnicodeCollationProtocolGuid,
171 ASSERT (mUnicodeCollationInterface !=
NULL);
173 return mUnicodeCollationInterface->StriColl (
174 mUnicodeCollationInterface,
189 IN OUT CHAR16 *String
192 ASSERT (
StrSize (String) != 0);
193 ASSERT (mUnicodeCollationInterface !=
NULL);
195 mUnicodeCollationInterface->StrUpr (mUnicodeCollationInterface, String);
207 IN OUT CHAR16 *String
210 ASSERT (
StrSize (String) != 0);
211 ASSERT (mUnicodeCollationInterface !=
NULL);
213 mUnicodeCollationInterface->StrLwr (mUnicodeCollationInterface, String);
233 ASSERT (Fat !=
NULL);
234 ASSERT (String !=
NULL);
235 ASSERT (((
UINTN)String & 0x01) == 0);
236 ASSERT (mUnicodeCollationInterface !=
NULL);
238 mUnicodeCollationInterface->FatToStr (mUnicodeCollationInterface, FatSize, Fat, String);
259 ASSERT (Fat !=
NULL);
260 ASSERT (
StrSize (String) != 0);
261 ASSERT (mUnicodeCollationInterface !=
NULL);
263 return mUnicodeCollationInterface->StrToFat (
264 mUnicodeCollationInterface,
UINTN EFIAPI StrSize(IN CONST CHAR16 *String)
VOID EFIAPI FreePool(IN VOID *Buffer)
#define PcdGetPtr(TokenName)
EFI_STATUS EFIAPI GetEfiGlobalVariable2(IN CONST CHAR16 *Name, OUT VOID **Value, OUT UINTN *Size OPTIONAL)
CHAR8 *EFIAPI GetBestLanguage(IN CONST CHAR8 *SupportedLanguages, IN UINTN Iso639Language,...)
BOOLEAN FatStrToFat(IN CHAR16 *String, IN UINTN FatSize, OUT CHAR8 *Fat)
VOID FatFatToStr(IN UINTN FatSize, IN CHAR8 *Fat, OUT CHAR16 *String)
INTN FatStriCmp(IN CHAR16 *S1, IN CHAR16 *S2)
EFI_STATUS InitializeUnicodeCollationSupportWorker(IN EFI_HANDLE AgentHandle, IN EFI_GUID *ProtocolGuid, IN CONST CHAR16 *VariableName, IN CONST CHAR8 *DefaultLanguage)
VOID FatStrLwr(IN OUT CHAR16 *String)
VOID FatStrUpr(IN OUT CHAR16 *String)
EFI_STATUS InitializeUnicodeCollationSupport(IN EFI_HANDLE AgentHandle)