b756fef2c378ef3a16482621c00038f909ad036c
[mirror_edk2.git] / BaseTools / Source / C / Include / Common / MdeModuleHii.h
1 /** @file
2 EDK II specific HII relative definition.
3
4 Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
5
6 This program and the accompanying materials are licensed and made available
7 under the terms and conditions of the BSD License which accompanies this
8 distribution. The full text of the license may be found at:
9 http://opensource.org/licenses/bsd-license.php
10
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13
14 File Name: MdeModuleHii.h
15
16 **/
17
18 #ifndef _MDEMODULE_HII_H
19 #define _MDEMODULE_HII_H
20
21 #define NARROW_CHAR 0xFFF0
22 #define WIDE_CHAR 0xFFF1
23 #define NON_BREAKING_CHAR 0xFFF2
24
25 ///
26 /// State defined for password statemachine .
27 ///
28 #define BROWSER_STATE_VALIDATE_PASSWORD 0
29 #define BROWSER_STATE_SET_PASSWORD 1
30
31 ///
32 /// GUIDed opcodes defined for EDKII implementation.
33 ///
34 #define EFI_IFR_TIANO_GUID \
35 { 0xf0b1735, 0x87a0, 0x4193, {0xb2, 0x66, 0x53, 0x8c, 0x38, 0xaf, 0x48, 0xce} }
36
37 #pragma pack(1)
38
39 ///
40 /// EDKII implementation extension opcodes, new extension can be added here later.
41 ///
42 #define EFI_IFR_EXTEND_OP_LABEL 0x0
43 #define EFI_IFR_EXTEND_OP_BANNER 0x1
44 #define EFI_IFR_EXTEND_OP_TIMEOUT 0x2
45 #define EFI_IFR_EXTEND_OP_CLASS 0x3
46 #define EFI_IFR_EXTEND_OP_SUBCLASS 0x4
47
48 ///
49 /// Label opcode.
50 ///
51 typedef struct _EFI_IFR_GUID_LABEL {
52 EFI_IFR_OP_HEADER Header;
53 ///
54 /// EFI_IFR_TIANO_GUID.
55 ///
56 EFI_GUID Guid;
57 ///
58 /// EFI_IFR_EXTEND_OP_LABEL.
59 ///
60 UINT8 ExtendOpCode;
61 ///
62 /// Label Number.
63 ///
64 UINT16 Number;
65 } EFI_IFR_GUID_LABEL;
66
67 #define EFI_IFR_BANNER_ALIGN_LEFT 0
68 #define EFI_IFR_BANNER_ALIGN_CENTER 1
69 #define EFI_IFR_BANNER_ALIGN_RIGHT 2
70
71 ///
72 /// Banner opcode.
73 ///
74 typedef struct _EFI_IFR_GUID_BANNER {
75 EFI_IFR_OP_HEADER Header;
76 ///
77 /// EFI_IFR_TIANO_GUID.
78 ///
79 EFI_GUID Guid;
80 ///
81 /// EFI_IFR_EXTEND_OP_BANNER
82 ///
83 UINT8 ExtendOpCode;
84 EFI_STRING_ID Title; ///< The string token for the banner title.
85 UINT16 LineNumber; ///< 1-based line number.
86 UINT8 Alignment; ///< left, center, or right-aligned.
87 } EFI_IFR_GUID_BANNER;
88
89 ///
90 /// Timeout opcode.
91 ///
92 typedef struct _EFI_IFR_GUID_TIMEOUT {
93 EFI_IFR_OP_HEADER Header;
94 ///
95 /// EFI_IFR_TIANO_GUID.
96 ///
97 EFI_GUID Guid;
98 ///
99 /// EFI_IFR_EXTEND_OP_TIMEOUT.
100 ///
101 UINT8 ExtendOpCode;
102 UINT16 TimeOut; ///< TimeOut Value.
103 } EFI_IFR_GUID_TIMEOUT;
104
105 #define EFI_NON_DEVICE_CLASS 0x00
106 #define EFI_DISK_DEVICE_CLASS 0x01
107 #define EFI_VIDEO_DEVICE_CLASS 0x02
108 #define EFI_NETWORK_DEVICE_CLASS 0x04
109 #define EFI_INPUT_DEVICE_CLASS 0x08
110 #define EFI_ON_BOARD_DEVICE_CLASS 0x10
111 #define EFI_OTHER_DEVICE_CLASS 0x20
112
113 ///
114 /// Device Class opcode.
115 ///
116 typedef struct _EFI_IFR_GUID_CLASS {
117 EFI_IFR_OP_HEADER Header;
118 ///
119 /// EFI_IFR_TIANO_GUID.
120 ///
121 EFI_GUID Guid;
122 ///
123 /// EFI_IFR_EXTEND_OP_CLASS.
124 ///
125 UINT8 ExtendOpCode;
126 UINT16 Class; ///< Device Class from the above.
127 } EFI_IFR_GUID_CLASS;
128
129 #define EFI_SETUP_APPLICATION_SUBCLASS 0x00
130 #define EFI_GENERAL_APPLICATION_SUBCLASS 0x01
131 #define EFI_FRONT_PAGE_SUBCLASS 0x02
132 #define EFI_SINGLE_USE_SUBCLASS 0x03
133
134 ///
135 /// SubClass opcode
136 ///
137 typedef struct _EFI_IFR_GUID_SUBCLASS {
138 EFI_IFR_OP_HEADER Header;
139 ///
140 /// EFI_IFR_TIANO_GUID.
141 ///
142 EFI_GUID Guid;
143 ///
144 /// EFI_IFR_EXTEND_OP_SUBCLASS.
145 ///
146 UINT8 ExtendOpCode;
147 UINT16 SubClass; ///< Sub Class type from the above.
148 } EFI_IFR_GUID_SUBCLASS;
149
150 ///
151 /// GUIDed opcodes support for framework vfr.
152 ///
153 #define EFI_IFR_FRAMEWORK_GUID \
154 { 0x31ca5d1a, 0xd511, 0x4931, { 0xb7, 0x82, 0xae, 0x6b, 0x2b, 0x17, 0x8c, 0xd7 } }
155
156 ///
157 /// Two extended opcodes are added, and new extensions can be added here later.
158 /// One is for framework OneOf question Option Key value;
159 /// another is for framework vareqval.
160 ///
161 #define EFI_IFR_EXTEND_OP_OPTIONKEY 0x0
162 #define EFI_IFR_EXTEND_OP_VAREQNAME 0x1
163
164 ///
165 /// Store the framework vfr option key value.
166 ///
167 typedef struct _EFI_IFR_GUID_OPTIONKEY {
168 EFI_IFR_OP_HEADER Header;
169 ///
170 /// EFI_IFR_FRAMEWORK_GUID.
171 ///
172 EFI_GUID Guid;
173 ///
174 /// EFI_IFR_EXTEND_OP_OPTIONKEY.
175 ///
176 UINT8 ExtendOpCode;
177 ///
178 /// OneOf Questiond ID binded by OneOf Option.
179 ///
180 EFI_QUESTION_ID QuestionId;
181 ///
182 /// The OneOf Option Value.
183 ///
184 EFI_IFR_TYPE_VALUE OptionValue;
185 ///
186 /// The Framework OneOf Option Key Value.
187 ///
188 UINT16 KeyValue;
189 } EFI_IFR_GUID_OPTIONKEY;
190
191 ///
192 /// Store the framework vfr vareqval name number.
193 ///
194 typedef struct _EFI_IFR_GUID_VAREQNAME {
195 EFI_IFR_OP_HEADER Header;
196 ///
197 /// EFI_IFR_FRAMEWORK_GUID.
198 ///
199 EFI_GUID Guid;
200 ///
201 /// EFI_IFR_EXTEND_OP_VAREQNAME.
202 ///
203 UINT8 ExtendOpCode;
204 ///
205 /// Question ID of the Numeric Opcode created.
206 ///
207 EFI_QUESTION_ID QuestionId;
208 ///
209 /// For vareqval (0x100), NameId is 0x100.
210 /// This value will convert to a Unicode String following this rule;
211 /// sprintf(StringBuffer, "%d", NameId) .
212 /// The the Unicode String will be used as a EFI Variable Name.
213 ///
214 UINT16 NameId;
215 } EFI_IFR_GUID_VAREQNAME;
216
217 #pragma pack()
218
219 extern EFI_GUID gEfiIfrTianoGuid;
220 extern EFI_GUID gEfiIfrFrameworkGuid;
221
222 #endif
223