]> git.proxmox.com Git - mirror_edk2.git/blob - IntelFrameworkPkg/Include/Protocol/FrameworkFormBrowser.h
Remove "Module Name:" from include file headers.
[mirror_edk2.git] / IntelFrameworkPkg / Include / Protocol / FrameworkFormBrowser.h
1 /** @file
2 The EFI_FORM_BROWSER_PROTOCOL is the interface to the EFI
3 Configuration Driver. This will allow the caller to direct the
4 configuration driver to use either the HII database or use the passed
5 in packet of data. This will also allow the caller to post messages
6 into the configuration drivers internal mailbox.
7
8 Copyright (c) 2006 - 2009, Intel Corporation
9 All rights reserved. This program and the accompanying materials
10 are licensed and made available under the terms and conditions of the BSD License
11 which accompanies this distribution. The full text of the license may be found at
12 http://opensource.org/licenses/bsd-license.php
13
14 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
15 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16
17 @par Revision Reference:
18 This protocol is defined in HII spec 0.92.
19
20 **/
21
22 #ifndef __FRAMEWORK_FORM_BROWSER_H__
23 #define __FRAMEWORK_FORM_BROWSER_H__
24
25 #include <Protocol/FrameworkHii.h>
26
27
28 #define EFI_FORM_BROWSER_PROTOCOL_GUID \
29 { \
30 0xe5a1333e, 0xe1b4, 0x4d55, {0xce, 0xeb, 0x35, 0xc3, 0xef, 0x13, 0x34, 0x43 } \
31 }
32
33 #define EFI_FORM_BROWSER_COMPATIBILITY_PROTOCOL_GUID \
34 { \
35 0xfb7c852, 0xadca, 0x4853, { 0x8d, 0xf, 0xfb, 0xa7, 0x1b, 0x1c, 0xe1, 0x1a } \
36 }
37
38 typedef struct _EFI_FORM_BROWSER_PROTOCOL EFI_FORM_BROWSER_PROTOCOL;
39
40 typedef struct {
41 UINT32 Length;
42 UINT16 Type;
43 UINT8 Data[1];
44 } EFI_HII_PACKET;
45
46 typedef struct {
47 EFI_HII_IFR_PACK *IfrData;
48 EFI_HII_STRING_PACK *StringData;
49 } FRAMEWORK_EFI_IFR_PACKET;
50
51 typedef struct {
52 UINTN LeftColumn;
53 UINTN RightColumn;
54 UINTN TopRow;
55 UINTN BottomRow;
56 } FRAMEWORK_EFI_SCREEN_DESCRIPTOR;
57
58 /**
59 Provides direction to the configuration driver whether to use the HII
60 database or a passed-in set of data. This function also establishes a
61 pointer to the calling driver's callback interface.
62
63 @param This A pointer to the EFI_FORM_BROWSER_PROTOCOL instance.
64 @param UseDatabase Determines whether the HII database is to be
65 used to gather information. If the value is FALSE, the configuration
66 driver will get the information provided in the passed-in Packet parameters.
67 @param Handle A pointer to an array of HII handles to display. This value
68 should correspond to the value of the HII form package that is required to
69 be displayed.
70 @param HandleCount The number of handles in the array specified by Handle.
71 @param Packet A pointer to a set of data containing pointers to IFR
72 and/or string data.
73 @param CallbackHandle The handle to the driver's callback interface.
74 This parameter is used only when the UseDatabase parameter is FALSE
75 and an application wants to register a callback with the browser
76 @param NvMapOverride This buffer is used only when there is no NV variable
77 to define the current settings and the caller needs to provide to the browser
78 the current settings for the "fake" NV variable.
79 @param ScreenDimensions Allows the browser to be called so that it occupies
80 a portion of the physical screen instead of dynamically determining the
81 screen dimensions.
82 @param ResetRequired This BOOLEAN value will tell the caller if a reset
83 is required based on the data that might have been changed. The ResetRequired
84 parameter is primarily applicable for configuration applications, and is an
85 optional parameter.
86
87 @retval EFI_SUCCESS The function completed successfully
88 @retval EFI_NOT_FOUND The variable was not found.
89 @retval EFI_BUFFER_TOO_SMALL The DataSize is too small for the result.
90 DataSize has been updated with the size needed to complete the request.
91 @retval EFI_INVALID_PARAMETER One of the parameters has an invalid value.
92 @retval EFI_DEVICE_ERROR The variable could not be saved due to a hardware failure.
93
94 **/
95 typedef
96 EFI_STATUS
97 (EFIAPI *EFI_SEND_FORM)(
98 IN EFI_FORM_BROWSER_PROTOCOL *This,
99 IN BOOLEAN UseDatabase,
100 IN FRAMEWORK_EFI_HII_HANDLE *Handle,
101 IN UINTN HandleCount,
102 IN FRAMEWORK_EFI_IFR_PACKET *Packet, OPTIONAL
103 IN EFI_HANDLE CallbackHandle, OPTIONAL
104 IN UINT8 *NvMapOverride, OPTIONAL
105 IN FRAMEWORK_EFI_SCREEN_DESCRIPTOR *ScreenDimensions, OPTIONAL
106 OUT BOOLEAN *ResetRequired OPTIONAL
107 );
108
109 /**
110 Routine used to abstract a generic dialog interface and return the selected
111 key or string.
112
113 @param NumberOfLines The number of lines for the dialog box.
114 @param HotKey Defines whether a single character is parsed (TRUE)
115 and returned in KeyValue or if a string is returned in StringBuffer.
116 @param MaximumStringSize The maximum size in bytes of a typed-in string.
117 Because each character is a CHAR16, the minimum string returned is two bytes.
118 @param StringBuffer The passed-in pointer to the buffer that will hold
119 the typed in string if HotKey is FALSE.
120 @param KeyValue The EFI_INPUT_KEY value returned if HotKey is TRUE.
121 @param String The pointer to the first string in the list of strings
122 that comprise the dialog box.
123 @param ... A series of NumberOfLines text strings that will be used
124 to construct the dialog box.
125
126 @retval EFI_SUCCESS The dialog was displayed and user interaction was received.
127 @retval EFI_DEVICE_ERROR The user typed in an ESC character to exit the routine.
128 @retval EFI_INVALID_PARAMETER One of the parameters was invalid
129
130 **/
131 typedef
132 EFI_STATUS
133 (EFIAPI *EFI_CREATE_POP_UP)(
134 IN UINTN NumberOfLines,
135 IN BOOLEAN HotKey,
136 IN UINTN MaximumStringSize,
137 OUT CHAR16 *StringBuffer,
138 OUT EFI_INPUT_KEY *KeyValue,
139 IN CHAR16 *String,
140 ...
141 );
142
143 /**
144 The EFI_FORM_BROWSER_PROTOCOL is the interface to call for drivers to
145 leverage the EFI configuration driver interface.
146 **/
147 struct _EFI_FORM_BROWSER_PROTOCOL {
148 ///
149 /// Provides direction to the configuration driver whether to use the HII
150 /// database or to use a passed-in set of data. This functions also establishes
151 /// a pointer to the calling driver's callback interface.
152 ///
153 EFI_SEND_FORM SendForm;
154
155 ///
156 /// Routine used to abstract a generic dialog interface and return the
157 /// selected key or string.
158 ///
159 EFI_CREATE_POP_UP CreatePopUp;
160 };
161
162 extern EFI_GUID gEfiFormBrowserProtocolGuid;
163 extern EFI_GUID gEfiFormBrowserCompatibilityProtocolGuid;
164
165
166 #endif