]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Protocol/Http.h
MdePkg: Add definitions for the SPI protocols introduced in PI 1.6.
[mirror_edk2.git] / MdePkg / Include / Protocol / Http.h
index ad6c76a4c44d79dde798dd91e204e2b1169493b3..bdcd7b1771290ff8cb603fb602eca5024122984b 100644 (file)
@@ -4,8 +4,8 @@
   HTTP Service Binding Protocol (HTTPSB)\r
   HTTP Protocol (HTTP)\r
 \r
-  Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>\r
-  (C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>\r
+  Copyright (c) 2016 - 2017, Intel Corporation. All rights reserved.<BR>\r
+  (C) Copyright 2015-2017 Hewlett Packard Enterprise Development LP<BR>\r
   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
@@ -73,7 +73,7 @@ typedef enum {
   HTTP_STATUS_204_NO_CONTENT,\r
   HTTP_STATUS_205_RESET_CONTENT,\r
   HTTP_STATUS_206_PARTIAL_CONTENT,\r
-  HTTP_STATUS_300_MULTIPLE_CHIOCES,\r
+  HTTP_STATUS_300_MULTIPLE_CHOICES,\r
   HTTP_STATUS_301_MOVED_PERMANENTLY,\r
   HTTP_STATUS_302_FOUND,\r
   HTTP_STATUS_303_SEE_OTHER,\r
@@ -103,7 +103,8 @@ typedef enum {
   HTTP_STATUS_502_BAD_GATEWAY,\r
   HTTP_STATUS_503_SERVICE_UNAVAILABLE,\r
   HTTP_STATUS_504_GATEWAY_TIME_OUT,\r
-  HTTP_STATUS_505_HTTP_VERSION_NOT_SUPPORTED\r
+  HTTP_STATUS_505_HTTP_VERSION_NOT_SUPPORTED,\r
+  HTTP_STATUS_308_PERMANENT_REDIRECT\r
 } EFI_HTTP_STATUS_CODE;\r
 \r
 ///\r
@@ -282,6 +283,8 @@ typedef struct {
   /// Status will be set to one of the following value if the HTTP request is\r
   /// successfully sent or if an unexpected error occurs:\r
   ///   EFI_SUCCESS:      The HTTP request was successfully sent to the remote host.\r
+  ///   EFI_HTTP_ERROR:   The response message was successfully received but contains a\r
+  ///                     HTTP error. The response status code is returned in token.\r
   ///   EFI_ABORTED:      The HTTP request was cancelled by the caller and removed from\r
   ///                     the transmit queue.\r
   ///   EFI_TIMEOUT:      The HTTP request timed out before reaching the remote host.\r
@@ -302,20 +305,22 @@ typedef struct {
 \r
   @param[in]  This                Pointer to EFI_HTTP_PROTOCOL instance.\r
   @param[out] HttpConfigData      Point to buffer for operational parameters of this\r
-                                  HTTP instance.\r
+                                  HTTP instance. It is the responsibility of the caller \r
+                                  to allocate the memory for HttpConfigData and \r
+                                  HttpConfigData->AccessPoint.IPv6Node/IPv4Node. In fact, \r
+                                  it is recommended to allocate sufficient memory to record \r
+                                  IPv6Node since it is big enough for all possibilities.\r
 \r
   @retval EFI_SUCCESS             Operation succeeded.\r
   @retval EFI_INVALID_PARAMETER   This is NULL.\r
                                   HttpConfigData is NULL.\r
-                                  HttpInstance->LocalAddressIsIPv6 is FALSE and\r
-                                  HttpConfigData->IPv4Node is NULL.\r
-                                  HttpInstance->LocalAddressIsIPv6 is TRUE and\r
-                                  HttpConfigData->IPv6Node is NULL.\r
+                                  HttpConfigData->AccessPoint.IPv4Node or \r
+                                  HttpConfigData->AccessPoint.IPv6Node is NULL.\r
   @retval EFI_NOT_STARTED         This EFI HTTP Protocol instance has not been started.\r
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI * EFI_HTTP_GET_MODE_DATA)(\r
+(EFIAPI *EFI_HTTP_GET_MODE_DATA)(\r
   IN  EFI_HTTP_PROTOCOL         *This,\r
   OUT EFI_HTTP_CONFIG_DATA      *HttpConfigData\r
   );\r
@@ -339,11 +344,10 @@ EFI_STATUS
   @retval EFI_SUCCESS             Operation succeeded.\r
   @retval EFI_INVALID_PARAMETER   One or more of the following conditions is TRUE:\r
                                   This is NULL.\r
-                                  HttpConfigData is NULL.\r
                                   HttpConfigData->LocalAddressIsIPv6 is FALSE and\r
-                                  HttpConfigData->IPv4Node is NULL.\r
+                                  HttpConfigData->AccessPoint.IPv4Node is NULL.\r
                                   HttpConfigData->LocalAddressIsIPv6 is TRUE and\r
-                                  HttpConfigData->IPv6Node is NULL.\r
+                                  HttpConfigData->AccessPoint.IPv6Node is NULL.\r
   @retval EFI_ALREADY_STARTED     Reinitialize this HTTP instance without calling\r
                                   Configure() with NULL to reset it.\r
   @retval EFI_DEVICE_ERROR        An unexpected system or network error occurred.\r
@@ -354,9 +358,9 @@ EFI_STATUS
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI * EFI_HTTP_CONFIGURE)(\r
+(EFIAPI *EFI_HTTP_CONFIGURE)(\r
   IN  EFI_HTTP_PROTOCOL         *This,\r
-  IN  EFI_HTTP_CONFIG_DATA      *HttpConfigData\r
+  IN  EFI_HTTP_CONFIG_DATA      *HttpConfigData OPTIONAL\r
   );\r
 \r
 /**\r