iPXE
Data Structures | Defines | Typedefs | Functions | Variables
HiiDatabase.h File Reference

The file provides Database manager for HII-related data structures. More...

Go to the source code of this file.

Data Structures

struct  _EFI_HII_DATABASE_PROTOCOL
 Database manager for HII-related data structures. More...

Defines

#define EFI_HII_DATABASE_PROTOCOL_GUID   { 0xef9fc172, 0xa1b2, 0x4693, { 0xb3, 0x27, 0x6d, 0x32, 0xfc, 0x41, 0x60, 0x42 } }
#define EFI_HII_DATABASE_NOTIFY_NEW_PACK   0x00000001
#define EFI_HII_DATABASE_NOTIFY_REMOVE_PACK   0x00000002
#define EFI_HII_DATABASE_NOTIFY_EXPORT_PACK   0x00000004
#define EFI_HII_DATABASE_NOTIFY_ADD_PACK   0x00000008

Typedefs

typedef struct
_EFI_HII_DATABASE_PROTOCOL 
EFI_HII_DATABASE_PROTOCOL
typedef UINTN EFI_HII_DATABASE_NOTIFY_TYPE
 EFI_HII_DATABASE_NOTIFY_TYPE.
typedef EFI_STATUS(EFIAPIEFI_HII_DATABASE_NOTIFY )(IN UINT8 PackageType, IN CONST EFI_GUID *PackageGuid, IN CONST EFI_HII_PACKAGE_HEADER *Package, IN EFI_HII_HANDLE Handle, IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType)
 Functions which are registered to receive notification of database events have this prototype.
typedef EFI_STATUS(EFIAPIEFI_HII_DATABASE_NEW_PACK )(IN CONST EFI_HII_DATABASE_PROTOCOL *This, IN CONST EFI_HII_PACKAGE_LIST_HEADER *PackageList, IN EFI_HANDLE DriverHandle, OPTIONAL OUT EFI_HII_HANDLE *Handle)
 This function adds the packages in the package list to the database and returns a handle.
typedef EFI_STATUS(EFIAPIEFI_HII_DATABASE_REMOVE_PACK )(IN CONST EFI_HII_DATABASE_PROTOCOL *This, IN EFI_HII_HANDLE Handle)
 This function removes the package list that is associated with a handle Handle from the HII database.
typedef EFI_STATUS(EFIAPIEFI_HII_DATABASE_UPDATE_PACK )(IN CONST EFI_HII_DATABASE_PROTOCOL *This, IN EFI_HII_HANDLE Handle, IN CONST EFI_HII_PACKAGE_LIST_HEADER *PackageList)
 This function updates the existing package list (which has the specified Handle) in the HII databases, using the new package list specified by PackageList.
typedef EFI_STATUS(EFIAPIEFI_HII_DATABASE_LIST_PACKS )(IN CONST EFI_HII_DATABASE_PROTOCOL *This, IN UINT8 PackageType, IN CONST EFI_GUID *PackageGuid, IN OUT UINTN *HandleBufferLength, OUT EFI_HII_HANDLE *Handle)
 This function returns a list of the package handles of the specified type that are currently active in the database.
typedef EFI_STATUS(EFIAPIEFI_HII_DATABASE_EXPORT_PACKS )(IN CONST EFI_HII_DATABASE_PROTOCOL *This, IN EFI_HII_HANDLE Handle, IN OUT UINTN *BufferSize, OUT EFI_HII_PACKAGE_LIST_HEADER *Buffer)
 This function will export one or all package lists in the database to a buffer.
typedef EFI_STATUS(EFIAPIEFI_HII_DATABASE_REGISTER_NOTIFY )(IN CONST EFI_HII_DATABASE_PROTOCOL *This, IN UINT8 PackageType, IN CONST EFI_GUID *PackageGuid, IN EFI_HII_DATABASE_NOTIFY PackageNotifyFn, IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType, OUT EFI_HANDLE *NotifyHandle)
 This function registers a function which will be called when specified actions related to packages of the specified type occur in the HII database.
typedef EFI_STATUS(EFIAPIEFI_HII_DATABASE_UNREGISTER_NOTIFY )(IN CONST EFI_HII_DATABASE_PROTOCOL *This, IN EFI_HANDLE NotificationHandle)
 Removes the specified HII database package-related notification.
typedef EFI_STATUS(EFIAPIEFI_HII_FIND_KEYBOARD_LAYOUTS )(IN CONST EFI_HII_DATABASE_PROTOCOL *This, IN OUT UINT16 *KeyGuidBufferLength, OUT EFI_GUID *KeyGuidBuffer)
 This routine retrieves an array of GUID values for each keyboard layout that was previously registered in the system.
typedef EFI_STATUS(EFIAPIEFI_HII_GET_KEYBOARD_LAYOUT )(IN CONST EFI_HII_DATABASE_PROTOCOL *This, IN CONST EFI_GUID *KeyGuid, IN OUT UINT16 *KeyboardLayoutLength, OUT EFI_HII_KEYBOARD_LAYOUT *KeyboardLayout)
 This routine retrieves the requested keyboard layout.
typedef EFI_STATUS(EFIAPIEFI_HII_SET_KEYBOARD_LAYOUT )(IN CONST EFI_HII_DATABASE_PROTOCOL *This, IN CONST EFI_GUID *KeyGuid)
 This routine sets the default keyboard layout to the one referenced by KeyGuid.
typedef EFI_STATUS(EFIAPIEFI_HII_DATABASE_GET_PACK_HANDLE )(IN CONST EFI_HII_DATABASE_PROTOCOL *This, IN EFI_HII_HANDLE PackageListHandle, OUT EFI_HANDLE *DriverHandle)
 Return the EFI handle associated with a package list.

Functions

 FILE_LICENCE (BSD3)

Variables

EFI_GUID gEfiHiiDatabaseProtocolGuid

Detailed Description

The file provides Database manager for HII-related data structures.

Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php.

THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.

Definition in file HiiDatabase.h.


Define Documentation

#define EFI_HII_DATABASE_PROTOCOL_GUID   { 0xef9fc172, 0xa1b2, 0x4693, { 0xb3, 0x27, 0x6d, 0x32, 0xfc, 0x41, 0x60, 0x42 } }

Definition at line 21 of file HiiDatabase.h.

#define EFI_HII_DATABASE_NOTIFY_NEW_PACK   0x00000001

Definition at line 33 of file HiiDatabase.h.

#define EFI_HII_DATABASE_NOTIFY_REMOVE_PACK   0x00000002

Definition at line 34 of file HiiDatabase.h.

#define EFI_HII_DATABASE_NOTIFY_EXPORT_PACK   0x00000004

Definition at line 35 of file HiiDatabase.h.

#define EFI_HII_DATABASE_NOTIFY_ADD_PACK   0x00000008

Definition at line 36 of file HiiDatabase.h.


Typedef Documentation

Definition at line 25 of file HiiDatabase.h.

EFI_HII_DATABASE_NOTIFY_TYPE.

Definition at line 31 of file HiiDatabase.h.

Functions which are registered to receive notification of database events have this prototype.

The actual event is encoded in NotifyType. The following table describes how PackageType, PackageGuid, Handle, and Package are used for each of the notification types.

Parameters:
PackageTypePackage type of the notification.
PackageGuidIf PackageType is EFI_HII_PACKAGE_TYPE_GUID, then this is the pointer to the GUID from the Guid field of EFI_HII_PACKAGE_GUID_HEADER. Otherwise, it must be NULL.
PackagePoints to the package referred to by the notification.
HandleThe handle of the package list which contains the specified package.
NotifyTypeThe type of change concerning the database. See EFI_HII_DATABASE_NOTIFY_TYPE.

Definition at line 65 of file HiiDatabase.h.

This function adds the packages in the package list to the database and returns a handle.

If there is a EFI_DEVICE_PATH_PROTOCOL associated with the DriverHandle, then this function will create a package of type EFI_PACKAGE_TYPE_DEVICE_PATH and add it to the package list. For each package in the package list, registered functions with the notification type NEW_PACK and having the same package type will be called. For each call to NewPackageList(), there should be a corresponding call to EFI_HII_DATABASE_PROTOCOL.RemovePackageList().

Parameters:
ThisA pointer to the EFI_HII_DATABASE_PROTOCOL instance.
PackageListA pointer to an EFI_HII_PACKAGE_LIST_HEADER structure.
DriverHandleAssociate the package list with this EFI handle. If a NULL is specified, this data will not be associate with any drivers and cannot have a callback induced.
HandleA pointer to the EFI_HII_HANDLE instance.
Return values:
EFI_SUCCESSThe package list associated with the Handle was added to the HII database.
EFI_OUT_OF_RESOURCESUnable to allocate necessary resources for the new database contents.
EFI_INVALID_PARAMETERPackageList is NULL, or Handle is NULL.

Definition at line 108 of file HiiDatabase.h.

This function removes the package list that is associated with a handle Handle from the HII database.

Before removing the package, any registered functions with the notification type REMOVE_PACK and the same package type will be called. For each call to EFI_HII_DATABASE_PROTOCOL.NewPackageList(), there should be a corresponding call to RemovePackageList.

Parameters:
ThisA pointer to the EFI_HII_DATABASE_PROTOCOL instance.
HandleThe handle that was registered to the data that is requested for removal.
Return values:
EFI_SUCCESSThe data associated with the Handle was removed from the HII database.
EFI_NOT_FOUNDThe specified Handle is not in database.

Definition at line 137 of file HiiDatabase.h.

This function updates the existing package list (which has the specified Handle) in the HII databases, using the new package list specified by PackageList.

The update process has the following steps: Collect all the package types in the package list specified by PackageList. A package type consists of the Type field of EFI_HII_PACKAGE_HEADER and, if the Type is EFI_HII_PACKAGE_TYPE_GUID, the Guid field, as defined in EFI_HII_PACKAGE_GUID_HEADER. Iterate through the packages within the existing package list in the HII database specified by Handle. If a package's type matches one of the collected types collected in step 1, then perform the following steps:

  • Call any functions registered with the notification type REMOVE_PACK.
  • Remove the package from the package list and the HII database. Add all of the packages within the new package list specified by PackageList, using the following steps:
  • Add the package to the package list and the HII database.
  • Call any functions registered with the notification type ADD_PACK.
Parameters:
ThisA pointer to the EFI_HII_DATABASE_PROTOCOL instance.
HandleThe handle that was registered to the data that is requested for removal.
PackageListA pointer to an EFI_HII_PACKAGE_LIST package.
Return values:
EFI_SUCCESSThe HII database was successfully updated.
EFI_OUT_OF_RESOURCESUnable to allocate enough memory for the updated database.
EFI_INVALID_PARAMETERPackageList was NULL.
EFI_NOT_FOUNDThe specified Handle is not in database.

Definition at line 185 of file HiiDatabase.h.

typedef EFI_STATUS(EFIAPI * EFI_HII_DATABASE_LIST_PACKS)(IN CONST EFI_HII_DATABASE_PROTOCOL *This, IN UINT8 PackageType, IN CONST EFI_GUID *PackageGuid, IN OUT UINTN *HandleBufferLength, OUT EFI_HII_HANDLE *Handle)

This function returns a list of the package handles of the specified type that are currently active in the database.

The pseudo-type EFI_HII_PACKAGE_TYPE_ALL will cause all package handles to be listed.

Parameters:
ThisA pointer to the EFI_HII_DATABASE_PROTOCOL instance.
PackageTypeSpecifies the package type of the packages to list or EFI_HII_PACKAGE_TYPE_ALL for all packages to be listed.
PackageGuidIf PackageType is EFI_HII_PACKAGE_TYPE_GUID, then this is the pointer to the GUID which must match the Guid field of EFI_HII_PACKAGE_GUID_HEADER. Otherwise, it must be NULL.
HandleBufferLengthOn input, a pointer to the length of the handle buffer. On output, the length of the handle buffer that is required for the handles found.
HandleAn array of EFI_HII_HANDLE instances returned.
Return values:
EFI_SUCCESSThe matching handles are outputted successfully. HandleBufferLength is updated with the actual length.
EFI_BUFFER_TOO_SMALLThe HandleBufferLength parameter indicates that Handle is too small to support the number of handles. HandleBufferLength is updated with a value that will enable the data to fit.
EFI_NOT_FOUNDNo matching handle could be found in database.
EFI_INVALID_PARAMETERHandleBufferLength was NULL.
EFI_INVALID_PARAMETERThe value referenced by HandleBufferLength was not zero and Handle was NULL.
EFI_INVALID_PARAMETERPackageType is not a EFI_HII_PACKAGE_TYPE_GUID but PackageGuid is not NULL, PackageType is a EFI_HII_ PACKAGE_TYPE_GUID but PackageGuid is NULL.

Definition at line 237 of file HiiDatabase.h.

This function will export one or all package lists in the database to a buffer.

For each package list exported, this function will call functions registered with EXPORT_PACK and then copy the package list to the buffer. The registered functions may call EFI_HII_DATABASE_PROTOCOL.UpdatePackageList() to modify the package list before it is copied to the buffer. If the specified BufferSize is too small, then the status EFI_OUT_OF_RESOURCES will be returned and the actual package size will be returned in BufferSize.

Parameters:
ThisA pointer to the EFI_HII_DATABASE_PROTOCOL instance.
HandleAn EFI_HII_HANDLE that corresponds to the desired package list in the HII database to export or NULL to indicate all package lists should be exported.
BufferSizeOn input, a pointer to the length of the buffer. On output, the length of the buffer that is required for the exported data.
BufferA pointer to a buffer that will contain the results of the export function.
Return values:
EFI_SUCCESSPackage exported.
EFI_OUT_OF_RESOURCESBufferSize is too small to hold the package.
EFI_NOT_FOUNDThe specified Handle could not be found in the current database.
EFI_INVALID_PARAMETERBufferSize was NULL.
EFI_INVALID_PARAMETERThe value referenced by BufferSize was not zero and Buffer was NULL.

Definition at line 288 of file HiiDatabase.h.

This function registers a function which will be called when specified actions related to packages of the specified type occur in the HII database.

By registering a function, other HII-related drivers are notified when specific package types are added, removed or updated in the HII database. Each driver or application which registers a notification should use EFI_HII_DATABASE_PROTOCOL.UnregisterPackageNotify() before exiting.

Parameters:
ThisA pointer to the EFI_HII_DATABASE_PROTOCOL instance.
PackageTypeThe package type. See EFI_HII_PACKAGE_TYPE_x in EFI_HII_PACKAGE_HEADER.
PackageGuidIf PackageType is EFI_HII_PACKAGE_TYPE_GUID, then this is the pointer to the GUID which must match the Guid field of EFI_HII_PACKAGE_GUID_HEADER. Otherwise, it must be NULL.
PackageNotifyFnPoints to the function to be called when the event specified by NotificationType occurs. See EFI_HII_DATABASE_NOTIFY.
NotifyTypeDescribes the types of notification which this function will be receiving. See EFI_HII_DATABASE_NOTIFY_TYPE for a list of types.
NotifyHandlePoints to the unique handle assigned to the registered notification. Can be used in EFI_HII_DATABASE_PROTOCOL.UnregisterPack to stop notifications.
Return values:
EFI_SUCCESSNotification registered successfully.
EFI_OUT_OF_RESOURCESUnable to allocate necessary data structures.
EFI_INVALID_PARAMETERPackageGuid is not NULL when PackageType is not EFI_HII_PACKAGE_TYPE_GUID.

Definition at line 349 of file HiiDatabase.h.

Removes the specified HII database package-related notification.

Parameters:
ThisA pointer to the EFI_HII_DATABASE_PROTOCOL instance.
NotificationHandleThe handle of the notification function being unregistered.
Return values:
EFI_SUCCESSSuccesssfully unregistered the notification.
EFI_NOT_FOUNDThe incoming notification handle does not exist in the current hii database.

Definition at line 376 of file HiiDatabase.h.

typedef EFI_STATUS(EFIAPI * EFI_HII_FIND_KEYBOARD_LAYOUTS)(IN CONST EFI_HII_DATABASE_PROTOCOL *This, IN OUT UINT16 *KeyGuidBufferLength, OUT EFI_GUID *KeyGuidBuffer)

This routine retrieves an array of GUID values for each keyboard layout that was previously registered in the system.

Parameters:
ThisA pointer to the EFI_HII_PROTOCOL instance.
KeyGuidBufferLengthOn input, a pointer to the length of the keyboard GUID buffer. On output, the length of the handle buffer that is required for the handles found.
KeyGuidBufferAn array of keyboard layout GUID instances returned.
Return values:
EFI_SUCCESSKeyGuidBuffer was updated successfully.
EFI_BUFFER_TOO_SMALLThe KeyGuidBufferLength parameter indicates that KeyGuidBuffer is too small to support the number of GUIDs. KeyGuidBufferLength is updated with a value that will enable the data to fit.
EFI_INVALID_PARAMETERThe KeyGuidBufferLength is NULL.
EFI_INVALID_PARAMETERThe value referenced by KeyGuidBufferLength is not zero and KeyGuidBuffer is NULL.
EFI_NOT_FOUNDThere was no keyboard layout.

Definition at line 416 of file HiiDatabase.h.

This routine retrieves the requested keyboard layout.

The layout is a physical description of the keys on a keyboard, and the character(s) that are associated with a particular set of key strokes.

Parameters:
ThisA pointer to the EFI_HII_PROTOCOL instance.
KeyGuidA pointer to the unique ID associated with a given keyboard layout. If KeyGuid is NULL then the current layout will be retrieved.
KeyboardLayoutLengthOn input, a pointer to the length of the KeyboardLayout buffer. On output, the length of the data placed into KeyboardLayout.
KeyboardLayoutA pointer to a buffer containing the retrieved keyboard layout.
Return values:
EFI_SUCCESSThe keyboard layout was retrieved successfully.
EFI_NOT_FOUNDThe requested keyboard layout was not found.

Definition at line 451 of file HiiDatabase.h.

This routine sets the default keyboard layout to the one referenced by KeyGuid.

When this routine is called, an event will be signaled of the EFI_HII_SET_KEYBOARD_LAYOUT_EVENT_GUID group type. This is so that agents which are sensitive to the current keyboard layout being changed can be notified of this change.

Parameters:
ThisA pointer to the EFI_HII_PROTOCOL instance.
KeyGuidA pointer to the unique ID associated with a given keyboard layout.
Return values:
EFI_SUCCESSThe current keyboard layout was successfully set.
EFI_NOT_FOUNDThe referenced keyboard layout was not found, so action was taken.

Definition at line 480 of file HiiDatabase.h.

Return the EFI handle associated with a package list.

Parameters:
ThisA pointer to the EFI_HII_PROTOCOL instance.
PackageListHandleAn EFI_HII_HANDLE that corresponds to the desired package list in the HIIdatabase.
DriverHandleOn return, contains the EFI_HANDLE which was registered with the package list in NewPackageList().
Return values:
EFI_SUCCESSThe DriverHandle was returned successfully.
EFI_INVALID_PARAMETERThe PackageListHandle was not valid.

Definition at line 506 of file HiiDatabase.h.


Function Documentation

FILE_LICENCE ( BSD3  )

Variable Documentation