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