/** @file\r
\r
- The file provides services to forward results to PCOL-based\r
- handler if EFI HII results processing protocol invokes this\r
- protocol.\r
+ The EFI HII results processing protocol invokes this type of protocol \r
+ when it needs to forward results to a driver's configuration handler. \r
+ This protocol is published by drivers providing and requesting \r
+ configuration data from HII. It may only be invoked by HII.\r
\r
- Copyright (c) 2006 - 2007, Intel Corporation\r
- All rights reserved. This program and the accompanying materials \r
- are licensed and made available under the terms and conditions of the BSD License \r
- which accompanies this distribution. The full text of the license may be found at \r
- http://opensource.org/licenses/bsd-license.php \r
-\r
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
+Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials are licensed and made available under \r
+the terms and conditions of the BSD License that accompanies this distribution. \r
+The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php. \r
+ \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
\r
**/\r
\r
#ifndef __EFI_HII_CONFIG_ACCESS_H__\r
#define __EFI_HII_CONFIG_ACCESS_H__\r
\r
-#error "UEFI 2.1 HII is not fully implemented for now, Please don't include this file now."\r
+#include <Protocol/FormBrowser2.h>\r
\r
#define EFI_HII_CONFIG_ACCESS_PROTOCOL_GUID \\r
{ 0x330d4706, 0xf2a0, 0x4e4f, { 0xa3, 0x69, 0xb6, 0x6f, 0xa8, 0xd5, 0x43, 0x85 } }\r
\r
typedef struct _EFI_HII_CONFIG_ACCESS_PROTOCOL EFI_HII_CONFIG_ACCESS_PROTOCOL;\r
\r
+typedef UINTN EFI_BROWSER_ACTION;\r
+\r
+#define EFI_BROWSER_ACTION_CHANGING 0\r
+#define EFI_BROWSER_ACTION_CHANGED 1\r
+#define EFI_BROWSER_ACTION_RETRIEVE 2\r
+#define EFI_BROWSER_ACTION_FORM_OPEN 3\r
+#define EFI_BROWSER_ACTION_FORM_CLOSE 4\r
+#define EFI_BROWSER_ACTION_DEFAULT_STANDARD 0x1000\r
+#define EFI_BROWSER_ACTION_DEFAULT_MANUFACTURING 0x1001\r
+#define EFI_BROWSER_ACTION_DEFAULT_SAFE 0x1002\r
+#define EFI_BROWSER_ACTION_DEFAULT_PLATFORM 0x2000\r
+#define EFI_BROWSER_ACTION_DEFAULT_HARDWARE 0x3000\r
+#define EFI_BROWSER_ACTION_DEFAULT_FIRMWARE 0x4000\r
+\r
/**\r
\r
This function allows the caller to request the current\r
converted from Hex UNICODE to binary) is a reference to a\r
string in the associated string pack.\r
\r
- @param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.\r
-\r
- @param Request A null-terminated Unicode string in\r
- <ConfigRequest> format. Note that this\r
- includes the routing information as well as\r
- the configurable name / value pairs. It is\r
- invalid for this string to be in\r
- <MultiConfigRequest> format.\r
+ @param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.\r
+\r
+ @param Request A null-terminated Unicode string in\r
+ <ConfigRequest> format. Note that this\r
+ includes the routing information as well as\r
+ the configurable name / value pairs. It is\r
+ invalid for this string to be in\r
+ <MultiConfigRequest> format. \r
+ If a NULL is passed in for the Request field, \r
+ all of the settings being abstracted by this function \r
+ will be returned in the Results field. In addition, \r
+ if a ConfigHdr is passed in with no request elements, \r
+ all of the settings being abstracted for that particular \r
+ ConfigHdr reference will be returned in the Results Field.\r
\r
@param Progress On return, points to a character in the\r
Request string. Points to the string's null\r
failing name / value pair (or the beginning\r
of the string if the failure is in the first\r
name / value pair) if the request was not\r
- successful\r
-\r
- @param Results A null-terminated Unicode string in\r
- <ConfigAltResp> format which has all values\r
- filled in for the names in the Request string.\r
- String to be allocated by the called function.\r
-\r
- @retval EFI_SUCCESS The Results string is filled with the\r
- values corresponding to all requested\r
- names.\r
-\r
- @retval EFI_OUT_OF_MEMORY Not enough memory to store the\r
- parts of the results that must be\r
- stored awaiting possible future\r
- protocols.\r
-\r
- @retval EFI_INVALID_PARAMETER For example, passing in a NULL\r
- for the Request parameter\r
- would result in this type of\r
- error. In this case, the\r
- Progress parameter would be\r
- set to NULL. \r
-\r
- @retval EFI_NOT_FOUND Routing data doesn't match any\r
- known driver. Progress set to the\r
- first character in the routing header.\r
- Note: There is no requirement that the\r
- driver validate the routing data. It\r
- must skip the <ConfigHdr> in order to\r
- process the names.\r
+ successful.\r
+\r
+ @param Results A null-terminated Unicode string in\r
+ <MultiConfigAltResp> format which has all values\r
+ filled in for the names in the Request string.\r
+ String to be allocated by the called function.\r
+\r
+ @retval EFI_SUCCESS The Results string is filled with the\r
+ values corresponding to all requested\r
+ names.\r
+\r
+ @retval EFI_OUT_OF_RESOURCES Not enough memory to store the\r
+ parts of the results that must be\r
+ stored awaiting possible future\r
+ protocols.\r
+\r
+ @retval EFI_NOT_FOUND A configuration element matching \r
+ the routing data is not found.\r
+ Progress set to the first character\r
+ in the routing header.\r
\r
@retval EFI_INVALID_PARAMETER Illegal syntax. Progress set\r
- to most recent & before the\r
+ to most recent "&" before the\r
error or the beginning of the\r
string.\r
\r
**/\r
typedef\r
EFI_STATUS\r
-(EFIAPI * EFI_HII_ACCESS_EXTRACT_CONFIG ) (\r
+(EFIAPI * EFI_HII_ACCESS_EXTRACT_CONFIG)(\r
IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This,\r
IN CONST EFI_STRING Request,\r
OUT EFI_STRING *Progress,\r
driver followed by name / value configuration pairs. The driver\r
must apply those pairs to its configurable storage. If the\r
driver's configuration is stored in a linear block of data\r
- and the driver????s name / value pairs are in <BlockConfig>\r
+ and the driver's name / value pairs are in <BlockConfig>\r
format, it may use the ConfigToBlock helper function (above) to\r
simplify the job.\r
\r
- @param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.\r
+ @param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.\r
\r
@param Configuration A null-terminated Unicode string in\r
- <ConfigString> format. Progress a\r
- pointer to a string filled in with the\r
+ <ConfigString> format. \r
+ \r
+ @param Progress A pointer to a string filled in with the\r
offset of the most recent '&' before the\r
first failing name / value pair (or the\r
beginn ing of the string if the failure\r
the terminating NULL if all was\r
successful.\r
\r
- @retval EFI_SUCCESS The results have been distributed or are\r
- awaiting distribution.\r
+ @retval EFI_SUCCESS The results have been distributed or are\r
+ awaiting distribution.\r
\r
- @retval EFI_OUT_OF_MEMORY Not enough memory to store the\r
- parts of the results that must be\r
- stored awaiting possible future\r
- protocols.\r
+ @retval EFI_OUT_OF_RESOURCES Not enough memory to store the\r
+ parts of the results that must be\r
+ stored awaiting possible future\r
+ protocols.\r
\r
@retval EFI_INVALID_PARAMETERS Passing in a NULL for the\r
Results parameter would result\r
in this type of error.\r
\r
- @retval EFI_NOT_FOUND Target for the specified routing data\r
- was not found\r
+ @retval EFI_NOT_FOUND Target for the specified routing data\r
+ was not found\r
\r
**/\r
typedef\r
EFI_STATUS\r
-(EFIAPI * EFI_HII_ACCESS_ROUTE_CONFIG ) (\r
+(EFIAPI * EFI_HII_ACCESS_ROUTE_CONFIG)(\r
IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This,\r
IN CONST EFI_STRING Configuration,\r
OUT EFI_STRING *Progress\r
This data consists of a unique key that is used to identify\r
which data is either being passed back or being asked for.\r
\r
- @param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.\r
-\r
- @param KeyValue A unique value which is sent to the original\r
- exporting driver so that it can identify the\r
- type of data to expect. The format of the\r
- data tends to vary based on the opcode that\r
- generated the callback.\r
-\r
- @param Data A pointer to the data being sent to the original\r
- exporting driver. The format of the data should\r
- be the same as that of the question invoking the\r
- callback and will be known to the recipient.\r
-\r
- @retval EFI_SUCCESS The firmware has successfully stored the\r
- variable and its data as defined by the\r
- Attributes.\r
-\r
- @retval EFI_INVALID_PARAMETER An invalid combination of\r
- Attributes bits was supplied,\r
- or the DataSize exceeds the\r
- maximum allowed.\r
-\r
- @retval EFI_OUT_OF_RESOURCES Not enough storage is available\r
- to hold the variable and its\r
- data.\r
-\r
- @retval EFI_DEVICE_ERROR The variable could not be saved due\r
- to a hardware failure.\r
-\r
-\r
+ @param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.\r
+ @param Action Specifies the type of action taken by the browser.\r
+ @param QuestionId A unique value which is sent to the original\r
+ exporting driver so that it can identify the type\r
+ of data to expect. The format of the data tends to \r
+ vary based on the opcode that generated the callback.\r
+ @param Type The type of value for the question.\r
+ @param Value A pointer to the data being sent to the original\r
+ exporting driver.\r
+ @param ActionRequest On return, points to the action requested by the\r
+ callback function.\r
+\r
+ @retval EFI_SUCCESS The callback successfully handled the action.\r
+ @retval EFI_OUT_OF_RESOURCES Not enough storage is available to hold the\r
+ variable and its data.\r
+ @retval EFI_DEVICE_ERROR The variable could not be saved.\r
+ @retval EFI_UNSUPPORTED The specified Action is not supported by the\r
+ callback.\r
**/\r
typedef\r
EFI_STATUS\r
-(EFIAPI *EFI_HII_ACCESS_FORM_CALLBACK) (\r
- IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This,\r
- IN EFI_BROWSER_ACTION Action,\r
- IN EFI_QUESTION_ID QuestionId,\r
- IN UINT8 Type,\r
- IN EFI_IFR_TYPE_VALUE *Value,\r
- OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest\r
+(EFIAPI *EFI_HII_ACCESS_FORM_CALLBACK)(\r
+ IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This,\r
+ IN EFI_BROWSER_ACTION Action,\r
+ IN EFI_QUESTION_ID QuestionId,\r
+ IN UINT8 Type,\r
+ IN OUT EFI_IFR_TYPE_VALUE *Value,\r
+ OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest\r
)\r
;\r
-/**\r
- \r
- This protocol provides a callable interface between the HII and\r
- drivers. Only drivers which provide IFR data to HII are required\r
- to publish this protocol.\r
-\r
- @param ExtractConfig This function breaks apart the UNICODE\r
- request strings routing them to the\r
- appropriate drivers. This function is\r
- analogous to the similarly named\r
- function in the HII Routing Protocol.\r
- \r
- @param RouteConfig This function breaks apart the UNICODE\r
- results strings and returns configuration\r
- information as specified by the request.\r
\r
- @param Callback This function is called from the\r
- configuration browser to communicate certain\r
- activities that were initiated by a user.\r
-\r
-\r
-**/\r
+///\r
+/// This protocol provides a callable interface between the HII and\r
+/// drivers. Only drivers which provide IFR data to HII are required\r
+/// to publish this protocol.\r
+///\r
struct _EFI_HII_CONFIG_ACCESS_PROTOCOL {\r
EFI_HII_ACCESS_EXTRACT_CONFIG ExtractConfig;\r
EFI_HII_ACCESS_ROUTE_CONFIG RouteConfig;\r
\r
#endif\r
\r
+\r