]>
Commit | Line | Data |
---|---|---|
878ddf1f | 1 | /** @file\r |
2 | The EFI_FORM_CALLBACK_PROTOCOL is the defined interface for access to custom \r | |
3 | NV storage devices as well as communication of user selections in a more \r | |
4 | interactive environment. This protocol should be published by hardware \r | |
5 | specific drivers which want to export access to custom hardware storage or \r | |
6 | publish IFR which has a requirement to call back the original driver.\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: FormCallback.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 __FORM_CALLBACK_H__\r | |
25 | #define __FORM_CALLBACK_H__\r | |
26 | \r | |
27 | \r | |
28 | #define EFI_FORM_CALLBACK_PROTOCOL_GUID \\r | |
29 | { \\r | |
30 | 0xf3e4543d, 0xcf35, 0x6cef, {0x35, 0xc4, 0x4f, 0xe6, 0x34, 0x4d, 0xfc, 0x54 } \\r | |
31 | }\r | |
32 | \r | |
33 | //\r | |
34 | // Forward reference for pure ANSI compatability\r | |
35 | //\r | |
36 | typedef struct _EFI_FORM_CALLBACK_PROTOCOL EFI_FORM_CALLBACK_PROTOCOL;\r | |
37 | \r | |
38 | \r | |
39 | #define RESET_REQUIRED 1 // Flags setting to signify that the callback operation resulted in an eventual\r | |
40 | // reset to be done upon exit of the browser\r | |
41 | //\r | |
42 | #define EXIT_REQUIRED 2 // Flags setting to signify that after the processing of the callback results - exit the browser\r | |
43 | #define SAVE_REQUIRED 4 // Flags setting to signify that after the processing of the callback results - save the NV data\r | |
44 | #define NV_CHANGED 8 // Flags setting to signify that after the processing of the callback results - turn the NV flag on\r | |
45 | #define NV_NOT_CHANGED 16 // Flags setting to signify that after the processing of the callback results - turn the NV flag off\r | |
46 | #pragma pack(1)\r | |
47 | typedef struct {\r | |
48 | UINT8 OpCode; // Likely a string, numeric, or one-of\r | |
49 | UINT8 Length; // Length of the EFI_IFR_DATA_ENTRY packet\r | |
50 | UINT16 Flags; // Flags settings to determine what behavior is desired from the browser after the callback\r | |
51 | VOID *Data; // The data in the form based on the op-code type - this is not a pointer to the data, the data follows immediately\r | |
52 | // If the OpCode is a OneOf or Numeric type - Data is a UINT16 value\r | |
53 | // If the OpCode is a String type - Data is a CHAR16[x] type\r | |
54 | // If the OpCode is a Checkbox type - Data is a UINT8 value\r | |
55 | // If the OpCode is a NV Access type - Data is a EFI_IFR_NV_DATA structure\r | |
56 | //\r | |
57 | } EFI_IFR_DATA_ENTRY;\r | |
58 | \r | |
59 | typedef struct {\r | |
60 | VOID *NvRamMap; // If the flag of the op-code specified retrieval of a copy of the NVRAM map,\r | |
61 | // this is a pointer to a buffer copy\r | |
62 | //\r | |
63 | UINT32 EntryCount; // How many EFI_IFR_DATA_ENTRY entries\r | |
64 | //\r | |
65 | // EFI_IFR_DATA_ENTRY Data[1]; // The in-line Data entries.\r | |
66 | //\r | |
67 | } EFI_IFR_DATA_ARRAY;\r | |
68 | \r | |
69 | typedef union {\r | |
70 | EFI_IFR_DATA_ARRAY DataArray; // Primarily used by those who call back to their drivers and use HII as a repository\r | |
71 | EFI_IFR_PACKET DataPacket; // Primarily used by those which do not use HII as a repository\r | |
72 | CHAR16 *String; // If returning an error - fill the string with null-terminated contents\r | |
73 | } EFI_HII_CALLBACK_PACKET;\r | |
74 | \r | |
75 | typedef struct {\r | |
76 | EFI_IFR_OP_HEADER Header;\r | |
77 | UINT16 QuestionId; // Offset into the map\r | |
78 | UINT8 StorageWidth; // Width of the value\r | |
79 | //\r | |
80 | // CHAR8 Data[1]; // The Data itself\r | |
81 | //\r | |
82 | } EFI_IFR_NV_DATA;\r | |
83 | \r | |
84 | #pragma pack()\r | |
85 | //\r | |
86 | // The following types are currently defined:\r | |
87 | //\r | |
88 | /**\r | |
89 | Returns the value of a variable. \r | |
90 | \r | |
91 | @param This A pointer to the EFI_FORM_CALLBACK_PROTOCOL instance.\r | |
92 | \r | |
93 | @param VariableName A NULL-terminated Unicode string that is the \r | |
94 |