]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Universal/DriverSampleDxe/DriverSample.h
Add example usage of EFI_BROWSER_ACTION_FORM_OPEN and EFI_BROWSER_ACTION_FORM_CLOSE...
[mirror_edk2.git] / MdeModulePkg / Universal / DriverSampleDxe / DriverSample.h
1 /** @file
2
3 Copyright (c) 2007 - 2009, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
8
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11
12 Module Name:
13
14 DriverSample.h
15
16 Abstract:
17
18
19 Revision History
20
21
22 **/
23
24 #ifndef _DRIVER_SAMPLE_H_
25 #define _DRIVER_SAMPLE_H_
26
27 #include <Uefi.h>
28
29 #include <Protocol/HiiConfigRouting.h>
30 #include <Protocol/FormBrowser2.h>
31 #include <Protocol/HiiConfigAccess.h>
32 #include <Protocol/HiiDatabase.h>
33 #include <Protocol/HiiString.h>
34
35 #include <Guid/MdeModuleHii.h>
36 #include <Library/DebugLib.h>
37 #include <Library/BaseLib.h>
38 #include <Library/BaseMemoryLib.h>
39 #include <Library/UefiRuntimeServicesTableLib.h>
40 #include <Library/UefiDriverEntryPoint.h>
41 #include <Library/UefiBootServicesTableLib.h>
42 #include <Library/MemoryAllocationLib.h>
43 #include <Library/HiiLib.h>
44 #include <Library/DevicePathLib.h>
45 #include <Library/PrintLib.h>
46 #include <Library/UefiLib.h>
47
48 #include "NVDataStruc.h"
49
50 //
51 // This is the generated <AltResp> for defaults defined in VFR
52 //
53 extern UINT8 VfrMyIfrNVDataDefault0000[];
54 extern UINT8 VfrMyIfrNVDataDefault0001[];
55 extern UINT8 VfrMyIfrNVDataBlockName[];
56
57 //
58 // This is the generated IFR binary data for each formset defined in VFR.
59 // This data array is ready to be used as input of HiiAddPackages() to
60 // create a packagelist (which contains Form packages, String packages, etc).
61 //
62 extern UINT8 VfrBin[];
63 extern UINT8 InventoryBin[];
64
65 //
66 // This is the generated String package data for all .UNI files.
67 // This data array is ready to be used as input of HiiAddPackages() to
68 // create a packagelist (which contains Form packages, String packages, etc).
69 //
70 extern UINT8 DriverSampleStrings[];
71
72 #define DYNAMIC_ONE_OF_VAR_OFFSET OFFSET_OF (DRIVER_SAMPLE_CONFIGURATION, DynamicOneof)
73 #define DYNAMIC_ORDERED_LIST_VAR_OFFSET OFFSET_OF (DRIVER_SAMPLE_CONFIGURATION, DynamicOrderedList)
74
75 #define DRIVER_SAMPLE_PRIVATE_SIGNATURE SIGNATURE_32 ('D', 'S', 'p', 's')
76
77 typedef struct {
78 UINTN Signature;
79
80 EFI_HANDLE DriverHandle[2];
81 EFI_HII_HANDLE HiiHandle[2];
82 DRIVER_SAMPLE_CONFIGURATION Configuration;
83 UINT8 PasswordState;
84
85 //
86 // Consumed protocol
87 //
88 EFI_HII_DATABASE_PROTOCOL *HiiDatabase;
89 EFI_HII_STRING_PROTOCOL *HiiString;
90 EFI_HII_CONFIG_ROUTING_PROTOCOL *HiiConfigRouting;
91 EFI_FORM_BROWSER2_PROTOCOL *FormBrowser2;
92
93 //
94 // Produced protocol
95 //
96 EFI_HII_CONFIG_ACCESS_PROTOCOL ConfigAccess;
97 } DRIVER_SAMPLE_PRIVATE_DATA;
98
99 #define DRIVER_SAMPLE_PRIVATE_FROM_THIS(a) CR (a, DRIVER_SAMPLE_PRIVATE_DATA, ConfigAccess, DRIVER_SAMPLE_PRIVATE_SIGNATURE)
100
101 #pragma pack(1)
102
103 ///
104 /// HII specific Vendor Device Path definition.
105 ///
106 typedef struct {
107 VENDOR_DEVICE_PATH VendorDevicePath;
108 EFI_DEVICE_PATH_PROTOCOL End;
109 } HII_VENDOR_DEVICE_PATH;
110
111 #pragma pack()
112
113 #endif