2 Public include file for the HII Library
4 Copyright (c) 2006, Intel Corporation
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
21 // Limited buffer size recommended by RFC4646 (4.3. Length Considerations)
22 // (42 characters plus a NULL terminator)
24 #define RFC_3066_ENTRY_SIZE (42 + 1)
27 This function allocates pool for an EFI_HII_PACKAGE_LIST structure
28 with additional space that is big enough to host all packages described by the variable
29 argument list of package pointers. The allocated structure is initialized using NumberOfPackages,
30 GuidId, and the variable length argument list of package pointers.
32 Then, EFI_HII_PACKAGE_LIST will be register to the default System HII Database. The
33 Handle to the newly registered Package List is returned throught HiiHandle.
35 @param NumberOfPackages The number of HII packages to register.
36 @param GuidId Package List GUID ID.
37 @param HiiHandle The ID used to retrieve the Package List later.
38 @param ... The variable argument list describing all HII Package.
41 The allocated and initialized packages.
47 HiiLibAddPackagesToHiiDatabase (
48 IN UINTN NumberOfPackages
,
49 IN CONST EFI_GUID
*GuidId
,
50 IN EFI_HANDLE DriverHandle
, OPTIONAL
51 OUT EFI_HII_HANDLE
*HiiHandle
, OPTIONAL
58 HiiLibAddFontPackageToHiiDatabase (
60 IN CONST UINT8
*FontBinary
,
61 IN CONST EFI_GUID
*GuidId
,
62 OUT EFI_HII_HANDLE
*HiiHandle OPTIONAL
68 HiiLibRemovePackagesFromHiiDatabase (
69 IN EFI_HII_HANDLE HiiHandle
74 This function adds the string into String Package of each language.
76 @param PackageList Handle of the package list where this string will
78 @param StringId On return, contains the new strings id, which is
79 unique within PackageList.
80 @param String Points to the new null-terminated string.
82 @retval EFI_SUCCESS The new string was added successfully.
83 @retval EFI_NOT_FOUND The specified PackageList could not be found in
85 @retval EFI_OUT_OF_RESOURCES Could not add the string due to lack of resources.
86 @retval EFI_INVALID_PARAMETER String is NULL or StringId is NULL is NULL.
92 IN EFI_HII_HANDLE PackageList
,
93 OUT EFI_STRING_ID
*StringId
,
94 IN CONST EFI_STRING String
99 This function update the specified string in String Package of each language.
101 @param PackageList Handle of the package list where this string will
103 @param StringId Ths String Id to be updated.
104 @param String Points to the new null-terminated string.
106 @retval EFI_SUCCESS The new string was added successfully.
107 @retval EFI_NOT_FOUND The specified PackageList could not be found in
109 @retval EFI_OUT_OF_RESOURCES Could not add the string due to lack of resources.
110 @retval EFI_INVALID_PARAMETER String is NULL or StringId is NULL is NULL.
116 IN EFI_HII_HANDLE PackageList
,
117 IN EFI_STRING_ID StringId
,
118 IN CONST EFI_STRING String
125 // Just use the UEFI prototype
129 HiiLibGetStringFromGuidId (
130 IN EFI_GUID
*ProducerGuid
,
131 IN EFI_STRING_ID StringId
,
132 OUT EFI_STRING
*String
137 // This function is Implementation Specifc. HII_VENDOR_DEVICE_PATH
138 // This should be moved to MdeModulepkg.
142 HiiLibCreateHiiDriverHandle (
143 OUT EFI_HANDLE
*DriverHandle
149 HiiLibDestroyHiiDriverHandle (
150 IN EFI_HANDLE DriverHandle
156 HiiLibExtractClassFromHiiHandle (
157 IN EFI_HII_HANDLE Handle
,
159 OUT EFI_STRING_ID
*FormSetTitle
,
160 OUT EFI_STRING_ID
*FormSetHelp
165 Extract formset class for given HII handle.
168 HiiHandle - Hii handle
169 Class - Class of the formset
170 FormSetTitle - Formset title string
171 FormSetHelp - Formset help string
174 EFI_SUCCESS - Successfully extract Class for specified Hii handle.