TianoCore EDK2 master
|
#include "InternalHiiLib.h"
Go to the source code of this file.
Functions | |
EFI_STRING_ID EFIAPI | HiiSetString (IN EFI_HII_HANDLE HiiHandle, IN EFI_STRING_ID StringId OPTIONAL, IN CONST EFI_STRING String, IN CONST CHAR8 *SupportedLanguages OPTIONAL) |
EFI_STRING EFIAPI | HiiGetPackageString (IN CONST EFI_GUID *PackageListGuid, IN EFI_STRING_ID StringId, IN CONST CHAR8 *Language OPTIONAL) |
EFI_STRING EFIAPI | HiiGetString (IN EFI_HII_HANDLE HiiHandle, IN EFI_STRING_ID StringId, IN CONST CHAR8 *Language OPTIONAL) |
EFI_STRING EFIAPI | HiiGetStringEx (IN EFI_HII_HANDLE HiiHandle, IN EFI_STRING_ID StringId, IN CONST CHAR8 *Language OPTIONAL, IN BOOLEAN TryBestLanguage) |
HII Library implementation that uses DXE protocols and services.
Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.
(C) Copyright 2021 Hewlett Packard Enterprise Development LP
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file HiiString.c.
EFI_STRING EFIAPI HiiGetPackageString | ( | IN CONST EFI_GUID * | PackageListGuid, |
IN EFI_STRING_ID | StringId, | ||
IN CONST CHAR8 *Language | OPTIONAL | ||
) |
Retrieves a string from a string package names by GUID in a specific language. If the language is not specified, then a string from a string package in the current platform language is retrieved. If the string can not be retrieved using the specified language or the current platform language, then the string is retrieved from the string package in the first language the string package supports. The returned string is allocated using AllocatePool(). The caller is responsible for freeing the allocated buffer using FreePool().
If PackageListGuid is NULL, then ASSERT(). If StringId is 0, then ASSERT.
[in] | PackageListGuid | The GUID of a package list that was previously registered in the HII Database. |
[in] | StringId | The identifier of the string to retrieved from the string package associated with PackageListGuid. |
[in] | Language | The language of the string to retrieve. If this parameter is NULL, then the current platform language is used. The format of Language must follow the language format assumed the HII Database. |
NULL | The package list specified by PackageListGuid is not present in the HII Database. |
NULL | The string specified by StringId is not present in the string package. |
Other | The string was returned. |
Definition at line 171 of file HiiString.c.
EFI_STRING EFIAPI HiiGetString | ( | IN EFI_HII_HANDLE | HiiHandle, |
IN EFI_STRING_ID | StringId, | ||
IN CONST CHAR8 *Language | OPTIONAL | ||
) |
Retrieves a string from a string package in a specific language specified in Language or in the best lanaguage. See HiiGetStringEx () for the details.
[in] | HiiHandle | A handle that was previously registered in the HII Database. |
[in] | StringId | The identifier of the string to retrieved from the string package associated with HiiHandle. |
[in] | Language | The language of the string to retrieve. If this parameter is NULL, then the current platform language is used. The format of Language must follow the language format assumed the HII Database. |
NULL | The string specified by StringId is not present in the string package. |
Other | The string was returned. |
Definition at line 211 of file HiiString.c.
EFI_STRING EFIAPI HiiGetStringEx | ( | IN EFI_HII_HANDLE | HiiHandle, |
IN EFI_STRING_ID | StringId, | ||
IN CONST CHAR8 *Language | OPTIONAL, | ||
IN BOOLEAN | TryBestLanguage | ||
) |
Retrieves a string from a string package in a specific language or in the best language at discretion of this function according to the priority of languages. TryBestLanguage is used to get the string in the best language or in the language specified in Language parameter. The behavior is, If TryBestLanguage is TRUE, this function looks for the best language for the string.
The returned string is allocated using AllocatePool(). The caller is responsible for freeing the allocated buffer using FreePool().
If HiiHandle is NULL, then ASSERT(). If StringId is 0, then ASSET. If TryBestLanguage is FALE and Language is NULL, then ASSERT().
[in] | HiiHandle | A handle that was previously registered in the HII Database. |
[in] | StringId | The identifier of the string to retrieved from the string package associated with HiiHandle. |
[in] | Language | The language of the string to retrieve. If this parameter is NULL, then the current platform language is used. The format of Language must follow the language format assumed the HII Database. |
[in] | TryBestLanguage | If TRUE, try to get the best matching language from all supported languages.If FALSE, the Language must be assigned for the StringID. |
NULL | The string specified by StringId is not present in the string package. |
Other | The string was returned. |
Definition at line 255 of file HiiString.c.
EFI_STRING_ID EFIAPI HiiSetString | ( | IN EFI_HII_HANDLE | HiiHandle, |
IN EFI_STRING_ID StringId | OPTIONAL, | ||
IN CONST EFI_STRING | String, | ||
IN CONST CHAR8 *SupportedLanguages | OPTIONAL | ||
) |
This function create a new string in String Package or updates an existing string in a String Package. If StringId is 0, then a new string is added to a String Package. If StringId is not zero, then a string in String Package is updated. If SupportedLanguages is NULL, then the string is added or updated for all the languages that the String Package supports. If SupportedLanguages is not NULL, then the string is added or updated for the set of languages specified by SupportedLanguages.
If HiiHandle is NULL, then ASSERT(). If String is NULL, then ASSERT().
[in] | HiiHandle | A handle that was previously registered in the HII Database. |
[in] | StringId | If zero, then a new string is created in the String Package associated with HiiHandle. If non-zero, then the string specified by StringId is updated in the String Package associated with HiiHandle. |
[in] | String | A pointer to the Null-terminated Unicode string to add or update in the String Package associated with HiiHandle. |
[in] | SupportedLanguages | A pointer to a Null-terminated ASCII string of language codes. If this parameter is NULL, then String is added or updated in the String Package associated with HiiHandle for all the languages that the String Package supports. If this parameter is not NULL, then then String is added or updated in the String Package associated with HiiHandle for the set oflanguages specified by SupportedLanguages. The format of SupportedLanguages must follow the language format assumed the HII Database. |
0 | The string could not be added or updated in the String Package. |
Other | The EFI_STRING_ID of the newly added or updated string. |
Definition at line 52 of file HiiString.c.