]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/HttpBootDxe/HttpBootDxe.h
NetworkPkg: Add URI configuration form to HTTP boot driver.
[mirror_edk2.git] / NetworkPkg / HttpBootDxe / HttpBootDxe.h
index 08f88c5606a008edbdd4eadf73428ad8c392e0ef..7cb4b2c55a14e40a58e9025065cfbcc965321ff5 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   UEFI HTTP boot driver's private data structure and interfaces declaration.\r
 \r
-Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>\r
 (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r
 This program and the accompanying materials are licensed and made available under \r
 the terms and conditions of the BSD License that accompanies this distribution.  \r
@@ -24,6 +24,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 // Libraries\r
 //\r
 #include <Library/UefiBootServicesTableLib.h>\r
+#include <Library/UefiHiiServicesLib.h>\r
+#include <Library/UefiRuntimeServicesTableLib.h>\r
 #include <Library/MemoryAllocationLib.h>\r
 #include <Library/BaseLib.h>\r
 #include <Library/UefiLib.h>\r
@@ -31,6 +33,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Library/DebugLib.h>\r
 #include <Library/NetLib.h>\r
 #include <Library/HttpLib.h>\r
+#include <Library/HiiLib.h>\r
+#include <Library/PrintLib.h>\r
 \r
 //\r
 // UEFI Driver Model Protocols\r
@@ -42,6 +46,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 //\r
 // Consumed Protocols\r
 //\r
+#include <Protocol/ServiceBinding.h>\r
+#include <Protocol/HiiConfigAccess.h>\r
 #include <Protocol/NetworkInterfaceIdentifier.h>\r
 #include <Protocol/Dhcp4.h>\r
 #include <Protocol/Dhcp6.h>\r
@@ -54,6 +60,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 //\r
 #include <Protocol/LoadFile.h>\r
 \r
+//\r
+// Consumed Guids\r
+//\r
+#include <Guid/HttpBootConfigHii.h>\r
+\r
 //\r
 // Driver Version\r
 //\r
@@ -81,6 +92,7 @@ typedef struct _HTTP_BOOT_VIRTUAL_NIC       HTTP_BOOT_VIRTUAL_NIC;
 #include "HttpBootImpl.h"\r
 #include "HttpBootSupport.h"\r
 #include "HttpBootClient.h"\r
+#include "HttpBootConfig.h"\r
 \r
 typedef union {\r
   HTTP_BOOT_DHCP4_PACKET_CACHE              Dhcp4;\r
@@ -95,6 +107,14 @@ struct _HTTP_BOOT_VIRTUAL_NIC {
   HTTP_BOOT_PRIVATE_DATA                    *Private;\r
 };\r
 \r
+#define HTTP_BOOT_PRIVATE_DATA_FROM_CALLBACK_INFO(Callback) \\r
+  CR ( \\r
+  Callback, \\r
+  HTTP_BOOT_PRIVATE_DATA, \\r
+  CallbackInfo, \\r
+  HTTP_BOOT_PRIVATE_DATA_SIGNATURE \\r
+  )\r
+\r
 struct _HTTP_BOOT_PRIVATE_DATA {\r
   UINT32                                    Signature;\r
   EFI_HANDLE                                Controller;\r
@@ -131,6 +151,11 @@ struct _HTTP_BOOT_PRIVATE_DATA {
   EFI_DEVICE_PATH_PROTOCOL                  *DevicePath;\r
   UINT32                                    Id;\r
 \r
+  //\r
+  // HII callback info block\r
+  //\r
+  HTTP_BOOT_FORM_CALLBACK_INFO              CallbackInfo;\r
+\r
   //\r
   // Mode data\r
   //\r
@@ -146,6 +171,12 @@ struct _HTTP_BOOT_PRIVATE_DATA {
   UINTN                                     BootFileSize;\r
   BOOLEAN                                   NoGateway;\r
 \r
+  //\r
+  // URI string extracted from the input FilePath parameter.\r
+  //\r
+  CHAR8                                     *FilePathUri;\r
+  VOID                                      *FilePathUriParser;\r
+\r
   //\r
   // Cached HTTP data\r
   //\r