]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Protocol/FormBrowser2.h
MdePkg: Clean up source files
[mirror_edk2.git] / MdePkg / Include / Protocol / FormBrowser2.h
CommitLineData
d1f95000 1/** @file\r
4ca9b6c4 2 This protocol is defined in UEFI spec.\r
9095d37b
LG
3\r
4 The EFI_FORM_BROWSER2_PROTOCOL is the interface to call for drivers to\r
4ca9b6c4 5 leverage the EFI configuration driver interface.\r
9095d37b
LG
6\r
7Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
8This program and the accompanying materials are licensed and made available under\r
9the terms and conditions of the BSD License that accompanies this distribution.\r
af2dc6a7 10The full text of the license may be found at\r
9095d37b
LG
11http://opensource.org/licenses/bsd-license.php.\r
12\r
13THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
14WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
d1f95000 15\r
d1f95000 16**/\r
17\r
4ca9b6c4
LG
18#ifndef __EFI_FORM_BROWSER2_H__\r
19#define __EFI_FORM_BROWSER2_H__\r
d1f95000 20\r
0cd118f7
LG
21#include <Guid/HiiPlatformSetupFormset.h>\r
22\r
5a1fc221 23#define EFI_FORM_BROWSER2_PROTOCOL_GUID \\r
7d582d6b 24 {0xb9d4c360, 0xbcfb, 0x4f9b, {0x92, 0x98, 0x53, 0xc1, 0x36, 0x98, 0x22, 0x58 }}\r
d1f95000 25\r
26\r
5a1fc221 27typedef struct _EFI_FORM_BROWSER2_PROTOCOL EFI_FORM_BROWSER2_PROTOCOL;\r
d1f95000 28\r
29\r
30\r
31/**\r
9095d37b 32\r
af2dc6a7 33 @param LeftColumn The value that designates the text column\r
f754f721 34 where the browser window will begin from\r
35 the left-hand side of the screen\r
9095d37b 36\r
af2dc6a7 37 @param RightColumn The value that designates the text\r
f754f721 38 column where the browser window will end\r
39 on the right-hand side of the screen.\r
d1f95000 40\r
af2dc6a7 41 @param TopRow The value that designates the text row from the\r
4ca9b6c4
LG
42 top of the screen where the browser window\r
43 will start.\r
d1f95000 44\r
af2dc6a7 45 @param BottomRow The value that designates the text row from the\r
4ca9b6c4 46 bottom of the screen where the browser\r
9095d37b 47 window will end.\r
d1f95000 48**/\r
49typedef struct {\r
50 UINTN LeftColumn;\r
51 UINTN RightColumn;\r
52 UINTN TopRow;\r
53 UINTN BottomRow;\r
54} EFI_SCREEN_DESCRIPTOR;\r
55\r
5a1fc221 56typedef UINTN EFI_BROWSER_ACTION_REQUEST;\r
57\r
7d582d6b 58#define EFI_BROWSER_ACTION_REQUEST_NONE 0\r
59#define EFI_BROWSER_ACTION_REQUEST_RESET 1\r
60#define EFI_BROWSER_ACTION_REQUEST_SUBMIT 2\r
61#define EFI_BROWSER_ACTION_REQUEST_EXIT 3\r
d4cb06e1
ED
62#define EFI_BROWSER_ACTION_REQUEST_FORM_SUBMIT_EXIT 4\r
63#define EFI_BROWSER_ACTION_REQUEST_FORM_DISCARD_EXIT 5\r
64#define EFI_BROWSER_ACTION_REQUEST_FORM_APPLY 6\r
65#define EFI_BROWSER_ACTION_REQUEST_FORM_DISCARD 7\r
1c2a4962 66#define EFI_BROWSER_ACTION_REQUEST_RECONNECT 8\r
5a1fc221 67\r
68\r
d1f95000 69/**\r
eecd469b
LG
70 Initialize the browser to display the specified configuration forms.\r
71\r
9095d37b
LG
72 This function is the primary interface to the internal forms-based browser.\r
73 The forms browser will display forms associated with the specified Handles.\r
74 The browser will select all forms in packages which have the specified Type\r
4ca9b6c4
LG
75 and (for EFI_HII_PACKAGE_TYPE_GUID) the specified PackageGuid.\r
76\r
77 @param This A pointer to the EFI_FORM_BROWSER2_PROTOCOL instance\r
78\r
9095d37b 79 @param Handles A pointer to an array of Handles. This value should correspond\r
eecd469b 80 to the value of the HII form package that is required to be displayed.\r
4ca9b6c4
LG
81\r
82 @param HandleCount The number of Handles specified in Handle.\r
83\r
25a0aa5d 84 @param FormSetGuid This field points to the EFI_GUID which must match the Guid field or one of the\r
85 elements of the ClassId field in the EFI_IFR_FORM_SET op-code. If\r
ed95ad4e 86 FormsetGuid is NULL, then this function will display the form set class\r
25a0aa5d 87 EFI_HII_PLATFORM_SETUP_FORMSET_GUID.\r
4ca9b6c4 88\r
25a0aa5d 89 @param FormId This field specifies the identifier of the form within the form set to render as the first\r
90 displayable page. If this field has a value of 0x0000, then the Forms Browser will\r
91 render the first enabled form in the form set.\r
4ca9b6c4 92\r
9095d37b 93 @param ScreenDimensions Points to recommended form dimensions, including any non-content area, in\r
4ca9b6c4
LG
94 characters.\r
95\r
96 @param ActionRequest Points to the action recommended by the form.\r
97\r
98 @retval EFI_SUCCESS The function completed successfully\r
9095d37b 99\r
4ca9b6c4 100 @retval EFI_NOT_FOUND The variable was not found.\r
9095d37b 101\r
4ca9b6c4 102 @retval EFI_INVALID_PARAMETER One of the parameters has an\r
9095d37b 103 invalid value.\r
d1f95000 104**/\r
105typedef\r
106EFI_STATUS\r
8b13229b 107(EFIAPI *EFI_SEND_FORM2)(\r
7d582d6b 108 IN CONST EFI_FORM_BROWSER2_PROTOCOL *This,\r
109 IN EFI_HII_HANDLE *Handle,\r
110 IN UINTN HandleCount,\r
111 IN EFI_GUID *FormSetGuid, OPTIONAL\r
112 IN EFI_FORM_ID FormId, OPTIONAL\r
5a1fc221 113 IN CONST EFI_SCREEN_DESCRIPTOR *ScreenDimensions, OPTIONAL\r
5a1fc221 114 OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest OPTIONAL\r
d1f95000 115);\r
116\r
117\r
118/**\r
eecd469b
LG
119 This function is called by a callback handler to retrieve uncommitted state data from the browser.\r
120\r
d1f95000 121 This routine is called by a routine which was called by the\r
122 browser. This routine called this service in the browser to\r
123 retrieve or set certain uncommitted state information.\r
124\r
4ca9b6c4 125 @param This A pointer to the EFI_FORM_BROWSER2_PROTOCOL instance.\r
d1f95000 126\r
127 @param ResultsDataSize A pointer to the size of the buffer\r
4ca9b6c4 128 associated with ResultsData. On input, the size in\r
9095d37b 129 bytes of ResultsData. On output, the size of data\r
af2dc6a7 130 returned in ResultsData.\r
d1f95000 131\r
4ca9b6c4
LG
132 @param ResultsData A string returned from an IFR browser or\r
133 equivalent. The results string will have\r
134 no routing information in them.\r
d1f95000 135\r
136 @param RetrieveData A BOOLEAN field which allows an agent to\r
137 retrieve (if RetrieveData = TRUE) data\r
138 from the uncommitted browser state\r
139 information or set (if RetrieveData =\r
140 FALSE) data in the uncommitted browser\r
141 state information.\r
142\r
143 @param VariableGuid An optional field to indicate the target\r
144 variable GUID name to use.\r
145\r
146 @param VariableName An optional field to indicate the target\r
147 human-readable variable name.\r
148\r
4ca9b6c4
LG
149 @retval EFI_SUCCESS The results have been distributed or are\r
150 awaiting distribution.\r
9095d37b 151\r
d1f95000 152 @retval EFI_OUT_OF_RESOURCES The ResultsDataSize specified\r
153 was too small to contain the\r
154 results data.\r
155\r
156**/\r
157typedef\r
158EFI_STATUS\r
8b13229b 159(EFIAPI *EFI_BROWSER_CALLBACK2)(\r
7d582d6b 160 IN CONST EFI_FORM_BROWSER2_PROTOCOL *This,\r
d1f95000 161 IN OUT UINTN *ResultsDataSize,\r
162 IN OUT EFI_STRING ResultsData,\r
163 IN CONST BOOLEAN RetrieveData,\r
164 IN CONST EFI_GUID *VariableGuid, OPTIONAL\r
165 IN CONST CHAR16 *VariableName OPTIONAL\r
166);\r
167\r
44717a39 168///\r
9095d37b 169/// This interface will allow the caller to direct the configuration\r
44717a39 170/// driver to use either the HII database or use the passed-in packet of data.\r
171///\r
5a1fc221 172struct _EFI_FORM_BROWSER2_PROTOCOL {\r
173 EFI_SEND_FORM2 SendForm;\r
174 EFI_BROWSER_CALLBACK2 BrowserCallback;\r
d1f95000 175} ;\r
176\r
5a1fc221 177extern EFI_GUID gEfiFormBrowser2ProtocolGuid;\r
d1f95000 178\r
179#endif\r
180\r