MdePkg[all]  1.08
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
HiiString.h File Reference

Data Structures

struct  _EFI_HII_STRING_PROTOCOL
 

Macros

#define EFI_HII_STRING_PROTOCOL_GUID   { 0xfd96974, 0x23aa, 0x4cdc, { 0xb9, 0xcb, 0x98, 0xd1, 0x77, 0x50, 0x32, 0x2a } }
 

Typedefs

typedef struct
_EFI_HII_STRING_PROTOCOL 
EFI_HII_STRING_PROTOCOL
 
typedef EFI_STATUS(EFIAPIEFI_HII_NEW_STRING )(IN CONST EFI_HII_STRING_PROTOCOL *This, IN EFI_HII_HANDLE PackageList, OUT EFI_STRING_ID *StringId, IN CONST CHAR8 *Language, IN CONST CHAR16 *LanguageName, IN CONST EFI_STRING String, IN CONST EFI_FONT_INFO *StringFontInfo)
 
typedef EFI_STATUS(EFIAPIEFI_HII_GET_STRING )(IN CONST EFI_HII_STRING_PROTOCOL *This, IN CONST CHAR8 *Language, IN EFI_HII_HANDLE PackageList, IN EFI_STRING_ID StringId, OUT EFI_STRING String, IN OUT UINTN *StringSize, OUT EFI_FONT_INFO **StringFontInfo)
 
typedef EFI_STATUS(EFIAPIEFI_HII_SET_STRING )(IN CONST EFI_HII_STRING_PROTOCOL *This, IN EFI_HII_HANDLE PackageList, IN EFI_STRING_ID StringId, IN CONST CHAR8 *Language, IN EFI_STRING String, IN CONST EFI_FONT_INFO *StringFontInfo)
 
typedef EFI_STATUS(EFIAPIEFI_HII_GET_LANGUAGES )(IN CONST EFI_HII_STRING_PROTOCOL *This, IN EFI_HII_HANDLE PackageList, IN OUT CHAR8 *Languages, IN OUT UINTN *LanguagesSize)
 
typedef EFI_STATUS(EFIAPIEFI_HII_GET_2ND_LANGUAGES )(IN CONST EFI_HII_STRING_PROTOCOL *This, IN EFI_HII_HANDLE PackageList, IN CONST CHAR8 *PrimaryLanguage, IN OUT CHAR8 *SecondaryLanguages, IN OUT UINTN *SecondaryLanguagesSize)
 

Variables

EFI_GUID gEfiHiiStringProtocolGuid
 

Detailed Description

The file provides services to manipulate string data.

Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Revision Reference:
This Protocol was introduced in UEFI Specification 2.1.

Macro Definition Documentation

#define EFI_HII_STRING_PROTOCOL_GUID   { 0xfd96974, 0x23aa, 0x4cdc, { 0xb9, 0xcb, 0x98, 0xd1, 0x77, 0x50, 0x32, 0x2a } }

Typedef Documentation

typedef EFI_STATUS(EFIAPI * EFI_HII_GET_2ND_LANGUAGES)(IN CONST EFI_HII_STRING_PROTOCOL *This, IN EFI_HII_HANDLE PackageList, IN CONST CHAR8 *PrimaryLanguage, IN OUT CHAR8 *SecondaryLanguages, IN OUT UINTN *SecondaryLanguagesSize)

Each string package has associated with it a single primary language and zero or more secondary languages. This routine returns the secondary languages associated with a package list.

Parameters
ThisA pointer to the EFI_HII_STRING_PROTOCOL instance.
PackageListThe package list to examine.
PrimaryLanguagePoints to the null-terminated ASCII string that specifies the primary language. Languages are specified in the format specified in Appendix M of the UEFI 2.0 specification.
SecondaryLanguagesPoints to the buffer to hold the returned null-terminated ASCII string that describes the list of secondary languages for the specified PrimaryLanguage. If there are no secondary languages, the function returns successfully, but this is set to NULL.
SecondaryLanguagesSizeOn entry, points to the size of the buffer pointed to by SecondaryLanguages, in bytes. On return, points to the length of SecondaryLanguages in bytes.
Return values
EFI_SUCCESSSecondary languages were correctly returned.
EFI_INVALID_PARAMETERPrimaryLanguage or SecondaryLanguagesSize was NULL.
EFI_INVALID_PARAMETERThe value referenced by SecondaryLanguagesSize is not zero and SecondaryLanguages is NULL.
EFI_BUFFER_TOO_SMALLThe buffer specified by SecondaryLanguagesSize is too small to hold the returned information. SecondaryLanguageSize is updated to hold the size of the buffer required.
EFI_INVALID_LANGUAGEThe language specified by PrimaryLanguage is not present in the specified package list.
EFI_NOT_FOUNDThe specified PackageList is not in the Database.
typedef EFI_STATUS(EFIAPI * EFI_HII_GET_LANGUAGES)(IN CONST EFI_HII_STRING_PROTOCOL *This, IN EFI_HII_HANDLE PackageList, IN OUT CHAR8 *Languages, IN OUT UINTN *LanguagesSize)

This function returns the list of supported languages.

Parameters
ThisA pointer to the EFI_HII_STRING_PROTOCOL instance.
PackageListThe package list to examine.
LanguagesPoints to the buffer to hold the returned null-terminated ASCII string.
LanguagesSizeOn entry, points to the size of the buffer pointed to by Languages, in bytes. On return, points to the length of Languages, in bytes.
Return values
EFI_SUCCESSThe languages were returned successfully.
EFI_INVALID_PARAMETERThe LanguagesSize was NULL.
EFI_INVALID_PARAMETERThe value referenced by LanguagesSize is not zero and Languages is NULL.
EFI_BUFFER_TOO_SMALLThe LanguagesSize is too small to hold the list of supported languages. LanguageSize is updated to contain the required size.
EFI_NOT_FOUNDCould not find string package in specified packagelist.
typedef EFI_STATUS(EFIAPI * EFI_HII_GET_STRING)(IN CONST EFI_HII_STRING_PROTOCOL *This, IN CONST CHAR8 *Language, IN EFI_HII_HANDLE PackageList, IN EFI_STRING_ID StringId, OUT EFI_STRING String, IN OUT UINTN *StringSize, OUT EFI_FONT_INFO **StringFontInfo)

This function retrieves the string specified by StringId which is associated with the specified PackageList in the language Language and copies it into the buffer specified by String.

Parameters
ThisA pointer to the EFI_HII_STRING_PROTOCOL instance.
LanguagePoints to the language for the retrieved string.
PackageListThe package list in the HII database to search for the specified string.
StringIdThe string's id, which is unique within PackageList.
StringPoints to the new null-terminated string.
StringSizeOn entry, points to the size of the buffer pointed to by String, in bytes. On return, points to the length of the string, in bytes.
StringFontInfoIf not NULL, points to the string's font information. It's caller's responsibility to free this buffer.
Return values
EFI_SUCCESSThe string was returned successfully.
EFI_NOT_FOUNDThe string specified by StringId is not available. The specified PackageList is not in the database.
EFI_INVALID_LANGUAGEThe string specified by StringId is available but not in the specified language.
EFI_BUFFER_TOO_SMALLThe buffer specified by StringSize is too small to hold the string.
EFI_INVALID_PARAMETERThe Language or StringSize was NULL.
EFI_INVALID_PARAMETERThe value referenced by StringSize was not zero and String was NULL.
EFI_OUT_OF_RESOURCESThere were insufficient resources to complete the request.
typedef EFI_STATUS(EFIAPI * EFI_HII_NEW_STRING)(IN CONST EFI_HII_STRING_PROTOCOL *This, IN EFI_HII_HANDLE PackageList, OUT EFI_STRING_ID *StringId, IN CONST CHAR8 *Language, IN CONST CHAR16 *LanguageName, IN CONST EFI_STRING String, IN CONST EFI_FONT_INFO *StringFontInfo)

This function adds the string String to the group of strings owned by PackageList, with the specified font information StringFontInfo, and returns a new string id. The new string identifier is guaranteed to be unique within the package list. That new string identifier is reserved for all languages in the package list.

Parameters
ThisA pointer to the EFI_HII_STRING_PROTOCOL instance.
PackageListThe handle of the package list where this string will be added.
StringIdOn return, contains the new strings id, which is unique within PackageList.
LanguagePoints to the language for the new string.
LanguageNamePoints to the printable language name to associate with the passed in Language field.If LanguageName is not NULL and the string package header's LanguageName associated with a given Language is not zero, the LanguageName being passed in will be ignored.
StringPoints to the new null-terminated string.
StringFontInfoPoints to the new string's font information or NULL if the string should have the default system font, size and style.
Return values
EFI_SUCCESSThe new string was added successfully.
EFI_NOT_FOUNDThe specified PackageList could not be found in database.
EFI_OUT_OF_RESOURCESCould not add the string due to lack of resources.
EFI_INVALID_PARAMETERString is NULL, or StringId is NULL, or Language is NULL.
EFI_INVALID_PARAMETERThe specified StringFontInfo does not exist in current database.
typedef EFI_STATUS(EFIAPI * EFI_HII_SET_STRING)(IN CONST EFI_HII_STRING_PROTOCOL *This, IN EFI_HII_HANDLE PackageList, IN EFI_STRING_ID StringId, IN CONST CHAR8 *Language, IN EFI_STRING String, IN CONST EFI_FONT_INFO *StringFontInfo)

This function updates the string specified by StringId in the specified PackageList to the text specified by String and, optionally, the font information specified by StringFontInfo.

Parameters
ThisA pointer to the EFI_HII_STRING_PROTOCOL instance.
PackageListThe package list containing the strings.
StringIdThe string's id, which is unique within PackageList.
LanguagePoints to the language for the updated string.
StringPoints to the new null-terminated string.
StringFontInfoPoints to the string's font information or NULL if the string font information is not changed.
Return values
EFI_SUCCESSThe string was updated successfully.
EFI_NOT_FOUNDThe string specified by StringId is not in the database.
EFI_INVALID_PARAMETERThe String or Language was NULL.
EFI_INVALID_PARAMETERThe specified StringFontInfo does not exist in current database.
EFI_OUT_OF_RESOURCESThe system is out of resources to accomplish the task.

Variable Documentation

EFI_GUID gEfiHiiStringProtocolGuid