Correct the GUID for EFI_FORM_BROWSER_COMPATIBILITY_PROTOCOL_GUID.
[mirror_edk2.git] / IntelFrameworkPkg / Include / Protocol / FrameworkFormBrowser.h
CommitLineData
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
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 40typedef struct _EFI_FORM_BROWSER_PROTOCOL EFI_FORM_BROWSER_PROTOCOL;\r
41\r
42typedef struct {\r
43 UINT32 Length;\r
44 UINT16 Type;\r
45 UINT8 Data[1];\r
46} EFI_HII_PACKET;\r
47\r
48typedef struct {\r
49 EFI_HII_IFR_PACK *IfrData;\r
50 EFI_HII_STRING_PACK *StringData;\r
dc7b4a5c 51} FRAMEWORK_EFI_IFR_PACKET;\r
35fec2c4 52\r
53typedef 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
67 used to gather information. If the value is FALSE, the configuration\r
68 driver will get the information provided in the passed-in Packet parameters.\r
69 @param Handle A pointer to an array of HII handles to display. This value\r
70 should correspond to the value of the HII form package that is required to\r
71 be displayed.\r
72 @param HandleCount The number of handles in the array specified by Handle.\r
73 @param Packet A pointer to a set of data containing pointers to IFR\r
74 and/or string data.\r
75 @param CallbackHandle The handle to the driver's callback interface.\r
76 This parameter is used only when the UseDatabase parameter is FALSE\r
77 and an application wants to register a callback with the browser\r
78 @param NvMapOverride This buffer is used only when there is no NV variable\r
79 to define the current settings and the caller needs to provide to the browser\r
80 the current settings for the "fake" NV variable.\r
81 @param ScreenDimensions Allows the browser to be called so that it occupies\r
82 a portion of the physical screen instead of dynamically determining the\r
83 screen dimensions.\r
84 @param ResetRequired This BOOLEAN value will tell the caller if a reset\r
85 is required based on the data that might have been changed. The ResetRequired\r
86 parameter is primarily applicable for configuration applications, and is an\r
87 optional parameter.\r
88\r
89 @retval EFI_SUCCESS The function completed successfully\r
90 @retval EFI_NOT_FOUND The variable was not found.\r
91 @retval EFI_BUFFER_TOO_SMALL The DataSize is too small for the result.\r
92 DataSize has been updated with the size needed to complete the request.\r
93 @retval EFI_INVALID_PARAMETER One of the parameters has an invalid value.\r
94 @retval EFI_DEVICE_ERROR The variable could not be saved due to a hardware failure.\r
95\r
96**/\r
97typedef\r
98EFI_STATUS\r
69686d56 99(EFIAPI *EFI_SEND_FORM)(\r
35fec2c4 100 IN EFI_FORM_BROWSER_PROTOCOL *This,\r
101 IN BOOLEAN UseDatabase,\r
dc7b4a5c 102 IN FRAMEWORK_EFI_HII_HANDLE *Handle,\r
35fec2c4 103 IN UINTN HandleCount,\r
534b8251 104 IN FRAMEWORK_EFI_IFR_PACKET *Packet, OPTIONAL\r
35fec2c4 105 IN EFI_HANDLE CallbackHandle, OPTIONAL\r
106 IN UINT8 *NvMapOverride, OPTIONAL\r
534b8251 107 IN FRAMEWORK_EFI_SCREEN_DESCRIPTOR *ScreenDimensions, OPTIONAL\r
35fec2c4 108 OUT BOOLEAN *ResetRequired OPTIONAL\r
109 );\r
110\r
111/**\r
112 Routine used to abstract a generic dialog interface and return the selected\r
113 key or string.\r
114\r
115 @param NumberOfLines The number of lines for the dialog box.\r
116 @param HotKey Defines whether a single character is parsed (TRUE)\r
117 and returned in KeyValue or if a string is returned in StringBuffer.\r
118 @param MaximumStringSize The maximum size in bytes of a typed-in string.\r
119 Because each character is a CHAR16, the minimum string returned is two bytes.\r
120 @param StringBuffer The passed-in pointer to the buffer that will hold\r
121 the typed in string if HotKey is FALSE.\r
122 @param KeyValue The EFI_INPUT_KEY value returned if HotKey is TRUE.\r
123 @param String The pointer to the first string in the list of strings\r
124 that comprise the dialog box.\r
125 @param ... A series of NumberOfLines text strings that will be used\r
126 to construct the dialog box.\r
127\r
128 @retval EFI_SUCCESS The dialog was displayed and user interaction was received.\r
129 @retval EFI_DEVICE_ERROR The user typed in an ESC character to exit the routine.\r
130 @retval EFI_INVALID_PARAMETER One of the parameters was invalid\r
131\r
132**/\r
133typedef\r
134EFI_STATUS\r
69686d56 135(EFIAPI *EFI_CREATE_POP_UP)(\r
35fec2c4 136 IN UINTN NumberOfLines,\r
137 IN BOOLEAN HotKey,\r
138 IN UINTN MaximumStringSize,\r
139 OUT CHAR16 *StringBuffer,\r
140 OUT EFI_INPUT_KEY *KeyValue,\r
141 IN CHAR16 *String,\r
142 ...\r
143 );\r
144\r
145/**\r
146 @par Protocol Description:\r
147 The EFI_FORM_BROWSER_PROTOCOL is the interface to call for drivers to\r
148 leverage the EFI configuration driver interface.\r
149\r
150 @param SendForm\r
151 Provides direction to the configuration driver whether to use the HII\r
152 database or to use a passed-in set of data. This functions also establishes\r
153 a pointer to the calling driver's callback interface.\r
154\r
155 @param CreatePopUp\r
156 Routine used to abstract a generic dialog interface and return the\r
157 selected key or string.\r
158\r
159**/\r
160struct _EFI_FORM_BROWSER_PROTOCOL {\r
161 EFI_SEND_FORM SendForm;\r
162 EFI_CREATE_POP_UP CreatePopUp;\r
163};\r
164\r
165extern EFI_GUID gEfiFormBrowserProtocolGuid;\r
c39940b5 166extern EFI_GUID gEfiFormBrowserCompatibilityProtocolGuid;\r
167\r
35fec2c4 168\r
169#endif\r