X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdePkg%2FInclude%2FProtocol%2FHiiString.h;h=b8439c95a6fb3b5bef57d9bf51fe2102a74feec5;hp=d0b7e0d2218bd368658c0e66369d9bb781963a55;hb=9344f0921518309295da89c221d10cbead8531aa;hpb=1e966f6375d3b9fe77c6e4a6974f771f67182694 diff --git a/MdePkg/Include/Protocol/HiiString.h b/MdePkg/Include/Protocol/HiiString.h index d0b7e0d221..b8439c95a6 100644 --- a/MdePkg/Include/Protocol/HiiString.h +++ b/MdePkg/Include/Protocol/HiiString.h @@ -1,14 +1,11 @@ /** @file The file provides services to manipulate string data. - - Copyright (c) 2006 - 2008, 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. +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + + @par Revision Reference: + This Protocol was introduced in UEFI Specification 2.1. **/ @@ -24,10 +21,12 @@ typedef struct _EFI_HII_STRING_PROTOCOL EFI_HII_STRING_PROTOCOL; /** 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. + 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. @param This A pointer to the EFI_HII_STRING_PROTOCOL instance. - @param PackageList Handle of the package list where this string will + @param PackageList The handle of the package list where this string will be added. @param StringId On return, contains the new strings id, which is unique within PackageList. @@ -36,7 +35,7 @@ typedef struct _EFI_HII_STRING_PROTOCOL EFI_HII_STRING_PROTOCOL; 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 + not zero, the LanguageName being passed in will be ignored. @param String Points to the new null-terminated string. @param StringFontInfo Points to the new string's font information or @@ -47,7 +46,7 @@ typedef struct _EFI_HII_STRING_PROTOCOL EFI_HII_STRING_PROTOCOL; @retval EFI_NOT_FOUND The specified PackageList could not be found in database. @retval EFI_OUT_OF_RESOURCES Could not add the string due to lack of resources. - @retval EFI_INVALID_PARAMETER String is NULL or StringId is NULL or Language is NULL. + @retval EFI_INVALID_PARAMETER String is NULL, or StringId is NULL, or Language is NULL. @retval EFI_INVALID_PARAMETER The specified StringFontInfo does not exist in current database. @@ -59,7 +58,7 @@ EFI_STATUS IN EFI_HII_HANDLE PackageList, OUT EFI_STRING_ID *StringId, IN CONST CHAR8 *Language, - IN CONST CHAR16 *LanguageName, OPTIONAL + IN CONST CHAR16 *LanguageName, OPTIONAL IN CONST EFI_STRING String, IN CONST EFI_FONT_INFO *StringFontInfo OPTIONAL ); @@ -86,14 +85,16 @@ EFI_STATUS @retval EFI_SUCCESS The string was returned successfully. @retval EFI_NOT_FOUND The string specified by StringId is not available. - @retval EFI_NOT_FOUND The string specified by StringId is available but - not in the specified language. The specified PackageList is not in the database. + @retval EFI_INVALID_LANGUAGE The string specified by StringId is available but + not in the specified language. @retval EFI_BUFFER_TOO_SMALL The buffer specified by StringSize is too small to hold the string. - @retval EFI_INVALID_PARAMETER The String or Language or StringSize was NULL. - @retval EFI_OUT_OF_RESOURCES There were insufficient resources to complete the - request. + @retval EFI_INVALID_PARAMETER The Language or StringSize was NULL. + @retval EFI_INVALID_PARAMETER The value referenced by StringSize was not zero and + String was NULL. + @retval EFI_OUT_OF_RESOURCES There were insufficient resources to complete the + request. **/ typedef @@ -148,13 +149,16 @@ EFI_STATUS @param This A pointer to the EFI_HII_STRING_PROTOCOL instance. @param PackageList The package list to examine. - @param Languages Points to the buffer to hold the returned string. + @param Languages Points to the buffer to hold the returned + null-terminated ASCII string. @param LanguagesSize On entry, points to the size of the buffer pointed - to by Languages, in bytes. On return, points to + to by Languages, in bytes. On return, points to the length of Languages, in bytes. @retval EFI_SUCCESS The languages were returned successfully. - @retval EFI_INVALID_PARAMETER The Languages or LanguagesSize was NULL. + @retval EFI_INVALID_PARAMETER The LanguagesSize was NULL. + @retval EFI_INVALID_PARAMETER The value referenced by LanguagesSize is not zero + and Languages is NULL. @retval EFI_BUFFER_TOO_SMALL The LanguagesSize is too small to hold the list of supported languages. LanguageSize is updated to contain the required size. @@ -179,26 +183,30 @@ EFI_STATUS @param This A pointer to the EFI_HII_STRING_PROTOCOL instance. @param PackageList The package list to examine. - @param FirstLanguage Points to the primary language. - @param SecondaryLanguages Points to the buffer to hold the returned list of + @param PrimaryLanguage Points 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. + @param SecondaryLanguages Points to the buffer to hold the returned null-terminated + ASCII string that describes the list of secondary languages for the specified - FirstLanguage. If there are no secondary - languages, the function returns successfully, but + PrimaryLanguage. If there are no secondary + languages, the function returns successfully, but this is set to NULL. @param SecondaryLanguagesSize On entry, points to the size of the buffer pointed - to by SecondaryLanguages, in bytes. On return, + to by SecondaryLanguages, in bytes. On return, points to the length of SecondaryLanguages in bytes. @retval EFI_SUCCESS Secondary languages were correctly returned. - @retval EFI_INVALID_PARAMETER FirstLanguage or SecondaryLanguages or - SecondaryLanguagesSize was NULL. + @retval EFI_INVALID_PARAMETER PrimaryLanguage or SecondaryLanguagesSize was NULL. + @retval EFI_INVALID_PARAMETER The value referenced by SecondaryLanguagesSize is not + zero and SecondaryLanguages is NULL. @retval EFI_BUFFER_TOO_SMALL The buffer specified by SecondaryLanguagesSize is too small to hold the returned information. - SecondLanguageSize is updated to hold the size of + SecondaryLanguageSize is updated to hold the size of the buffer required. - @retval EFI_INVALID_LANGUAGE The language specified by FirstLanguage is not + @retval EFI_INVALID_LANGUAGE The language specified by PrimaryLanguage is not present in the specified package list. - @retval EFI_NOT_FOUND The specified PackageList is not in the Database. + @retval EFI_NOT_FOUND The specified PackageList is not in the Database. **/ typedef @@ -206,9 +214,9 @@ 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 + IN CONST CHAR8 *PrimaryLanguage, + IN OUT CHAR8 *SecondaryLanguages, + IN OUT UINTN *SecondaryLanguagesSize ); @@ -228,4 +236,3 @@ extern EFI_GUID gEfiHiiStringProtocolGuid; #endif -