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