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