]> git.proxmox.com Git - mirror_edk2.git/blob - EdkCompatibilityPkg/Foundation/Efi/Protocol/FormBrowser2/FormBrowser2.h
Update the copyright notice format
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Efi / Protocol / FormBrowser2 / FormBrowser2.h
1 /*++
2
3 Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
4 This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
8
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11
12 Module Name:
13
14 FormBrowser2.h
15
16 Abstract:
17
18 The EFI_FORM_BROWSER2_PROTOCOL is the interface to the UEFI configuration driver.
19
20 --*/
21
22 #ifndef _FORM_BROWSER2_H_
23 #define _FORM_BROWSER2_H_
24
25 #include "EfiHii.h"
26
27 #define EFI_FORM_BROWSER2_PROTOCOL_GUID \
28 { \
29 0xb9d4c360, 0xbcfb, 0x4f9b, {0x92, 0x98, 0x53, 0xc1, 0x36, 0x98, 0x22, 0x58} \
30 }
31
32 //
33 // Forward reference for pure ANSI compatability
34 //
35 EFI_FORWARD_DECLARATION (EFI_FORM_BROWSER2_PROTOCOL);
36
37 typedef struct {
38 UINTN LeftColumn;
39 UINTN RightColumn;
40 UINTN TopRow;
41 UINTN BottomRow;
42 } EFI_SCREEN_DESCRIPTOR;
43
44 typedef UINTN EFI_BROWSER_ACTION_REQUEST;
45
46 #define EFI_BROWSER_ACTION_REQUEST_NONE 0
47 #define EFI_BROWSER_ACTION_REQUEST_RESET 1
48 #define EFI_BROWSER_ACTION_REQUEST_SUBMIT 2
49 #define EFI_BROWSER_ACTION_REQUEST_EXIT 3
50
51 //
52 // The following types are currently defined:
53 //
54 typedef
55 EFI_STATUS
56 (EFIAPI *EFI_SEND_FORM2) (
57 IN CONST EFI_FORM_BROWSER2_PROTOCOL *This,
58 IN EFI_HII_HANDLE *Handles,
59 IN UINTN HandleCount,
60 IN EFI_GUID *FormSetGuid, OPTIONAL
61 IN UINT16 FormId, OPTIONAL
62 IN CONST EFI_SCREEN_DESCRIPTOR *ScreenDimensions, OPTIONAL
63 OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest OPTIONAL
64 )
65 /*++
66
67 Routine Description:
68 This is the routine which an external caller uses to direct the browser
69 where to obtain it's information.
70
71 Arguments:
72 This - A pointer to the EFI_FORM_BROWSER2_PROTOCOL instance.
73 Handles - A pointer to an array of HII handles to display.
74 HandleCount - The number of handles in the array specified by Handle.
75 FormSetGuid - This field points to the EFI_GUID which must match the Guid field in the EFI_IFR_FORM_SET op-code for the specified
76 forms-based package. If FormSetGuid is NULL, then this function will display the first found forms package.
77 FormId - This field specifies which EFI_IFR_FORM to render as the first displayable page.
78 If this field has a value of 0x0000, then the forms browser will render the specified forms in their encoded order.
79 ScreenDimenions - This allows the browser to be called so that it occupies a portion of the physical screen instead of
80 dynamically determining the screen dimensions.
81 ActionRequest - Points to the action recommended by the form.
82
83 Returns:
84 EFI_SUCCESS - The function completed successfully.
85 EFI_INVALID_PARAMETER - One of the parameters has an invalid value.
86 EFI_NOT_FOUND - No valid forms could be found to display.
87
88 --*/
89 ;
90
91 typedef
92 EFI_STATUS
93 (EFIAPI *EFI_BROWSER_CALLBACK2) (
94 IN CONST EFI_FORM_BROWSER2_PROTOCOL *This,
95 IN OUT UINTN *ResultsDataSize,
96 IN OUT EFI_STRING ResultsData,
97 IN BOOLEAN RetrieveData,
98 IN CONST EFI_GUID *VariableGuid, OPTIONAL
99 IN CONST CHAR16 *VariableName OPTIONAL
100 )
101 /*++
102
103 Routine Description:
104 This function is called by a callback handler to retrieve uncommitted state
105 data from the browser.
106
107 Arguments:
108 This - A pointer to the EFI_FORM_BROWSER2_PROTOCOL instance.
109 ResultsDataSize - A pointer to the size of the buffer associated with ResultsData.
110 On input, the size in bytes of ResultsData.
111 On output, the size of data returned in ResultsData.
112 ResultsData - A string returned from an IFR browser or equivalent.
113 The results string will have no routing information in them.
114 RetrieveData - A BOOLEAN field which allows an agent to retrieve (if RetrieveData = TRUE)
115 data from the uncommitted browser state information or set
116 (if RetrieveData = FALSE) data in the uncommitted browser state information.
117 VariableGuid - An optional field to indicate the target variable GUID name to use.
118 VariableName - An optional field to indicate the target human-readable variable name.
119
120 Returns:
121 EFI_SUCCESS - The results have been distributed or are awaiting distribution.
122 EFI_BUFFER_TOO_SMALL - The ResultsDataSize specified was too small to contain the results data.
123
124 --*/
125 ;
126
127 struct _EFI_FORM_BROWSER2_PROTOCOL {
128 EFI_SEND_FORM2 SendForm;
129 EFI_BROWSER_CALLBACK2 BrowserCallback;
130 };
131
132 extern EFI_GUID gEfiFormBrowser2ProtocolGuid;
133
134 #endif