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