]> git.proxmox.com Git - mirror_edk2.git/blobdiff - 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
index 8c20cf26ba6a71eb15b1d5ba237266e98218faaa..ebe40a2948efe27e14f666f1d5eb5da8a25ddbe8 100644 (file)
@@ -1,6 +1,6 @@
 /** @file\r
 \r
-Copyright (c) 2007, Intel Corporation\r
+Copyright (c) 2007 - 2009, Intel Corporation\r
 All rights reserved. This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -32,19 +32,18 @@ Revision History
 #include <Protocol/HiiDatabase.h>\r
 #include <Protocol/HiiString.h>\r
 \r
+#include <Guid/MdeModuleHii.h>\r
 #include <Library/DebugLib.h>\r
+#include <Library/BaseLib.h>\r
 #include <Library/BaseMemoryLib.h>\r
 #include <Library/UefiRuntimeServicesTableLib.h>\r
 #include <Library/UefiDriverEntryPoint.h>\r
 #include <Library/UefiBootServicesTableLib.h>\r
 #include <Library/MemoryAllocationLib.h>\r
-#include <Library/IfrSupportLib.h>\r
-#include <Library/ExtendedIfrSupportLib.h>\r
 #include <Library/HiiLib.h>\r
-#include <Library/ExtendedHiiLib.h>\r
-\r
-#include <MdeModuleHii.h>\r
-\r
+#include <Library/DevicePathLib.h>\r
+#include <Library/PrintLib.h>\r
+#include <Library/UefiLib.h>\r
 \r
 #include "NVDataStruc.h"\r
 \r
@@ -57,7 +56,7 @@ extern UINT8 VfrMyIfrNVDataBlockName[];
 \r
 //\r
 // This is the generated IFR binary data for each formset defined in VFR.\r
-// This data array is ready to be used as input of HiiLibPreparePackageList() to\r
+// This data array is ready to be used as input of HiiAddPackages() to\r
 // create a packagelist (which contains Form packages, String packages, etc).\r
 //\r
 extern UINT8  VfrBin[];\r
@@ -65,18 +64,15 @@ extern UINT8  InventoryBin[];
 \r
 //\r
 // This is the generated String package data for all .UNI files.\r
-// This data array is ready to be used as input of HiiLibPreparePackageList() to\r
+// This data array is ready to be used as input of HiiAddPackages() to\r
 // create a packagelist (which contains Form packages, String packages, etc).\r
 //\r
 extern UINT8  DriverSampleStrings[];\r
 \r
-#define VAR_OFFSET(Field)    \\r
-  ((UINT16) ((UINTN) &(((DRIVER_SAMPLE_CONFIGURATION *) 0)->Field)))\r
+#define DYNAMIC_ONE_OF_VAR_OFFSET        OFFSET_OF (DRIVER_SAMPLE_CONFIGURATION, DynamicOneof)\r
+#define DYNAMIC_ORDERED_LIST_VAR_OFFSET  OFFSET_OF (DRIVER_SAMPLE_CONFIGURATION, DynamicOrderedList)\r
 \r
-#define DYNAMIC_ONE_OF_VAR_OFFSET        VAR_OFFSET (DynamicOneof)\r
-#define DYNAMIC_ORDERED_LIST_VAR_OFFSET  VAR_OFFSET (DynamicOrderedList)\r
-\r
-#define DRIVER_SAMPLE_PRIVATE_SIGNATURE EFI_SIGNATURE_32 ('D', 'S', 'p', 's')\r
+#define DRIVER_SAMPLE_PRIVATE_SIGNATURE SIGNATURE_32 ('D', 'S', 'p', 's')\r
 \r
 typedef struct {\r
   UINTN                            Signature;\r
@@ -102,4 +98,16 @@ typedef struct {
 \r
 #define DRIVER_SAMPLE_PRIVATE_FROM_THIS(a)  CR (a, DRIVER_SAMPLE_PRIVATE_DATA, ConfigAccess, DRIVER_SAMPLE_PRIVATE_SIGNATURE)\r
 \r
+#pragma pack(1)\r
+\r
+///\r
+/// HII specific Vendor Device Path definition.\r
+///\r
+typedef struct {\r
+  VENDOR_DEVICE_PATH             VendorDevicePath;\r
+  EFI_DEVICE_PATH_PROTOCOL       End;\r
+} HII_VENDOR_DEVICE_PATH;\r
+\r
+#pragma pack()\r
+\r
 #endif\r