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