]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkPkg/Include/Protocol/FrameworkHii.h
Clarify @pram b in Base.h. Accepted and edited in Qing Huang changes for @retval...
[mirror_edk2.git] / IntelFrameworkPkg / Include / Protocol / FrameworkHii.h
index f2f212be7d9020ac06c445f892d3fb19e95556bb..67e9341b4a7f35f4d7c4de0d0c7e95c17b04934d 100644 (file)
@@ -1,11 +1,9 @@
 /** @file\r
-  This file defines the Human Interface Infrastructure protocol which will\r
-  be used by resources which want to publish IFR/Font/String data and have it\r
-  collected by the Configuration engine. This protocol is defined in the.\r
-  Intel Platform Innovation Framework for EFI Human Interface Infrastructure\r
-  Specification Version 0.92.\r
+  This file defines the Human Interface Infrastructure protocol, which is\r
+  used by resources that want to publish IFR/Font/String data and have it\r
+  collected by the Configuration engine.\r
 \r
-  Copyright (c) 2007 - 2009, Intel Corporation\r
+  Copyright (c) 2007 - 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
   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
+  @par Revision Reference:\r
+  This protocol is defined in Framework for EFI Human Interface Infrastructure\r
+  Specification Version 0.92.\r
+\r
 **/\r
 \r
 #ifndef _FRAMEWORK_HII_H_\r
 #define _FRAMEWORK_HII_H_\r
 \r
-#include <PiDxe.h>\r
-\r
 //\r
-// To get EFI_GRAPHICS_OUTPUT_BLT_PIXEL,\r
-// is defined in MdePkg/Protocol/GraphicsOutput.h\r
+// EFI_GRAPHICS_OUTPUT_BLT_PIXEL is defined in MdePkg/Protocol/GraphicsOutput.h\r
 //\r
 #include <Protocol/GraphicsOutput.h>\r
-\r
 ///\r
-/// In both EDK and EDK II, incompatbile change is done to Framework HII protocol. \r
-/// This change should cause a change of GUID in both of code and HII spec. But we \r
+/// In both EDK and EDK II, incompatbile change is done to Framework HII protocol.\r
+/// This change should cause a change of GUID in both of code and HII spec. But we\r
 /// update the GUID in code in EDK and EDK II. The 0.92 spec is not updated. This\r
 /// is a known issue.\r
 ///\r
@@ -48,7 +46,6 @@
     0x5542cce1, 0xdf5c, 0x4d1b, { 0xab, 0xca, 0x36, 0x4f, 0x77, 0xd3, 0x99, 0xfb } \\r
   }\r
 \r
-typedef UINT16                    STRING_REF;\r
 typedef UINT32                    RELOFST;\r
 \r
 typedef struct _EFI_HII_PROTOCOL  EFI_HII_PROTOCOL;\r
@@ -95,7 +92,7 @@ typedef struct {
 \r
 ///\r
 /// IFR package structure.\r
-/// Immediately following the EFI_HII_IFR_PACK structure will be a series of IFR opcodes. \r
+/// Immediately following the EFI_HII_IFR_PACK structure will be a series of IFR opcodes.\r
 ///\r
 typedef struct {\r
   EFI_HII_PACK_HEADER Header; ///< Header of the IFR package.\r
@@ -103,38 +100,38 @@ typedef struct {
 \r
 ///\r
 /// HII Handle package structure.\r
-/// \r
+///\r
 typedef struct {\r
   ///\r
   /// Header of the package.\r
   ///\r
-  EFI_HII_PACK_HEADER Header;           // Must be filled in\r
+  EFI_HII_PACK_HEADER Header;           ///< Must be filled in\r
   ///\r
   /// The image handle of the driver to which the package is referring.\r
   ///\r
-  EFI_HANDLE          ImageHandle;      // Must be filled in\r
+  EFI_HANDLE          ImageHandle;      ///< Must be filled in\r
   ///\r
   /// The handle of the device that is being described by this package.\r
   ///\r
-  EFI_HANDLE          DeviceHandle;     // Optional\r
+  EFI_HANDLE          DeviceHandle;     ///< Optional\r
   ///\r
   /// The handle of the parent of the device that is being described by this package.\r
   ///\r
-  EFI_HANDLE          ControllerHandle; // Optional\r
+  EFI_HANDLE          ControllerHandle; ///< Optional\r
   ///\r
   /// The handle that was registered to receive EFI_FORM_CALLBACK_PROTOCOL calls from other drivers.\r
   ///\r
-  EFI_HANDLE          CallbackHandle;   // Optional\r
+  EFI_HANDLE          CallbackHandle;   ///< Optional\r
   ///\r
   /// Note this field is not defined in the Framework HII 0.92 spec.\r
   /// Unused. Reserved for source code compatibility.\r
   ///\r
-  EFI_HANDLE          COBExportHandle;  // Optional\r
+  EFI_HANDLE          COBExportHandle;  ///< Optional\r
 } EFI_HII_HANDLE_PACK;\r
 \r
 ///\r
 /// Variable package structure.\r
-/// \r
+///\r
 typedef struct {\r
   ///\r
   /// Header of the package.\r
@@ -172,13 +169,13 @@ typedef struct {
 \r
 typedef struct {\r
   ///\r
-  /// Unique value that correlates to the original HII handle. \r
+  /// Unique value that correlates to the original HII handle.\r
   ///\r
   FRAMEWORK_EFI_HII_HANDLE  HiiHandle;\r
   ///\r
   /// If an IFR pack exists in a data table that does not contain strings,\r
-  /// then the strings for that IFR pack are located in another data table \r
-  /// that contains a string pack and has a matching HiiDataTable.PackageGuid. \r
+  /// then the strings for that IFR pack are located in another data table\r
+  /// that contains a string pack and has a matching HiiDataTable.PackageGuid.\r
   ///\r
   EFI_GUID                  PackageGuid;\r
   ///\r
@@ -191,7 +188,7 @@ typedef struct {
   ///\r
   UINT32                    IfrDataOffset;\r
   ///\r
-  /// Byte offset from the start of this structure to the string data. \r
+  /// Byte offset from the start of this structure to the string data.\r
   /// If the offset value is 0, then no string data is enclosed.\r
   ///\r
   UINT32                    StringDataOffset;\r
@@ -244,18 +241,18 @@ typedef struct {
 ///\r
 typedef struct {\r
   ///\r
-  /// If TRUE, indicates that the FormCallbackHandle value will \r
+  /// If TRUE, indicates that the FormCallbackHandle value will\r
   /// be used to update the contents of the CallBackHandle entry in the form set.\r
   ///\r
   BOOLEAN               FormSetUpdate;\r
   ///\r
   /// This parameter is valid only when FormSetUpdate is TRUE.\r
-  /// The value in this parameter will be used to update the contents \r
+  /// The value in this parameter will be used to update the contents\r
   /// of the CallbackHandle entry in the form set.\r
   ///\r
   EFI_PHYSICAL_ADDRESS  FormCallbackHandle;\r
   ///\r
-  /// If TRUE, indicates that the FormTitle contents will be \r
+  /// If TRUE, indicates that the FormTitle contents will be\r
   /// used to update the FormValue's title.\r
   ///\r
   BOOLEAN               FormUpdate;\r
@@ -265,7 +262,7 @@ typedef struct {
   UINT16                FormValue;\r
   ///\r
   /// This parameter is valid only when the FormUpdate parameter is TRUE.\r
-  /// The value in this parameter will be used to update the contents of the form title. \r
+  /// The value in this parameter will be used to update the contents of the form title.\r
   ///\r
   STRING_REF            FormTitle;\r
   ///\r
@@ -301,7 +298,7 @@ typedef struct {
   ///\r
   /// The string containing one or more ISO 639-2 three-character designator(s)\r
   /// of the language or languages whose translations are contained in this language pack.\r
-  /// The first designator indicates the primary language while the others are secondary languages. \r
+  /// The first designator indicates the primary language while the others are secondary languages.\r
   ///\r
   RELOFST             LanguageNameString;\r
   ///\r
@@ -373,8 +370,8 @@ typedef struct {
   ///\r
   CHAR16  ShiftedAltGrUnicode;\r
   ///\r
-  /// Modifier keys are defined to allow for special functionality that \r
-  /// is not necessarily accomplished by a printable character. \r
+  /// Modifier keys are defined to allow for special functionality that\r
+  /// is not necessarily accomplished by a printable character.\r
   ///\r
   UINT16  Modifier;\r
 } FRAMEWORK_EFI_KEY_DESCRIPTOR;\r
@@ -438,7 +435,7 @@ typedef struct {
 ///\r
 typedef struct _EFI_HII_VARIABLE_PACK_LIST {\r
   ///\r
-  /// A pointer points to the next data structure of type \r
+  /// A pointer points to the next data structure of type\r
   /// EFI_HII_VARIABLE_PACK_LIST in the packed link list.\r
   ///\r
   struct _EFI_HII_VARIABLE_PACK_LIST   *NextVariablePack;\r
@@ -517,9 +514,9 @@ EFI_STATUS
   Exports the contents of the database into a buffer.\r
 \r
   @param  This                  A pointer to the EFI_HII_PROTOCOL instance.\r
-  @param  Handle                An FRAMEWORK_EFI_HII_HANDLE  that corresponds to the desired\r
+  @param  Handle                A FRAMEWORK_EFI_HII_HANDLE that corresponds to the desired\r
                                 handle to export. If the value is 0, the entire database will be exported.\r
-                                In either case, the data will be exported in a format described by the\r
+                                The data is exported in a format described by the\r
                                 structure definition of EFI_HII_EXPORT_TABLE.\r
   @param  BufferSize\r
   On input, a pointer to the length of the buffer. On output, the length\r
@@ -546,7 +543,7 @@ EFI_STATUS
   @param  This                  A pointer to the EFI_HII_PROTOCOL instance.\r
   @param  Handle                The handle on which the string resides.\r
 \r
-  @retval EFI_SUCCESS           Remove strings from the handle successfully.\r
+  @retval EFI_SUCCESS           Successfully removed strings from the handle.\r
   @retval EFI_INVALID_PARAMETER The Handle was unknown.\r
 \r
 **/\r
@@ -578,7 +575,7 @@ EFI_STATUS
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_HII_TEST_STRING) (\r
+(EFIAPI *EFI_HII_TEST_STRING)(\r
   IN     EFI_HII_PROTOCOL  *This,\r
   IN     CHAR16            *StringToTest,\r
   IN OUT UINT32            *FirstMissing,\r
@@ -594,7 +591,7 @@ EFI_STATUS
   @param  This                  A pointer to the EFI_HII_PROTOCOL instance.\r
   @param  Source                A pointer to a Unicode string.\r
   @param  Index                 On input, the offset into the string from which to fetch\r
-                                the character.On successful completion, the index is updated to the first\r
+                                the character. On successful completion, the index is updated to the first\r
                                 character past the character(s) making up the just extracted glyph.\r
   @param  GlyphBuffer           Pointer to an array where the glyphs corresponding\r
                                 to the characters in the source may be stored. GlyphBuffer is assumed\r
@@ -638,9 +635,9 @@ EFI_STATUS
 \r
   @retval EFI_SUCCESS           It worked.\r
   @retval EFI_NOT_FOUND         A glyph for a character was not found.\r
-  @note: Inconsistent with specification here:\r
-         In Framework Spec,HII spec 0.92. The type of 3rd, 4th and 8th parameter is EFI_UGA_PIXEL.\r
-         Here the definition use the EFI_GRAPHICS_OUTPUT_BLT_PIXEL which defined in UEFI2.1 spec\r
+  @note  Inconsistent with specification here:\r
+         In Framework Spec, HII spec 0.92. The type of 3rd, 4th and 8th parameter is EFI_UGA_PIXEL.\r
+         Here the definition uses the EFI_GRAPHICS_OUTPUT_BLT_PIXEL, which is defined in UEFI 2.1 spec\r
 **/\r
 typedef\r
 EFI_STATUS\r
@@ -841,7 +838,7 @@ EFI_STATUS
   @param  Handle                The HII handle from which will have default data retrieved.\r
   @param  DefaultMask           The mask used to specify some type of default override when extracting\r
                                 the default image data.\r
-  @param  VariablePackList      A indirect pointer to the first entry of a link list with\r
+  @param  VariablePackList      An indirect pointer to the first entry of a link list with\r
                                 type EFI_HII_VARIABLE_PACK_LIST.\r
 \r
   @retval EFI_SUCCESS           The VariablePackList was populated with the appropriate\r
@@ -920,17 +917,17 @@ struct _EFI_HII_PROTOCOL {
   /// Extracts the various packs from a package list.\r
   ///\r
   EFI_HII_NEW_PACK                      NewPack;\r
-  \r
+\r
   ///\r
   /// Removes a package from the HII database.\r
   ///\r
   EFI_HII_REMOVE_PACK                   RemovePack;\r
-  \r
+\r
   ///\r
   /// Determines the handles that are currently active in the database.\r
-  /// \r
+  ///\r
   EFI_HII_FIND_HANDLES                  FindHandles;\r
-  \r
+\r
   ///\r
   /// Export the entire contents of the database to a buffer.\r
   ///\r
@@ -940,12 +937,12 @@ struct _EFI_HII_PROTOCOL {
   /// Tests if all of the characters in a string have corresponding font characters.\r
   ///\r
   EFI_HII_TEST_STRING                   TestString;\r
-  \r
+\r
   ///\r
   /// Translates a Unicode character into the corresponding font glyph.\r
   ///\r
   FRAMEWORK_EFI_HII_GET_GLYPH           GetGlyph;\r
-  \r
+\r
   ///\r
   /// Converts a glyph value into a format that is ready for a UGA BLT command.\r
   ///\r
@@ -955,48 +952,48 @@ struct _EFI_HII_PROTOCOL {
   /// Allows a new string to be added to an already existing string package.\r
   ///\r
   FRAMEWORK_EFI_HII_NEW_STRING          NewString;\r
-  \r
+\r
   ///\r
   /// Allows a program to determine the primary languages that are supported\r
-  /// on a given handle.  \r
+  /// on a given handle.\r
   ///\r
   EFI_HII_GET_PRI_LANGUAGES             GetPrimaryLanguages;\r
-  \r
+\r
   ///\r
   /// Allows a program to determine which secondary languages are supported\r
-  /// on a given handle for a given primary language.  \r
+  /// on a given handle for a given primary language.\r
   ///\r
   EFI_HII_GET_SEC_LANGUAGES             GetSecondaryLanguages;\r
-  \r
+\r
   ///\r
   /// Extracts a string from a package that is already registered with the\r
-  /// EFI HII database.  \r
+  /// EFI HII database.\r
   ///\r
   FRAMEWORK_EFI_HII_GET_STRING          GetString;\r
-  \r
+\r
   ///\r
   /// Remove any new strings that were added after the initial string export\r
-  /// for this handle.  \r
-  /// \r
+  /// for this handle.\r
+  ///\r
   /// Note this function is not defined in the Framework HII 0.92 spec.\r
   ///\r
   EFI_HII_RESET_STRINGS                 ResetStrings;\r
-  \r
+\r
   ///\r
   /// Allows a program to extract a part of a string of not more than a given width.\r
   ///\r
   EFI_HII_GET_LINE                      GetLine;\r
-  \r
+\r
   ///\r
   /// Allows a program to extract a form or form package that has been previously registered.\r
   ///\r
   EFI_HII_GET_FORMS                     GetForms;\r
-  \r
+\r
   ///\r
   /// Allows a program to extract the nonvolatile image that represents the default storage image.\r
   ///\r
   EFI_HII_GET_DEFAULT_IMAGE             GetDefaultImage;\r
-  \r
+\r
   ///\r
   /// Allows a program to update a previously registered form.\r
   ///\r