]>
Commit | Line | Data |
---|---|---|
d1f95000 | 1 | /** @file\r |
2 | The file provides Database manager for HII-related data\r | |
3 | structures.\r | |
9095d37b LG |
4 | \r |
5 | Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r | |
6 | This program and the accompanying materials are licensed and made available under\r | |
7 | the terms and conditions of the BSD License that accompanies this distribution.\r | |
af2dc6a7 | 8 | The full text of the license may be found at\r |
9095d37b LG |
9 | http://opensource.org/licenses/bsd-license.php.\r |
10 | \r | |
11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
d1f95000 | 13 | \r |
d1f95000 | 14 | **/\r |
15 | \r | |
16 | #ifndef __HII_DATABASE_H__\r | |
17 | #define __HII_DATABASE_H__\r | |
18 | \r | |
19 | #define EFI_HII_DATABASE_PROTOCOL_GUID \\r | |
20 | { 0xef9fc172, 0xa1b2, 0x4693, { 0xb3, 0x27, 0x6d, 0x32, 0xfc, 0x41, 0x60, 0x42 } }\r | |
21 | \r | |
22 | \r | |
23 | typedef struct _EFI_HII_DATABASE_PROTOCOL EFI_HII_DATABASE_PROTOCOL;\r | |
24 | \r | |
d1f95000 | 25 | \r |
721b16af | 26 | ///\r |
af2dc6a7 | 27 | /// EFI_HII_DATABASE_NOTIFY_TYPE.\r |
9095d37b | 28 | ///\r |
d1f95000 | 29 | typedef UINTN EFI_HII_DATABASE_NOTIFY_TYPE;\r |
721b16af | 30 | \r |
d1f95000 | 31 | #define EFI_HII_DATABASE_NOTIFY_NEW_PACK 0x00000001\r |
32 | #define EFI_HII_DATABASE_NOTIFY_REMOVE_PACK 0x00000002\r | |
33 | #define EFI_HII_DATABASE_NOTIFY_EXPORT_PACK 0x00000004\r | |
34 | #define EFI_HII_DATABASE_NOTIFY_ADD_PACK 0x00000008\r | |
35 | /**\r | |
9095d37b | 36 | \r |
d1f95000 | 37 | Functions which are registered to receive notification of\r |
38 | database events have this prototype. The actual event is encoded\r | |
39 | in NotifyType. The following table describes how PackageType,\r | |
40 | PackageGuid, Handle, and Package are used for each of the\r | |
41 | notification types.\r | |
42 | \r | |
43 | @param PackageType Package type of the notification.\r | |
44 | \r | |
45 | @param PackageGuid If PackageType is\r | |
46 | EFI_HII_PACKAGE_TYPE_GUID, then this is\r | |
47 | the pointer to the GUID from the Guid\r | |
48 | field of EFI_HII_PACKAGE_GUID_HEADER.\r | |
49 | Otherwise, it must be NULL.\r | |
50 | \r | |
9095d37b LG |
51 | @param Package Points to the package referred to by the notification.\r |
52 | \r | |
4ca9b6c4 LG |
53 | @param Handle The handle of the package\r |
54 | list which contains the specified package.\r | |
d1f95000 | 55 | \r |
56 | @param NotifyType The type of change concerning the\r | |
57 | database. See\r | |
58 | EFI_HII_DATABASE_NOTIFY_TYPE.\r | |
59 | \r | |
60 | **/\r | |
61 | typedef\r | |
62 | EFI_STATUS\r | |
8b13229b | 63 | (EFIAPI *EFI_HII_DATABASE_NOTIFY)(\r |
7d582d6b | 64 | IN UINT8 PackageType,\r |
d1f95000 | 65 | IN CONST EFI_GUID *PackageGuid,\r |
66 | IN CONST EFI_HII_PACKAGE_HEADER *Package,\r | |
7d582d6b | 67 | IN EFI_HII_HANDLE Handle,\r |
68 | IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType\r | |
d1f95000 | 69 | );\r |
70 | \r | |
71 | /**\r | |
72 | \r | |
73 | This function adds the packages in the package list to the\r | |
74 | database and returns a handle. If there is a\r | |
75 | EFI_DEVICE_PATH_PROTOCOL associated with the DriverHandle, then\r | |
76 | this function will create a package of type\r | |
77 | EFI_PACKAGE_TYPE_DEVICE_PATH and add it to the package list. For\r | |
78 | each package in the package list, registered functions with the\r | |
79 | notification type NEW_PACK and having the same package type will\r | |
80 | be called. For each call to NewPackageList(), there should be a\r | |
81 | corresponding call to\r | |
82 | EFI_HII_DATABASE_PROTOCOL.RemovePackageList().\r | |
9095d37b | 83 | \r |
4ca9b6c4 | 84 | @param This A pointer to the EFI_HII_DATABASE_PROTOCOL instance.\r |
d1f95000 | 85 | \r |
4ca9b6c4 | 86 | @param PackageList A pointer to an EFI_HII_PACKAGE_LIST_HEADER structure.\r |
d1f95000 | 87 | \r |
4ca9b6c4 | 88 | @param DriverHandle Associate the package list with this EFI handle.\r |
8c6d73fb | 89 | If a NULL is specified, this data will not be associate\r |
90 | with any drivers and cannot have a callback induced.\r | |
9095d37b | 91 | \r |
4ca9b6c4 | 92 | @param Handle A pointer to the EFI_HII_HANDLE instance.\r |
d1f95000 | 93 | \r |
4ca9b6c4 LG |
94 | @retval EFI_SUCCESS The package list associated with the\r |
95 | Handle was added to the HII database.\r | |
d1f95000 | 96 | \r |
97 | @retval EFI_OUT_OF_RESOURCES Unable to allocate necessary\r | |
98 | resources for the new database\r | |
99 | contents.\r | |
100 | \r | |
af2dc6a7 | 101 | @retval EFI_INVALID_PARAMETER PackageList is NULL, or Handle is NULL.\r |
d1f95000 | 102 | \r |
103 | **/\r | |
104 | typedef\r | |
105 | EFI_STATUS\r | |
8b13229b | 106 | (EFIAPI *EFI_HII_DATABASE_NEW_PACK)(\r |
d1f95000 | 107 | IN CONST EFI_HII_DATABASE_PROTOCOL *This,\r |
108 | IN CONST EFI_HII_PACKAGE_LIST_HEADER *PackageList,\r | |
8c6d73fb | 109 | IN EFI_HANDLE DriverHandle, OPTIONAL\r |
7d582d6b | 110 | OUT EFI_HII_HANDLE *Handle\r |
d1f95000 | 111 | );\r |
112 | \r | |
113 | \r | |
114 | /**\r | |
115 | \r | |
116 | This function removes the package list that is associated with a\r | |
117 | handle Handle from the HII database. Before removing the\r | |
118 | package, any registered functions with the notification type\r | |
119 | REMOVE_PACK and the same package type will be called. For each\r | |
120 | call to EFI_HII_DATABASE_PROTOCOL.NewPackageList(), there should\r | |
121 | be a corresponding call to RemovePackageList.\r | |
122 | \r | |
4ca9b6c4 | 123 | @param This A pointer to the EFI_HII_DATABASE_PROTOCOL instance.\r |
9095d37b | 124 | \r |
4ca9b6c4 LG |
125 | @param Handle The handle that was registered to the data\r |
126 | that is requested for removal.\r | |
9095d37b | 127 | \r |
4ca9b6c4 LG |
128 | @retval EFI_SUCCESS The data associated with the Handle was\r |
129 | removed from the HII database.\r | |
54cf8780 | 130 | @retval EFI_NOT_FOUND The specified Handle is not in database.\r |
d1f95000 | 131 | \r |
132 | **/\r | |
133 | typedef\r | |
134 | EFI_STATUS\r | |
8b13229b | 135 | (EFIAPI *EFI_HII_DATABASE_REMOVE_PACK)(\r |
d1f95000 | 136 | IN CONST EFI_HII_DATABASE_PROTOCOL *This,\r |
7d582d6b | 137 | IN EFI_HII_HANDLE Handle\r |
d1f95000 | 138 | );\r |
139 | \r | |
140 | \r | |
141 | /**\r | |
9095d37b | 142 | \r |
d1f95000 | 143 | This function updates the existing package list (which has the\r |
144 | specified Handle) in the HII databases, using the new package\r | |
145 | list specified by PackageList. The update process has the\r | |
146 | following steps: Collect all the package types in the package\r | |
147 | list specified by PackageList. A package type consists of the\r | |
148 | Type field of EFI_HII_PACKAGE_HEADER and, if the Type is\r | |
149 | EFI_HII_PACKAGE_TYPE_GUID, the Guid field, as defined in\r | |
150 | EFI_HII_PACKAGE_GUID_HEADER. Iterate through the packages within\r | |
151 | the existing package list in the HII database specified by\r | |
f754f721 | 152 | Handle. If a package's type matches one of the collected types collected\r |
153 | in step 1, then perform the following steps:\r | |
d1f95000 | 154 | - Call any functions registered with the notification type\r |
155 | REMOVE_PACK.\r | |
156 | - Remove the package from the package list and the HII\r | |
157 | database.\r | |
158 | Add all of the packages within the new package list specified\r | |
159 | by PackageList, using the following steps:\r | |
160 | - Add the package to the package list and the HII database.\r | |
161 | - Call any functions registered with the notification type\r | |
162 | ADD_PACK.\r | |
163 | \r | |
4ca9b6c4 | 164 | @param This A pointer to the EFI_HII_DATABASE_PROTOCOL instance.\r |
9095d37b | 165 | \r |
4ca9b6c4 LG |
166 | @param Handle The handle that was registered to the data\r |
167 | that is requested for removal.\r | |
9095d37b | 168 | \r |
d1f95000 | 169 | @param PackageList A pointer to an EFI_HII_PACKAGE_LIST\r |
170 | package.\r | |
9095d37b | 171 | \r |
4ca9b6c4 | 172 | @retval EFI_SUCCESS The HII database was successfully updated.\r |
9095d37b | 173 | \r |
4ca9b6c4 LG |
174 | @retval EFI_OUT_OF_RESOURCES Unable to allocate enough memory\r |
175 | for the updated database.\r | |
9095d37b | 176 | \r |
54cf8780 | 177 | @retval EFI_INVALID_PARAMETER PackageList was NULL.\r |
178 | @retval EFI_NOT_FOUND The specified Handle is not in database.\r | |
d1f95000 | 179 | \r |
180 | **/\r | |
181 | typedef\r | |
182 | EFI_STATUS\r | |
8b13229b | 183 | (EFIAPI *EFI_HII_DATABASE_UPDATE_PACK)(\r |
d1f95000 | 184 | IN CONST EFI_HII_DATABASE_PROTOCOL *This,\r |
7d582d6b | 185 | IN EFI_HII_HANDLE Handle,\r |
d1f95000 | 186 | IN CONST EFI_HII_PACKAGE_LIST_HEADER *PackageList\r |
187 | );\r | |
188 | \r | |
189 | \r | |
190 | /**\r | |
9095d37b LG |
191 | \r |
192 | This function returns a list of the package handles of the\r | |
193 | specified type that are currently active in the database. The\r | |
194 | pseudo-type EFI_HII_PACKAGE_TYPE_ALL will cause all package\r | |
d1f95000 | 195 | handles to be listed.\r |
9095d37b | 196 | \r |
4ca9b6c4 | 197 | @param This A pointer to the EFI_HII_DATABASE_PROTOCOL instance.\r |
9095d37b | 198 | \r |
4ca9b6c4 LG |
199 | @param PackageType Specifies the package type of the packages\r |
200 | to list or EFI_HII_PACKAGE_TYPE_ALL for\r | |
201 | all packages to be listed.\r | |
9095d37b | 202 | \r |
4ca9b6c4 LG |
203 | @param PackageGuid If PackageType is\r |
204 | EFI_HII_PACKAGE_TYPE_GUID, then this is\r | |
205 | the pointer to the GUID which must match\r | |
206 | the Guid field of\r | |
207 | EFI_HII_PACKAGE_GUID_HEADER. Otherwise, it\r | |
208 | must be NULL.\r | |
9095d37b | 209 | \r |
d1f95000 | 210 | @param HandleBufferLength On input, a pointer to the length\r |
211 | of the handle buffer. On output,\r | |
212 | the length of the handle buffer\r | |
4ca9b6c4 | 213 | that is required for the handles found.\r |
d1f95000 | 214 | \r |
af2dc6a7 | 215 | @param Handle An array of EFI_HII_HANDLE instances returned.\r |
d1f95000 | 216 | \r |
a750b4ae | 217 | @retval EFI_SUCCESS The matching handles are outputted successfully.\r |
4ca9b6c4 LG |
218 | HandleBufferLength is updated with the actual length.\r |
219 | @retval EFI_BUFFER_TOO_SMALL The HandleBufferLength parameter\r | |
d1f95000 | 220 | indicates that Handle is too\r |
221 | small to support the number of\r | |
222 | handles. HandleBufferLength is\r | |
223 | updated with a value that will\r | |
224 | enable the data to fit.\r | |
af2dc6a7 | 225 | @retval EFI_NOT_FOUND No matching handle could be found in database.\r |
5795218e ED |
226 | @retval EFI_INVALID_PARAMETER HandleBufferLength was NULL.\r |
227 | @retval EFI_INVALID_PARAMETER The value referenced by HandleBufferLength was not\r | |
228 | zero and Handle was NULL.\r | |
4ca9b6c4 LG |
229 | @retval EFI_INVALID_PARAMETER PackageType is not a EFI_HII_PACKAGE_TYPE_GUID but\r |
230 | PackageGuid is not NULL, PackageType is a EFI_HII_\r | |
231 | PACKAGE_TYPE_GUID but PackageGuid is NULL.\r | |
d1f95000 | 232 | **/\r |
233 | typedef\r | |
234 | EFI_STATUS\r | |
8b13229b | 235 | (EFIAPI *EFI_HII_DATABASE_LIST_PACKS)(\r |
d1f95000 | 236 | IN CONST EFI_HII_DATABASE_PROTOCOL *This,\r |
7d582d6b | 237 | IN UINT8 PackageType,\r |
d1f95000 | 238 | IN CONST EFI_GUID *PackageGuid,\r |
239 | IN OUT UINTN *HandleBufferLength,\r | |
4ca9b6c4 | 240 | OUT EFI_HII_HANDLE *Handle\r |
d1f95000 | 241 | );\r |
242 | \r | |
d1f95000 | 243 | /**\r |
244 | \r | |
245 | This function will export one or all package lists in the\r | |
246 | database to a buffer. For each package list exported, this\r | |
247 | function will call functions registered with EXPORT_PACK and\r | |
248 | then copy the package list to the buffer. The registered\r | |
249 | functions may call EFI_HII_DATABASE_PROTOCOL.UpdatePackageList()\r | |
250 | to modify the package list before it is copied to the buffer. If\r | |
251 | the specified BufferSize is too small, then the status\r | |
252 | EFI_OUT_OF_RESOURCES will be returned and the actual package\r | |
253 | size will be returned in BufferSize.\r | |
254 | \r | |
4ca9b6c4 LG |
255 | @param This A pointer to the EFI_HII_DATABASE_PROTOCOL instance.\r |
256 | \r | |
d1f95000 | 257 | \r |
4ca9b6c4 LG |
258 | @param Handle An EFI_HII_HANDLE that corresponds to the\r |
259 | desired package list in the HII database to\r | |
260 | export or NULL to indicate all package lists\r | |
9095d37b | 261 | should be exported.\r |
d1f95000 | 262 | \r |
263 | @param BufferSize On input, a pointer to the length of the\r | |
264 | buffer. On output, the length of the\r | |
265 | buffer that is required for the exported\r | |
266 | data.\r | |
267 | \r | |
4ca9b6c4 LG |
268 | @param Buffer A pointer to a buffer that will contain the\r |
269 | results of the export function.\r | |
9095d37b LG |
270 | \r |
271 | \r | |
4ca9b6c4 | 272 | @retval EFI_SUCCESS Package exported.\r |
9095d37b | 273 | \r |
4ca9b6c4 | 274 | @retval EFI_OUT_OF_RESOURCES BufferSize is too small to hold the package.\r |
d1f95000 | 275 | \r |
a750b4ae | 276 | @retval EFI_NOT_FOUND The specified Handle could not be found in the\r |
5795218e | 277 | current database.\r |
9095d37b | 278 | \r |
5795218e | 279 | @retval EFI_INVALID_PARAMETER BufferSize was NULL.\r |
9095d37b LG |
280 | \r |
281 | @retval EFI_INVALID_PARAMETER The value referenced by BufferSize was not zero\r | |
5795218e | 282 | and Buffer was NULL.\r |
d1f95000 | 283 | **/\r |
284 | typedef\r | |
285 | EFI_STATUS\r | |
8b13229b | 286 | (EFIAPI *EFI_HII_DATABASE_EXPORT_PACKS)(\r |
7d582d6b | 287 | IN CONST EFI_HII_DATABASE_PROTOCOL *This,\r |
288 | IN EFI_HII_HANDLE Handle,\r | |
289 | IN OUT UINTN *BufferSize,\r | |
290 | OUT EFI_HII_PACKAGE_LIST_HEADER *Buffer\r | |
d1f95000 | 291 | );\r |
292 | \r | |
293 | \r | |
294 | /**\r | |
9095d37b LG |
295 | \r |
296 | \r | |
d1f95000 | 297 | This function registers a function which will be called when\r |
298 | specified actions related to packages of the specified type\r | |
299 | occur in the HII database. By registering a function, other\r | |
300 | HII-related drivers are notified when specific package types\r | |
301 | are added, removed or updated in the HII database. Each driver\r | |
302 | or application which registers a notification should use\r | |
303 | EFI_HII_DATABASE_PROTOCOL.UnregisterPackageNotify() before\r | |
304 | exiting.\r | |
9095d37b LG |
305 | \r |
306 | \r | |
4ca9b6c4 | 307 | @param This A pointer to the EFI_HII_DATABASE_PROTOCOL instance.\r |
d1f95000 | 308 | \r |
4ca9b6c4 | 309 | @param PackageType The package type. See\r |
9095d37b | 310 | EFI_HII_PACKAGE_TYPE_x in EFI_HII_PACKAGE_HEADER.\r |
d1f95000 | 311 | \r |
4ca9b6c4 LG |
312 | @param PackageGuid If PackageType is\r |
313 | EFI_HII_PACKAGE_TYPE_GUID, then this is\r | |
314 | the pointer to the GUID which must match\r | |
315 | the Guid field of\r | |
316 | EFI_HII_PACKAGE_GUID_HEADER. Otherwise, it\r | |
317 | must be NULL.\r | |
d1f95000 | 318 | \r |
319 | @param PackageNotifyFn Points to the function to be called\r | |
320 | when the event specified by\r | |
321 | NotificationType occurs. See\r | |
322 | EFI_HII_DATABASE_NOTIFY.\r | |
323 | \r | |
4ca9b6c4 LG |
324 | @param NotifyType Describes the types of notification which\r |
325 | this function will be receiving. See\r | |
af2dc6a7 | 326 | EFI_HII_DATABASE_NOTIFY_TYPE for a\r |
4ca9b6c4 | 327 | list of types.\r |
d1f95000 | 328 | \r |
4ca9b6c4 LG |
329 | @param NotifyHandle Points to the unique handle assigned to\r |
330 | the registered notification. Can be used\r | |
331 | in EFI_HII_DATABASE_PROTOCOL.UnregisterPack\r | |
332 | to stop notifications.\r | |
d1f95000 | 333 | \r |
334 | \r | |
4ca9b6c4 | 335 | @retval EFI_SUCCESS Notification registered successfully.\r |
d1f95000 | 336 | \r |
337 | @retval EFI_OUT_OF_RESOURCES Unable to allocate necessary\r | |
338 | data structures.\r | |
339 | \r | |
4ca9b6c4 LG |
340 | @retval EFI_INVALID_PARAMETER PackageGuid is not NULL when\r |
341 | PackageType is not\r | |
342 | EFI_HII_PACKAGE_TYPE_GUID.\r | |
d1f95000 | 343 | \r |
344 | **/\r | |
345 | typedef\r | |
346 | EFI_STATUS\r | |
8b13229b | 347 | (EFIAPI *EFI_HII_DATABASE_REGISTER_NOTIFY)(\r |
d1f95000 | 348 | IN CONST EFI_HII_DATABASE_PROTOCOL *This,\r |
7d582d6b | 349 | IN UINT8 PackageType,\r |
d1f95000 | 350 | IN CONST EFI_GUID *PackageGuid,\r |
7d582d6b | 351 | IN EFI_HII_DATABASE_NOTIFY PackageNotifyFn,\r |
352 | IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType,\r | |
d1f95000 | 353 | OUT EFI_HANDLE *NotifyHandle\r |
354 | );\r | |
355 | \r | |
356 | \r | |
357 | /**\r | |
9095d37b | 358 | \r |
d1f95000 | 359 | Removes the specified HII database package-related notification.\r |
9095d37b | 360 | \r |
4ca9b6c4 LG |
361 | @param This A pointer to the EFI_HII_DATABASE_PROTOCOL instance.\r |
362 | \r | |
d1f95000 | 363 | @param NotificationHandle The handle of the notification\r |
364 | function being unregistered.\r | |
9095d37b LG |
365 | \r |
366 | @retval EFI_SUCCESS Successsfully unregistered the notification.\r | |
367 | \r | |
368 | @retval EFI_NOT_FOUND The incoming notification handle does not exist\r | |
630b4187 | 369 | in the current hii database.\r |
9095d37b | 370 | \r |
d1f95000 | 371 | **/\r |
372 | typedef\r | |
373 | EFI_STATUS\r | |
8b13229b | 374 | (EFIAPI *EFI_HII_DATABASE_UNREGISTER_NOTIFY)(\r |
d1f95000 | 375 | IN CONST EFI_HII_DATABASE_PROTOCOL *This,\r |
7d582d6b | 376 | IN EFI_HANDLE NotificationHandle\r |
d1f95000 | 377 | );\r |
378 | \r | |
379 | \r | |
d1f95000 | 380 | /**\r |
9095d37b | 381 | \r |
d1f95000 | 382 | This routine retrieves an array of GUID values for each keyboard\r |
383 | layout that was previously registered in the system.\r | |
384 | \r | |
4ca9b6c4 | 385 | @param This A pointer to the EFI_HII_PROTOCOL instance.\r |
d1f95000 | 386 | \r |
387 | @param KeyGuidBufferLength On input, a pointer to the length\r | |
388 | of the keyboard GUID buffer. On\r | |
389 | output, the length of the handle\r | |
390 | buffer that is required for the\r | |
9095d37b LG |
391 | handles found.\r |
392 | \r | |
4ca9b6c4 | 393 | @param KeyGuidBuffer An array of keyboard layout GUID\r |
d1f95000 | 394 | instances returned.\r |
395 | \r | |
4ca9b6c4 | 396 | @retval EFI_SUCCESS KeyGuidBuffer was updated successfully.\r |
9095d37b | 397 | \r |
d1f95000 | 398 | @retval EFI_BUFFER_TOO_SMALL The KeyGuidBufferLength\r |
399 | parameter indicates that\r | |
400 | KeyGuidBuffer is too small to\r | |
401 | support the number of GUIDs.\r | |
402 | KeyGuidBufferLength is updated\r | |
403 | with a value that will enable\r | |
404 | the data to fit.\r | |
5795218e | 405 | @retval EFI_INVALID_PARAMETER The KeyGuidBufferLength is NULL.\r |
9095d37b | 406 | @retval EFI_INVALID_PARAMETER The value referenced by\r |
5795218e ED |
407 | KeyGuidBufferLength is not\r |
408 | zero and KeyGuidBuffer is NULL.\r | |
409 | @retval EFI_NOT_FOUND There was no keyboard layout.\r | |
d1f95000 | 410 | \r |
411 | **/\r | |
412 | typedef\r | |
413 | EFI_STATUS\r | |
8b13229b | 414 | (EFIAPI *EFI_HII_FIND_KEYBOARD_LAYOUTS)(\r |
d1f95000 | 415 | IN CONST EFI_HII_DATABASE_PROTOCOL *This,\r |
416 | IN OUT UINT16 *KeyGuidBufferLength,\r | |
417 | OUT EFI_GUID *KeyGuidBuffer\r | |
418 | );\r | |
419 | \r | |
420 | \r | |
421 | /**\r | |
9095d37b | 422 | \r |
d1f95000 | 423 | This routine retrieves the requested keyboard layout. The layout\r |
af2dc6a7 | 424 | is a physical description of the keys on a keyboard, and the\r |
d1f95000 | 425 | character(s) that are associated with a particular set of key\r |
426 | strokes.\r | |
427 | \r | |
4ca9b6c4 | 428 | @param This A pointer to the EFI_HII_PROTOCOL instance.\r |
9095d37b | 429 | \r |
4ca9b6c4 LG |
430 | @param KeyGuid A pointer to the unique ID associated with a\r |
431 | given keyboard layout. If KeyGuid is NULL then\r | |
432 | the current layout will be retrieved.\r | |
433 | \r | |
434 | @param KeyboardLayoutLength On input, a pointer to the length of the\r | |
435 | KeyboardLayout buffer. On output, the length of\r | |
436 | the data placed into KeyboardLayout.\r | |
9095d37b | 437 | \r |
4ca9b6c4 LG |
438 | @param KeyboardLayout A pointer to a buffer containing the\r |
439 | retrieved keyboard layout.\r | |
9095d37b | 440 | \r |
d1f95000 | 441 | @retval EFI_SUCCESS The keyboard layout was retrieved\r |
442 | successfully.\r | |
9095d37b | 443 | \r |
4ca9b6c4 | 444 | @retval EFI_NOT_FOUND The requested keyboard layout was not found.\r |
d1f95000 | 445 | \r |
446 | **/\r | |
447 | typedef\r | |
448 | EFI_STATUS\r | |
8b13229b | 449 | (EFIAPI *EFI_HII_GET_KEYBOARD_LAYOUT)(\r |
d1f95000 | 450 | IN CONST EFI_HII_DATABASE_PROTOCOL *This,\r |
451 | IN CONST EFI_GUID *KeyGuid,\r | |
f620c889 | 452 | IN OUT UINT16 *KeyboardLayoutLength,\r |
d1f95000 | 453 | OUT EFI_HII_KEYBOARD_LAYOUT *KeyboardLayout\r |
454 | );\r | |
455 | \r | |
456 | /**\r | |
9095d37b | 457 | \r |
d1f95000 | 458 | This routine sets the default keyboard layout to the one\r |
459 | referenced by KeyGuid. When this routine is called, an event\r | |
460 | will be signaled of the EFI_HII_SET_KEYBOARD_LAYOUT_EVENT_GUID\r | |
461 | group type. This is so that agents which are sensitive to the\r | |
462 | current keyboard layout being changed can be notified of this\r | |
463 | change.\r | |
464 | \r | |
4ca9b6c4 | 465 | @param This A pointer to the EFI_HII_PROTOCOL instance.\r |
d1f95000 | 466 | \r |
4ca9b6c4 LG |
467 | @param KeyGuid A pointer to the unique ID associated with a\r |
468 | given keyboard layout.\r | |
d1f95000 | 469 | \r |
4ca9b6c4 | 470 | @retval EFI_SUCCESS The current keyboard layout was successfully set.\r |
d1f95000 | 471 | \r |
4ca9b6c4 LG |
472 | @retval EFI_NOT_FOUND The referenced keyboard layout was not\r |
473 | found, so action was taken.\r | |
d1f95000 | 474 | \r |
475 | **/\r | |
476 | typedef\r | |
477 | EFI_STATUS\r | |
8b13229b | 478 | (EFIAPI *EFI_HII_SET_KEYBOARD_LAYOUT)(\r |
d1f95000 | 479 | IN CONST EFI_HII_DATABASE_PROTOCOL *This,\r |
480 | IN CONST EFI_GUID *KeyGuid\r | |
481 | );\r | |
482 | \r | |
483 | /**\r | |
9095d37b | 484 | \r |
d1f95000 | 485 | Return the EFI handle associated with a package list.\r |
9095d37b | 486 | \r |
4ca9b6c4 | 487 | @param This A pointer to the EFI_HII_PROTOCOL instance.\r |
9095d37b | 488 | \r |
7d582d6b | 489 | @param PackageListHandle An EFI_HII_HANDLE that corresponds\r |
d1f95000 | 490 | to the desired package list in the\r |
491 | HIIdatabase.\r | |
9095d37b | 492 | \r |
4ca9b6c4 LG |
493 | @param DriverHandle On return, contains the EFI_HANDLE which\r |
494 | was registered with the package list in\r | |
495 | NewPackageList().\r | |
9095d37b | 496 | \r |
4ca9b6c4 | 497 | @retval EFI_SUCCESS The DriverHandle was returned successfully.\r |
9095d37b | 498 | \r |
4ca9b6c4 | 499 | @retval EFI_INVALID_PARAMETER The PackageListHandle was not valid.\r |
d1f95000 | 500 | \r |
501 | **/\r | |
502 | typedef\r | |
503 | EFI_STATUS\r | |
8b13229b | 504 | (EFIAPI *EFI_HII_DATABASE_GET_PACK_HANDLE)(\r |
d1f95000 | 505 | IN CONST EFI_HII_DATABASE_PROTOCOL *This,\r |
7d582d6b | 506 | IN EFI_HII_HANDLE PackageListHandle,\r |
d1f95000 | 507 | OUT EFI_HANDLE *DriverHandle\r |
508 | );\r | |
509 | \r | |
44717a39 | 510 | ///\r |
511 | /// Database manager for HII-related data structures.\r | |
512 | ///\r | |
d1f95000 | 513 | struct _EFI_HII_DATABASE_PROTOCOL {\r |
721b16af | 514 | EFI_HII_DATABASE_NEW_PACK NewPackageList;\r |
515 | EFI_HII_DATABASE_REMOVE_PACK RemovePackageList;\r | |
7d582d6b | 516 | EFI_HII_DATABASE_UPDATE_PACK UpdatePackageList;\r |
517 | EFI_HII_DATABASE_LIST_PACKS ListPackageLists;\r | |
518 | EFI_HII_DATABASE_EXPORT_PACKS ExportPackageLists;\r | |
519 | EFI_HII_DATABASE_REGISTER_NOTIFY RegisterPackageNotify;\r | |
520 | EFI_HII_DATABASE_UNREGISTER_NOTIFY UnregisterPackageNotify;\r | |
521 | EFI_HII_FIND_KEYBOARD_LAYOUTS FindKeyboardLayouts;\r | |
522 | EFI_HII_GET_KEYBOARD_LAYOUT GetKeyboardLayout;\r | |
523 | EFI_HII_SET_KEYBOARD_LAYOUT SetKeyboardLayout;\r | |
524 | EFI_HII_DATABASE_GET_PACK_HANDLE GetPackageListHandle;\r | |
d1f95000 | 525 | };\r |
526 | \r | |
527 | extern EFI_GUID gEfiHiiDatabaseProtocolGuid;\r | |
528 | \r | |
529 | #endif\r | |
530 | \r | |
7d582d6b | 531 | \r |