]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Rename Protocol/FrameworkHii.h to Protocol/HiiFramework.h to follow the naming conven...
authorqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 2 Jul 2007 08:20:41 +0000 (08:20 +0000)
committerqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 2 Jul 2007 08:20:41 +0000 (08:20 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2943 6f19259b-4bc3-4df7-8a09-765794883524

IntelFrameworkPkg/Include/Library/HiiLibFramework.h
IntelFrameworkPkg/Include/Protocol/FormCallback.h
IntelFrameworkPkg/Include/Protocol/FrameworkHii.h [deleted file]
IntelFrameworkPkg/Include/Protocol/HiiFramework.h [new file with mode: 0644]
IntelFrameworkPkg/Library/IfrSupportLibFramework/CommonHeader.h

index d2d74336a0e83e282cabf8a0d1f449315b866cf5..91453e99ea2e40a61189dfec1c1fc4d8fe59f66c 100644 (file)
@@ -17,7 +17,7 @@
 #ifndef __HII_LIB_H__\r
 #define __HII_LIB_H__\r
 \r
-#include <Protocol/FrameworkHii.h>\r
+#include <Protocol/HiiFramework.h>\r
 \r
 /**\r
   This function allocates pool for an EFI_HII_PACKAGES structure\r
index 0d65f569bd8d4c6a467be6459cb31ee6d7d68567..bded9c0835e817c51a8da51894f6f7e5a48a5887 100644 (file)
@@ -26,7 +26,7 @@
 \r
 #include <PiDxe.h>\r
 \r
-#include <Protocol/FrameworkHii.h>\r
+#include <Protocol/HiiFramework.h>\r
 #include <Protocol/FrameworkFormBrowser.h>\r
 \r
 #define EFI_FORM_CALLBACK_PROTOCOL_GUID \\r
diff --git a/IntelFrameworkPkg/Include/Protocol/FrameworkHii.h b/IntelFrameworkPkg/Include/Protocol/FrameworkHii.h
deleted file mode 100644 (file)
index a9665c6..0000000
+++ /dev/null
@@ -1,951 +0,0 @@
-/** @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.\r
-\r
-  Copyright (c) 2007, 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
-\r
-  Module Name:  FrameworkHii.h\r
-\r
-  @par Revision Reference:\r
-  This protocol is defined in HII spec 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
-//\r
-#include <Protocol/GraphicsOutput.h>\r
-\r
-#define EFI_HII_PROTOCOL_GUID \\r
-  { \\r
-    0xd7ad636e, 0xb997, 0x459b, {0xbf, 0x3f, 0x88, 0x46, 0x89, 0x79, 0x80, 0xe1} \\r
-  }\r
-\r
-// BugBug:\r
-//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\r
-// If UGA goes away we need to put this some place. I'm not sure where?\r
-//\r
-//typedef struct {\r
-//  UINT8 Blue;\r
-//  UINT8 Green;\r
-//  UINT8 Red;\r
-//  UINT8 Reserved;\r
-//} EFI_UGA_PIXEL;\r
-\r
-//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\r
-//\r
-\r
-typedef struct _EFI_HII_PROTOCOL  EFI_HII_PROTOCOL;\r
-\r
-//\r
-// Global definition\r
-//\r
-#define NARROW_CHAR         0xFFF0\r
-#define WIDE_CHAR           0xFFF1\r
-#define NON_BREAKING_CHAR   0xFFF2\r
-#define GLYPH_WIDTH         8\r
-#define GLYPH_HEIGHT        19\r
-\r
-#define EFI_HII_FONT        1\r
-#define EFI_HII_STRING      2\r
-#define EFI_HII_IFR         3\r
-#define EFI_HII_KEYBOARD    4\r
-#define EFI_HII_HANDLES     5\r
-#define EFI_HII_VARIABLE    6\r
-#define EFI_HII_DEVICE_PATH 7\r
-\r
-\r
-// References to string tokens must use this macro to enable scanning for\r
-// token usages.\r
-//\r
-#define STRING_TOKEN(t) t\r
-\r
-//\r
-// The following types are currently defined:\r
-//\r
-typedef UINT16  EFI_FORM_ID;\r
-typedef UINT16  EFI_FORM_LABEL;\r
-\r
-#pragma pack(1)\r
-\r
-typedef struct {\r
-  UINT32  Length;\r
-  UINT16  Type;\r
-} EFI_HII_PACK_HEADER;\r
-\r
-//\r
-// A form list consists of a large variety of structure\r
-// possibilities so to represent the binary blob of data\r
-// associated with a package of forms, we will assume a\r
-// pointer to a self-describing data buffer.\r
-//\r
-typedef struct {\r
-  EFI_HII_PACK_HEADER Header;\r
-} EFI_HII_IFR_PACK;\r
-\r
-typedef struct {\r
-  EFI_HII_PACK_HEADER Header;           // Must be filled in\r
-  EFI_HANDLE          ImageHandle;      // Must be filled in\r
-  EFI_HANDLE          DeviceHandle;     // Optional\r
-  EFI_HANDLE          ControllerHandle; // Optional\r
-  EFI_HANDLE          CallbackHandle;   // Optional\r
-  EFI_HANDLE          COBExportHandle;  // Optional\r
-} EFI_HII_HANDLE_PACK;\r
-\r
-//\r
-// ********************************************************\r
-// EFI_VARIABLE_CONTENTS\r
-// ********************************************************\r
-//\r
-typedef struct {\r
-  EFI_HII_PACK_HEADER Header;\r
-  EFI_GUID            VariableGuid;\r
-  UINT32              VariableNameLength;\r
-  UINT16              VariableId;\r
-  //\r
-  //  CHAR16                VariableName[]; //Null-terminated\r
-  //\r
-} EFI_HII_VARIABLE_PACK;\r
-\r
-//\r
-// ********************************************************\r
-// EFI_DEVICE_PATH_PACK\r
-// ********************************************************\r
-//\r
-typedef struct {\r
-  EFI_HII_PACK_HEADER Header;\r
-  //\r
-  //  EFI_DEVICE_PATH       DevicePath[];\r
-  //\r
-} EFI_HII_DEVICE_PATH_PACK;\r
-\r
-//\r
-// ********************************************************\r
-// EFI_HII_DATA_TABLE\r
-// ********************************************************\r
-//\r
-typedef struct {\r
-  EFI_HII_HANDLE  HiiHandle;\r
-  EFI_GUID        PackageGuid;\r
-  UINT32          DataTableSize;\r
-  UINT32          IfrDataOffset;\r
-  UINT32          StringDataOffset;\r
-  UINT32          VariableDataOffset;\r
-  UINT32          DevicePathOffset;\r
-  UINT32          NumberOfVariableData;\r
-  UINT32          NumberOfLanguages;\r
-  //\r
-  // EFI_HII_DEVICE_PATH_PACK DevicePath[];\r
-  // EFI_HII_VARIABLE_PACK VariableData[];\r
-  // EFI_HII_IFR_PACK IfrData;\r
-  // EFI_HII_STRING_PACK StringData[];\r
-  //\r
-} EFI_HII_DATA_TABLE;\r
-\r
-//\r
-// ********************************************************\r
-// EFI_HII_EXPORT_TABLE\r
-// ********************************************************\r
-//\r
-typedef struct {\r
-  UINT32    NumberOfHiiDataTables;\r
-  EFI_GUID  Revision;\r
-  //\r
-  // EFI_HII_DATA_TABLE HiiDataTable[];\r
-  //\r
-} EFI_HII_EXPORT_TABLE;\r
-\r
-typedef struct {\r
-  BOOLEAN               FormSetUpdate;      // If TRUE, next variable is significant\r
-  EFI_PHYSICAL_ADDRESS  FormCallbackHandle; // If not 0, will update Formset with this info\r
-  BOOLEAN               FormUpdate;         // If TRUE, next variable is significant\r
-  UINT16                FormValue;          // specify which form is to be updated if FormUpdate value is TRUE.\r
-  STRING_REF            FormTitle;          // If not 0, will update Form with this info\r
-  UINT16                DataCount;          // The number of Data entries in this structure\r
-  UINT8                 *Data;              // An array of 1+ op-codes, specified by DataCount\r
-} EFI_HII_UPDATE_DATA;\r
-\r
-//\r
-// String attributes\r
-//\r
-#define LANG_RIGHT_TO_LEFT  0x00000001\r
-\r
-//\r
-// A string package is used to localize strings to a particular\r
-// language.  The package is associated with a particular driver\r
-// or set of drivers.  Tools are used to associate tokens with\r
-// string references in forms and in programs.  These tokens are\r
-// language agnostic.  When paired with a language pack (directly\r
-// or indirectly), the string token resolves into an actual\r
-// UNICODE string.  The NumStringPointers determines how many\r
-// StringPointers (offset values) there are as well as the total\r
-// number of Strings that are defined.\r
-//\r
-typedef struct {\r
-  EFI_HII_PACK_HEADER Header;\r
-  RELOFST             LanguageNameString;\r
-  RELOFST             PrintableLanguageName;\r
-  UINT32              NumStringPointers;\r
-  UINT32              Attributes;\r
-  //\r
-  //  RELOFST               StringPointers[];\r
-  //  EFI_STRING            Strings[];\r
-  //\r
-} EFI_HII_STRING_PACK;\r
-\r
-//\r
-// Glyph Attributes\r
-//\r
-#define EFI_GLYPH_NON_SPACING   1\r
-#define EFI_GLYPH_WIDE          2\r
-\r
-typedef struct {\r
-  CHAR16  UnicodeWeight;\r
-  UINT8   Attributes;\r
-  UINT8   GlyphCol1[GLYPH_HEIGHT];\r
-} EFI_NARROW_GLYPH;\r
-\r
-typedef struct {\r
-  CHAR16  UnicodeWeight;\r
-  UINT8   Attributes;\r
-  UINT8   GlyphCol1[GLYPH_HEIGHT];\r
-  UINT8   GlyphCol2[GLYPH_HEIGHT];\r
-  UINT8   Pad[3];\r
-} EFI_WIDE_GLYPH;\r
-\r
-//\r
-// A font list consists of a font header followed by a series\r
-// of glyph structures.  Note that fonts are not language specific.\r
-//\r
-typedef struct {\r
-  EFI_HII_PACK_HEADER Header;\r
-  UINT16              NumberOfNarrowGlyphs;\r
-  UINT16              NumberOfWideGlyphs;\r
-} EFI_HII_FONT_PACK;\r
-\r
-//\r
-// The IfrData in the EFI_HII_IFR_PACK structure definition\r
-// is variable length, and not really part of the header. To\r
-// simplify from code the size of the header, define an\r
-// identical structure that does not include the IfrData field.\r
-// Then use sizeof() this new structure to determine the\r
-// actual size of the header.\r
-//\r
-typedef struct {\r
-  EFI_HII_PACK_HEADER Header;\r
-} EFI_HII_IFR_PACK_HEADER;\r
-\r
-//\r
-// pedef EFI_HII_PACK_HEADER EFI_HII_IFR_PACK_HEADER;\r
-//\r
-typedef enum {\r
-  EfiKeyLCtrl,\r
-  EfiKeyA0,\r
-  EfiKeyLAlt,\r
-  EfiKeySpaceBar,\r
-  EfiKeyA2,\r
-  EfiKeyA3,\r
-  EfiKeyA4,\r
-  EfiKeyRCtrl,\r
-  EfiKeyLeftArrow,\r
-  EfiKeyDownArrow,\r
-  EfiKeyRightArrow,\r
-  EfiKeyZero,\r
-  EfiKeyPeriod,\r
-  EfiKeyEnter,\r
-  EfiKeyLShift,\r
-  EfiKeyB0,\r
-  EfiKeyB1,\r
-  EfiKeyB2,\r
-  EfiKeyB3,\r
-  EfiKeyB4,\r
-  EfiKeyB5,\r
-  EfiKeyB6,\r
-  EfiKeyB7,\r
-  EfiKeyB8,\r
-  EfiKeyB9,\r
-  EfiKeyB10,\r
-  EfiKeyRshift,\r
-  EfiKeyUpArrow,\r
-  EfiKeyOne,\r
-  EfiKeyTwo,\r
-  EfiKeyThree,\r
-  EfiKeyCapsLock,\r
-  EfiKeyC1,\r
-  EfiKeyC2,\r
-  EfiKeyC3,\r
-  EfiKeyC4,\r
-  EfiKeyC5,\r
-  EfiKeyC6,\r
-  EfiKeyC7,\r
-  EfiKeyC8,\r
-  EfiKeyC9,\r
-  EfiKeyC10,\r
-  EfiKeyC11,\r
-  EfiKeyC12,\r
-  EfiKeyFour,\r
-  EfiKeyFive,\r
-  EfiKeySix,\r
-  EfiKeyPlus,\r
-  EfiKeyTab,\r
-  EfiKeyD1,\r
-  EfiKeyD2,\r
-  EfiKeyD3,\r
-  EfiKeyD4,\r
-  EfiKeyD5,\r
-  EfiKeyD6,\r
-  EfiKeyD7,\r
-  EfiKeyD8,\r
-  EfiKeyD9,\r
-  EfiKeyD10,\r
-  EfiKeyD11,\r
-  EfiKeyD12,\r
-  EfiKeyD13,\r
-  EfiKeyDel,\r
-  EfiKeyEnd,\r
-  EfiKeyPgDn,\r
-  EfiKeySeven,\r
-  EfiKeyEight,\r
-  EfiKeyNine,\r
-  EfiKeyE0,\r
-  EfiKeyE1,\r
-  EfiKeyE2,\r
-  EfiKeyE3,\r
-  EfiKeyE4,\r
-  EfiKeyE5,\r
-  EfiKeyE6,\r
-  EfiKeyE7,\r
-  EfiKeyE8,\r
-  EfiKeyE9,\r
-  EfiKeyE10,\r
-  EfiKeyE11,\r
-  EfiKeyE12,\r
-  EfiKeyBackSpace,\r
-  EfiKeyIns,\r
-  EfiKeyHome,\r
-  EfiKeyPgUp,\r
-  EfiKeyNLck,\r
-  EfiKeySlash,\r
-  EfiKeyAsterisk,\r
-  EfiKeyMinus,\r
-  EfiKeyEsc,\r
-  EfiKeyF1,\r
-  EfiKeyF2,\r
-  EfiKeyF3,\r
-  EfiKeyF4,\r
-  EfiKeyF5,\r
-  EfiKeyF6,\r
-  EfiKeyF7,\r
-  EfiKeyF8,\r
-  EfiKeyF9,\r
-  EfiKeyF10,\r
-  EfiKeyF11,\r
-  EfiKeyF12,\r
-  EfiKeyPrint,\r
-  EfiKeySLck,\r
-  EfiKeyPause\r
-} EFI_KEY;\r
-\r
-typedef struct {\r
-  EFI_KEY Key;\r
-  CHAR16  Unicode;\r
-  CHAR16  ShiftedUnicode;\r
-  CHAR16  AltGrUnicode;\r
-  CHAR16  ShiftedAltGrUnicode;\r
-  UINT16  Modifier;\r
-} EFI_KEY_DESCRIPTOR;\r
-\r
-//\r
-// This structure allows a sparse set of keys to be redefined\r
-// or a complete redefinition of the keyboard layout.  Most\r
-// keyboards have a lot of commonality in their layouts, therefore\r
-// only defining those keys that need to change from the default\r
-// minimizes the passed in information.\r
-//\r
-// Additionally, when an update occurs, the active keyboard layout\r
-// will be switched to the newly updated keyboard layout.  This\r
-// allows for situations that when a keyboard layout driver is\r
-// loaded as part of system initialization, the system will default\r
-// the keyboard behavior to the new layout.\r
-//\r
-// Each call to update the keyboard mapping should contain the\r
-// complete set of key descriptors to be updated, since every\r
-// call to the HII which contains an EFI_HII_KEYBOARD_PACK will\r
-// wipe the previous set of overrides.  A call to\r
-//\r
-typedef struct {\r
-  EFI_HII_PACK_HEADER Header;\r
-  EFI_KEY_DESCRIPTOR  *Descriptor;\r
-  UINT8               DescriptorCount;\r
-} EFI_HII_KEYBOARD_PACK;\r
-\r
-//\r
-// The EFI_HII_PACKAGES can contain different types of packages just\r
-// after the structure as inline data.\r
-//\r
-typedef struct {\r
-  UINTN     NumberOfPackages;\r
-  EFI_GUID  *GuidId;\r
-  //\r
-  // EFI_HII_HANDLE_PACK    *HandlePack;        // Only one pack.\r
-  // EFI_HII_IFR_PACK       *IfrPack;           // Only one pack.\r
-  // EFI_HII_FONT_PACK      *FontPack[];        // Multiple packs ok\r
-  // EFI_HII_STRING_PACK    *StringPack[];      // Multiple packs ok\r
-  // EFI_HII_KEYBOARD_PACK  *KeyboardPack[];    // Multiple packs ok\r
-  //\r
-} EFI_HII_PACKAGES;\r
-\r
-typedef struct _EFI_HII_VARIABLE_PACK_LIST {\r
-  struct _EFI_HII_VARIABLE_PACK_LIST   *NextVariablePack;\r
-  EFI_HII_VARIABLE_PACK                *VariablePack;\r
-} EFI_HII_VARIABLE_PACK_LIST;\r
-\r
-\r
-#pragma pack()\r
-\r
-/**\r
-  Registers the various packs that are passed in via the Packages parameter.\r
-\r
-  @param  This                  A pointer to the EFI_HII_PROTOCOL instance.\r
-  @param  Packages              A pointer to an EFI_HII_PACKAGES package instance.\r
-  @param  Handle                A pointer to the EFI_HII_HANDLE instance.\r
-\r
-  @retval EFI_SUCCESS           Data was extracted from Packages, the database\r
-                                was updated with the data, and Handle returned successfully.\r
-  @retval EFI_INVALID_PARAMETER The content of Packages was invalid.\r
-\r
-**/\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_HII_NEW_PACK) (\r
-  IN  EFI_HII_PROTOCOL    *This,\r
-  IN  EFI_HII_PACKAGES    *Packages,\r
-  OUT EFI_HII_HANDLE      *Handle\r
-  );\r
-\r
-/**\r
-  Removes a package from the HII database.\r
-\r
-  @param  This                  A pointer to the EFI_HII_PROTOCOL instance.\r
-  @param  Handle                The handle that was registered to the data that is requested\r
-                                for removal.\r
-\r
-  @retval EFI_SUCCESS           The data associated with the Handle was removed\r
-                                from the HII database.\r
-  @retval EFI_INVALID_PARAMETER The Handle was not valid.\r
-\r
-**/\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_HII_REMOVE_PACK) (\r
-  IN EFI_HII_PROTOCOL    *This,\r
-  IN EFI_HII_HANDLE      Handle\r
-  );\r
-\r
-/**\r
-  Determines the handles that are currently active in the database.\r
-\r
-  @param  This                  A pointer to the EFI_HII_PROTOCOL instance.\r
-  @param  HandleBufferLength    On input, a pointer to the length of the handle\r
-                                buffer. On output, the length of the handle buffer that is required\r
-                                for the handles found.\r
-  @param  Handle                An array of EFI_HII_HANDLE instances returned.\r
-\r
-  @retval EFI_SUCCESS           Handle was updated successfully.\r
-  @retval EFI_BUFFER_TOO_SMALL  The HandleBufferLength parameter indicates\r
-                                that Handle is too small to support the number of handles.\r
-\r
-**/\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_HII_FIND_HANDLES) (\r
-  IN     EFI_HII_PROTOCOL *This,\r
-  IN OUT UINT16           *HandleBufferLength,\r
-  OUT    EFI_HII_HANDLE   *Handle\r
-  );\r
-\r
-/**\r
-  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 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
-                                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
-  of the buffer that is required for the export data.\r
-  @param  Buffer                A pointer to a buffer that will contain the results of the export function.\r
-\r
-  @retval EFI_SUCCESS           The buffer was successfully filled with BufferSize amount of data.\r
-  @retval EFI_BUFFER_TOO_SMALL  The value in BufferSize was too small to contain the export data.\r
-\r
-**/\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_HII_EXPORT) (\r
-  IN     EFI_HII_PROTOCOL *This,\r
-  IN     EFI_HII_HANDLE   Handle,\r
-  IN OUT UINTN            *BufferSize,\r
-  OUT    VOID             *Buffer\r
-  );\r
-\r
-/**\r
-  Remove any new strings that were added after the initial string export\r
-  for this handle.\r
-\r
-  @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_INVALID_PARAMETER The Handle was unknown.\r
-\r
-**/\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_HII_RESET_STRINGS) (\r
-  IN     EFI_HII_PROTOCOL   *This,\r
-  IN     EFI_HII_HANDLE     Handle\r
-  );\r
-\r
-/**\r
-  Tests if all of the characters in a string have corresponding font characters.\r
-\r
-  @param  This                  A pointer to the EFI_HII_PROTOCOL instance.\r
-  @param  StringToTest          A pointer to a Unicode string.\r
-  @param  FirstMissing          A pointer to an index into the string. On input,\r
-                                the index of the first character in the StringToTest to examine. On exit,\r
-                                the index of the first character encountered for which a glyph is unavailable.\r
-                                If all glyphs in the string are available, the index is the index of the\r
-                                terminator of the string.\r
-  @param  GlyphBufferSize       A pointer to a value. On output, if the function\r
-                                returns EFI_SUCCESS, it contains the amount of memory that is required to\r
-                                store the string's glyph equivalent.\r
-\r
-  @retval EFI_SUCCESS           All glyphs are available. Note that an empty string\r
-                                always returns this value.\r
-  @retval EFI_NOT_FOUND         A glyph was not found for a character.\r
-\r
-**/\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_HII_TEST_STRING) (\r
-  IN     EFI_HII_PROTOCOL  *This,\r
-  IN     CHAR16            *StringToTest,\r
-  IN OUT UINT32            *FirstMissing,\r
-  OUT    UINT32            *GlyphBufferSize\r
-  );\r
-\r
-/**\r
-  Translates a Unicode character into the corresponding font glyph.\r
-\r
-  @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
-                                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
-                                to be wide enough to accept a wide glyph character.\r
-  @param  BitWidth              If EFI_SUCCESS was returned, the UINT16 pointed to by\r
-                                this value is filled with the length of the glyph in pixels. It is unchanged\r
-                                if the call was unsuccessful.\r
-  @param  InternalStatus        The cell pointed to by this parameter must be\r
-                                initialized to zero prior to invoking the call the first time for any string.\r
-\r
-  @retval EFI_SUCCESS           It worked.\r
-  @retval EFI_NOT_FOUND         A glyph for a character was not found.\r
-\r
-**/\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_HII_GET_GLYPH) (\r
-  IN     EFI_HII_PROTOCOL  *This,\r
-  IN     CHAR16            *Source,\r
-  IN OUT UINT16            *Index,\r
-  OUT    UINT8             **GlyphBuffer,\r
-  OUT    UINT16            *BitWidth,\r
-  IN OUT UINT32            *InternalStatus\r
-  );\r
-\r
-/**\r
-  Translates a glyph into the format required for input to the Universal\r
-  Graphics Adapter (UGA) Block Transfer (BLT) routines.\r
-\r
-  @param  This                  A pointer to the EFI_HII_PROTOCOL instance.\r
-  @param  GlyphBuffer           A pointer to the buffer that contains glyph data.\r
-  @param  Foreground            The foreground setting requested to be used for the\r
-                                generated BltBuffer data.\r
-  @param  Background            The background setting requested to be used for the\r
-                                generated BltBuffer data.\r
-  @param  Count                 The entry in the BltBuffer upon which to act.\r
-  @param  Width                 The width in bits of the glyph being converted.\r
-  @param  Height                The height in bits of the glyph being converted\r
-  @param  BltBuffer             A pointer to the buffer that contains the data that is\r
-                                ready to be used by the UGA BLT routines.\r
-\r
-  @retval EFI_SUCCESS           It worked.\r
-  @retval EFI_NOT_FOUND         A glyph for a character was not found.\r
-\r
-**/\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_HII_GLYPH_TO_BLT) (\r
-  IN     EFI_HII_PROTOCOL             *This,\r
-  IN     UINT8                        *GlyphBuffer,\r
-  IN     EFI_GRAPHICS_OUTPUT_BLT_PIXEL Foreground,\r
-  IN     EFI_GRAPHICS_OUTPUT_BLT_PIXEL Background,\r
-  IN     UINTN                         Count,\r
-  IN     UINTN                         Width,\r
-  IN     UINTN                         Height,\r
-  IN OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer\r
-  );\r
-\r
-/**\r
-  Allows a new string to be added to an already existing string package.\r
-\r
-  @param  This                  A pointer to the EFI_HII_PROTOCOL instance.\r
-  @param  Pointer               to a NULL-terminated string containing a single ISO 639-2\r
-                                language identifier, indicating the language in which the string is translated.\r
-  @param  Handle                The handle of the language pack to which the string is to be added.\r
-  @param  Reference             The identifier of the string to be added. If the reference\r
-                                value is zero, then the string will be assigned a new identifier on that\r
-                                handle for the language specified. Otherwise, the string will be updated\r
-                                with the NewString Value.\r
-  @param  NewString             The string to be added.\r
-\r
-  @retval EFI_SUCCESS           The string was effectively registered.\r
-  @retval EFI_INVALID_PARAMETER The Handle was unknown.\r
-\r
-**/\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_HII_NEW_STRING) (\r
-  IN     EFI_HII_PROTOCOL      *This,\r
-  IN     CHAR16                *Language,\r
-  IN     EFI_HII_HANDLE        Handle,\r
-  IN OUT STRING_REF            *Reference,\r
-  IN     CHAR16                *NewString\r
-  );\r
-\r
-/**\r
-  Allows a program to determine the primary languages that are supported\r
-  on a given handle.\r
-\r
-  @param  This                  A pointer to the EFI_HII_PROTOCOL instance.\r
-  @param  Handle                The handle on which the strings reside.\r
-  @param  LanguageString        A string allocated by GetPrimaryLanguages() that\r
-                                contains a list of all primary languages registered on the handle.\r
-\r
-  @retval EFI_SUCCESS           LanguageString was correctly returned.\r
-  @retval EFI_INVALID_PARAMETER The Handle was unknown.\r
-\r
-**/\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_HII_GET_PRI_LANGUAGES) (\r
-  IN  EFI_HII_PROTOCOL    *This,\r
-  IN  EFI_HII_HANDLE      Handle,\r
-  OUT EFI_STRING          *LanguageString\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
-\r
-  @param  This                  A pointer to the EFI_HII_PROTOCOL instance.\r
-  @param  Handle                The handle on which the strings reside.\r
-  @param  PrimaryLanguage       Pointer to a NULL-terminated string containing a single\r
-                                ISO 639-2 language identifier, indicating the primary language.\r
-  @param  LanguageString        A string allocated by GetSecondaryLanguages()\r
-                                containing a list of all secondary languages registered on the handle.\r
-\r
-  @retval EFI_SUCCESS           LanguageString was correctly returned.\r
-  @retval EFI_INVALID_PARAMETER The Handle was unknown.\r
-\r
-**/\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_HII_GET_SEC_LANGUAGES) (\r
-  IN  EFI_HII_PROTOCOL    *This,\r
-  IN  EFI_HII_HANDLE      Handle,\r
-  IN  CHAR16              *PrimaryLanguage,\r
-  OUT EFI_STRING          *LanguageString\r
-  );\r
-\r
-/**\r
-  Extracts a string from a package already registered with the EFI HII database.\r
-\r
-  @param  This                  A pointer to the EFI_HII_PROTOCOL instance.\r
-  @param  Handle                The handle on which the string resides.\r
-  @param  Token                 The string token assigned to the string.\r
-  @param  Raw                   If TRUE, the string is returned unedited in the internal\r
-                                storage format described above. If false, the string returned is edited\r
-                                by replacing <cr> with <space> and by removing special characters such\r
-                                as the <wide> prefix.\r
-  @param  LanguageString        Pointer to a NULL-terminated string containing a\r
-                                single ISO 639-2 language identifier, indicating the language to print.\r
-                                If the LanguageString is empty (starts with a NULL), the default system\r
-                                language will be used to determine the language.\r
-  @param  BufferLength          Length of the StringBuffer.\r
-  @param  StringBuffer          The buffer designed to receive the characters in the string.\r
-\r
-  @retval EFI_SUCCESS           StringBuffer is filled with a NULL-terminated string.\r
-  @retval EFI_INVALID_PARAMETER The handle or string token is unknown.\r
-  @retval EFI_BUFFER_TOO_SMALL  The buffer provided was not large enough to\r
-                                allow the entire string to be stored.\r
-\r
-**/\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_HII_GET_STRING) (\r
-  IN     EFI_HII_PROTOCOL  *This,\r
-  IN     EFI_HII_HANDLE    Handle,\r
-  IN     STRING_REF        Token,\r
-  IN     BOOLEAN           Raw,\r
-  IN     CHAR16            *LanguageString,\r
-  IN OUT UINTN             *BufferLength,\r
-  OUT    EFI_STRING        StringBuffer\r
-  );\r
-\r
-/**\r
-  Allows a program to extract a part of a string of not more than a given width.\r
-\r
-  @param  This                  A pointer to the EFI_HII_PROTOCOL instance.\r
-  @param  Handle                The handle on which the string resides.\r
-  @param  Token                 The string token assigned to the string.\r
-  @param  Index                 On input, the offset into the string where the line is to start.\r
-                                On output, the index is updated to point to beyond the last character returned\r
-                                in the call.\r
-  @param  LineWidth             The maximum width of the line in units of narrow glyphs.\r
-  @param  LanguageString        Pointer to a NULL-terminated string containing a\r
-                                single ISO 639-2 language identifier, indicating the language to print.\r
-  @param  BufferLength          Pointer to the length of the StringBuffer.\r
-  @param  StringBuffer          The buffer designed to receive the characters in the string.\r
-\r
-  @retval EFI_SUCCESS           StringBuffer filled with characters that will fit on the line.\r
-  @retval EFI_NOT_FOUND         The font glyph for at least one of the characters in\r
-                                the string is not in the font database.\r
-  @retval EFI_BUFFER_TOO_SMALL  The buffer provided was not large enough\r
-                                to allow the entire string to be stored.\r
-\r
-**/\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_HII_GET_LINE) (\r
-  IN     EFI_HII_PROTOCOL  *This,\r
-  IN     EFI_HII_HANDLE    Handle,\r
-  IN     STRING_REF        Token,\r
-  IN OUT UINT16            *Index,\r
-  IN     UINT16            LineWidth,\r
-  IN     CHAR16            *LanguageString,\r
-  IN OUT UINT16            *BufferLength,\r
-  OUT    EFI_STRING        StringBuffer\r
-  );\r
-\r
-/**\r
-  Allows a program to extract a form or form package that has previously\r
-  been registered with the HII database.\r
-\r
-  @param  This                  A pointer to the EFI_HII_PROTOCOL instance.\r
-  @param  Handle                Handle on which the form resides.\r
-  @param  FormId                The ID of the form to return. If the ID is zero,\r
-                                the entire form package is returned.\r
-  @param  BufferLength          On input, the length of the Buffer. On output,\r
-                                the length of the returned buffer,\r
-  @param  Buffer                The buffer designed to receive the form(s).\r
-\r
-  @retval EFI_SUCCESS           Buffer filled with the requested forms. BufferLength\r
-                                was updated.\r
-  @retval EFI_INVALID_PARAMETER The handle is unknown.\r
-  @retval EFI_NOT_FOUND         A form on the requested handle cannot be found with\r
-                                the requested FormId.\r
-  @retval EFI_BUFFER_TOO_SMALL  The buffer provided was not large enough\r
-                                to allow the form to be stored.\r
-\r
-**/\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_HII_GET_FORMS) (\r
-  IN     EFI_HII_PROTOCOL  *This,\r
-  IN     EFI_HII_HANDLE    Handle,\r
-  IN     EFI_FORM_ID       FormId,\r
-  IN OUT UINTN             *BufferLength,\r
-  OUT    UINT8             *Buffer\r
-  );\r
-\r
-/**\r
-  Extracts the defaults that are associated with a given handle in the HII database.\r
-\r
-  @param  This                  A pointer to the EFI_HII_PROTOCOL instance.\r
-  @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
-                                type EFI_HII_VARIABLE_PACK_LIST.\r
-\r
-  @retval EFI_SUCCESS           The VariablePackList was populated with the appropriate\r
-                                default setting data.\r
-  @retval EFI_NOT_FOUND         The IFR does not have any explicit or default map(s).\r
-  @retval EFI_INVALID_PARAMETER The HII database entry associated with Handle\r
-                                contain invalid data.\r
-\r
-**/\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_HII_GET_DEFAULT_IMAGE) (\r
-  IN     EFI_HII_PROTOCOL           *This,\r
-  IN     EFI_HII_HANDLE             Handle,\r
-  IN     UINTN                      DefaultMask,\r
-  OUT    EFI_HII_VARIABLE_PACK_LIST **VariablePackList\r
-  );\r
-\r
-/**\r
-  Allows the caller to update a form or form package that has previously been\r
-  registered with the EFI HII database.\r
-\r
-  @param  This                  A pointer to the EFI_HII_PROTOCOL instance.\r
-  @param  Handle                Handle of the package where the form to be updated resides.\r
-  @param  Label                 The label inside the form package where the update is to take place.\r
-  @param  AddData               If TRUE, adding data at a given Label; otherwise,\r
-                                if FALSE, removing data at a given Label.\r
-  @param  Data                  The buffer containing the new tags to insert after the Label\r
-\r
-  @retval EFI_SUCCESS           The form was updated with the new tags.\r
-  @retval EFI_INVALID_PARAMETER The buffer for the buffer length does not\r
-                                contain an integral number of tags.\r
-  @retval EFI_NOT_FOUND         The Handle, Label, or FormId was not found.\r
-\r
-**/\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_HII_UPDATE_FORM) (\r
-  IN EFI_HII_PROTOCOL     *This,\r
-  IN EFI_HII_HANDLE       Handle,\r
-  IN EFI_FORM_LABEL       Label,\r
-  IN BOOLEAN              AddData,\r
-  IN EFI_HII_UPDATE_DATA  *Data\r
-  );\r
-\r
-/**\r
-  Retrieves the current keyboard layout.\r
-\r
-  @param  This                  A pointer to the EFI_HII_PROTOCOL instance.\r
-  @param  DescriptorCount       A pointer to the number of Descriptor entries being\r
-                                described in the keyboard layout being retrieved.\r
-  @param  Descriptor            A pointer to a buffer containing an array of EFI_KEY_DESCRIPTOR\r
-                                entries. Each entry will reflect the definition of a specific physical key.\r
-\r
-  @retval EFI_SUCCESS           The keyboard layout was retrieved successfully.\r
-\r
-**/\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_HII_GET_KEYBOARD_LAYOUT) (\r
-  IN     EFI_HII_PROTOCOL    *This,\r
-  OUT    UINT16              *DescriptorCount,\r
-  OUT    EFI_KEY_DESCRIPTOR  *Descriptor\r
-  );\r
-\r
-/**\r
-  @par Protocol Description:\r
-  The HII Protocol manages the HII database, which is a repository for data\r
-  having to do with fonts, strings, forms, keyboards, and other future human\r
-  interface items.\r
-\r
-  @param NewPack\r
-  Extracts the various packs from a package list.\r
-\r
-  @param RemovePack\r
-  Removes a package from the HII database.\r
-\r
-  @param FindHandles\r
-  Determines the handles that are currently active in the database.\r
-\r
-  @param ExportDatabase\r
-  Export the entire contents of the database to a buffer.\r
-\r
-  @param TestString\r
-  Tests if all of the characters in a string have corresponding font characters.\r
-\r
-  @param GetGlyph\r
-  Translates a Unicode character into the corresponding font glyph.\r
-\r
-  @param GlyphToBlt\r
-  Converts a glyph value into a format that is ready for a UGA BLT command.\r
-\r
-  @param NewString\r
-  Allows a new string to be added to an already existing string package.\r
-\r
-  @param GetPrimaryLanguages\r
-  Allows a program to determine the primary languages that are supported\r
-  on a given handle.\r
-\r
-  @param GetSecondaryLanguages\r
-  Allows a program to determine which secondary languages are supported\r
-  on a given handle for a given primary language.\r
-\r
-  @param GetString\r
-  Extracts a string from a package that is already registered with the\r
-  EFI HII database.\r
-\r
-  @param ResetString\r
-  Remove any new strings that were added after the initial string export\r
-  for this handle.\r
-\r
-  @param GetLine\r
-  Allows a program to extract a part of a string of not more than a given width.\r
-\r
-  @param GetForms\r
-  Allows a program to extract a form or form package that has been previously registered.\r
-\r
-  @param GetDefaultImage\r
-  Allows a program to extract the nonvolatile image that represents the default storage image.\r
-\r
-  @param UpdateForm\r
-  Allows a program to update a previously registered form.\r
-\r
-  @param GetKeyboardLayout\r
-  Allows a program to extract the current keyboard layout.\r
-\r
-**/\r
-struct _EFI_HII_PROTOCOL {\r
-  EFI_HII_NEW_PACK            NewPack;\r
-  EFI_HII_REMOVE_PACK         RemovePack;\r
-  EFI_HII_FIND_HANDLES        FindHandles;\r
-  EFI_HII_EXPORT              ExportDatabase;\r
-\r
-  EFI_HII_TEST_STRING         TestString;\r
-  EFI_HII_GET_GLYPH           GetGlyph;\r
-  EFI_HII_GLYPH_TO_BLT        GlyphToBlt;\r
-\r
-  EFI_HII_NEW_STRING          NewString;\r
-  EFI_HII_GET_PRI_LANGUAGES   GetPrimaryLanguages;\r
-  EFI_HII_GET_SEC_LANGUAGES   GetSecondaryLanguages;\r
-  EFI_HII_GET_STRING          GetString;\r
-  EFI_HII_RESET_STRINGS       ResetStrings;\r
-  EFI_HII_GET_LINE            GetLine;\r
-  EFI_HII_GET_FORMS           GetForms;\r
-  EFI_HII_GET_DEFAULT_IMAGE   GetDefaultImage;\r
-  EFI_HII_UPDATE_FORM         UpdateForm;\r
-\r
-  EFI_HII_GET_KEYBOARD_LAYOUT GetKeyboardLayout;\r
-};\r
-\r
-extern EFI_GUID gEfiHiiProtocolGuid;\r
-\r
-#endif\r
diff --git a/IntelFrameworkPkg/Include/Protocol/HiiFramework.h b/IntelFrameworkPkg/Include/Protocol/HiiFramework.h
new file mode 100644 (file)
index 0000000..4a22378
--- /dev/null
@@ -0,0 +1,951 @@
+/** @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.\r
+\r
+  Copyright (c) 2007, 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
+\r
+  Module Name:  HiiFramework.h\r
+\r
+  @par Revision Reference:\r
+  This protocol is defined in HII spec 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
+//\r
+#include <Protocol/GraphicsOutput.h>\r
+\r
+#define EFI_HII_PROTOCOL_GUID \\r
+  { \\r
+    0xd7ad636e, 0xb997, 0x459b, {0xbf, 0x3f, 0x88, 0x46, 0x89, 0x79, 0x80, 0xe1} \\r
+  }\r
+\r
+// BugBug:\r
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\r
+// If UGA goes away we need to put this some place. I'm not sure where?\r
+//\r
+//typedef struct {\r
+//  UINT8 Blue;\r
+//  UINT8 Green;\r
+//  UINT8 Red;\r
+//  UINT8 Reserved;\r
+//} EFI_UGA_PIXEL;\r
+\r
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\r
+//\r
+\r
+typedef struct _EFI_HII_PROTOCOL  EFI_HII_PROTOCOL;\r
+\r
+//\r
+// Global definition\r
+//\r
+#define NARROW_CHAR         0xFFF0\r
+#define WIDE_CHAR           0xFFF1\r
+#define NON_BREAKING_CHAR   0xFFF2\r
+#define GLYPH_WIDTH         8\r
+#define GLYPH_HEIGHT        19\r
+\r
+#define EFI_HII_FONT        1\r
+#define EFI_HII_STRING      2\r
+#define EFI_HII_IFR         3\r
+#define EFI_HII_KEYBOARD    4\r
+#define EFI_HII_HANDLES     5\r
+#define EFI_HII_VARIABLE    6\r
+#define EFI_HII_DEVICE_PATH 7\r
+\r
+\r
+// References to string tokens must use this macro to enable scanning for\r
+// token usages.\r
+//\r
+#define STRING_TOKEN(t) t\r
+\r
+//\r
+// The following types are currently defined:\r
+//\r
+typedef UINT16  EFI_FORM_ID;\r
+typedef UINT16  EFI_FORM_LABEL;\r
+\r
+#pragma pack(1)\r
+\r
+typedef struct {\r
+  UINT32  Length;\r
+  UINT16  Type;\r
+} EFI_HII_PACK_HEADER;\r
+\r
+//\r
+// A form list consists of a large variety of structure\r
+// possibilities so to represent the binary blob of data\r
+// associated with a package of forms, we will assume a\r
+// pointer to a self-describing data buffer.\r
+//\r
+typedef struct {\r
+  EFI_HII_PACK_HEADER Header;\r
+} EFI_HII_IFR_PACK;\r
+\r
+typedef struct {\r
+  EFI_HII_PACK_HEADER Header;           // Must be filled in\r
+  EFI_HANDLE          ImageHandle;      // Must be filled in\r
+  EFI_HANDLE          DeviceHandle;     // Optional\r
+  EFI_HANDLE          ControllerHandle; // Optional\r
+  EFI_HANDLE          CallbackHandle;   // Optional\r
+  EFI_HANDLE          COBExportHandle;  // Optional\r
+} EFI_HII_HANDLE_PACK;\r
+\r
+//\r
+// ********************************************************\r
+// EFI_VARIABLE_CONTENTS\r
+// ********************************************************\r
+//\r
+typedef struct {\r
+  EFI_HII_PACK_HEADER Header;\r
+  EFI_GUID            VariableGuid;\r
+  UINT32              VariableNameLength;\r
+  UINT16              VariableId;\r
+  //\r
+  //  CHAR16                VariableName[]; //Null-terminated\r
+  //\r
+} EFI_HII_VARIABLE_PACK;\r
+\r
+//\r
+// ********************************************************\r
+// EFI_DEVICE_PATH_PACK\r
+// ********************************************************\r
+//\r
+typedef struct {\r
+  EFI_HII_PACK_HEADER Header;\r
+  //\r
+  //  EFI_DEVICE_PATH       DevicePath[];\r
+  //\r
+} EFI_HII_DEVICE_PATH_PACK;\r
+\r
+//\r
+// ********************************************************\r
+// EFI_HII_DATA_TABLE\r
+// ********************************************************\r
+//\r
+typedef struct {\r
+  EFI_HII_HANDLE  HiiHandle;\r
+  EFI_GUID        PackageGuid;\r
+  UINT32          DataTableSize;\r
+  UINT32          IfrDataOffset;\r
+  UINT32          StringDataOffset;\r
+  UINT32          VariableDataOffset;\r
+  UINT32          DevicePathOffset;\r
+  UINT32          NumberOfVariableData;\r
+  UINT32          NumberOfLanguages;\r
+  //\r
+  // EFI_HII_DEVICE_PATH_PACK DevicePath[];\r
+  // EFI_HII_VARIABLE_PACK VariableData[];\r
+  // EFI_HII_IFR_PACK IfrData;\r
+  // EFI_HII_STRING_PACK StringData[];\r
+  //\r
+} EFI_HII_DATA_TABLE;\r
+\r
+//\r
+// ********************************************************\r
+// EFI_HII_EXPORT_TABLE\r
+// ********************************************************\r
+//\r
+typedef struct {\r
+  UINT32    NumberOfHiiDataTables;\r
+  EFI_GUID  Revision;\r
+  //\r
+  // EFI_HII_DATA_TABLE HiiDataTable[];\r
+  //\r
+} EFI_HII_EXPORT_TABLE;\r
+\r
+typedef struct {\r
+  BOOLEAN               FormSetUpdate;      // If TRUE, next variable is significant\r
+  EFI_PHYSICAL_ADDRESS  FormCallbackHandle; // If not 0, will update Formset with this info\r
+  BOOLEAN               FormUpdate;         // If TRUE, next variable is significant\r
+  UINT16                FormValue;          // specify which form is to be updated if FormUpdate value is TRUE.\r
+  STRING_REF            FormTitle;          // If not 0, will update Form with this info\r
+  UINT16                DataCount;          // The number of Data entries in this structure\r
+  UINT8                 *Data;              // An array of 1+ op-codes, specified by DataCount\r
+} EFI_HII_UPDATE_DATA;\r
+\r
+//\r
+// String attributes\r
+//\r
+#define LANG_RIGHT_TO_LEFT  0x00000001\r
+\r
+//\r
+// A string package is used to localize strings to a particular\r
+// language.  The package is associated with a particular driver\r
+// or set of drivers.  Tools are used to associate tokens with\r
+// string references in forms and in programs.  These tokens are\r
+// language agnostic.  When paired with a language pack (directly\r
+// or indirectly), the string token resolves into an actual\r
+// UNICODE string.  The NumStringPointers determines how many\r
+// StringPointers (offset values) there are as well as the total\r
+// number of Strings that are defined.\r
+//\r
+typedef struct {\r
+  EFI_HII_PACK_HEADER Header;\r
+  RELOFST             LanguageNameString;\r
+  RELOFST             PrintableLanguageName;\r
+  UINT32              NumStringPointers;\r
+  UINT32              Attributes;\r
+  //\r
+  //  RELOFST               StringPointers[];\r
+  //  EFI_STRING            Strings[];\r
+  //\r
+} EFI_HII_STRING_PACK;\r
+\r
+//\r
+// Glyph Attributes\r
+//\r
+#define EFI_GLYPH_NON_SPACING   1\r
+#define EFI_GLYPH_WIDE          2\r
+\r
+typedef struct {\r
+  CHAR16  UnicodeWeight;\r
+  UINT8   Attributes;\r
+  UINT8   GlyphCol1[GLYPH_HEIGHT];\r
+} EFI_NARROW_GLYPH;\r
+\r
+typedef struct {\r
+  CHAR16  UnicodeWeight;\r
+  UINT8   Attributes;\r
+  UINT8   GlyphCol1[GLYPH_HEIGHT];\r
+  UINT8   GlyphCol2[GLYPH_HEIGHT];\r
+  UINT8   Pad[3];\r
+} EFI_WIDE_GLYPH;\r
+\r
+//\r
+// A font list consists of a font header followed by a series\r
+// of glyph structures.  Note that fonts are not language specific.\r
+//\r
+typedef struct {\r
+  EFI_HII_PACK_HEADER Header;\r
+  UINT16              NumberOfNarrowGlyphs;\r
+  UINT16              NumberOfWideGlyphs;\r
+} EFI_HII_FONT_PACK;\r
+\r
+//\r
+// The IfrData in the EFI_HII_IFR_PACK structure definition\r
+// is variable length, and not really part of the header. To\r
+// simplify from code the size of the header, define an\r
+// identical structure that does not include the IfrData field.\r
+// Then use sizeof() this new structure to determine the\r
+// actual size of the header.\r
+//\r
+typedef struct {\r
+  EFI_HII_PACK_HEADER Header;\r
+} EFI_HII_IFR_PACK_HEADER;\r
+\r
+//\r
+// pedef EFI_HII_PACK_HEADER EFI_HII_IFR_PACK_HEADER;\r
+//\r
+typedef enum {\r
+  EfiKeyLCtrl,\r
+  EfiKeyA0,\r
+  EfiKeyLAlt,\r
+  EfiKeySpaceBar,\r
+  EfiKeyA2,\r
+  EfiKeyA3,\r
+  EfiKeyA4,\r
+  EfiKeyRCtrl,\r
+  EfiKeyLeftArrow,\r
+  EfiKeyDownArrow,\r
+  EfiKeyRightArrow,\r
+  EfiKeyZero,\r
+  EfiKeyPeriod,\r
+  EfiKeyEnter,\r
+  EfiKeyLShift,\r
+  EfiKeyB0,\r
+  EfiKeyB1,\r
+  EfiKeyB2,\r
+  EfiKeyB3,\r
+  EfiKeyB4,\r
+  EfiKeyB5,\r
+  EfiKeyB6,\r
+  EfiKeyB7,\r
+  EfiKeyB8,\r
+  EfiKeyB9,\r
+  EfiKeyB10,\r
+  EfiKeyRshift,\r
+  EfiKeyUpArrow,\r
+  EfiKeyOne,\r
+  EfiKeyTwo,\r
+  EfiKeyThree,\r
+  EfiKeyCapsLock,\r
+  EfiKeyC1,\r
+  EfiKeyC2,\r
+  EfiKeyC3,\r
+  EfiKeyC4,\r
+  EfiKeyC5,\r
+  EfiKeyC6,\r
+  EfiKeyC7,\r
+  EfiKeyC8,\r
+  EfiKeyC9,\r
+  EfiKeyC10,\r
+  EfiKeyC11,\r
+  EfiKeyC12,\r
+  EfiKeyFour,\r
+  EfiKeyFive,\r
+  EfiKeySix,\r
+  EfiKeyPlus,\r
+  EfiKeyTab,\r
+  EfiKeyD1,\r
+  EfiKeyD2,\r
+  EfiKeyD3,\r
+  EfiKeyD4,\r
+  EfiKeyD5,\r
+  EfiKeyD6,\r
+  EfiKeyD7,\r
+  EfiKeyD8,\r
+  EfiKeyD9,\r
+  EfiKeyD10,\r
+  EfiKeyD11,\r
+  EfiKeyD12,\r
+  EfiKeyD13,\r
+  EfiKeyDel,\r
+  EfiKeyEnd,\r
+  EfiKeyPgDn,\r
+  EfiKeySeven,\r
+  EfiKeyEight,\r
+  EfiKeyNine,\r
+  EfiKeyE0,\r
+  EfiKeyE1,\r
+  EfiKeyE2,\r
+  EfiKeyE3,\r
+  EfiKeyE4,\r
+  EfiKeyE5,\r
+  EfiKeyE6,\r
+  EfiKeyE7,\r
+  EfiKeyE8,\r
+  EfiKeyE9,\r
+  EfiKeyE10,\r
+  EfiKeyE11,\r
+  EfiKeyE12,\r
+  EfiKeyBackSpace,\r
+  EfiKeyIns,\r
+  EfiKeyHome,\r
+  EfiKeyPgUp,\r
+  EfiKeyNLck,\r
+  EfiKeySlash,\r
+  EfiKeyAsterisk,\r
+  EfiKeyMinus,\r
+  EfiKeyEsc,\r
+  EfiKeyF1,\r
+  EfiKeyF2,\r
+  EfiKeyF3,\r
+  EfiKeyF4,\r
+  EfiKeyF5,\r
+  EfiKeyF6,\r
+  EfiKeyF7,\r
+  EfiKeyF8,\r
+  EfiKeyF9,\r
+  EfiKeyF10,\r
+  EfiKeyF11,\r
+  EfiKeyF12,\r
+  EfiKeyPrint,\r
+  EfiKeySLck,\r
+  EfiKeyPause\r
+} EFI_KEY;\r
+\r
+typedef struct {\r
+  EFI_KEY Key;\r
+  CHAR16  Unicode;\r
+  CHAR16  ShiftedUnicode;\r
+  CHAR16  AltGrUnicode;\r
+  CHAR16  ShiftedAltGrUnicode;\r
+  UINT16  Modifier;\r
+} EFI_KEY_DESCRIPTOR;\r
+\r
+//\r
+// This structure allows a sparse set of keys to be redefined\r
+// or a complete redefinition of the keyboard layout.  Most\r
+// keyboards have a lot of commonality in their layouts, therefore\r
+// only defining those keys that need to change from the default\r
+// minimizes the passed in information.\r
+//\r
+// Additionally, when an update occurs, the active keyboard layout\r
+// will be switched to the newly updated keyboard layout.  This\r
+// allows for situations that when a keyboard layout driver is\r
+// loaded as part of system initialization, the system will default\r
+// the keyboard behavior to the new layout.\r
+//\r
+// Each call to update the keyboard mapping should contain the\r
+// complete set of key descriptors to be updated, since every\r
+// call to the HII which contains an EFI_HII_KEYBOARD_PACK will\r
+// wipe the previous set of overrides.  A call to\r
+//\r
+typedef struct {\r
+  EFI_HII_PACK_HEADER Header;\r
+  EFI_KEY_DESCRIPTOR  *Descriptor;\r
+  UINT8               DescriptorCount;\r
+} EFI_HII_KEYBOARD_PACK;\r
+\r
+//\r
+// The EFI_HII_PACKAGES can contain different types of packages just\r
+// after the structure as inline data.\r
+//\r
+typedef struct {\r
+  UINTN     NumberOfPackages;\r
+  EFI_GUID  *GuidId;\r
+  //\r
+  // EFI_HII_HANDLE_PACK    *HandlePack;        // Only one pack.\r
+  // EFI_HII_IFR_PACK       *IfrPack;           // Only one pack.\r
+  // EFI_HII_FONT_PACK      *FontPack[];        // Multiple packs ok\r
+  // EFI_HII_STRING_PACK    *StringPack[];      // Multiple packs ok\r
+  // EFI_HII_KEYBOARD_PACK  *KeyboardPack[];    // Multiple packs ok\r
+  //\r
+} EFI_HII_PACKAGES;\r
+\r
+typedef struct _EFI_HII_VARIABLE_PACK_LIST {\r
+  struct _EFI_HII_VARIABLE_PACK_LIST   *NextVariablePack;\r
+  EFI_HII_VARIABLE_PACK                *VariablePack;\r
+} EFI_HII_VARIABLE_PACK_LIST;\r
+\r
+\r
+#pragma pack()\r
+\r
+/**\r
+  Registers the various packs that are passed in via the Packages parameter.\r
+\r
+  @param  This                  A pointer to the EFI_HII_PROTOCOL instance.\r
+  @param  Packages              A pointer to an EFI_HII_PACKAGES package instance.\r
+  @param  Handle                A pointer to the EFI_HII_HANDLE instance.\r
+\r
+  @retval EFI_SUCCESS           Data was extracted from Packages, the database\r
+                                was updated with the data, and Handle returned successfully.\r
+  @retval EFI_INVALID_PARAMETER The content of Packages was invalid.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_HII_NEW_PACK) (\r
+  IN  EFI_HII_PROTOCOL    *This,\r
+  IN  EFI_HII_PACKAGES    *Packages,\r
+  OUT EFI_HII_HANDLE      *Handle\r
+  );\r
+\r
+/**\r
+  Removes a package from the HII database.\r
+\r
+  @param  This                  A pointer to the EFI_HII_PROTOCOL instance.\r
+  @param  Handle                The handle that was registered to the data that is requested\r
+                                for removal.\r
+\r
+  @retval EFI_SUCCESS           The data associated with the Handle was removed\r
+                                from the HII database.\r
+  @retval EFI_INVALID_PARAMETER The Handle was not valid.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_HII_REMOVE_PACK) (\r
+  IN EFI_HII_PROTOCOL    *This,\r
+  IN EFI_HII_HANDLE      Handle\r
+  );\r
+\r
+/**\r
+  Determines the handles that are currently active in the database.\r
+\r
+  @param  This                  A pointer to the EFI_HII_PROTOCOL instance.\r
+  @param  HandleBufferLength    On input, a pointer to the length of the handle\r
+                                buffer. On output, the length of the handle buffer that is required\r
+                                for the handles found.\r
+  @param  Handle                An array of EFI_HII_HANDLE instances returned.\r
+\r
+  @retval EFI_SUCCESS           Handle was updated successfully.\r
+  @retval EFI_BUFFER_TOO_SMALL  The HandleBufferLength parameter indicates\r
+                                that Handle is too small to support the number of handles.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_HII_FIND_HANDLES) (\r
+  IN     EFI_HII_PROTOCOL *This,\r
+  IN OUT UINT16           *HandleBufferLength,\r
+  OUT    EFI_HII_HANDLE   *Handle\r
+  );\r
+\r
+/**\r
+  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 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
+                                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
+  of the buffer that is required for the export data.\r
+  @param  Buffer                A pointer to a buffer that will contain the results of the export function.\r
+\r
+  @retval EFI_SUCCESS           The buffer was successfully filled with BufferSize amount of data.\r
+  @retval EFI_BUFFER_TOO_SMALL  The value in BufferSize was too small to contain the export data.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_HII_EXPORT) (\r
+  IN     EFI_HII_PROTOCOL *This,\r
+  IN     EFI_HII_HANDLE   Handle,\r
+  IN OUT UINTN            *BufferSize,\r
+  OUT    VOID             *Buffer\r
+  );\r
+\r
+/**\r
+  Remove any new strings that were added after the initial string export\r
+  for this handle.\r
+\r
+  @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_INVALID_PARAMETER The Handle was unknown.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_HII_RESET_STRINGS) (\r
+  IN     EFI_HII_PROTOCOL   *This,\r
+  IN     EFI_HII_HANDLE     Handle\r
+  );\r
+\r
+/**\r
+  Tests if all of the characters in a string have corresponding font characters.\r
+\r
+  @param  This                  A pointer to the EFI_HII_PROTOCOL instance.\r
+  @param  StringToTest          A pointer to a Unicode string.\r
+  @param  FirstMissing          A pointer to an index into the string. On input,\r
+                                the index of the first character in the StringToTest to examine. On exit,\r
+                                the index of the first character encountered for which a glyph is unavailable.\r
+                                If all glyphs in the string are available, the index is the index of the\r
+                                terminator of the string.\r
+  @param  GlyphBufferSize       A pointer to a value. On output, if the function\r
+                                returns EFI_SUCCESS, it contains the amount of memory that is required to\r
+                                store the string's glyph equivalent.\r
+\r
+  @retval EFI_SUCCESS           All glyphs are available. Note that an empty string\r
+                                always returns this value.\r
+  @retval EFI_NOT_FOUND         A glyph was not found for a character.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_HII_TEST_STRING) (\r
+  IN     EFI_HII_PROTOCOL  *This,\r
+  IN     CHAR16            *StringToTest,\r
+  IN OUT UINT32            *FirstMissing,\r
+  OUT    UINT32            *GlyphBufferSize\r
+  );\r
+\r
+/**\r
+  Translates a Unicode character into the corresponding font glyph.\r
+\r
+  @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
+                                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
+                                to be wide enough to accept a wide glyph character.\r
+  @param  BitWidth              If EFI_SUCCESS was returned, the UINT16 pointed to by\r
+                                this value is filled with the length of the glyph in pixels. It is unchanged\r
+                                if the call was unsuccessful.\r
+  @param  InternalStatus        The cell pointed to by this parameter must be\r
+                                initialized to zero prior to invoking the call the first time for any string.\r
+\r
+  @retval EFI_SUCCESS           It worked.\r
+  @retval EFI_NOT_FOUND         A glyph for a character was not found.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_HII_GET_GLYPH) (\r
+  IN     EFI_HII_PROTOCOL  *This,\r
+  IN     CHAR16            *Source,\r
+  IN OUT UINT16            *Index,\r
+  OUT    UINT8             **GlyphBuffer,\r
+  OUT    UINT16            *BitWidth,\r
+  IN OUT UINT32            *InternalStatus\r
+  );\r
+\r
+/**\r
+  Translates a glyph into the format required for input to the Universal\r
+  Graphics Adapter (UGA) Block Transfer (BLT) routines.\r
+\r
+  @param  This                  A pointer to the EFI_HII_PROTOCOL instance.\r
+  @param  GlyphBuffer           A pointer to the buffer that contains glyph data.\r
+  @param  Foreground            The foreground setting requested to be used for the\r
+                                generated BltBuffer data.\r
+  @param  Background            The background setting requested to be used for the\r
+                                generated BltBuffer data.\r
+  @param  Count                 The entry in the BltBuffer upon which to act.\r
+  @param  Width                 The width in bits of the glyph being converted.\r
+  @param  Height                The height in bits of the glyph being converted\r
+  @param  BltBuffer             A pointer to the buffer that contains the data that is\r
+                                ready to be used by the UGA BLT routines.\r
+\r
+  @retval EFI_SUCCESS           It worked.\r
+  @retval EFI_NOT_FOUND         A glyph for a character was not found.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_HII_GLYPH_TO_BLT) (\r
+  IN     EFI_HII_PROTOCOL             *This,\r
+  IN     UINT8                        *GlyphBuffer,\r
+  IN     EFI_GRAPHICS_OUTPUT_BLT_PIXEL Foreground,\r
+  IN     EFI_GRAPHICS_OUTPUT_BLT_PIXEL Background,\r
+  IN     UINTN                         Count,\r
+  IN     UINTN                         Width,\r
+  IN     UINTN                         Height,\r
+  IN OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer\r
+  );\r
+\r
+/**\r
+  Allows a new string to be added to an already existing string package.\r
+\r
+  @param  This                  A pointer to the EFI_HII_PROTOCOL instance.\r
+  @param  Pointer               to a NULL-terminated string containing a single ISO 639-2\r
+                                language identifier, indicating the language in which the string is translated.\r
+  @param  Handle                The handle of the language pack to which the string is to be added.\r
+  @param  Reference             The identifier of the string to be added. If the reference\r
+                                value is zero, then the string will be assigned a new identifier on that\r
+                                handle for the language specified. Otherwise, the string will be updated\r
+                                with the NewString Value.\r
+  @param  NewString             The string to be added.\r
+\r
+  @retval EFI_SUCCESS           The string was effectively registered.\r
+  @retval EFI_INVALID_PARAMETER The Handle was unknown.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_HII_NEW_STRING) (\r
+  IN     EFI_HII_PROTOCOL      *This,\r
+  IN     CHAR16                *Language,\r
+  IN     EFI_HII_HANDLE        Handle,\r
+  IN OUT STRING_REF            *Reference,\r
+  IN     CHAR16                *NewString\r
+  );\r
+\r
+/**\r
+  Allows a program to determine the primary languages that are supported\r
+  on a given handle.\r
+\r
+  @param  This                  A pointer to the EFI_HII_PROTOCOL instance.\r
+  @param  Handle                The handle on which the strings reside.\r
+  @param  LanguageString        A string allocated by GetPrimaryLanguages() that\r
+                                contains a list of all primary languages registered on the handle.\r
+\r
+  @retval EFI_SUCCESS           LanguageString was correctly returned.\r
+  @retval EFI_INVALID_PARAMETER The Handle was unknown.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_HII_GET_PRI_LANGUAGES) (\r
+  IN  EFI_HII_PROTOCOL    *This,\r
+  IN  EFI_HII_HANDLE      Handle,\r
+  OUT EFI_STRING          *LanguageString\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
+\r
+  @param  This                  A pointer to the EFI_HII_PROTOCOL instance.\r
+  @param  Handle                The handle on which the strings reside.\r
+  @param  PrimaryLanguage       Pointer to a NULL-terminated string containing a single\r
+                                ISO 639-2 language identifier, indicating the primary language.\r
+  @param  LanguageString        A string allocated by GetSecondaryLanguages()\r
+                                containing a list of all secondary languages registered on the handle.\r
+\r
+  @retval EFI_SUCCESS           LanguageString was correctly returned.\r
+  @retval EFI_INVALID_PARAMETER The Handle was unknown.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_HII_GET_SEC_LANGUAGES) (\r
+  IN  EFI_HII_PROTOCOL    *This,\r
+  IN  EFI_HII_HANDLE      Handle,\r
+  IN  CHAR16              *PrimaryLanguage,\r
+  OUT EFI_STRING          *LanguageString\r
+  );\r
+\r
+/**\r
+  Extracts a string from a package already registered with the EFI HII database.\r
+\r
+  @param  This                  A pointer to the EFI_HII_PROTOCOL instance.\r
+  @param  Handle                The handle on which the string resides.\r
+  @param  Token                 The string token assigned to the string.\r
+  @param  Raw                   If TRUE, the string is returned unedited in the internal\r
+                                storage format described above. If false, the string returned is edited\r
+                                by replacing <cr> with <space> and by removing special characters such\r
+                                as the <wide> prefix.\r
+  @param  LanguageString        Pointer to a NULL-terminated string containing a\r
+                                single ISO 639-2 language identifier, indicating the language to print.\r
+                                If the LanguageString is empty (starts with a NULL), the default system\r
+                                language will be used to determine the language.\r
+  @param  BufferLength          Length of the StringBuffer.\r
+  @param  StringBuffer          The buffer designed to receive the characters in the string.\r
+\r
+  @retval EFI_SUCCESS           StringBuffer is filled with a NULL-terminated string.\r
+  @retval EFI_INVALID_PARAMETER The handle or string token is unknown.\r
+  @retval EFI_BUFFER_TOO_SMALL  The buffer provided was not large enough to\r
+                                allow the entire string to be stored.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_HII_GET_STRING) (\r
+  IN     EFI_HII_PROTOCOL  *This,\r
+  IN     EFI_HII_HANDLE    Handle,\r
+  IN     STRING_REF        Token,\r
+  IN     BOOLEAN           Raw,\r
+  IN     CHAR16            *LanguageString,\r
+  IN OUT UINTN             *BufferLength,\r
+  OUT    EFI_STRING        StringBuffer\r
+  );\r
+\r
+/**\r
+  Allows a program to extract a part of a string of not more than a given width.\r
+\r
+  @param  This                  A pointer to the EFI_HII_PROTOCOL instance.\r
+  @param  Handle                The handle on which the string resides.\r
+  @param  Token                 The string token assigned to the string.\r
+  @param  Index                 On input, the offset into the string where the line is to start.\r
+                                On output, the index is updated to point to beyond the last character returned\r
+                                in the call.\r
+  @param  LineWidth             The maximum width of the line in units of narrow glyphs.\r
+  @param  LanguageString        Pointer to a NULL-terminated string containing a\r
+                                single ISO 639-2 language identifier, indicating the language to print.\r
+  @param  BufferLength          Pointer to the length of the StringBuffer.\r
+  @param  StringBuffer          The buffer designed to receive the characters in the string.\r
+\r
+  @retval EFI_SUCCESS           StringBuffer filled with characters that will fit on the line.\r
+  @retval EFI_NOT_FOUND         The font glyph for at least one of the characters in\r
+                                the string is not in the font database.\r
+  @retval EFI_BUFFER_TOO_SMALL  The buffer provided was not large enough\r
+                                to allow the entire string to be stored.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_HII_GET_LINE) (\r
+  IN     EFI_HII_PROTOCOL  *This,\r
+  IN     EFI_HII_HANDLE    Handle,\r
+  IN     STRING_REF        Token,\r
+  IN OUT UINT16            *Index,\r
+  IN     UINT16            LineWidth,\r
+  IN     CHAR16            *LanguageString,\r
+  IN OUT UINT16            *BufferLength,\r
+  OUT    EFI_STRING        StringBuffer\r
+  );\r
+\r
+/**\r
+  Allows a program to extract a form or form package that has previously\r
+  been registered with the HII database.\r
+\r
+  @param  This                  A pointer to the EFI_HII_PROTOCOL instance.\r
+  @param  Handle                Handle on which the form resides.\r
+  @param  FormId                The ID of the form to return. If the ID is zero,\r
+                                the entire form package is returned.\r
+  @param  BufferLength          On input, the length of the Buffer. On output,\r
+                                the length of the returned buffer,\r
+  @param  Buffer                The buffer designed to receive the form(s).\r
+\r
+  @retval EFI_SUCCESS           Buffer filled with the requested forms. BufferLength\r
+                                was updated.\r
+  @retval EFI_INVALID_PARAMETER The handle is unknown.\r
+  @retval EFI_NOT_FOUND         A form on the requested handle cannot be found with\r
+                                the requested FormId.\r
+  @retval EFI_BUFFER_TOO_SMALL  The buffer provided was not large enough\r
+                                to allow the form to be stored.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_HII_GET_FORMS) (\r
+  IN     EFI_HII_PROTOCOL  *This,\r
+  IN     EFI_HII_HANDLE    Handle,\r
+  IN     EFI_FORM_ID       FormId,\r
+  IN OUT UINTN             *BufferLength,\r
+  OUT    UINT8             *Buffer\r
+  );\r
+\r
+/**\r
+  Extracts the defaults that are associated with a given handle in the HII database.\r
+\r
+  @param  This                  A pointer to the EFI_HII_PROTOCOL instance.\r
+  @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
+                                type EFI_HII_VARIABLE_PACK_LIST.\r
+\r
+  @retval EFI_SUCCESS           The VariablePackList was populated with the appropriate\r
+                                default setting data.\r
+  @retval EFI_NOT_FOUND         The IFR does not have any explicit or default map(s).\r
+  @retval EFI_INVALID_PARAMETER The HII database entry associated with Handle\r
+                                contain invalid data.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_HII_GET_DEFAULT_IMAGE) (\r
+  IN     EFI_HII_PROTOCOL           *This,\r
+  IN     EFI_HII_HANDLE             Handle,\r
+  IN     UINTN                      DefaultMask,\r
+  OUT    EFI_HII_VARIABLE_PACK_LIST **VariablePackList\r
+  );\r
+\r
+/**\r
+  Allows the caller to update a form or form package that has previously been\r
+  registered with the EFI HII database.\r
+\r
+  @param  This                  A pointer to the EFI_HII_PROTOCOL instance.\r
+  @param  Handle                Handle of the package where the form to be updated resides.\r
+  @param  Label                 The label inside the form package where the update is to take place.\r
+  @param  AddData               If TRUE, adding data at a given Label; otherwise,\r
+                                if FALSE, removing data at a given Label.\r
+  @param  Data                  The buffer containing the new tags to insert after the Label\r
+\r
+  @retval EFI_SUCCESS           The form was updated with the new tags.\r
+  @retval EFI_INVALID_PARAMETER The buffer for the buffer length does not\r
+                                contain an integral number of tags.\r
+  @retval EFI_NOT_FOUND         The Handle, Label, or FormId was not found.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_HII_UPDATE_FORM) (\r
+  IN EFI_HII_PROTOCOL     *This,\r
+  IN EFI_HII_HANDLE       Handle,\r
+  IN EFI_FORM_LABEL       Label,\r
+  IN BOOLEAN              AddData,\r
+  IN EFI_HII_UPDATE_DATA  *Data\r
+  );\r
+\r
+/**\r
+  Retrieves the current keyboard layout.\r
+\r
+  @param  This                  A pointer to the EFI_HII_PROTOCOL instance.\r
+  @param  DescriptorCount       A pointer to the number of Descriptor entries being\r
+                                described in the keyboard layout being retrieved.\r
+  @param  Descriptor            A pointer to a buffer containing an array of EFI_KEY_DESCRIPTOR\r
+                                entries. Each entry will reflect the definition of a specific physical key.\r
+\r
+  @retval EFI_SUCCESS           The keyboard layout was retrieved successfully.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_HII_GET_KEYBOARD_LAYOUT) (\r
+  IN     EFI_HII_PROTOCOL    *This,\r
+  OUT    UINT16              *DescriptorCount,\r
+  OUT    EFI_KEY_DESCRIPTOR  *Descriptor\r
+  );\r
+\r
+/**\r
+  @par Protocol Description:\r
+  The HII Protocol manages the HII database, which is a repository for data\r
+  having to do with fonts, strings, forms, keyboards, and other future human\r
+  interface items.\r
+\r
+  @param NewPack\r
+  Extracts the various packs from a package list.\r
+\r
+  @param RemovePack\r
+  Removes a package from the HII database.\r
+\r
+  @param FindHandles\r
+  Determines the handles that are currently active in the database.\r
+\r
+  @param ExportDatabase\r
+  Export the entire contents of the database to a buffer.\r
+\r
+  @param TestString\r
+  Tests if all of the characters in a string have corresponding font characters.\r
+\r
+  @param GetGlyph\r
+  Translates a Unicode character into the corresponding font glyph.\r
+\r
+  @param GlyphToBlt\r
+  Converts a glyph value into a format that is ready for a UGA BLT command.\r
+\r
+  @param NewString\r
+  Allows a new string to be added to an already existing string package.\r
+\r
+  @param GetPrimaryLanguages\r
+  Allows a program to determine the primary languages that are supported\r
+  on a given handle.\r
+\r
+  @param GetSecondaryLanguages\r
+  Allows a program to determine which secondary languages are supported\r
+  on a given handle for a given primary language.\r
+\r
+  @param GetString\r
+  Extracts a string from a package that is already registered with the\r
+  EFI HII database.\r
+\r
+  @param ResetString\r
+  Remove any new strings that were added after the initial string export\r
+  for this handle.\r
+\r
+  @param GetLine\r
+  Allows a program to extract a part of a string of not more than a given width.\r
+\r
+  @param GetForms\r
+  Allows a program to extract a form or form package that has been previously registered.\r
+\r
+  @param GetDefaultImage\r
+  Allows a program to extract the nonvolatile image that represents the default storage image.\r
+\r
+  @param UpdateForm\r
+  Allows a program to update a previously registered form.\r
+\r
+  @param GetKeyboardLayout\r
+  Allows a program to extract the current keyboard layout.\r
+\r
+**/\r
+struct _EFI_HII_PROTOCOL {\r
+  EFI_HII_NEW_PACK            NewPack;\r
+  EFI_HII_REMOVE_PACK         RemovePack;\r
+  EFI_HII_FIND_HANDLES        FindHandles;\r
+  EFI_HII_EXPORT              ExportDatabase;\r
+\r
+  EFI_HII_TEST_STRING         TestString;\r
+  EFI_HII_GET_GLYPH           GetGlyph;\r
+  EFI_HII_GLYPH_TO_BLT        GlyphToBlt;\r
+\r
+  EFI_HII_NEW_STRING          NewString;\r
+  EFI_HII_GET_PRI_LANGUAGES   GetPrimaryLanguages;\r
+  EFI_HII_GET_SEC_LANGUAGES   GetSecondaryLanguages;\r
+  EFI_HII_GET_STRING          GetString;\r
+  EFI_HII_RESET_STRINGS       ResetStrings;\r
+  EFI_HII_GET_LINE            GetLine;\r
+  EFI_HII_GET_FORMS           GetForms;\r
+  EFI_HII_GET_DEFAULT_IMAGE   GetDefaultImage;\r
+  EFI_HII_UPDATE_FORM         UpdateForm;\r
+\r
+  EFI_HII_GET_KEYBOARD_LAYOUT GetKeyboardLayout;\r
+};\r
+\r
+extern EFI_GUID gEfiHiiProtocolGuid;\r
+\r
+#endif\r
index 6d6137358f9a650f2dd984c3e815932b07ed12e2..c575777a5ade41c67241954c38945bed096a2237 100644 (file)
@@ -24,7 +24,7 @@
 // The protocols, PPI and GUID defintions for this module\r
 //\r
 #include <Guid/GlobalVariable.h>\r
-#include <Protocol/FrameworkHii.h>\r
+#include <Protocol/HiiFramework.h>\r
 //\r
 // The Library classes this module consumes\r
 //\r