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