1) Sync EdkCompatibilityPkg with EDK 1.04. The changes includes:
1.1) Bug fixes. (For details, please check Documents & files: Snapshot/Release Notes at https://edk.tianocore.org/servlets/ProjectDocumentList?folderID=43&expandFolder=43&folderID=6)
1.2) Add new UEFI protocol definitions for AbsolutePointer, FormBrowser2, HiiConfigAccess, HiiConfigRouting, HiiDatabase, HiiFont, HiiImage, HiiString, SimpleTextInputEx, DPC protocol.
1.3) Add Smbios 2.5, 2.6 supports.
Incompatible changes hilighted:
1) EFI_MANAGED_NETWORK_PROTOCOL_GUID changed.
2) EFI_IP4_IPCONFIG_DATA changed.
2) Add in EdkCompatibilityPkg/EdkCompatibilityPkg.dsc to build all libraries in this package.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4622 6f19259b-4bc3-4df7-8a09-765794883524
2008-01-24 07:37:35 +01:00
|
|
|
/*++
|
|
|
|
|
|
|
|
Copyright (c) 2007, Intel Corporation
|
|
|
|
All rights reserved. This program and the accompanying materials
|
|
|
|
are licensed and made available under the terms and conditions of the BSD License
|
|
|
|
which accompanies this distribution. The full text of the license may be found at
|
|
|
|
http://opensource.org/licenses/bsd-license.php
|
|
|
|
|
|
|
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|
|
|
|
|
|
|
Module Name:
|
|
|
|
|
|
|
|
HiiString.h
|
|
|
|
|
|
|
|
Abstract:
|
|
|
|
|
|
|
|
EFI_HII_STRING_PROTOCOL from UEFI 2.1 specification.
|
|
|
|
|
|
|
|
This protocol provides interfaces to manipulate string data.
|
|
|
|
|
|
|
|
Revision History
|
|
|
|
|
|
|
|
--*/
|
|
|
|
|
|
|
|
#ifndef __EFI_HII_STRING_PROTOCOL_H__
|
|
|
|
#define __EFI_HII_STRING_PROTOCOL_H__
|
|
|
|
|
|
|
|
#include EFI_PROTOCOL_DEFINITION (HiiFont)
|
|
|
|
|
|
|
|
//
|
|
|
|
// Global ID for the Hii String Protocol.
|
|
|
|
//
|
|
|
|
#define EFI_HII_STRING_PROTOCOL_GUID \
|
|
|
|
{ \
|
2008-03-28 13:00:46 +01:00
|
|
|
0xfd96974, 0x23aa, 0x4cdc, {0xb9, 0xcb, 0x98, 0xd1, 0x77, 0x50, 0x32, 0x2a} \
|
1) Sync EdkCompatibilityPkg with EDK 1.04. The changes includes:
1.1) Bug fixes. (For details, please check Documents & files: Snapshot/Release Notes at https://edk.tianocore.org/servlets/ProjectDocumentList?folderID=43&expandFolder=43&folderID=6)
1.2) Add new UEFI protocol definitions for AbsolutePointer, FormBrowser2, HiiConfigAccess, HiiConfigRouting, HiiDatabase, HiiFont, HiiImage, HiiString, SimpleTextInputEx, DPC protocol.
1.3) Add Smbios 2.5, 2.6 supports.
Incompatible changes hilighted:
1) EFI_MANAGED_NETWORK_PROTOCOL_GUID changed.
2) EFI_IP4_IPCONFIG_DATA changed.
2) Add in EdkCompatibilityPkg/EdkCompatibilityPkg.dsc to build all libraries in this package.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4622 6f19259b-4bc3-4df7-8a09-765794883524
2008-01-24 07:37:35 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
EFI_FORWARD_DECLARATION (EFI_HII_STRING_PROTOCOL);
|
|
|
|
|
|
|
|
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, OPTIONAL
|
|
|
|
IN CONST EFI_STRING String,
|
|
|
|
IN CONST EFI_FONT_INFO *StringFontInfo OPTIONAL
|
|
|
|
)
|
|
|
|
/*++
|
|
|
|
|
|
|
|
Routine Description:
|
|
|
|
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.
|
|
|
|
|
|
|
|
Arguments:
|
|
|
|
This - A pointer to the EFI_HII_STRING_PROTOCOL instance.
|
|
|
|
PackageList - Handle of the package list where this string will be added.
|
|
|
|
StringId - On return, contains the new strings id, which is unique within PackageList.
|
|
|
|
Language - Points to the language for the new string.
|
|
|
|
LanguageName - Points 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.
|
|
|
|
String - Points to the new null-terminated string.
|
2008-06-19 13:15:44 +02:00
|
|
|
StringFontInfo - Points to the new string's font information or NULL if the string should have the
|
1) Sync EdkCompatibilityPkg with EDK 1.04. The changes includes:
1.1) Bug fixes. (For details, please check Documents & files: Snapshot/Release Notes at https://edk.tianocore.org/servlets/ProjectDocumentList?folderID=43&expandFolder=43&folderID=6)
1.2) Add new UEFI protocol definitions for AbsolutePointer, FormBrowser2, HiiConfigAccess, HiiConfigRouting, HiiDatabase, HiiFont, HiiImage, HiiString, SimpleTextInputEx, DPC protocol.
1.3) Add Smbios 2.5, 2.6 supports.
Incompatible changes hilighted:
1) EFI_MANAGED_NETWORK_PROTOCOL_GUID changed.
2) EFI_IP4_IPCONFIG_DATA changed.
2) Add in EdkCompatibilityPkg/EdkCompatibilityPkg.dsc to build all libraries in this package.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4622 6f19259b-4bc3-4df7-8a09-765794883524
2008-01-24 07:37:35 +01:00
|
|
|
default system font, size and style.
|
|
|
|
|
|
|
|
Returns:
|
|
|
|
EFI_SUCCESS - The new string was added successfully.
|
|
|
|
EFI_NOT_FOUND - The specified PackageList could not be found in database.
|
|
|
|
EFI_OUT_OF_RESOURCES - Could not add the string due to lack of resources.
|
|
|
|
EFI_INVALID_PARAMETER - String is NULL or StringId is NULL or Language is NULL.
|
|
|
|
|
|
|
|
--*/
|
|
|
|
;
|
|
|
|
|
|
|
|
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 OPTIONAL
|
|
|
|
)
|
|
|
|
/*++
|
|
|
|
|
|
|
|
Routine Description:
|
|
|
|
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.
|
|
|
|
|
|
|
|
Arguments:
|
|
|
|
This - A pointer to the EFI_HII_STRING_PROTOCOL instance.
|
|
|
|
Language - Points to the language for the retrieved string.
|
|
|
|
PackageList - The package list in the HII database to search for the
|
|
|
|
specified string.
|
|
|
|
StringId - The string's id, which is unique within PackageList.
|
|
|
|
String - Points to the new null-terminated string.
|
|
|
|
StringSize - On 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.
|
2008-06-19 13:15:44 +02:00
|
|
|
StringFontInfo - If not NULL, points to the string's font information.
|
1) Sync EdkCompatibilityPkg with EDK 1.04. The changes includes:
1.1) Bug fixes. (For details, please check Documents & files: Snapshot/Release Notes at https://edk.tianocore.org/servlets/ProjectDocumentList?folderID=43&expandFolder=43&folderID=6)
1.2) Add new UEFI protocol definitions for AbsolutePointer, FormBrowser2, HiiConfigAccess, HiiConfigRouting, HiiDatabase, HiiFont, HiiImage, HiiString, SimpleTextInputEx, DPC protocol.
1.3) Add Smbios 2.5, 2.6 supports.
Incompatible changes hilighted:
1) EFI_MANAGED_NETWORK_PROTOCOL_GUID changed.
2) EFI_IP4_IPCONFIG_DATA changed.
2) Add in EdkCompatibilityPkg/EdkCompatibilityPkg.dsc to build all libraries in this package.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4622 6f19259b-4bc3-4df7-8a09-765794883524
2008-01-24 07:37:35 +01:00
|
|
|
It's caller's responsibility to free this buffer.
|
|
|
|
|
|
|
|
Returns:
|
|
|
|
EFI_SUCCESS - The string was returned successfully.
|
|
|
|
EFI_NOT_FOUND - The string specified by StringId is not available.
|
|
|
|
EFI_BUFFER_TOO_SMALL - The buffer specified by StringSize is too small to
|
|
|
|
hold the string.
|
|
|
|
EFI_INVALID_PARAMETER - The String or Language or StringSize was NULL.
|
|
|
|
EFI_OUT_OF_RESOURCES - There were insufficient resources to complete the
|
|
|
|
request.
|
|
|
|
|
|
|
|
--*/
|
|
|
|
;
|
|
|
|
|
|
|
|
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 CONST EFI_STRING String,
|
|
|
|
IN CONST EFI_FONT_INFO *StringFontInfo OPTIONAL
|
|
|
|
)
|
|
|
|
/*++
|
|
|
|
|
|
|
|
Routine Description:
|
|
|
|
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.
|
|
|
|
|
|
|
|
Arguments:
|
|
|
|
This - A pointer to the EFI_HII_STRING_PROTOCOL instance.
|
|
|
|
PackageList - The package list containing the strings.
|
2008-06-19 13:15:44 +02:00
|
|
|
StringId - The string's id, which is unique within PackageList.
|
1) Sync EdkCompatibilityPkg with EDK 1.04. The changes includes:
1.1) Bug fixes. (For details, please check Documents & files: Snapshot/Release Notes at https://edk.tianocore.org/servlets/ProjectDocumentList?folderID=43&expandFolder=43&folderID=6)
1.2) Add new UEFI protocol definitions for AbsolutePointer, FormBrowser2, HiiConfigAccess, HiiConfigRouting, HiiDatabase, HiiFont, HiiImage, HiiString, SimpleTextInputEx, DPC protocol.
1.3) Add Smbios 2.5, 2.6 supports.
Incompatible changes hilighted:
1) EFI_MANAGED_NETWORK_PROTOCOL_GUID changed.
2) EFI_IP4_IPCONFIG_DATA changed.
2) Add in EdkCompatibilityPkg/EdkCompatibilityPkg.dsc to build all libraries in this package.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4622 6f19259b-4bc3-4df7-8a09-765794883524
2008-01-24 07:37:35 +01:00
|
|
|
Language - Points to the language for the updated string.
|
|
|
|
String - Points to the new null-terminated string.
|
2008-06-19 13:15:44 +02:00
|
|
|
StringFontInfo - Points to the string's font information or NULL if the string font information is not
|
1) Sync EdkCompatibilityPkg with EDK 1.04. The changes includes:
1.1) Bug fixes. (For details, please check Documents & files: Snapshot/Release Notes at https://edk.tianocore.org/servlets/ProjectDocumentList?folderID=43&expandFolder=43&folderID=6)
1.2) Add new UEFI protocol definitions for AbsolutePointer, FormBrowser2, HiiConfigAccess, HiiConfigRouting, HiiDatabase, HiiFont, HiiImage, HiiString, SimpleTextInputEx, DPC protocol.
1.3) Add Smbios 2.5, 2.6 supports.
Incompatible changes hilighted:
1) EFI_MANAGED_NETWORK_PROTOCOL_GUID changed.
2) EFI_IP4_IPCONFIG_DATA changed.
2) Add in EdkCompatibilityPkg/EdkCompatibilityPkg.dsc to build all libraries in this package.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4622 6f19259b-4bc3-4df7-8a09-765794883524
2008-01-24 07:37:35 +01:00
|
|
|
changed.
|
|
|
|
|
|
|
|
Returns:
|
|
|
|
EFI_SUCCESS - The string was updated successfully.
|
|
|
|
EFI_NOT_FOUND - The string specified by StringId is not in the database.
|
|
|
|
EFI_INVALID_PARAMETER - The String or Language was NULL.
|
|
|
|
EFI_OUT_OF_RESOURCES - The system is out of resources to accomplish the task.
|
|
|
|
|
|
|
|
--*/
|
|
|
|
;
|
|
|
|
|
|
|
|
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
|
|
|
|
)
|
|
|
|
/*++
|
|
|
|
|
|
|
|
Routine Description:
|
|
|
|
This function returns the list of supported languages, in the format specified
|
|
|
|
in Appendix M of UEFI 2.1 spec.
|
|
|
|
|
|
|
|
Arguments:
|
|
|
|
This - A pointer to the EFI_HII_STRING_PROTOCOL instance.
|
|
|
|
PackageList - The package list to examine.
|
|
|
|
Languages - Points to the buffer to hold the returned string.
|
|
|
|
LanguagesSize - On entry, points to the size of the buffer pointed to by
|
|
|
|
Languages, in bytes. On
|
|
|
|
return, points to the length of Languages, in bytes.
|
|
|
|
|
|
|
|
Returns:
|
|
|
|
EFI_SUCCESS - The languages were returned successfully.
|
|
|
|
EFI_INVALID_PARAMETER - The Languages or LanguagesSize was NULL.
|
|
|
|
EFI_BUFFER_TOO_SMALL - The LanguagesSize is too small to hold the list of
|
|
|
|
supported languages. LanguageSize is updated to
|
|
|
|
contain the required size.
|
|
|
|
|
|
|
|
--*/
|
|
|
|
;
|
|
|
|
|
|
|
|
typedef
|
|
|
|
EFI_STATUS
|
|
|
|
(EFIAPI *EFI_HII_GET_2ND_LANGUAGES) (
|
|
|
|
IN CONST EFI_HII_STRING_PROTOCOL *This,
|
|
|
|
IN EFI_HII_HANDLE PackageList,
|
|
|
|
IN CONST CHAR8 *FirstLanguage,
|
|
|
|
IN OUT CHAR8 *SecondLanguages,
|
|
|
|
IN OUT UINTN *SecondLanguagesSize
|
|
|
|
)
|
|
|
|
/*++
|
|
|
|
|
|
|
|
Routine Description:
|
|
|
|
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.
|
|
|
|
|
|
|
|
Arguments:
|
|
|
|
This - A pointer to the EFI_HII_STRING_PROTOCOL instance.
|
|
|
|
PackageList - The package list to examine.
|
|
|
|
FirstLanguage - Points to the primary language.
|
|
|
|
SecondaryLanguages - Points to the buffer to hold the returned list of
|
|
|
|
secondary languages for the specified FirstLanguage.
|
|
|
|
If there are no secondary languages, the function
|
|
|
|
returns successfully, but this is set to NULL.
|
|
|
|
SecondaryLanguageSize - On entry, points to the size of the buffer pointed to
|
|
|
|
by SecondLanguages, in bytes. On return, points to
|
|
|
|
the length of SecondLanguages in bytes.
|
|
|
|
|
|
|
|
Returns:
|
|
|
|
EFI_SUCCESS - Secondary languages were correctly returned.
|
|
|
|
EFI_INVALID_PARAMETER - FirstLanguage or SecondLanguages or SecondLanguagesSize was NULL.
|
|
|
|
EFI_BUFFER_TOO_SMALL - The buffer specified by SecondLanguagesSize is
|
|
|
|
too small to hold the returned information.
|
|
|
|
SecondLanguageSize is updated to hold the size of
|
|
|
|
the buffer required.
|
|
|
|
|
|
|
|
--*/
|
|
|
|
;
|
|
|
|
//
|
|
|
|
// Interface structure for the EFI_HII_STRING_PROTOCOL
|
|
|
|
//
|
2008-03-20 17:37:48 +01:00
|
|
|
struct _EFI_HII_STRING_PROTOCOL {
|
1) Sync EdkCompatibilityPkg with EDK 1.04. The changes includes:
1.1) Bug fixes. (For details, please check Documents & files: Snapshot/Release Notes at https://edk.tianocore.org/servlets/ProjectDocumentList?folderID=43&expandFolder=43&folderID=6)
1.2) Add new UEFI protocol definitions for AbsolutePointer, FormBrowser2, HiiConfigAccess, HiiConfigRouting, HiiDatabase, HiiFont, HiiImage, HiiString, SimpleTextInputEx, DPC protocol.
1.3) Add Smbios 2.5, 2.6 supports.
Incompatible changes hilighted:
1) EFI_MANAGED_NETWORK_PROTOCOL_GUID changed.
2) EFI_IP4_IPCONFIG_DATA changed.
2) Add in EdkCompatibilityPkg/EdkCompatibilityPkg.dsc to build all libraries in this package.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4622 6f19259b-4bc3-4df7-8a09-765794883524
2008-01-24 07:37:35 +01:00
|
|
|
EFI_HII_NEW_STRING NewString;
|
|
|
|
EFI_HII_GET_STRING GetString;
|
|
|
|
EFI_HII_SET_STRING SetString;
|
|
|
|
EFI_HII_GET_LANGUAGES GetLanguages;
|
|
|
|
EFI_HII_GET_2ND_LANGUAGES GetSecondaryLanguages;
|
2008-03-20 17:37:48 +01:00
|
|
|
};
|
1) Sync EdkCompatibilityPkg with EDK 1.04. The changes includes:
1.1) Bug fixes. (For details, please check Documents & files: Snapshot/Release Notes at https://edk.tianocore.org/servlets/ProjectDocumentList?folderID=43&expandFolder=43&folderID=6)
1.2) Add new UEFI protocol definitions for AbsolutePointer, FormBrowser2, HiiConfigAccess, HiiConfigRouting, HiiDatabase, HiiFont, HiiImage, HiiString, SimpleTextInputEx, DPC protocol.
1.3) Add Smbios 2.5, 2.6 supports.
Incompatible changes hilighted:
1) EFI_MANAGED_NETWORK_PROTOCOL_GUID changed.
2) EFI_IP4_IPCONFIG_DATA changed.
2) Add in EdkCompatibilityPkg/EdkCompatibilityPkg.dsc to build all libraries in this package.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4622 6f19259b-4bc3-4df7-8a09-765794883524
2008-01-24 07:37:35 +01:00
|
|
|
|
|
|
|
extern EFI_GUID gEfiHiiStringProtocolGuid;
|
|
|
|
|
|
|
|
#endif
|