2007-06-19 12:12:02 +02:00
|
|
|
/** @file
|
2008-07-25 12:37:15 +02:00
|
|
|
This protocol is defined in UEFI spec.
|
|
|
|
|
|
|
|
The EFI_FORM_BROWSER2_PROTOCOL is the interface to call for drivers to
|
|
|
|
leverage the EFI configuration driver interface.
|
2007-06-19 12:12:02 +02:00
|
|
|
|
2008-07-25 12:37:15 +02:00
|
|
|
Copyright (c) 2006 - 2008, Intel Corporation
|
2007-06-19 12:12:02 +02:00
|
|
|
All rights reserved. This program and the accompanying materials
|
|
|
|
are licensed and made available under the terms and conditions of the BSD License
|
|
|
|
which 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.
|
|
|
|
|
|
|
|
**/
|
|
|
|
|
2008-07-25 12:37:15 +02:00
|
|
|
#ifndef __EFI_FORM_BROWSER2_H__
|
|
|
|
#define __EFI_FORM_BROWSER2_H__
|
2007-06-19 12:12:02 +02:00
|
|
|
|
2007-12-10 08:28:15 +01:00
|
|
|
#define EFI_FORM_BROWSER2_PROTOCOL_GUID \
|
2008-01-21 15:41:31 +01:00
|
|
|
{0xb9d4c360, 0xbcfb, 0x4f9b, {0x92, 0x98, 0x53, 0xc1, 0x36, 0x98, 0x22, 0x58 }}
|
2007-06-19 12:12:02 +02:00
|
|
|
|
|
|
|
|
2007-12-10 08:28:15 +01:00
|
|
|
typedef struct _EFI_FORM_BROWSER2_PROTOCOL EFI_FORM_BROWSER2_PROTOCOL;
|
2007-06-19 12:12:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
@param LeftColumn Value that designates the text column
|
2009-06-11 03:46:51 +02:00
|
|
|
where the browser window will begin from
|
|
|
|
the left-hand side of the screen
|
2008-07-25 12:37:15 +02:00
|
|
|
|
|
|
|
@param RightColumn Value that designates the text
|
2009-06-11 03:46:51 +02:00
|
|
|
column where the browser window will end
|
|
|
|
on the right-hand side of the screen.
|
2007-06-19 12:12:02 +02:00
|
|
|
|
2008-07-25 12:37:15 +02:00
|
|
|
@param TopRow Value that designates the text row from the
|
|
|
|
top of the screen where the browser window
|
|
|
|
will start.
|
2007-06-19 12:12:02 +02:00
|
|
|
|
2008-07-25 12:37:15 +02:00
|
|
|
@param BottomRow Value that designates the text row from the
|
|
|
|
bottom of the screen where the browser
|
|
|
|
window will end.
|
2007-06-19 12:12:02 +02:00
|
|
|
**/
|
|
|
|
typedef struct {
|
|
|
|
UINTN LeftColumn;
|
|
|
|
UINTN RightColumn;
|
|
|
|
UINTN TopRow;
|
|
|
|
UINTN BottomRow;
|
|
|
|
} EFI_SCREEN_DESCRIPTOR;
|
|
|
|
|
2007-12-10 08:28:15 +01:00
|
|
|
typedef UINTN EFI_BROWSER_ACTION_REQUEST;
|
|
|
|
|
2008-01-21 15:41:31 +01:00
|
|
|
#define EFI_BROWSER_ACTION_REQUEST_NONE 0
|
|
|
|
#define EFI_BROWSER_ACTION_REQUEST_RESET 1
|
|
|
|
#define EFI_BROWSER_ACTION_REQUEST_SUBMIT 2
|
|
|
|
#define EFI_BROWSER_ACTION_REQUEST_EXIT 3
|
2007-12-10 08:28:15 +01:00
|
|
|
|
|
|
|
|
2007-06-19 12:12:02 +02:00
|
|
|
/**
|
2008-10-10 06:50:16 +02:00
|
|
|
Initialize the browser to display the specified configuration forms.
|
|
|
|
|
2008-07-25 12:37:15 +02:00
|
|
|
This function is the primary interface to the internal forms-based browser.
|
|
|
|
The forms browser will display forms associated with the specified Handles.
|
|
|
|
The browser will select all forms in packages which have the specified Type
|
|
|
|
and (for EFI_HII_PACKAGE_TYPE_GUID) the specified PackageGuid.
|
|
|
|
|
|
|
|
@param This A pointer to the EFI_FORM_BROWSER2_PROTOCOL instance
|
|
|
|
|
|
|
|
@param Handles A pointer to an array of Handles. This value should correspond
|
2008-10-10 06:50:16 +02:00
|
|
|
to the value of the HII form package that is required to be displayed.
|
2008-07-25 12:37:15 +02:00
|
|
|
|
|
|
|
@param HandleCount The number of Handles specified in Handle.
|
|
|
|
|
|
|
|
@param FormSetGuid This field points to the EFI_GUID which must match the Guid
|
|
|
|
field in the EFI_IFR_FORM_SET op-code for the specified
|
|
|
|
forms-based package. If FormSetGuid is NULL, then this
|
|
|
|
function will display the first found forms package.
|
|
|
|
|
|
|
|
@param FormId This field specifies which EFI_IFR_FORM to render as the first
|
|
|
|
displayable page. If this field has a value of 0x0000, then
|
|
|
|
the forms browser will render the specified forms in their encoded order.
|
|
|
|
|
|
|
|
@param ScreenDimensions Points to recommended form dimensions, including any non-content area, in
|
|
|
|
characters.
|
|
|
|
|
|
|
|
@param ActionRequest Points to the action recommended by the form.
|
|
|
|
|
|
|
|
@retval EFI_SUCCESS The function completed successfully
|
2007-06-19 12:12:02 +02:00
|
|
|
|
2008-07-25 12:37:15 +02:00
|
|
|
@retval EFI_NOT_FOUND The variable was not found.
|
2007-06-19 12:12:02 +02:00
|
|
|
|
2008-07-25 12:37:15 +02:00
|
|
|
@retval EFI_INVALID_PARAMETER One of the parameters has an
|
|
|
|
invalid value.
|
2007-06-19 12:12:02 +02:00
|
|
|
**/
|
|
|
|
typedef
|
|
|
|
EFI_STATUS
|
2008-06-24 09:14:18 +02:00
|
|
|
(EFIAPI *EFI_SEND_FORM2)(
|
2008-01-21 15:41:31 +01:00
|
|
|
IN CONST EFI_FORM_BROWSER2_PROTOCOL *This,
|
|
|
|
IN EFI_HII_HANDLE *Handle,
|
|
|
|
IN UINTN HandleCount,
|
|
|
|
IN EFI_GUID *FormSetGuid, OPTIONAL
|
|
|
|
IN EFI_FORM_ID FormId, OPTIONAL
|
2007-12-10 08:28:15 +01:00
|
|
|
IN CONST EFI_SCREEN_DESCRIPTOR *ScreenDimensions, OPTIONAL
|
|
|
|
OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest OPTIONAL
|
2007-06-19 12:12:02 +02:00
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2008-10-10 06:50:16 +02:00
|
|
|
This function is called by a callback handler to retrieve uncommitted state data from the browser.
|
|
|
|
|
2007-06-19 12:12:02 +02:00
|
|
|
This routine is called by a routine which was called by the
|
|
|
|
browser. This routine called this service in the browser to
|
|
|
|
retrieve or set certain uncommitted state information.
|
|
|
|
|
2008-07-25 12:37:15 +02:00
|
|
|
@param This A pointer to the EFI_FORM_BROWSER2_PROTOCOL instance.
|
2007-06-19 12:12:02 +02:00
|
|
|
|
|
|
|
@param ResultsDataSize A pointer to the size of the buffer
|
2008-07-25 12:37:15 +02:00
|
|
|
associated with ResultsData. On input, the size in
|
|
|
|
bytes of ResultsData. On output, the size of data returned in ResultsData.
|
2007-06-19 12:12:02 +02:00
|
|
|
|
2008-07-25 12:37:15 +02:00
|
|
|
@param ResultsData A string returned from an IFR browser or
|
|
|
|
equivalent. The results string will have
|
|
|
|
no routing information in them.
|
2007-06-19 12:12:02 +02:00
|
|
|
|
|
|
|
@param RetrieveData A BOOLEAN field which allows an agent to
|
|
|
|
retrieve (if RetrieveData = TRUE) data
|
|
|
|
from the uncommitted browser state
|
|
|
|
information or set (if RetrieveData =
|
|
|
|
FALSE) data in the uncommitted browser
|
|
|
|
state information.
|
|
|
|
|
|
|
|
@param VariableGuid An optional field to indicate the target
|
|
|
|
variable GUID name to use.
|
|
|
|
|
|
|
|
@param VariableName An optional field to indicate the target
|
|
|
|
human-readable variable name.
|
|
|
|
|
2008-07-25 12:37:15 +02:00
|
|
|
@retval EFI_SUCCESS The results have been distributed or are
|
|
|
|
awaiting distribution.
|
2007-06-19 12:12:02 +02:00
|
|
|
|
|
|
|
@retval EFI_OUT_OF_RESOURCES The ResultsDataSize specified
|
|
|
|
was too small to contain the
|
|
|
|
results data.
|
|
|
|
|
|
|
|
**/
|
|
|
|
typedef
|
|
|
|
EFI_STATUS
|
2008-06-24 09:14:18 +02:00
|
|
|
(EFIAPI *EFI_BROWSER_CALLBACK2)(
|
2008-01-21 15:41:31 +01:00
|
|
|
IN CONST EFI_FORM_BROWSER2_PROTOCOL *This,
|
2007-06-19 12:12:02 +02:00
|
|
|
IN OUT UINTN *ResultsDataSize,
|
|
|
|
IN OUT EFI_STRING ResultsData,
|
|
|
|
IN CONST BOOLEAN RetrieveData,
|
|
|
|
IN CONST EFI_GUID *VariableGuid, OPTIONAL
|
|
|
|
IN CONST CHAR16 *VariableName OPTIONAL
|
|
|
|
);
|
|
|
|
|
2008-10-13 04:54:29 +02:00
|
|
|
///
|
|
|
|
/// This interface will allow the caller to direct the configuration
|
|
|
|
/// driver to use either the HII database or use the passed-in packet of data.
|
|
|
|
///
|
2007-12-10 08:28:15 +01:00
|
|
|
struct _EFI_FORM_BROWSER2_PROTOCOL {
|
|
|
|
EFI_SEND_FORM2 SendForm;
|
|
|
|
EFI_BROWSER_CALLBACK2 BrowserCallback;
|
2007-06-19 12:12:02 +02:00
|
|
|
} ;
|
|
|
|
|
2007-12-10 08:28:15 +01:00
|
|
|
extern EFI_GUID gEfiFormBrowser2ProtocolGuid;
|
2007-06-19 12:12:02 +02:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|