]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/HiiDatabase.h
EdkCompatibilityPkg: Remove EdkCompatibilityPkg
[mirror_edk2.git] / EdkCompatibilityPkg / Compatibility / FrameworkHiiOnUefiHiiThunk / HiiDatabase.h
diff --git a/EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/HiiDatabase.h b/EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/HiiDatabase.h
deleted file mode 100644 (file)
index c736990..0000000
+++ /dev/null
@@ -1,947 +0,0 @@
-/** @file\r
-\r
-  This file contains global defines and prototype definitions\r
-  for the Framework HII to Uefi HII Thunk Module.\r
-  \r
-Copyright (c) 2006 - 2011, 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
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-**/\r
-\r
-#ifndef _HIIDATABASE_H_\r
-#define _HIIDATABASE_H_\r
-\r
-\r
-#include <FrameworkDxe.h>\r
-\r
-#include <Guid/GlobalVariable.h>\r
-#include <Protocol/FrameworkFormCallback.h>\r
-#include <Protocol/FrameworkHii.h>\r
-#include <Protocol/FrameworkFormBrowser.h>\r
-\r
-//\r
-// UEFI HII Protocols\r
-//\r
-#include <Protocol/HiiFont.h>\r
-#include <Protocol/HiiImage.h>\r
-#include <Protocol/HiiString.h>\r
-#include <Protocol/HiiDatabase.h>\r
-#include <Protocol/HiiConfigRouting.h>\r
-#include <Protocol/HiiConfigAccess.h>\r
-#include <Protocol/UgaDraw.h>\r
-#include <Guid/HiiFormMapMethodGuid.h>\r
-#include <Guid/FrameworkBdsFrontPageFormSet.h>\r
-\r
-#include <Library/BaseLib.h>\r
-#include <Library/DebugLib.h>\r
-#include <Library/UefiDriverEntryPoint.h>\r
-#include <Library/MemoryAllocationLib.h>\r
-#include <Library/BaseMemoryLib.h>\r
-#include <Library/UefiBootServicesTableLib.h>\r
-#include <Library/UefiRuntimeServicesTableLib.h>\r
-#include <Library/HiiLib.h>\r
-#include <Library/UefiLib.h>\r
-#include <Library/PcdLib.h>\r
-#include <Library/LanguageLib.h>\r
-#include <Library/PrintLib.h>\r
-\r
-#include <Guid/MdeModuleHii.h>\r
-\r
-#include "UefiIfrParser.h"\r
-\r
-\r
-//\r
-// VARSTORE ID of 0 for Buffer Storage Type Storage is defined as invalid in UEFI 2.1 HII. VARSTORE ID\r
-// 0 is the default VarStore ID for storage without explicit declaration in Framework HII 0.92. EDK II UEFI VFR compiler\r
-// in compatible mode will assign 0x0001 as UEFI VARSTORE ID to this default storage id in Framework VFR without\r
-// VARSTORE declaration.\r
-// \r
-// In addition, the Name of Default VarStore is assumed to be L"Setup" for those storage without explicit VARSTORE declaration in the formset\r
-// by Framework HII. EDK II UEFI VFR compiler in compatible mode hard-coded L"Setup" as VARSTORE name.\r
-//\r
-#define FRAMEWORK_RESERVED_VARSTORE_ID 0x0001\r
-#define FRAMEWORK_RESERVED_VARSTORE_NAME L"Setup"\r
-\r
-///\r
-/// The size of a 3 character ISO639 language code.\r
-///\r
-#define ISO_639_2_ENTRY_SIZE            3\r
-\r
-#pragma pack (1)\r
-typedef struct {\r
-  EFI_HII_PACK_HEADER     FrameworkPackageHeader;\r
-  EFI_HII_PACKAGE_HEADER  PackageHeader;\r
-} TIANO_AUTOGEN_PACKAGES_HEADER;\r
-#pragma pack ()\r
-\r
-#define HII_THUNK_PRIVATE_DATA_FROM_THIS(Record)  CR(Record, HII_THUNK_PRIVATE_DATA, Hii, HII_THUNK_PRIVATE_DATA_SIGNATURE)\r
-#define HII_THUNK_PRIVATE_DATA_SIGNATURE            SIGNATURE_32 ('H', 'i', 'I', 'T')\r
-typedef struct {\r
-  UINTN                    Signature;\r
-  EFI_HANDLE               Handle;\r
-  EFI_HII_PROTOCOL         Hii;\r
-\r
-  //\r
-  // The head of link list for all HII_THUNK_CONTEXT.\r
-  //\r
-  LIST_ENTRY               ThunkContextListHead;\r
-\r
-  EFI_HANDLE               RemovePackNotifyHandle;\r
-  EFI_HANDLE               AddPackNotifyHandle;\r
-} HII_THUNK_PRIVATE_DATA;\r
-\r
-\r
-\r
-\r
-\r
-#define QUESTION_ID_MAP_ENTRY_FROM_LINK(Record) CR(Record, QUESTION_ID_MAP_ENTRY, Link, QUESTION_ID_MAP_ENTRY_SIGNATURE)\r
-#define QUESTION_ID_MAP_ENTRY_SIGNATURE            SIGNATURE_32 ('Q', 'I', 'M', 'E')\r
-typedef struct {\r
-  UINT32            Signature;\r
-  LIST_ENTRY        Link;\r
-  UINT16            FwQId;\r
-  EFI_QUESTION_ID   UefiQid;\r
-} QUESTION_ID_MAP_ENTRY;\r
-\r
-\r
-\r
-#define QUESTION_ID_MAP_FROM_LINK(Record) CR(Record, QUESTION_ID_MAP, Link, QUESTION_ID_MAP_SIGNATURE)\r
-#define QUESTION_ID_MAP_SIGNATURE            SIGNATURE_32 ('Q', 'I', 'M', 'P')\r
-typedef struct {\r
-  UINT32            Signature;\r
-  LIST_ENTRY        Link;\r
-  UINT16            VarStoreId;\r
-  UINTN             VarSize;\r
-  LIST_ENTRY        MapEntryListHead;\r
-} QUESTION_ID_MAP;\r
-\r
-\r
-\r
-#define HII_THUNK_CONTEXT_FROM_LINK(Record) CR(Record, HII_THUNK_CONTEXT, Link, HII_THUNK_CONTEXT_SIGNATURE)\r
-#define HII_THUNK_CONTEXT_SIGNATURE            SIGNATURE_32 ('H', 'T', 'H', 'M')\r
-typedef struct {\r
-  LIST_ENTRY                Link;\r
-  UINT32                    Signature;\r
-  FRAMEWORK_EFI_HII_HANDLE  FwHiiHandle;\r
-  EFI_HII_HANDLE            UefiHiiHandle;\r
-  EFI_HANDLE                UefiHiiDriverHandle;\r
-\r
-  UINTN                     IfrPackageCount;\r
-  UINTN                     StringPackageCount;\r
-\r
-  BOOLEAN                   ByFrameworkHiiNewPack;\r
-\r
-  //\r
-  // HII Thunk will use TagGuid to associate the String Package and Form Package togehter.\r
-  // See description for TagGuid. This field is to record if either one of the following condition \r
-  // is TRUE:\r
-  // 1) if ((SharingStringPack == TRUE) && (StringPackageCount != 0 && IfrPackageCount == 0)), then this Package List only \r
-  ///   has String Packages and provides Strings to other IFR package.\r
-  // 2) if ((SharingStringPack == TRUE) && (StringPackageCount == 0 && IfrPackageCount != 1)), then this Form Package\r
-  //    copied String Packages from other Package List.\r
-  // 3) if ((SharingStringPack == FALSE)), this Package does not provide String Package or copy String Packages from other\r
-  //    Package List.\r
-  //\r
-  //\r
-  // When a Hii->NewString() is called for this FwHiiHandle and SharingStringPack is TRUE, then all Package List that sharing\r
-  // the same TagGuid will update or create String in there respective String Packages. If SharingStringPack is FALSE, then\r
-  // only the String from String Packages in this Package List will be updated or created.\r
-  //\r
-  BOOLEAN                   SharingStringPack;\r
-\r
-  //\r
-  // The HII 0.92 version of HII data implementation in EDK 1.03 and 1.04 make an the following assumption\r
-  // in both HII Database implementation and all modules that registering packages:\r
-  // If a Package List has only IFR package and no String Package, the IFR package will reference \r
-  // String in another Package List registered with the HII database with the same EFI_HII_PACKAGES.GuidId.\r
-  // TagGuid is the used to record this GuidId.\r
-  EFI_GUID                   TagGuid;\r
-\r
-  UINT8                      *NvMapOverride;\r
-\r
-  FORM_BROWSER_FORMSET       *FormSet;\r
-\r
-} HII_THUNK_CONTEXT;\r
-\r
-\r
-\r
-#define BUFFER_STORAGE_ENTRY_SIGNATURE              SIGNATURE_32 ('H', 'T', 's', 'k')\r
-#define BUFFER_STORAGE_ENTRY_FROM_LINK(Record) CR(Record, BUFFER_STORAGE_ENTRY, Link, BUFFER_STORAGE_ENTRY_SIGNATURE)\r
-typedef struct {\r
-  LIST_ENTRY Link;\r
-  UINT32     Signature;\r
-  EFI_GUID   Guid;\r
-  CHAR16     *Name;\r
-  UINTN      Size;\r
-  UINT16     VarStoreId;\r
-} BUFFER_STORAGE_ENTRY;\r
-\r
-#pragma pack(1)\r
-///\r
-/// HII specific Vendor Device Path Node definition.\r
-///\r
-typedef struct {\r
-  VENDOR_DEVICE_PATH             VendorDevicePath;\r
-  UINT32                         Reserved;\r
-  UINT64                         UniqueId;\r
-} HII_VENDOR_DEVICE_PATH_NODE;\r
-\r
-///\r
-/// HII specific Vendor Device Path definition.\r
-///\r
-typedef struct {\r
-  HII_VENDOR_DEVICE_PATH_NODE    Node;\r
-  EFI_DEVICE_PATH_PROTOCOL       End;\r
-} HII_VENDOR_DEVICE_PATH;\r
-#pragma pack()\r
-\r
-#define CONFIG_ACCESS_PRIVATE_SIGNATURE            SIGNATURE_32 ('H', 'T', 'c', 'a')\r
-#define CONFIG_ACCESS_PRIVATE_FROM_PROTOCOL(Record) CR(Record, CONFIG_ACCESS_PRIVATE, ConfigAccessProtocol, CONFIG_ACCESS_PRIVATE_SIGNATURE)\r
-typedef struct {\r
-  UINT32                         Signature;\r
-  EFI_HII_CONFIG_ACCESS_PROTOCOL ConfigAccessProtocol;\r
-  //\r
-  // Framework's callback\r
-  //\r
-  EFI_FORM_CALLBACK_PROTOCOL     *FormCallbackProtocol;\r
-\r
-  HII_THUNK_CONTEXT              *ThunkContext;\r
-} CONFIG_ACCESS_PRIVATE;\r
-\r
-\r
-\r
-#define EFI_FORMBROWSER_THUNK_PRIVATE_DATA_SIGNATURE            SIGNATURE_32 ('F', 'B', 'T', 'd')\r
-#define EFI_FORMBROWSER_THUNK_PRIVATE_DATA_FROM_THIS(Record)   CR(Record, EFI_FORMBROWSER_THUNK_PRIVATE_DATA, FormBrowser, EFI_FORMBROWSER_THUNK_PRIVATE_DATA_SIGNATURE)\r
-typedef struct {\r
-  UINTN                     Signature;\r
-  EFI_HANDLE                Handle;\r
-  HII_THUNK_PRIVATE_DATA    *ThunkPrivate;\r
-  EFI_FORM_BROWSER_PROTOCOL FormBrowser;\r
-} EFI_FORMBROWSER_THUNK_PRIVATE_DATA;\r
-\r
-\r
-//\r
-// Extern Variables\r
-//\r
-extern CONST EFI_HII_DATABASE_PROTOCOL            *mHiiDatabase;\r
-extern CONST EFI_HII_IMAGE_PROTOCOL               *mHiiImageProtocol;\r
-extern CONST EFI_HII_STRING_PROTOCOL              *mHiiStringProtocol;\r
-extern CONST EFI_HII_FONT_PROTOCOL                *mHiiFontProtocol;\r
-extern CONST EFI_HII_CONFIG_ROUTING_PROTOCOL      *mHiiConfigRoutingProtocol;\r
-extern CONST EFI_FORM_BROWSER2_PROTOCOL           *mFormBrowser2Protocol;\r
-\r
-extern HII_THUNK_PRIVATE_DATA                     *mHiiThunkPrivateData;\r
-\r
-extern BOOLEAN                                    mInFrameworkUpdatePakcage;\r
-\r
-\r
-/**\r
-\r
-  Registers the various packages that are passed in a Package List.\r
-\r
-  @param This      Pointer of Frameowk HII protocol instance.\r
-  @param Packages  Pointer of HII packages.\r
-  @param Handle    Handle value to be returned.\r
-\r
-  @retval EFI_SUCCESS           Packages has added to HII database successfully.\r
-  @retval EFI_INVALID_PARAMETER If Handle or Packages is NULL.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-HiiNewPack (\r
-  IN  EFI_HII_PROTOCOL               *This,\r
-  IN  EFI_HII_PACKAGES               *Packages,\r
-  OUT FRAMEWORK_EFI_HII_HANDLE       *Handle\r
-  );\r
-\r
-/**\r
-\r
-  Remove a package from the HII database.\r
-\r
-  @param This      Pointer of Frameowk HII protocol instance.\r
-  @param Handle    Handle value to be removed.\r
-\r
-  @retval EFI_SUCCESS           Packages has added to HII database successfully.\r
-  @retval EFI_INVALID_PARAMETER If Handle or Packages is NULL.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-HiiRemovePack (\r
-  IN EFI_HII_PROTOCOL               *This,\r
-  IN FRAMEWORK_EFI_HII_HANDLE       Handle\r
-  );\r
-\r
-/**\r
-  Determines the handles that are currently active in the database.\r
-\r
-  This function determines the handles that are currently active in the database. \r
-  For example, a program wishing to create a Setup-like configuration utility would use this call \r
-  to determine the handles that are available. It would then use calls defined in the forms section \r
-  below to extract forms and then interpret them.\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 buffer. \r
-                              On output, the length of the handle buffer that is required for the handles found.\r
-  @param Handle               Pointer to an array of EFI_HII_HANDLE instances returned. \r
-                              Type EFI_HII_HANDLE is defined in EFI_HII_PROTOCOL.NewPack() in the Packages section.\r
-\r
-  @retval EFI_SUCCESS         Handle was updated successfully.\r
\r
-  @retval EFI_BUFFER_TOO_SMALL The HandleBufferLength parameter indicates that Handle is too small \r
-                               to support the number of handles. HandleBufferLength is updated with a value that \r
-                               will enable the data to fit.\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-HiiFindHandles (\r
-  IN     EFI_HII_PROTOCOL *This,\r
-  IN OUT UINT16           *HandleBufferLength,\r
-  OUT    FRAMEWORK_EFI_HII_HANDLE    *Handle\r
-  );\r
-\r
-/**\r
-\r
-  This thunk module only handles UEFI HII packages. The caller of this function \r
-  won't be able to parse the content. Therefore, it is not supported.\r
-  \r
-  This function will ASSERT and return EFI_UNSUPPORTED.\r
-\r
-  @param This            N.A.\r
-  @param Handle          N.A.\r
-  @param BufferSize      N.A.\r
-  @param Buffer          N.A.\r
-\r
-  @retval EFI_UNSUPPORTED\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-HiiExportDatabase (\r
-  IN     EFI_HII_PROTOCOL *This,\r
-  IN     FRAMEWORK_EFI_HII_HANDLE    Handle,\r
-  IN OUT UINTN            *BufferSize,\r
-  OUT    VOID             *Buffer\r
-  );\r
-\r
-/**\r
-  Translates a Unicode character into the corresponding font glyph.\r
-  \r
-  Notes:\r
-    This function is only called by Graphics Console module and GraphicsLib. \r
-    Wrap the Framework HII GetGlyph function to UEFI Font Protocol.\r
-    \r
-    EDK II provides a UEFI Graphics Console module. ECP provides a GraphicsLib \r
-    complying to UEFI HII.\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 the character. On successful completion, the \r
-                         index is updated to the first character past the character(s) making up the just extracted glyph. \r
-  @param GlyphBuffer     Pointer to an array where the glyphs corresponding to the characters in the source may be stored. \r
-                         GlyphBuffer is assumed to be wide enough to accept a wide glyph character.\r
-  @param BitWidth        If EFI_SUCCESS was returned, the UINT16 pointed to by this value is filled with the length of the glyph in pixels. \r
-                         It is unchanged if the call was unsuccessful.\r
-  @param InternalStatus  To save the time required to read the string from the beginning on each glyph extraction \r
-                         (for example, to ensure that the narrow versus wide glyph mode is correct), this value is \r
-                         updated each time the function is called with the status that is local to the call. The cell pointed \r
-                         to by this parameter must be 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
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-HiiGetGlyph (\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 Graphics Adapter (UGA) Block Transfer (BLT) routines.\r
-  \r
-  Notes:\r
-  This function is only called by Graphics Console module and GraphicsLib. \r
-  EDK II provides a UEFI Graphics Console module. ECP provides a GraphicsLib \r
-  complying to UEFI HII.\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 generated BltBuffer data. Type EFI_UGA_PIXEL is defined in "Related Definitions" below.\r
-  @param Background   The background setting requested to be used for the 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 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
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-HiiGlyphToBlt (\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
-  Create or update a String Token in a String Package.\r
-\r
-  If *Reference == 0, a new String Token is created.\r
-\r
-  @param This            A pointer to the EFI_HII_PROTOCOL instance.\r
-  @param Language        Pointer to a NULL-terminated string containing a single ISO 639-2 language\r
-                         identifier, indicating the language to print. A string consisting of\r
-                         all spaces indicates that the string is applicable to all languages.\r
-  @param Handle          The handle of the language pack to which the string is to be added.\r
-  @param Reference       The string token assigned to the string.\r
-  @param NewString       The string to be added.\r
-\r
-\r
-  @retval EFI_SUCCESS             The string was effectively registered.\r
-  @retval EFI_INVALID_PARAMETER   The Handle was unknown. The string is not created or updated in the\r
-                                  the string package.\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-HiiNewString (\r
-  IN     EFI_HII_PROTOCOL           *This,\r
-  IN     CHAR16                     *Language,\r
-  IN     FRAMEWORK_EFI_HII_HANDLE   Handle,\r
-  IN OUT STRING_REF                 *Reference,\r
-  IN     CHAR16                     *NewString\r
-  );\r
-\r
-/**\r
- This function 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 HII 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 storage format described\r
-                         above. If false, the string returned is edited by replacing <cr> with <space>\r
-                         and by removing special characters such as the <wide> prefix.\r
-  @param LanguageString  Pointer to a NULL-terminated string containing a single ISO 639-2 language\r
-                         identifier, indicating the language to print. If the LanguageString is empty (starts\r
-                         with a NULL), the default system language will be used to determine the language.\r
-  @param BufferLength    Length of the StringBuffer. If the status reports that the buffer width is too\r
-                         small, this parameter is filled with the length of the buffer needed.\r
-  @param StringBuffer    The buffer designed to receive the characters in the string. Type EFI_STRING is\r
-                         defined in String.\r
-\r
-  @retval EFI_INVALID_PARAMETER If input parameter is invalid.\r
-  @retval EFI_BUFFER_TOO_SMALL  If the *BufferLength is too small.\r
-  @retval EFI_SUCCESS           Operation is successful.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-HiiThunkGetString (\r
-  IN     EFI_HII_PROTOCOL           *This,\r
-  IN     FRAMEWORK_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
-  This function removes any new strings that were added after the initial string export for this handle.\r
-  UEFI HII String Protocol does not have Reset String function. This function perform nothing.\r
-\r
-  @param This            A pointer to the EFI_HII_PROTOCOL instance.\r
-  @param Handle          The HII handle on which the string resides.\r
-\r
-  @retval EFI_SUCCESS    This function is a NOP and always return EFI_SUCCESS.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-HiiResetStrings (\r
-  IN     EFI_HII_PROTOCOL   *This,\r
-  IN     FRAMEWORK_EFI_HII_HANDLE      Handle\r
-  );\r
-\r
-/**\r
-  Test if all of the characters in a string have corresponding font characters.\r
-\r
-  This is a deprecated API. No Framework HII module is calling it. This function will ASSERT and\r
-  return EFI_UNSUPPORTED.\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, the index of \r
-                         the first character in the StringToTest to examine. On exit, the index \r
-                         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 terminator \r
-                         of the string. \r
-  @param GlyphBufferSize A pointer to a value. On output, if the function returns EFI_SUCCESS, \r
-                         it contains the amount of memory that is required to store the string? glyph equivalent.\r
-\r
-  @retval EFI_UNSUPPORTED  The function performs nothing and return EFI_UNSUPPORTED.\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-HiiTestString (\r
-  IN     EFI_HII_PROTOCOL   *This,\r
-  IN     CHAR16             *StringToTest,\r
-  IN OUT UINT32             *FirstMissing,\r
-  OUT    UINT32             *GlyphBufferSize\r
-  );\r
-\r
-/**\r
-  Allows a program to determine the primary languages that are supported on a given handle.\r
-\r
-  This routine is intended to be used by drivers to query the interface database for supported languages. \r
-  This routine returns a string of concatenated 3-byte language identifiers, one per string package associated with the handle.\r
-\r
-  @param This           A pointer to the EFI_HII_PROTOCOL instance.\r
-  @param Handle         The handle on which the strings reside. Type EFI_HII_HANDLE is defined in EFI_HII_PROTOCOL.NewPack() \r
-                        in the Packages section.\r
-  @param LanguageString A string allocated by GetPrimaryLanguages() that contains a list of all primary languages \r
-                        registered on the handle. The routine will not return the three-spaces language identifier used in \r
-                        other functions to indicate non-language-specific strings.\r
-\r
-  @retval EFI_SUCCESS            LanguageString was correctly returned.\r
\r
-  @retval EFI_INVALID_PARAMETER  The Handle was unknown.\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-HiiGetPrimaryLanguages (\r
-  IN  EFI_HII_PROTOCOL            *This,\r
-  IN  FRAMEWORK_EFI_HII_HANDLE    Handle,\r
-  OUT EFI_STRING                  *LanguageString\r
-  );\r
-\r
-/**\r
-  Allows a program to determine which secondary languages are supported on a given handle for a given primary language\r
-\r
-  This routine is intended to be used by drivers to query the interface database for supported languages. \r
-  This routine returns a string of concatenated 3-byte language identifiers, one per string package associated with the handle.\r
-\r
-  @param This           A pointer to the EFI_HII_PROTOCOL instance.\r
-  @param Handle         The handle on which the strings reside. Type EFI_HII_HANDLE is defined in EFI_HII_PROTOCOL.NewPack() \r
-                        in the Packages section.\r
-  @param PrimaryLanguage Pointer to a NULL-terminated string containing a single ISO 639-2 language identifier, indicating \r
-                         the primary language.\r
-  @param LanguageString  A string allocated by GetSecondaryLanguages() containing a list of all secondary languages registered \r
-                         on the handle. The routine will not return the three-spaces language identifier used in other functions \r
-                         to indicate non-language-specific strings, nor will it return the primary language. This function succeeds \r
-                         but returns a NULL LanguageString if there are no secondary languages associated with the input Handle and \r
-                         PrimaryLanguage pair. Type EFI_STRING is defined in String.\r
-  \r
-  @retval EFI_SUCCESS            LanguageString was correctly returned.\r
-  @retval EFI_INVALID_PARAMETER  The Handle was unknown.\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-HiiGetSecondaryLanguages (\r
-  IN  EFI_HII_PROTOCOL              *This,\r
-  IN  FRAMEWORK_EFI_HII_HANDLE      Handle,\r
-  IN  CHAR16                        *PrimaryLanguage,\r
-  OUT EFI_STRING                    *LanguageString\r
-  );\r
-\r
-/**\r
-\r
-  This function allows a program to extract a part of a string of not more than a given width.\r
-  With repeated calls, this allows a calling program to extract "lines" of text that fit inside\r
-  columns.  The effort of measuring the fit of strings inside columns is localized to this call.\r
-\r
-  This is a deprecated API. No Framework HII module is calling it. This function will ASSERT and\r
-  return EFI_UNSUPPORTED.\r
-\r
-  @param This            A pointer to the EFI_HII_PROTOCOL instance.\r
-  @param Handle          The HII 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 single ISO 639-2 language\r
-                         identifier, indicating the language to print. If the LanguageString is empty (starts\r
-                         with a NULL), the default system language will be used to determine the language.\r
-  @param BufferLength    Length of the StringBuffer. If the status reports that the buffer width is too\r
-                         small, this parameter is filled with the length of the buffer needed.\r
-  @param StringBuffer    The buffer designed to receive the characters in the string. Type EFI_STRING is\r
-                         defined in String.\r
-\r
-  @retval EFI_UNSUPPORTED.\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-HiiGetLine (\r
-  IN     EFI_HII_PROTOCOL           *This,\r
-  IN     FRAMEWORK_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
-  This function allows a program to extract a form or form package that has\r
-  previously been registered with the EFI HII database.\r
-\r
-  In this thunk module, this function will create a IFR Package with only \r
-  one Formset. Effectively, only the GUID of the Formset is updated and return\r
-  in this IFR package to caller. This is enable the Framework modules which call \r
-  a API named GetStringFromToken. GetStringFromToken retieves a String based on\r
-  a String Token from a Package List known only by the Formset GUID.\r
-  \r
-\r
-\r
-  @param This             A pointer to the EFI_HII_PROTOCOL instance.\r
-  @param Handle           Handle on which the form resides. Type FRAMEWORK_EFI_HII_HANDLE  is defined in\r
-                          EFI_HII_PROTOCOL.NewPack() in the Packages section.\r
-  @param FormId           Ignored by this implementation.\r
-  @param BufferLengthTemp On input, the size of input buffer. On output, it\r
-                          is the size of FW_HII_FORMSET_TEMPLATE.\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 the\r
-                                  requested FormId.\r
-  @retval  EFI_BUFFER_TOO_SMALL   The buffer provided was not large enough to allow the form to be stored.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-HiiGetForms (\r
-  IN     EFI_HII_PROTOCOL             *This,\r
-  IN     FRAMEWORK_EFI_HII_HANDLE     Handle,\r
-  IN     EFI_FORM_ID                  FormId,\r
-  IN OUT UINTN                        *BufferLengthTemp,\r
-  OUT    UINT8                        *Buffer\r
-  );\r
-\r
-/**\r
-\r
-  This function allows a program to extract the NV Image\r
-  that represents the default storage image\r
-\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
-                         UINTN            - Mask used to retrieve the default image.\r
-  @param DefaultMask     EDES_TODO: Add parameter description\r
-  @param VariablePackList Callee allocated, tightly-packed, link list data\r
-                         structure that contain all default varaible packs\r
-                         from the Hii Database.\r
-\r
-  @retval  EFI_NOT_FOUND          If Hii database does not contain any default images.\r
-  @retval  EFI_INVALID_PARAMETER  Invalid input parameter.\r
-  @retval  EFI_SUCCESS            Operation successful.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-HiiGetDefaultImage (\r
-  IN     EFI_HII_PROTOCOL            *This,\r
-  IN     FRAMEWORK_EFI_HII_HANDLE    Handle,\r
-  IN     UINTN                       DefaultMask,\r
-  OUT    EFI_HII_VARIABLE_PACK_LIST  **VariablePackList\r
-  );\r
-\r
-/**\r
-  This function allows the caller to update a form that has\r
-  previously been registered with the EFI HII database.\r
-\r
-\r
-  @param This            EDES_TODO: Add parameter description\r
-  @param Handle          Hii Handle associated with the Formset to modify\r
-  @param Label           Update information starting immediately after this label in the IFR\r
-  @param AddData         If TRUE, add data.  If FALSE, remove data\r
-  @param Data            If adding data, this is the pointer to the data to add\r
-\r
-  @retval  EFI_SUCCESS  Update success.\r
-  @retval  Other        Update fail.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-HiiThunkUpdateForm (\r
-  IN EFI_HII_PROTOCOL                  *This,\r
-  IN FRAMEWORK_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
-  This function is not implemented by HII Thunk Module.\r
-\r
-  @param This             A pointer to the EFI_HII_PROTOCOL instance. \r
-  @param DescriptorCount  A pointer to the number of Descriptor entries being described in the keyboard layout being retrieved.\r
-  @param Descriptor       A pointer to a buffer containing an array of EFI_KEY_DESCRIPTOR entries. Each entry will reflect the \r
-                          definition of a specific physical key. Type EFI_KEY_DESCRIPTOR is defined in "Related Definitions" below.\r
-\r
-  @retval  EFI_SUCCESS   The keyboard layout was retrieved successfully.\r
\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-HiiGetKeyboardLayout (\r
-  IN     EFI_HII_PROTOCOL   *This,\r
-  OUT    UINT16             *DescriptorCount,\r
-  OUT    FRAMEWORK_EFI_KEY_DESCRIPTOR *Descriptor\r
-  );\r
-\r
-/**\r
-  This is the Framework Setup Browser interface which displays a FormSet.\r
-\r
-  @param This           The EFI_FORM_BROWSER_PROTOCOL context.\r
-  @param UseDatabase    TRUE if the FormSet is from HII database. The Thunk implementation\r
-                        only support UseDatabase is TRUE.\r
-  @param Handle         The Handle buffer.\r
-  @param HandleCount    The number of Handle in the Handle Buffer. It must be 1 for this implementation.\r
-  @param Packet         The pointer to data buffer containing IFR and String package. Not supported.\r
-  @param CallbackHandle Not supported.\r
-  @param NvMapOverride  The buffer is used only when there is no NV variable to define the \r
-                        current settings and the caller needs to provide to the browser the\r
-                        current settings for the the "fake" NV variable. If used, no saving of\r
-                        an NV variable is possbile. This parameter is also ignored if Handle is NULL.\r
-  @param ScreenDimensions \r
-                        Allows the browser to be called so that it occupies a portion of the physical \r
-                        screen instead of dynamically determining the screen dimensions.\r
-  @param ResetRequired  This BOOLEAN value denotes whether a reset is required based on the data that \r
-                        might have been changed. The ResetRequired parameter is primarily applicable \r
-                        for configuration applications, and is an optional parameter.\r
-\r
-  @retval EFI_SUCCESS             If the Formset is displayed correctly.\r
-  @retval EFI_UNSUPPORTED         If UseDatabase is FALSE or HandleCount is not 1.\r
-  @retval EFI_INVALID_PARAMETER   If the *Handle passed in is not found in the database.\r
-**/\r
-EFI_STATUS\r
-EFIAPI \r
-ThunkSendForm (\r
-  IN  EFI_FORM_BROWSER_PROTOCOL         *This,\r
-  IN  BOOLEAN                           UseDatabase,\r
-  IN  FRAMEWORK_EFI_HII_HANDLE          *Handle,\r
-  IN  UINTN                             HandleCount,\r
-  IN  EFI_IFR_PACKET                    *Packet, OPTIONAL\r
-  IN  EFI_HANDLE                        CallbackHandle, OPTIONAL\r
-  IN  UINT8                             *NvMapOverride, OPTIONAL\r
-  IN  FRAMEWORK_EFI_SCREEN_DESCRIPTOR   *ScreenDimensions, OPTIONAL\r
-  OUT BOOLEAN                           *ResetRequired OPTIONAL\r
-  );\r
-\r
-/** \r
-\r
-  Rountine used to display a generic dialog interface and return \r
-  the Key or Input from user input.\r
-\r
-  @param LinesNumber   The number of lines for the dialog box.\r
-  @param HotKey        Defines if a single character is parsed (TRUE) and returned in KeyValue\r
-                       or if a string is returned in StringBuffer.\r
-  @param MaximumStringSize The maximum size in bytes of a typed-in string.\r
-  @param StringBuffer  On return contains the typed-in string if HotKey is FALSE.\r
-  @param Key           The EFI_INPUT_KEY value returned if HotKey is TRUE.\r
-  @param FirstString   The pointer to the first string in the list of strings\r
-                       that comprise the dialog box.\r
-  @param ...           A series of NumberOfLines text strings that will be used\r
-                       to construct the dialog box.\r
-  @retval EFI_SUCCESS  The dialog is created successfully and user interaction was received.\r
-  @retval EFI_DEVICE_ERROR The user typed in an ESC.\r
-  @retval EFI_INVALID_PARAMETER One of the parameters was invalid.(StringBuffer == NULL && HotKey == FALSE).\r
-**/\r
-EFI_STATUS\r
-EFIAPI \r
-ThunkCreatePopUp (\r
-  IN  UINTN                           LinesNumber,\r
-  IN  BOOLEAN                         HotKey,\r
-  IN  UINTN                           MaximumStringSize,\r
-  OUT CHAR16                          *StringBuffer,\r
-  OUT EFI_INPUT_KEY                   *Key,\r
-  IN  CHAR16                          *FirstString,\r
-  ...\r
-  );\r
-\r
-/**\r
-  This notification function will be called when a Package List is removed\r
-  using UEFI HII interface. The Package List removed need to be removed from\r
-  Framework Thunk module too.\r
-\r
-  If the Package List registered is not Sting Package, \r
-  then ASSERT. If the NotifyType is not REMOVE_PACK, then ASSERT.\r
-  Both cases means UEFI HII Database itself is buggy. \r
-\r
-  @param PackageType The Package Type.\r
-  @param PackageGuid The Package GUID.\r
-  @param Package     The Package Header.\r
-  @param Handle      The HII Handle of this Package List.\r
-  @param NotifyType  The reason of the notification. \r
-\r
-  @retval EFI_SUCCESS The notification function is successful.\r
-  \r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-RemovePackNotify (\r
-  IN UINT8                              PackageType,\r
-  IN CONST EFI_GUID                     *PackageGuid,\r
-  IN CONST EFI_HII_PACKAGE_HEADER       *Package,\r
-  IN EFI_HII_HANDLE                     Handle,\r
-  IN EFI_HII_DATABASE_NOTIFY_TYPE       NotifyType\r
-  );\r
-\r
-/**\r
-  This notification function will be called when a Package List is registered\r
-  using UEFI HII interface. The Package List registered need to be recorded in\r
-  Framework Thunk module as Thunk Module may need to look for String Package in\r
-  the package registered.\r
-\r
-  If the Package List registered is not either Sting Package or IFR package, \r
-  then ASSERT. If the NotifyType is not ADD_PACK or NEW_PACK, then ASSERT.\r
-  Both cases means UEFI HII Database itself is buggy. \r
-\r
-  @param PackageType The Package Type.\r
-  @param PackageGuid The Package GUID.\r
-  @param Package     The Package Header.\r
-  @param Handle      The HII Handle of this Package List.\r
-  @param NotifyType  The reason of the notification. \r
-\r
-  @retval EFI_SUCCESS The notification function is successful.\r
-  \r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-NewOrAddPackNotify (\r
-  IN UINT8                              PackageType,\r
-  IN CONST EFI_GUID                     *PackageGuid,\r
-  IN CONST EFI_HII_PACKAGE_HEADER       *Package,\r
-  IN EFI_HII_HANDLE                     Handle,\r
-  IN EFI_HII_DATABASE_NOTIFY_TYPE       NotifyType\r
-  );\r
-\r
-/**\r
-  Create a Hii Update data Handle used to call IfrLibUpdateForm.\r
-\r
-  @param ThunkContext         The HII Thunk Context.\r
-  @param FwUpdateData         The Framework Update Data.\r
-  @param UefiOpCodeHandle     The UEFI Update Data.\r
-\r
-  @retval EFI_SUCCESS       The UEFI Update Data is created successfully.\r
-  @retval EFI_UNSUPPORTED   There is unsupported opcode in FwUpdateData.\r
-  @retval EFI_OUT_OF_RESOURCES There is not enough resource.\r
-**/\r
-EFI_STATUS\r
-FwUpdateDataToUefiUpdateData (\r
-  IN       HII_THUNK_CONTEXT    *ThunkContext,\r
-  IN CONST EFI_HII_UPDATE_DATA  *FwUpdateData,\r
-  IN       VOID                 *UefiOpCodeHandle\r
-  )\r
-;\r
-\r
-/** \r
-\r
-  Initialize string packages in HII database.\r
-\r
-**/\r
-VOID\r
-InitSetBrowserStrings (\r
-  VOID\r
-  )\r
-;\r
-\r
-/**\r
-  Convert language code from RFC4646 to ISO639-2.\r
-\r
-  LanguageRfc4646 contain a single RFC 4646 code such as\r
-  "en-US" or "fr-FR".\r
-\r
-  The LanguageRfc4646 must be a buffer large enough\r
-  for ISO_639_2_ENTRY_SIZE characters.\r
-\r
-  If LanguageRfc4646 is NULL, then ASSERT.\r
-  If LanguageIso639 is NULL, then ASSERT.\r
-\r
-  @param  LanguageRfc4646        RFC4646 language code.\r
-  @param  LanguageIso639         ISO639-2 language code.\r
-\r
-  @retval EFI_SUCCESS            Language code converted.\r
-  @retval EFI_NOT_FOUND          Language code not found.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-ConvertRfc4646LanguageToIso639Language (\r
-  IN  CHAR8   *LanguageRfc4646,\r
-  OUT CHAR8   *LanguageIso639\r
-  )\r
-;\r
-\r
-/**\r
-  Convert language code from ISO639-2 to RFC4646 and return the converted language.\r
-  Caller is responsible for freeing the allocated buffer.\r
-\r
-  LanguageIso639 contain a single ISO639-2 code such as\r
-  "eng" or "fra".\r
-\r
-  If LanguageIso639 is NULL, then ASSERT.\r
-  If LanguageRfc4646 is NULL, then ASSERT.\r
-\r
-  @param  LanguageIso639         ISO639-2 language code.\r
-\r
-  @return the allocated buffer or NULL, if the language is not found.\r
-\r
-**/\r
-CHAR8*\r
-EFIAPI\r
-ConvertIso639LanguageToRfc4646Language (\r
-  IN  CONST CHAR8   *LanguageIso639\r
-  )\r
-;\r
-\r
-/**\r
-  Get next language from language code list (with separator ';').\r
-\r
-  If LangCode is NULL, then ASSERT.\r
-  If Lang is NULL, then ASSERT.\r
-\r
-  @param  LangCode    On input: point to first language in the list. On\r
-                                 output: point to next language in the list, or\r
-                                 NULL if no more language in the list.\r
-  @param  Lang           The first language in the list.\r
-\r
-**/\r
-VOID\r
-EFIAPI\r
-GetNextLanguage (\r
-  IN OUT CHAR8      **LangCode,\r
-  OUT CHAR8         *Lang\r
-  )\r
-;\r
-\r
-#include "Utility.h"\r
-#include "ConfigAccess.h"\r
-\r
-#endif\r