]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/Utility.h
HII Library Class interface refine.
[mirror_edk2.git] / EdkCompatibilityPkg / Compatibility / FrameworkHiiOnUefiHiiThunk / Utility.h
index 99642fd5b91b4525bc7cd42221a0972f6ce1bdde..087eafaaa8efb870e8b2665a0f9df6b59a25b934 100644 (file)
@@ -16,6 +16,100 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #ifndef _HII_THUNK_UTILITY_H\r
 #define _HII_THUNK_UTILITY_H\r
 \r
+/**\r
+  \r
+  This function returns a list of the package handles of the   \r
+  specified type that are currently active in the HII database. The   \r
+  pseudo-type EFI_HII_PACKAGE_TYPE_ALL will cause all package   \r
+  handles to be listed.\r
+\r
+  If HandleBufferLength is NULL, then ASSERT.\r
+  If HandleBuffer is NULL, the ASSERT.\r
+  If PackageType is EFI_HII_PACKAGE_TYPE_GUID and PackageGuid is\r
+  NULL, then ASSERT.\r
+  If PackageType is not EFI_HII_PACKAGE_TYPE_GUID and PackageGuid is not\r
+  NULL, then ASSERT.\r
+  \r
+  \r
+  @param PackageType          Specifies the package type of the packages\r
+                              to list or EFI_HII_PACKAGE_TYPE_ALL for\r
+                              all packages to be listed.\r
+  \r
+  @param PackageGuid          If PackageType is\r
+                              EFI_HII_PACKAGE_TYPE_GUID, then this is\r
+                              the pointer to the GUID which must match\r
+                              the Guid field of\r
+                              EFI_HII_PACKAGE_GUID_HEADER. Otherwise, it\r
+                              must be NULL.\r
+  \r
+  @param HandleBufferLength   On output, the length of the handle buffer\r
+                              that is required for the handles found.\r
+\r
+  @param HandleBuffer         On output, an array of EFI_HII_HANDLE  instances returned.\r
+                              The caller is responcible to free this pointer allocated.\r
+\r
+  @retval EFI_SUCCESS           The matching handles are outputed successfully.\r
+                                HandleBufferLength is updated with the actual length.\r
+  @retval EFI_OUT_OF_RESOURCES  Not enough resource to complete the operation.\r
+  @retval EFI_NOT_FOUND         No matching handle could not be found in database.\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+ListPackageLists (\r
+  IN        UINT8                     PackageType,\r
+  IN CONST  EFI_GUID                  *PackageGuid,\r
+  IN OUT    UINTN                     *HandleBufferLength,\r
+  OUT       EFI_HII_HANDLE            **HandleBuffer\r
+  )\r
+;\r
+\r
+/**\r
+  Exports the contents of one or all package lists in the HII database into a buffer.\r
+\r
+  If Handle is not NULL and not a valid EFI_HII_HANDLE registered in the database, \r
+  then ASSERT.\r
+  If PackageListHeader is NULL, then ASSERT.\r
+  If PackageListSize is NULL, then ASSERT.\r
+\r
+  @param  Handle                 The HII Handle.\r
+  @param  PackageListHeader      A pointer to a buffer that will contain the results of \r
+                                 the export function.\r
+  @param  PackageListSize        On output, the length of the buffer that is required for the exported data.\r
+\r
+  @retval EFI_SUCCESS            Package exported.\r
+\r
+  @retval EFI_OUT_OF_RESOURCES   Not enought memory to complete the operations.\r
+\r
+**/\r
+EFI_STATUS \r
+EFIAPI\r
+ExportPackageLists (\r
+  IN EFI_HII_HANDLE                    Handle,\r
+  OUT EFI_HII_PACKAGE_LIST_HEADER      **PackageListHeader,\r
+  OUT UINTN                            *PackageListSize\r
+  )\r
+;\r
+\r
+/**\r
+  Extract Hii package list GUID for given HII handle.\r
+\r
+  If HiiHandle could not be found in the HII database, then ASSERT.\r
+  If Guid is NULL, then ASSERT.\r
+\r
+  @param  Handle              Hii handle\r
+  @param  Guid                Package list GUID\r
+\r
+  @retval EFI_SUCCESS            Successfully extract GUID from Hii database.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+ExtractGuidFromHiiHandle (\r
+  IN      EFI_HII_HANDLE      Handle,\r
+  OUT     EFI_GUID            *Guid\r
+  )\r
+;\r
+\r
 /**\r
   Find the UefiHiiHandle based on a Framework HII Handle returned by\r
   the HII Thunk to Framework HII code.\r