2007-06-19 12:12:02 +02:00
|
|
|
/** @file
|
|
|
|
|
2008-07-25 12:37:15 +02:00
|
|
|
The EFI HII results processing protocol invokes this type of protocol
|
|
|
|
when it needs to forward results to a driver's configuration handler.
|
|
|
|
This protocol is published by drivers providing and requesting
|
|
|
|
configuration data from HII. It may only be invoked by HII.
|
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.
|
|
|
|
|
|
|
|
**/
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef __EFI_HII_CONFIG_ACCESS_H__
|
|
|
|
#define __EFI_HII_CONFIG_ACCESS_H__
|
|
|
|
|
2008-01-21 15:41:31 +01:00
|
|
|
#include <Protocol/FormBrowser2.h>
|
2007-06-29 08:51:45 +02:00
|
|
|
|
2007-12-10 08:28:15 +01:00
|
|
|
#define EFI_HII_CONFIG_ACCESS_PROTOCOL_GUID \
|
2007-06-19 12:12:02 +02:00
|
|
|
{ 0x330d4706, 0xf2a0, 0x4e4f, { 0xa3, 0x69, 0xb6, 0x6f, 0xa8, 0xd5, 0x43, 0x85 } }
|
|
|
|
|
|
|
|
typedef struct _EFI_HII_CONFIG_ACCESS_PROTOCOL EFI_HII_CONFIG_ACCESS_PROTOCOL;
|
|
|
|
|
2008-01-21 15:41:31 +01:00
|
|
|
typedef UINTN EFI_BROWSER_ACTION;
|
|
|
|
|
|
|
|
#define EFI_BROWSER_ACTION_CHANGING 0
|
|
|
|
#define EFI_BROWSER_ACTION_CHANGED 1
|
|
|
|
|
2007-06-19 12:12:02 +02:00
|
|
|
/**
|
|
|
|
|
|
|
|
This function allows the caller to request the current
|
|
|
|
configuration for one or more named elements. The resulting
|
|
|
|
string is in <ConfigAltResp> format. Any and all alternative
|
|
|
|
configuration strings shall also be appended to the end of the
|
|
|
|
current configuration string. If they are, they must appear
|
|
|
|
after the current configuration. They must contain the same
|
|
|
|
routing (GUID, NAME, PATH) as the current configuration string.
|
|
|
|
They must have an additional description indicating the type of
|
|
|
|
alternative configuration the string represents,
|
|
|
|
"ALTCFG=<StringToken>". That <StringToken> (when
|
|
|
|
converted from Hex UNICODE to binary) is a reference to a
|
|
|
|
string in the associated string pack.
|
|
|
|
|
2008-07-25 12:37:15 +02:00
|
|
|
@param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
|
2007-06-19 12:12:02 +02:00
|
|
|
|
2008-07-25 12:37:15 +02:00
|
|
|
@param Request A null-terminated Unicode string in
|
|
|
|
<ConfigRequest> format. Note that this
|
|
|
|
includes the routing information as well as
|
|
|
|
the configurable name / value pairs. It is
|
|
|
|
invalid for this string to be in
|
|
|
|
<MultiConfigRequest> format.
|
2007-06-19 12:12:02 +02:00
|
|
|
|
|
|
|
@param Progress On return, points to a character in the
|
|
|
|
Request string. Points to the string's null
|
|
|
|
terminator if request was successful. Points
|
|
|
|
to the most recent "&" before the first
|
|
|
|
failing name / value pair (or the beginning
|
|
|
|
of the string if the failure is in the first
|
|
|
|
name / value pair) if the request was not
|
|
|
|
successful
|
|
|
|
|
2008-07-25 12:37:15 +02:00
|
|
|
@param Results A null-terminated Unicode string in
|
|
|
|
<ConfigAltResp> format which has all values
|
|
|
|
filled in for the names in the Request string.
|
|
|
|
String to be allocated by the called function.
|
2007-06-19 12:12:02 +02:00
|
|
|
|
2008-07-25 12:37:15 +02:00
|
|
|
@retval EFI_SUCCESS The Results string is filled with the
|
|
|
|
values corresponding to all requested
|
|
|
|
names.
|
2007-06-19 12:12:02 +02:00
|
|
|
|
2008-07-25 12:37:15 +02:00
|
|
|
@retval EFI_OUT_OF_MEMORY Not enough memory to store the
|
|
|
|
parts of the results that must be
|
|
|
|
stored awaiting possible future
|
|
|
|
protocols.
|
2007-06-19 12:12:02 +02:00
|
|
|
|
|
|
|
@retval EFI_INVALID_PARAMETER For example, passing in a NULL
|
|
|
|
for the Request parameter
|
|
|
|
would result in this type of
|
|
|
|
error. In this case, the
|
|
|
|
Progress parameter would be
|
|
|
|
set to NULL.
|
|
|
|
|
2008-07-25 12:37:15 +02:00
|
|
|
@retval EFI_NOT_FOUND Routing data doesn't match any
|
|
|
|
known driver. Progress set to the
|
|
|
|
first character in the routing header.
|
|
|
|
Note: There is no requirement that the
|
|
|
|
driver validate the routing data. It
|
|
|
|
must skip the <ConfigHdr> in order to
|
|
|
|
process the names.
|
2007-06-19 12:12:02 +02:00
|
|
|
|
|
|
|
@retval EFI_INVALID_PARAMETER Illegal syntax. Progress set
|
|
|
|
to most recent & before the
|
|
|
|
error or the beginning of the
|
|
|
|
string.
|
|
|
|
|
|
|
|
@retval EFI_INVALID_PARAMETER Unknown name. Progress points
|
|
|
|
to the & before the name in
|
|
|
|
question.
|
|
|
|
|
|
|
|
**/
|
|
|
|
typedef
|
|
|
|
EFI_STATUS
|
2008-06-24 09:14:18 +02:00
|
|
|
(EFIAPI * EFI_HII_ACCESS_EXTRACT_CONFIG)(
|
2007-06-19 12:12:02 +02:00
|
|
|
IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This,
|
|
|
|
IN CONST EFI_STRING Request,
|
|
|
|
OUT EFI_STRING *Progress,
|
|
|
|
OUT EFI_STRING *Results
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
This function applies changes in a driver's configuration.
|
|
|
|
Input is a Configuration, which has the routing data for this
|
|
|
|
driver followed by name / value configuration pairs. The driver
|
|
|
|
must apply those pairs to its configurable storage. If the
|
|
|
|
driver's configuration is stored in a linear block of data
|
|
|
|
and the driver????s name / value pairs are in <BlockConfig>
|
|
|
|
format, it may use the ConfigToBlock helper function (above) to
|
|
|
|
simplify the job.
|
|
|
|
|
2008-07-25 12:37:15 +02:00
|
|
|
@param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
|
2007-06-19 12:12:02 +02:00
|
|
|
|
|
|
|
@param Configuration A null-terminated Unicode string in
|
2008-07-25 12:37:15 +02:00
|
|
|
<ConfigString> format.
|
|
|
|
|
|
|
|
@param Progress A pointer to a string filled in with the
|
2007-06-19 12:12:02 +02:00
|
|
|
offset of the most recent '&' before the
|
|
|
|
first failing name / value pair (or the
|
|
|
|
beginn ing of the string if the failure
|
|
|
|
is in the first name / value pair) or
|
|
|
|
the terminating NULL if all was
|
|
|
|
successful.
|
|
|
|
|
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
|
|
|
|
2008-07-25 12:37:15 +02:00
|
|
|
@retval EFI_OUT_OF_MEMORY Not enough memory to store the
|
|
|
|
parts of the results that must be
|
|
|
|
stored awaiting possible future
|
|
|
|
protocols.
|
2007-06-19 12:12:02 +02:00
|
|
|
|
|
|
|
@retval EFI_INVALID_PARAMETERS Passing in a NULL for the
|
|
|
|
Results parameter would result
|
|
|
|
in this type of error.
|
|
|
|
|
2008-07-25 12:37:15 +02:00
|
|
|
@retval EFI_NOT_FOUND Target for the specified routing data
|
|
|
|
was not found
|
2007-06-19 12:12:02 +02:00
|
|
|
|
|
|
|
**/
|
|
|
|
typedef
|
|
|
|
EFI_STATUS
|
2008-06-24 09:14:18 +02:00
|
|
|
(EFIAPI * EFI_HII_ACCESS_ROUTE_CONFIG)(
|
2007-06-19 12:12:02 +02:00
|
|
|
IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This,
|
|
|
|
IN CONST EFI_STRING Configuration,
|
|
|
|
OUT EFI_STRING *Progress
|
|
|
|
);
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
This function is called to provide results data to the driver.
|
|
|
|
This data consists of a unique key that is used to identify
|
|
|
|
which data is either being passed back or being asked for.
|
|
|
|
|
2008-07-25 12:37:15 +02:00
|
|
|
@param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
|
|
|
|
@param Action Specifies the type of action taken by the browser.
|
|
|
|
@param QuestionId A unique value which is sent to the original
|
|
|
|
exporting driver so that it can identify the type
|
|
|
|
of data to expect. The format of the data tends to
|
|
|
|
vary based on the opcode that enerated the callback.
|
|
|
|
@param Type The type of value for the question.
|
|
|
|
@param Value A pointer to the data being sent to the original
|
|
|
|
exporting driver.
|
|
|
|
@param ActionRequest On return, points to the action requested by the
|
|
|
|
callback function.
|
|
|
|
|
|
|
|
@retval EFI_SUCCESS The callback successfully handled the action.
|
|
|
|
@retval EFI_OUT_OF_RESOURCES Not enough storage is available to hold the
|
|
|
|
variable and its data.
|
|
|
|
@retval EFI_DEVICE_ERROR The variable could not be saved.
|
|
|
|
@retval EFI_UNSUPPORTED The specified Action is not supported by the
|
|
|
|
callback.
|
2007-06-19 12:12:02 +02:00
|
|
|
**/
|
|
|
|
typedef
|
|
|
|
EFI_STATUS
|
2008-06-24 09:14:18 +02:00
|
|
|
(EFIAPI *EFI_HII_ACCESS_FORM_CALLBACK)(
|
2007-12-10 08:28:15 +01:00
|
|
|
IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This,
|
|
|
|
IN EFI_BROWSER_ACTION Action,
|
|
|
|
IN EFI_QUESTION_ID QuestionId,
|
|
|
|
IN UINT8 Type,
|
|
|
|
IN EFI_IFR_TYPE_VALUE *Value,
|
|
|
|
OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest
|
|
|
|
)
|
|
|
|
;
|
2008-10-09 20:33:40 +02:00
|
|
|
|
2008-10-13 04:54:29 +02:00
|
|
|
///
|
|
|
|
/// This protocol provides a callable interface between the HII and
|
|
|
|
/// drivers. Only drivers which provide IFR data to HII are required
|
|
|
|
/// to publish this protocol.
|
|
|
|
///
|
2007-06-19 12:12:02 +02:00
|
|
|
struct _EFI_HII_CONFIG_ACCESS_PROTOCOL {
|
2007-12-10 08:28:15 +01:00
|
|
|
EFI_HII_ACCESS_EXTRACT_CONFIG ExtractConfig;
|
|
|
|
EFI_HII_ACCESS_ROUTE_CONFIG RouteConfig;
|
|
|
|
EFI_HII_ACCESS_FORM_CALLBACK Callback;
|
2007-06-19 12:12:02 +02:00
|
|
|
} ;
|
|
|
|
|
|
|
|
extern EFI_GUID gEfiHiiConfigAccessProtocolGuid;
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2008-01-21 15:41:31 +01:00
|
|
|
|