Reviewed-by: Siyuan Fu <siyuan...@intel.com>

-----Original Message-----
From: Zhang, Lubo 
Sent: Friday, January 29, 2016 11:45 AM
To: edk2-devel@lists.01.org
Cc: Ye, Ting <ting...@intel.com>; Fu, Siyuan <siyuan...@intel.com>; Gao, Liming 
<liming....@intel.com>
Subject: [PATCH v2] MdePkg:Add a new error status code EFI_HTTP_ERROR.

v2:
*Return the EFI_HTTP_ERROR in the “Status” field in token, instead of in the 
status codes returned table of EFI_HTTP_PROTOCOL.Response() interface.

Cc: Ye Ting <ting...@intel.com>
Cc: Fu Siyuan <siyuan...@intel.com>
Cc: Liming Gao <liming....@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zhang Lubo <lubo.zh...@intel.com>
---
 MdePkg/Include/Base.h              | 7 ++++++-
 MdePkg/Include/Protocol/Http.h     | 2 ++
 MdePkg/Include/Uefi/UefiBaseType.h | 3 ++-
 3 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/MdePkg/Include/Base.h b/MdePkg/Include/Base.h index 
85ed34f..882b5a6 100644
--- a/MdePkg/Include/Base.h
+++ b/MdePkg/Include/Base.h
@@ -4,11 +4,11 @@
   This is the include file for any module of type base. Base modules only use
   types defined via this include file and can be ported easily to any
   environment. There are a set of base libraries in the Mde Package that can
   be used to implement base modules.
 
-Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
 Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>  This 
program and the accompanying materials  are licensed and made available under 
the terms and conditions of the BSD License  which accompanies this 
distribution.  The full text of the license may be found at  
http://opensource.org/licenses/bsd-license.php.
@@ -939,10 +939,15 @@ typedef UINTN RETURN_STATUS;  /// security status.
 ///
 #define RETURN_COMPROMISED_DATA      ENCODE_ERROR (33)
 
 ///
+/// A HTTP error occurred during the network operation.
+///
+#define RETURN_HTTP_ERROR            ENCODE_ERROR (35)
+
+///
 /// The string contained one or more characters that  /// the device could not 
render and were skipped.
 ///
 #define RETURN_WARN_UNKNOWN_GLYPH    ENCODE_WARNING (1)
 
diff --git a/MdePkg/Include/Protocol/Http.h b/MdePkg/Include/Protocol/Http.h 
index ad6c76a..22201b4 100644
--- a/MdePkg/Include/Protocol/Http.h
+++ b/MdePkg/Include/Protocol/Http.h
@@ -280,10 +280,12 @@ typedef struct {
   EFI_EVENT                     Event;
   ///
   /// Status will be set to one of the following value if the HTTP request is
   /// successfully sent or if an unexpected error occurs:
   ///   EFI_SUCCESS:      The HTTP request was successfully sent to the remote 
host.
+  ///   EFI_HTTP_ERROR:   The response message was successfully received but 
contains a
+  ///                     HTTP error. The response status code is returned in 
token.
   ///   EFI_ABORTED:      The HTTP request was cancelled by the caller and 
removed from
   ///                     the transmit queue.
   ///   EFI_TIMEOUT:      The HTTP request timed out before reaching the 
remote host.
   ///   EFI_DEVICE_ERROR: An unexpected system or network error occurred.
   ///
diff --git a/MdePkg/Include/Uefi/UefiBaseType.h 
b/MdePkg/Include/Uefi/UefiBaseType.h
index b505e7d..90a93db 100644
--- a/MdePkg/Include/Uefi/UefiBaseType.h
+++ b/MdePkg/Include/Uefi/UefiBaseType.h
@@ -1,10 +1,10 @@
 /** @file
   Defines data types and constants introduced in UEFI.
 
 Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR> 
-Portions copyright (c) 2011 - 2013, ARM Ltd. All rights reserved.<BR>
+Portions copyright (c) 2011 - 2016, ARM Ltd. All rights reserved.<BR>
 
 This program and the accompanying materials are licensed and made available 
under  the terms and conditions of the BSD License that accompanies this 
distribution.  
 The full text of the license may be found at
 http://opensource.org/licenses/bsd-license.php.                                
          
@@ -149,10 +149,11 @@ typedef union {
 #define EFI_CRC_ERROR             RETURN_CRC_ERROR   
 #define EFI_END_OF_MEDIA          RETURN_END_OF_MEDIA
 #define EFI_END_OF_FILE           RETURN_END_OF_FILE
 #define EFI_INVALID_LANGUAGE      RETURN_INVALID_LANGUAGE
 #define EFI_COMPROMISED_DATA      RETURN_COMPROMISED_DATA
+#define EFI_HTTP_ERROR            RETURN_HTTP_ERROR
 
 #define EFI_WARN_UNKNOWN_GLYPH    RETURN_WARN_UNKNOWN_GLYPH   
 #define EFI_WARN_DELETE_FAILURE   RETURN_WARN_DELETE_FAILURE  
 #define EFI_WARN_WRITE_FAILURE    RETURN_WARN_WRITE_FAILURE   
 #define EFI_WARN_BUFFER_TOO_SMALL RETURN_WARN_BUFFER_TOO_SMALL
--
1.9.5.msysgit.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to