]>
Commit | Line | Data |
---|---|---|
35fec2c4 | 1 | /** @file\r |
2 | The EFI_FORM_BROWSER_PROTOCOL is the interface to the EFI\r | |
3 | Configuration Driver. This will allow the caller to direct the\r | |
4 | configuration driver to use either the HII database or use the passed\r | |
5 | in packet of data. This will also allow the caller to post messages\r | |
6 | into the configuration drivers internal mailbox.\r | |
7 | \r | |
8 | Copyright (c) 2006, Intel Corporation\r | |
9 | All rights reserved. This program and the accompanying materials\r | |
10 | are licensed and made available under the terms and conditions of the BSD License\r | |
11 | which accompanies this distribution. 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 | |
16 | \r | |
17 | Module Name: FrameworkFormBrowser.h\r | |
18 | \r | |
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 | |
b69cc7ac | 27 | #include <Protocol/HiiFramework.h>\r |
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 | |
35 | typedef struct _EFI_FORM_BROWSER_PROTOCOL EFI_FORM_BROWSER_PROTOCOL;\r | |
36 | \r | |
37 | typedef struct {\r | |
38 | UINT32 Length;\r | |
39 | UINT16 Type;\r | |
40 | UINT8 Data[1];\r | |
41 | } EFI_HII_PACKET;\r | |
42 | \r | |
43 | typedef struct {\r | |
44 | EFI_HII_IFR_PACK *IfrData;\r | |
45 | EFI_HII_STRING_PACK *StringData;\r | |
46 | } EFI_IFR_PACKET;\r | |
47 | \r | |
48 | typedef struct {\r | |
49 | UINTN LeftColumn;\r | |
50 | UINTN RightColumn;\r | |
51 | UINTN TopRow;\r | |
52 | UINTN BottomRow;\r | |
53 | } EFI_SCREEN_DESCRIPTOR;\r | |
54 | \r | |
55 | /**\r | |
56 | Provides direction to the configuration driver whether to use the HII\r | |
57 | database or a passed-in set of data. This function also establishes a\r | |
58 | pointer to the calling driver's callback interface.\r | |
59 | \r | |
60 | @param This A pointer to the EFI_FORM_BROWSER_PROTOCOL instance.\r | |
61 | @param UseDatabase Determines whether the HII database is to be\r | |
62 | used to gather information. If the value is FALSE, the configuration\r | |
63 | driver will get the information provided in the passed-in Packet parameters.\r | |
64 | @param Handle A pointer to an array of HII handles to display. This value\r | |
65 | should correspond to the value of the HII form package that is required to\r | |
66 | be displayed.\r | |
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 | |
71 | This parameter is used only when the UseDatabase parameter is FALSE\r | |
72 | and an application wants to register a callback with the browser\r | |
73 | @param NvMapOverride This buffer is used only when there is no NV variable\r | |
74 | to define the current settings and the caller needs to provide to the browser\r | |
75 | the current settings for the "fake" NV variable.\r | |
76 | @param ScreenDimensions Allows the browser to be called so that it occupies\r | |
77 | a portion of the physical screen instead of dynamically determining the\r | |
78 | screen dimensions.\r | |
79 | @param ResetRequired This BOOLEAN value will tell the caller if a reset\r | |
80 | is required based on the data that might have been changed. The ResetRequired\r | |
81 | parameter is primarily applicable for configuration applications, and is an\r | |
82 | optional parameter.\r | |
83 | \r | |
84 | @retval EFI_SUCCESS The function completed successfully\r | |
85 | @retval EFI_NOT_FOUND The variable was not found.\r | |
86 | @retval EFI_BUFFER_TOO_SMALL The DataSize is too small for the result.\r | |
87 | DataSize has been updated with the size needed to complete the request.\r | |
88 | @retval EFI_INVALID_PARAMETER One of the parameters has an invalid value.\r | |
89 | @retval EFI_DEVICE_ERROR The variable could not be saved due to a hardware failure.\r | |
90 | \r | |
91 | **/\r | |
92 | typedef\r | |
93 | EFI_STATUS\r | |
94 | (EFIAPI *EFI_SEND_FORM) (\r | |
95 | IN EFI_FORM_BROWSER_PROTOCOL *This,\r | |
96 | IN BOOLEAN UseDatabase,\r | |
97 | IN EFI_HII_HANDLE *Handle,\r | |
98 | IN UINTN HandleCount,\r | |
99 | IN EFI_IFR_PACKET *Packet, OPTIONAL\r | |
100 | IN EFI_HANDLE CallbackHandle, OPTIONAL\r | |
101 | IN UINT8 *NvMapOverride, OPTIONAL\r | |
102 | IN EFI_SCREEN_DESCRIPTOR *ScreenDimensions, OPTIONAL\r | |
103 | OUT BOOLEAN *ResetRequired OPTIONAL\r | |
104 | );\r | |
105 | \r | |
106 | /**\r | |
107 | Routine used to abstract a generic dialog interface and return the selected\r | |
108 | key or string.\r | |
109 | \r | |
110 | @param NumberOfLines The number of lines for the dialog box.\r | |
111 | @param HotKey Defines whether a single character is parsed (TRUE)\r | |
112 | and returned in KeyValue or if a string is returned in StringBuffer.\r | |
113 | @param MaximumStringSize The maximum size in bytes of a typed-in string.\r | |
114 | Because each character is a CHAR16, the minimum string returned is two bytes.\r | |
115 | @param StringBuffer The passed-in pointer to the buffer that will hold\r | |
116 | the typed in string if HotKey is FALSE.\r | |
117 | @param KeyValue The EFI_INPUT_KEY value returned if HotKey is TRUE.\r | |
118 | @param String The pointer to the first string in the list of strings\r | |
119 | that comprise the dialog box.\r | |
120 | @param ... A series of NumberOfLines text strings that will be used\r | |
121 | to construct the dialog box.\r | |
122 | \r | |
123 | @retval EFI_SUCCESS The dialog was displayed and user interaction was received.\r | |
124 | @retval EFI_DEVICE_ERROR The user typed in an ESC character to exit the routine.\r | |
125 | @retval EFI_INVALID_PARAMETER One of the parameters was invalid\r | |
126 | \r | |
127 | **/\r | |
128 | typedef\r | |
129 | EFI_STATUS\r | |
130 | (EFIAPI *EFI_CREATE_POP_UP) (\r | |
131 | IN UINTN NumberOfLines,\r | |
132 | IN BOOLEAN HotKey,\r | |
133 | IN UINTN MaximumStringSize,\r | |
134 | OUT CHAR16 *StringBuffer,\r | |
135 | OUT EFI_INPUT_KEY *KeyValue,\r | |
136 | IN CHAR16 *String,\r | |
137 | ...\r | |
138 | );\r | |
139 | \r | |
140 | /**\r | |
141 | @par Protocol Description:\r | |
142 | The EFI_FORM_BROWSER_PROTOCOL is the interface to call for drivers to\r | |
143 | leverage the EFI configuration driver interface.\r | |
144 | \r | |
145 | @param SendForm\r | |
146 | Provides direction to the configuration driver whether to use the HII\r | |
147 | database or to use a passed-in set of data. This functions also establishes\r | |
148 | a pointer to the calling driver's callback interface.\r | |
149 | \r | |
150 | @param CreatePopUp\r | |
151 | Routine used to abstract a generic dialog interface and return the\r | |
152 | selected key or string.\r | |
153 | \r | |
154 | **/\r | |
155 | struct _EFI_FORM_BROWSER_PROTOCOL {\r | |
156 | EFI_SEND_FORM SendForm;\r | |
157 | EFI_CREATE_POP_UP CreatePopUp;\r | |
158 | };\r | |
159 | \r | |
160 | extern EFI_GUID gEfiFormBrowserProtocolGuid;\r | |
161 | \r | |
162 | #endif\r |