]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Protocol/HiiString.h
MdePkg/UefiLib: Avoid mis-calculate of graphic console size
[mirror_edk2.git] / MdePkg / Include / Protocol / HiiString.h
index 169696e79c5b10fec112d63845da4e4f026e1110..6400b51d388c76089dfa6676a87682a723370f7a 100644 (file)
@@ -1,14 +1,14 @@
 /** @file\r
   The file provides services to manipulate string data.\r
   \r
-  Copyright (c) 2006 - 2010, Intel Corporation\r
-  All rights reserved. This program and the accompanying materials                          \r
-  are licensed and made available under the terms and conditions of the BSD License         \r
-  which accompanies this distribution.  The full text of the license may be found at        \r
-  http://opensource.org/licenses/bsd-license.php                                            \r
-\r
-  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials are licensed and made available under \r
+the terms and conditions of the BSD License that accompanies this distribution.  \r
+The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php.                                          \r
+    \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
 \r
 **/\r
 \r
@@ -24,12 +24,12 @@ typedef struct _EFI_HII_STRING_PROTOCOL EFI_HII_STRING_PROTOCOL;
 \r
 /**\r
   This function adds the string String to the group of strings owned by PackageList, with the\r
-  specified font information StringFontInfo and returns a new string id.\r
+  specified font information StringFontInfo, and returns a new string id.\r
   The new string identifier is guaranteed to be unique within the package list. \r
   That new string identifier is reserved for all languages in the package list. \r
 \r
   @param  This                   A pointer to the EFI_HII_STRING_PROTOCOL instance.\r
-  @param  PackageList            Handle of the package list where this string will\r
+  @param  PackageList            The handle of the package list where this string will\r
                                  be added.\r
   @param  StringId               On return, contains the new strings id, which is\r
                                  unique within PackageList.\r
@@ -38,7 +38,7 @@ typedef struct _EFI_HII_STRING_PROTOCOL EFI_HII_STRING_PROTOCOL;
                                  with the passed in  Language field.If LanguageName\r
                                  is not NULL and the string package header's\r
                                  LanguageName  associated with a given Language is\r
-                                 not zero, the LanguageName being passed  in will\r
+                                 not zero, the LanguageName being passed in will\r
                                  be ignored.\r
   @param  String                 Points to the new null-terminated string.\r
   @param  StringFontInfo         Points to the new string's font information or\r
@@ -49,7 +49,7 @@ typedef struct _EFI_HII_STRING_PROTOCOL EFI_HII_STRING_PROTOCOL;
   @retval EFI_NOT_FOUND          The specified PackageList could not be found in\r
                                  database.\r
   @retval EFI_OUT_OF_RESOURCES   Could not add the string due to lack of resources.\r
-  @retval EFI_INVALID_PARAMETER  String is NULL or StringId is NULL or Language is NULL.\r
+  @retval EFI_INVALID_PARAMETER  String is NULL, or StringId is NULL, or Language is NULL.\r
   @retval EFI_INVALID_PARAMETER  The specified StringFontInfo does not exist in\r
                                  current database.\r
 \r
@@ -88,14 +88,16 @@ EFI_STATUS
 \r
   @retval EFI_SUCCESS            The string was returned successfully.\r
   @retval EFI_NOT_FOUND          The string specified by StringId is not available.\r
-  @retval EFI_NOT_FOUND          The string specified by StringId is available but\r
-                                 not in the specified language.\r
                                  The specified PackageList is not in the database.\r
+  @retval EFI_INVALID_LANGUAGE    The string specified by StringId is available but \r
+                                  not in the specified language.\r
   @retval EFI_BUFFER_TOO_SMALL   The buffer specified by StringSize is too small to\r
                                  hold the string.\r
-  @retval EFI_INVALID_PARAMETER  The String or Language or StringSize was NULL.\r
-  @retval EFI_OUT_OF_RESOURCES   There were insufficient resources to complete the\r
-                                 request.\r
+  @retval EFI_INVALID_PARAMETER   The Language or StringSize was NULL.\r
+  @retval EFI_INVALID_PARAMETER   The value referenced by StringSize was not zero and\r
+                                  String was NULL.\r
+  @retval EFI_OUT_OF_RESOURCES    There were insufficient resources to complete the\r
+                                  request.\r
 \r
 **/\r
 typedef\r
@@ -150,13 +152,16 @@ EFI_STATUS
 \r
   @param  This                   A pointer to the EFI_HII_STRING_PROTOCOL instance.\r
   @param  PackageList            The package list to examine.\r
-  @param  Languages              Points to the buffer to hold the returned string.\r
+  @param  Languages              Points to the buffer to hold the returned\r
+                                 null-terminated ASCII string.\r
   @param  LanguagesSize          On entry, points to the size of the buffer pointed\r
-                                 to by  Languages, in bytes. On  return, points to\r
+                                 to by Languages, in bytes. On return, points to\r
                                  the length of Languages, in bytes.\r
 \r
   @retval EFI_SUCCESS            The languages were returned successfully.\r
-  @retval EFI_INVALID_PARAMETER  The Languages or LanguagesSize was NULL.\r
+  @retval EFI_INVALID_PARAMETER  The LanguagesSize was NULL.\r
+  @retval EFI_INVALID_PARAMETER  The value referenced by LanguagesSize is not zero\r
+                                 and Languages is NULL.\r
   @retval EFI_BUFFER_TOO_SMALL   The LanguagesSize is too small to hold the list of\r
                                  supported languages. LanguageSize is updated to\r
                                  contain the required size.\r
@@ -181,26 +186,30 @@ EFI_STATUS
 \r
   @param  This                   A pointer to the EFI_HII_STRING_PROTOCOL instance.\r
   @param  PackageList            The package list to examine.\r
-  @param  FirstLanguage          Points to the primary language.\r
-  @param  SecondaryLanguages     Points to the buffer to hold the returned list of\r
+  @param  PrimaryLanguage        Points to the null-terminated ASCII string that specifies\r
+                                 the primary language. Languages are specified in the\r
+                                 format specified in Appendix M of the UEFI 2.0 specification.\r
+  @param  SecondaryLanguages     Points to the buffer to hold the returned null-terminated\r
+                                 ASCII string that describes the list of\r
                                  secondary languages for the specified\r
-                                 FirstLanguage. If there are no secondary\r
-                                 languages, the function  returns successfully, but\r
+                                 PrimaryLanguage. If there are no secondary\r
+                                 languages, the function returns successfully, but\r
                                  this is set to NULL.\r
   @param  SecondaryLanguagesSize On entry, points to the size of the buffer pointed\r
-                                 to  by SecondaryLanguages, in bytes. On return,\r
+                                 to by SecondaryLanguages, in bytes. On return,\r
                                  points to the length of SecondaryLanguages in bytes.\r
 \r
   @retval EFI_SUCCESS            Secondary languages were correctly returned.\r
-  @retval EFI_INVALID_PARAMETER  FirstLanguage or SecondaryLanguages or\r
-                                 SecondaryLanguagesSize was NULL.\r
+  @retval EFI_INVALID_PARAMETER  PrimaryLanguage or SecondaryLanguagesSize was NULL.\r
+  @retval EFI_INVALID_PARAMETER  The value referenced by SecondaryLanguagesSize is not\r
+                                 zero and SecondaryLanguages is NULL.\r
   @retval EFI_BUFFER_TOO_SMALL   The buffer specified by SecondaryLanguagesSize is\r
                                  too small to hold the returned information.\r
-                                 SecondLanguageSize is updated to hold the size of\r
+                                 SecondaryLanguageSize is updated to hold the size of\r
                                  the buffer required.\r
-  @retval EFI_INVALID_LANGUAGE   The language specified by FirstLanguage is not\r
+  @retval EFI_INVALID_LANGUAGE   The language specified by PrimaryLanguage is not\r
                                  present in the specified package list.\r
-  @retval EFI_NOT_FOUND          The specified PackageList is not in the Database.                                \r
+  @retval EFI_NOT_FOUND          The specified PackageList is not in the Database.\r
 \r
 **/\r
 typedef\r
@@ -208,9 +217,9 @@ EFI_STATUS
 (EFIAPI *EFI_HII_GET_2ND_LANGUAGES)(\r
   IN CONST  EFI_HII_STRING_PROTOCOL   *This,\r
   IN        EFI_HII_HANDLE            PackageList,\r
-  IN CONST  CHAR8                     *FirstLanguage,\r
-  IN OUT    CHAR8                     *SecondLanguages,\r
-  IN OUT    UINTN                     *SecondLanguagesSize\r
+  IN CONST  CHAR8                     *PrimaryLanguage,\r
+  IN OUT    CHAR8                     *SecondaryLanguages,\r
+  IN OUT    UINTN                     *SecondaryLanguagesSize\r
 );\r
 \r
 \r
@@ -230,4 +239,3 @@ extern EFI_GUID gEfiHiiStringProtocolGuid;
 \r
 #endif\r
 \r
-\r