]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Library/HiiLib.h
UEFI HII: Merge UEFI HII support changes from branch.
[mirror_edk2.git] / MdePkg / Include / Library / HiiLib.h
CommitLineData
fb3df220 1/** @file\r
2 Public include file for the HII Library\r
3\r
4 Copyright (c) 2006, Intel Corporation \r
5 All rights reserved. This program and the accompanying materials \r
6 are licensed and made available under the terms and conditions of the BSD License \r
7 which accompanies this distribution. The full text of the license may be found at \r
8 http://opensource.org/licenses/bsd-license.php \r
9\r
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
12\r
fb3df220 13**/\r
14\r
15#ifndef __HII_LIB_H__\r
16#define __HII_LIB_H__\r
17\r
7d582d6b 18//#include <PiDxe.h>\r
1528fae8 19\r
7d582d6b 20//\r
21// Limited buffer size recommended by RFC4646 (4.3. Length Considerations)\r
22// (42 characters plus a NULL terminator)\r
23//\r
24#define RFC_3066_ENTRY_SIZE (42 + 1)\r
fb3df220 25\r
26/**\r
7d582d6b 27 This function allocates pool for an EFI_HII_PACKAGE_LIST structure\r
28 with additional space that is big enough to host all packages described by the variable \r
29 argument list of package pointers. The allocated structure is initialized using NumberOfPackages, \r
30 GuidId, and the variable length argument list of package pointers.\r
fb3df220 31\r
7d582d6b 32 Then, EFI_HII_PACKAGE_LIST will be register to the default System HII Database. The\r
33 Handle to the newly registered Package List is returned throught HiiHandle.\r
34\r
35 @param NumberOfPackages The number of HII packages to register.\r
36 @param GuidId Package List GUID ID.\r
37 @param HiiHandle The ID used to retrieve the Package List later.\r
38 @param ... The variable argument list describing all HII Package.\r
fb3df220 39\r
40 @return\r
41 The allocated and initialized packages.\r
42\r
43**/\r
7d582d6b 44\r
45EFI_STATUS\r
fb3df220 46EFIAPI\r
7d582d6b 47HiiLibAddPackagesToHiiDatabase (\r
48 IN UINTN NumberOfPackages,\r
49 IN CONST EFI_GUID *GuidId,\r
50 IN EFI_HANDLE DriverHandle, OPTIONAL\r
51 OUT EFI_HII_HANDLE *HiiHandle, OPTIONAL\r
fb3df220 52 ...\r
7d582d6b 53 )\r
54;\r
55\r
56EFI_STATUS\r
57EFIAPI\r
58HiiLibAddFontPackageToHiiDatabase (\r
59 IN UINTN FontSize,\r
60 IN CONST UINT8 *FontBinary,\r
61 IN CONST EFI_GUID *GuidId,\r
62 OUT EFI_HII_HANDLE *HiiHandle OPTIONAL\r
63 )\r
64;\r
65\r
66EFI_STATUS\r
67EFIAPI\r
68HiiLibRemovePackagesFromHiiDatabase (\r
69 IN EFI_HII_HANDLE HiiHandle\r
70 )\r
71;\r
72\r
73/**\r
74 This function adds the string into String Package of each language.\r
75\r
76 @param PackageList Handle of the package list where this string will\r
77 be added.\r
78 @param StringId On return, contains the new strings id, which is\r
79 unique within PackageList.\r
80 @param String Points to the new null-terminated string.\r
81\r
82 @retval EFI_SUCCESS The new string was added successfully.\r
83 @retval EFI_NOT_FOUND The specified PackageList could not be found in\r
84 database.\r
85 @retval EFI_OUT_OF_RESOURCES Could not add the string due to lack of resources.\r
86 @retval EFI_INVALID_PARAMETER String is NULL or StringId is NULL is NULL.\r
87\r
88**/\r
89EFI_STATUS\r
90EFIAPI\r
91HiiLibCreateString (\r
92 IN EFI_HII_HANDLE PackageList,\r
93 OUT EFI_STRING_ID *StringId,\r
94 IN CONST EFI_STRING String\r
95 )\r
96;\r
97\r
98/**\r
99 This function update the specified string in String Package of each language.\r
100\r
101 @param PackageList Handle of the package list where this string will\r
102 be added.\r
103 @param StringId Ths String Id to be updated.\r
104 @param String Points to the new null-terminated string.\r
105\r
106 @retval EFI_SUCCESS The new string was added successfully.\r
107 @retval EFI_NOT_FOUND The specified PackageList could not be found in\r
108 database.\r
109 @retval EFI_OUT_OF_RESOURCES Could not add the string due to lack of resources.\r
110 @retval EFI_INVALID_PARAMETER String is NULL or StringId is NULL is NULL.\r
111\r
112**/\r
113EFI_STATUS\r
114EFIAPI\r
115HiiLibUpdateString (\r
116 IN EFI_HII_HANDLE PackageList,\r
117 IN EFI_STRING_ID StringId,\r
118 IN CONST EFI_STRING String\r
119 )\r
120;\r
121\r
122\r
123\r
124//\r
125// Just use the UEFI prototype\r
126//\r
127EFI_STATUS\r
128EFIAPI\r
129HiiLibGetStringFromGuidId (\r
130 IN EFI_GUID *ProducerGuid,\r
131 IN EFI_STRING_ID StringId,\r
132 OUT EFI_STRING *String\r
133 )\r
134;\r
135\r
136//\r
137// This function is Implementation Specifc. HII_VENDOR_DEVICE_PATH\r
138// This should be moved to MdeModulepkg.\r
139//\r
140EFI_STATUS\r
141EFIAPI\r
142HiiLibCreateHiiDriverHandle (\r
143 OUT EFI_HANDLE *DriverHandle\r
144 )\r
145;\r
146\r
147EFI_STATUS\r
148EFIAPI\r
149HiiLibDestroyHiiDriverHandle (\r
150 IN EFI_HANDLE DriverHandle\r
151 )\r
152;\r
153\r
154\r
155EFI_STATUS\r
156HiiLibExtractClassFromHiiHandle (\r
157 IN EFI_HII_HANDLE Handle,\r
158 OUT UINT16 *Class,\r
159 OUT EFI_STRING_ID *FormSetTitle,\r
160 OUT EFI_STRING_ID *FormSetHelp\r
161 )\r
162/*++\r
163\r
164Routine Description:\r
165 Extract formset class for given HII handle.\r
166\r
167Arguments:\r
168 HiiHandle - Hii handle\r
169 Class - Class of the formset\r
170 FormSetTitle - Formset title string\r
171 FormSetHelp - Formset help string\r
172\r
173Returns:\r
174 EFI_SUCCESS - Successfully extract Class for specified Hii handle.\r
175\r
176--*/\r
177;\r
fb3df220 178\r
179#endif\r