3 Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
4 This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
18 EFI_HII_CONFIG_ACCESS_PROTOCOL as defined in UEFI 2.1 spec.
22 #ifndef _HII_CONFIG_ACCESS_H_
23 #define _HII_CONFIG_ACCESS_H_
25 #include EFI_PROTOCOL_DEFINITION (FormBrowser2)
27 #define EFI_HII_CONFIG_ACCESS_PROTOCOL_GUID \
29 0x330d4706, 0xf2a0, 0x4e4f, {0xa3, 0x69, 0xb6, 0x6f, 0xa8, 0xd5, 0x43, 0x85} \
33 // Forward reference for pure ANSI compatability
35 EFI_FORWARD_DECLARATION (EFI_HII_CONFIG_ACCESS_PROTOCOL
);
37 typedef UINTN EFI_BROWSER_ACTION
;
39 #define EFI_BROWSER_ACTION_CHANGING 0
40 #define EFI_BROWSER_ACTION_CHANGED 1
45 (EFIAPI
*EFI_HII_ACCESS_EXTRACT_CONFIG
) (
46 IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL
*This
,
47 IN CONST EFI_STRING Request
,
48 OUT EFI_STRING
*Progress
,
49 OUT EFI_STRING
*Results
54 This function allows a caller to extract the current configuration for one
55 or more named elements from the target driver.
58 This - Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
59 Request - A null-terminated Unicode string in <ConfigRequest> format.
60 Progress - On return, points to a character in the Request string.
61 Points to the string's null terminator if request was successful.
62 Points to the most recent '&' before the first failing name/value
63 pair (or the beginning of the string if the failure is in the
64 first name/value pair) if the request was not successful.
65 Results - A null-terminated Unicode string in <ConfigAltResp> format which
66 has all values filled in for the names in the Request string.
67 String to be allocated by the called function.
70 EFI_SUCCESS - The Results is filled with the requested values.
71 EFI_OUT_OF_RESOURCES - Not enough memory to store the results.
72 EFI_INVALID_PARAMETER - Request is NULL, illegal syntax, or unknown name.
73 EFI_NOT_FOUND - Routing data doesn't match any storage in this driver.
80 (EFIAPI
*EFI_HII_ACCESS_ROUTE_CONFIG
) (
81 IN EFI_HII_CONFIG_ACCESS_PROTOCOL
*This
,
82 IN CONST EFI_STRING Configuration
,
83 OUT EFI_STRING
*Progress
88 This function processes the results of changes in configuration.
91 This - Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
92 Configuration - A null-terminated Unicode string in <ConfigResp> format.
93 Progress - A pointer to a string filled in with the offset of the most
94 recent '&' before the first failing name/value pair (or the
95 beginning of the string if the failure is in the first
96 name/value pair) or the terminating NULL if all was successful.
99 EFI_SUCCESS - The Results is processed successfully.
100 EFI_INVALID_PARAMETER - Configuration is NULL.
101 EFI_NOT_FOUND - Routing data doesn't match any storage in this driver.
108 (EFIAPI
*EFI_HII_ACCESS_FORM_CALLBACK
) (
109 IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL
*This
,
110 IN EFI_BROWSER_ACTION Action
,
111 IN EFI_QUESTION_ID QuestionId
,
113 IN EFI_IFR_TYPE_VALUE
*Value
,
114 OUT EFI_BROWSER_ACTION_REQUEST
*ActionRequest
119 This function processes the results of changes in configuration.
122 This - Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
123 Action - Specifies the type of action taken by the browser.
124 QuestionId - A unique value which is sent to the original exporting driver
125 so that it can identify the type of data to expect.
126 Type - The type of value for the question.
127 Value - A pointer to the data being sent to the original exporting driver.
128 ActionRequest - On return, points to the action requested by the callback function.
131 EFI_SUCCESS - The callback successfully handled the action.
132 EFI_OUT_OF_RESOURCES - Not enough storage is available to hold the variable and its data.
133 EFI_DEVICE_ERROR - The variable could not be saved.
134 EFI_UNSUPPORTED - The specified Action is not supported by the callback.
139 struct _EFI_HII_CONFIG_ACCESS_PROTOCOL
{
140 EFI_HII_ACCESS_EXTRACT_CONFIG ExtractConfig
;
141 EFI_HII_ACCESS_ROUTE_CONFIG RouteConfig
;
142 EFI_HII_ACCESS_FORM_CALLBACK Callback
;
145 extern EFI_GUID gEfiHiiConfigAccessProtocolGuid
;