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