]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/HiiLib/HiiLib.c
Clean up ExtendedHiiLib, HiiLib, IfrSupportLib, ExtendedIfrSupportLib for Doxygen...
[mirror_edk2.git] / MdePkg / Library / HiiLib / HiiLib.c
index b0c28e2a805daf7ff77cdd88e8cd8ddddca3cb2d..749b004d9f641b7fdcda7dee71d1141401b1f22f 100644 (file)
@@ -23,10 +23,6 @@ BOOLEAN mHiiProtocolsInitialized = FALSE;
 \r
   This function locate Hii relative protocols for later usage.\r
 \r
-  @param VOID\r
-\r
-  @retval  VOID\r
-\r
 **/\r
 VOID\r
 LocateHiiProtocols (\r
@@ -50,10 +46,28 @@ LocateHiiProtocols (
 \r
 \r
 \r
+/**\r
+  This funciton build the package list based on the package number,\r
+  the GUID of the package list and the list of pointer which point to\r
+  package header that defined by UEFI VFR compiler and StringGather\r
+  tool.\r
+\r
+  If there is not enough resource for the new package list,\r
+  the function will ASSERT.\r
+\r
+  @param NumberOfPackages The number of packages be \r
+  @param GuidId          The GUID for the package list to be generated.\r
+  @param Marker          The variable argument list. Each entry represent a specific package header that is\r
+                         generated by VFR compiler and StrGather tool. The first 4 bytes is a UINT32 value\r
+                         that indicate the overall length of the package.\r
+\r
+  @return The pointer to the package list header.\r
+\r
+**/\r
 EFI_HII_PACKAGE_LIST_HEADER *\r
 InternalHiiLibPreparePackages (\r
   IN UINTN           NumberOfPackages,\r
-  IN CONST EFI_GUID  *GuidId, OPTIONAL\r
+  IN CONST EFI_GUID  *GuidId,\r
   VA_LIST            Marker\r
   )\r
 {\r
@@ -106,6 +120,20 @@ InternalHiiLibPreparePackages (
   return PackageListHeader;\r
 }\r
 \r
+/**\r
+  Assemble EFI_HII_PACKAGE_LIST according to the passed in packages.\r
+\r
+  If GuidId is NULL, then ASSERT.\r
+  If not enough resource to complete the operation, then ASSERT.\r
+\r
+  @param  NumberOfPackages       Number of packages.\r
+  @param  GuidId                          Package GUID.\r
+  @param  ...                                Variable argument list for packages to be assembled.\r
+\r
+  @return EFI_HII_PACKAGE_LIST_HEADER Pointer of EFI_HII_PACKAGE_LIST_HEADER. The function will ASSERT if system has\r
+                                                                not enough resource to complete the operation.\r
+\r
+**/\r
 EFI_HII_PACKAGE_LIST_HEADER *\r
 EFIAPI\r
 HiiLibPreparePackageList (\r
@@ -127,6 +155,30 @@ HiiLibPreparePackageList (
 }\r
 \r
 \r
+/**\r
+  This function allocates pool for an EFI_HII_PACKAGE_LIST structure\r
+  with additional space that is big enough to host all packages described by the variable \r
+  argument list of package pointers.  The allocated structure is initialized using NumberOfPackages, \r
+  GuidId,  and the variable length argument list of package pointers.\r
+\r
+  Then, EFI_HII_PACKAGE_LIST will be register to the default System HII Database. The\r
+  Handle to the newly registered Package List is returned throught HiiHandle.\r
+\r
+  If HiiHandle is NULL, then ASSERT.\r
+\r
+  @param  NumberOfPackages    The number of HII packages to register.\r
+  @param  GuidId              Package List GUID ID.\r
+  @param  DriverHandle        Optional. If not NULL, the DriverHandle on which an instance of DEVICE_PATH_PROTOCOL is installed.\r
+                              This DriverHandle uniquely defines the device that the added packages are associated with.\r
+  @param  HiiHandle           On output, the HiiHandle is update with the handle which can be used to retrieve the Package \r
+                              List later. If the functions failed to add the package to the default HII database, this value will\r
+                              be set to NULL.\r
+  @param  ...                 The variable argument list describing all HII Package.\r
+\r
+  @return  EFI_SUCCESS         If the packages are successfully added to the default HII database.\r
+  @return  EFI_OUT_OF_RESOURCE Not enough resource to complete the operation.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 HiiLibAddPackages (\r
@@ -161,6 +213,18 @@ HiiLibAddPackages (
   return Status;\r
 }\r
 \r
+/**\r
+  Removes a package list from the default HII database.\r
+\r
+  If HiiHandle is NULL, then ASSERT.\r
+  If HiiHandle is not a valid EFI_HII_HANDLE in the default HII database, then ASSERT.\r
+\r
+  @param  HiiHandle                The handle that was previously registered to the data base that is requested for removal.\r
+                                             List later.\r
+\r
+  @return  VOID\r
+\r
+**/\r
 VOID\r
 EFIAPI\r
 HiiLibRemovePackages (\r
@@ -177,6 +241,21 @@ HiiLibRemovePackages (
 }\r
 \r
 \r
+/**\r
+  Determines the handles that are currently active in the database.\r
+  It's the caller's responsibility to free handle buffer.\r
+\r
+  If HandleBufferLength is NULL, then ASSERT.\r
+  If HiiHandleBuffer is NULL, then ASSERT.\r
+\r
+  @param  HandleBufferLength     On input, a pointer to the length of the handle\r
+                                 buffer. On output, the length of the handle buffer\r
+                                 that is required for the handles found.\r
+  @param  HiiHandleBuffer        Pointer to an array of Hii Handles returned.\r
+\r
+  @retval EFI_SUCCESS            Get an array of Hii Handles successfully.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 HiiLibGetHiiHandles (\r
@@ -225,6 +304,18 @@ HiiLibGetHiiHandles (
   return Status;\r
 }\r
 \r
+/**\r
+  Extract Hii package list GUID for given HII handle.\r
+\r
+  If HiiHandle could not be found in the default 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
 HiiLibExtractGuidFromHiiHandle (\r
@@ -269,6 +360,19 @@ HiiLibExtractGuidFromHiiHandle (
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Find HII Handle in the default HII database associated with given Device Path.\r
+\r
+  If DevicePath is NULL, then ASSERT.\r
+\r
+  @param  DevicePath             Device Path associated with the HII package list\r
+                                 handle.\r
+\r
+  @retval Handle                 HII package list Handle associated with the Device\r
+                                        Path.\r
+  @retval NULL                   Hii Package list handle is not found.\r
+\r
+**/\r
 EFI_HII_HANDLE\r
 EFIAPI\r
 HiiLibDevicePathToHiiHandle (\r
@@ -382,6 +486,15 @@ HiiLibDevicePathToHiiHandle (
   return HiiHandle;\r
 }\r
 \r
+/**\r
+  This function check if the Hii Handle is a valid handle registered\r
+  in the HII database.\r
+\r
+  @param HiiHandle The HII Handle.\r
+\r
+  @retval TRUE If it is a valid HII handle.\r
+  @retval FALSE If it is a invalid HII handle.\r
+**/\r
 BOOLEAN\r
 IsHiiHandleRegistered (\r
   EFI_HII_HANDLE    HiiHandle\r