]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkCompatibilityPkg/Foundation/Efi/Protocol/HiiString/HiiString.h
Sync all bug fixes between EDK1.04 and EDK1.06 into EdkCompatibilityPkg.
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Efi / Protocol / HiiString / HiiString.h
index d1fc9fde440d1b423f4941f11e7a1c2f5a9ee1ad..0c27218b38db14481eba65ad5486678eb71eadcb 100644 (file)
@@ -1,7 +1,7 @@
 /*++\r
 \r
-Copyright (c) 2007, Intel Corporation                                                         \r
-All rights reserved. This program and the accompanying materials                          \r
+Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+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
@@ -33,7 +33,7 @@ Revision History
 //\r
 #define EFI_HII_STRING_PROTOCOL_GUID \\r
   { \\r
-    0xfd96974, 0x23aa, 0x4cdc, 0xb9, 0xcb, 0x98, 0xd1, 0x77, 0x50, 0x32, 0x2a \\r
+    0xfd96974, 0x23aa, 0x4cdc, {0xb9, 0xcb, 0x98, 0xd1, 0x77, 0x50, 0x32, 0x2a} \\r
   }\r
 \r
 EFI_FORWARD_DECLARATION (EFI_HII_STRING_PROTOCOL);\r
@@ -54,6 +54,8 @@ EFI_STATUS
   Routine Description:\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
+    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
   Arguments:          \r
     This              - A pointer to the EFI_HII_STRING_PROTOCOL instance.\r
@@ -65,7 +67,7 @@ EFI_STATUS
                         associated with a given Language is not zero, the LanguageName being passed \r
                         in will be ignored.    \r
     String            - Points to the new null-terminated string.                                                                                     \r
-    StringFontInfo    - Points to the new string¡¯s font information or NULL if the string should have the\r
+    StringFontInfo    - Points to the new string's font information or NULL if the string should have the\r
                         default system font, size and style.                                                  \r
 \r
   Returns:\r
@@ -104,13 +106,19 @@ EFI_STATUS
     String            - Points to the new null-terminated string.            \r
     StringSize        - On entry, points to the size of the buffer pointed to by \r
                         String, in bytes. On return,\r
-                        points to the length of the string, in bytes.                                                                                             \r
-    StringFontInfo    - If not NULL, points to the string¡¯s font information. \r
-                        It's caller's responsibility to free this buffer.\r
+                        points to the length of the string, in bytes.\r
+    StringFontInfo    - Points to a buffer that will be callee allocated and will \r
+                        have the string's font information into this buffer.  \r
+                        The caller is responsible for freeing this buffer.  \r
+                        If the parameter is NULL a buffer will not be allocated \r
+                        and the string font information will not be returned.\r
 \r
   Returns:\r
     EFI_SUCCESS            - The string was returned successfully.\r
     EFI_NOT_FOUND          - The string specified by StringId is not available.\r
+                             The specified PackageList is not in the database.\r
+    EFI_INVALID_LANGUAGE   - The string specified by StringId is available but\r
+                             not in the specified language.                             \r
     EFI_BUFFER_TOO_SMALL   - The buffer specified by StringSize is too small to \r
                              hold the string.                                                      \r
     EFI_INVALID_PARAMETER  - The String or Language or StringSize was NULL.\r
@@ -139,15 +147,16 @@ EFI_STATUS
   Arguments:          \r
     This              - A pointer to the EFI_HII_STRING_PROTOCOL instance.\r
     PackageList       - The package list containing the strings.\r
-    StringId          - The string¡¯s id, which is unique within PackageList.    \r
+    StringId          - The string's id, which is unique within PackageList.    \r
     Language          - Points to the language for the updated string.\r
     String            - Points to the new null-terminated string.                   \r
-    StringFontInfo    - Points to the string¡¯s font information or NULL if the string font information is not\r
+    StringFontInfo    - Points to the string's font information or NULL if the string font information is not\r
                         changed.  \r
 \r
   Returns:\r
     EFI_SUCCESS            - The string was updated successfully.\r
-    EFI_NOT_FOUND          - The string specified by StringId is not in the database.    \r
+    EFI_NOT_FOUND          - The string specified by StringId is not in the database.\r
+                             The specified PackageList is not in the database.\r
     EFI_INVALID_PARAMETER  - The String or Language was NULL.\r
     EFI_OUT_OF_RESOURCES   - The system is out of resources to accomplish the task.\r
     \r
@@ -182,6 +191,7 @@ EFI_STATUS
     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
+    EFI_NOT_FOUND          - The specified PackageList is not in the database.\r
     \r
 --*/\r
 ;\r
@@ -220,20 +230,23 @@ EFI_STATUS
     EFI_BUFFER_TOO_SMALL   - The buffer specified by SecondLanguagesSize is   \r
                              too small to hold the returned information.      \r
                              SecondLanguageSize is updated to hold the size of\r
-                             the buffer required.                             \r
-                             \r
---*/                         \r
+                             the buffer required.\r
+    EFI_INVALID_LANGUAGE   - The language specified by FirstLanguage is not\r
+                             present in the specified package list.\r
+    EFI_NOT_FOUND          - The specified PackageList is not in the Database.    \r
+    \r
+--*/\r
 ;\r
 //\r
 // Interface structure for the EFI_HII_STRING_PROTOCOL\r
 //\r
-typedef struct _EFI_HII_STRING_PROTOCOL {\r
+struct _EFI_HII_STRING_PROTOCOL {\r
   EFI_HII_NEW_STRING        NewString;\r
   EFI_HII_GET_STRING        GetString;\r
   EFI_HII_SET_STRING        SetString;\r
   EFI_HII_GET_LANGUAGES     GetLanguages;\r
   EFI_HII_GET_2ND_LANGUAGES GetSecondaryLanguages;\r
-} EFI_HII_STRING_PROTOCOL;\r
+};\r
 \r
 extern EFI_GUID gEfiHiiStringProtocolGuid;\r
 \r