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