]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/HttpBootDxe/HttpBootSupport.h
NetworkPkg: Clean up source files
[mirror_edk2.git] / NetworkPkg / HttpBootDxe / HttpBootSupport.h
index 9b7acd9e1b92fa74c7720ff6311aba8422e3452f..72a2f1f25a84cccc08fe39d20e57be43f02e9ed8 100644 (file)
@@ -1,13 +1,13 @@
 /** @file\r
   Support functions declaration for UEFI HTTP boot driver.\r
 \r
 /** @file\r
   Support functions declaration for UEFI HTTP boot driver.\r
 \r
-Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<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
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<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
 The full text of the license may be found at\r
 The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php.                                          \r
-    \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+http://opensource.org/licenses/bsd-license.php.\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -107,7 +107,7 @@ typedef struct {
   @param[in]  MaxHeaderCount         The maximun number of HTTP header in this holder.\r
 \r
   @return    A pointer of the HTTP header holder or NULL if failed.\r
   @param[in]  MaxHeaderCount         The maximun number of HTTP header in this holder.\r
 \r
   @return    A pointer of the HTTP header holder or NULL if failed.\r
-  \r
+\r
 **/\r
 HTTP_IO_HEADER *\r
 HttpBootCreateHeader (\r
 **/\r
 HTTP_IO_HEADER *\r
 HttpBootCreateHeader (\r
@@ -115,7 +115,7 @@ HttpBootCreateHeader (
   );\r
 \r
 /**\r
   );\r
 \r
 /**\r
-  Destroy the HTTP_IO_HEADER and release the resouces. \r
+  Destroy the HTTP_IO_HEADER and release the resouces.\r
 \r
   @param[in]  HttpIoHeader       Point to the HTTP header holder to be destroyed.\r
 \r
 \r
   @param[in]  HttpIoHeader       Point to the HTTP header holder to be destroyed.\r
 \r
@@ -129,14 +129,14 @@ HttpBootFreeHeader (
   Set or update a HTTP header with the field name and corresponding value.\r
 \r
   @param[in]  HttpIoHeader       Point to the HTTP header holder.\r
   Set or update a HTTP header with the field name and corresponding value.\r
 \r
   @param[in]  HttpIoHeader       Point to the HTTP header holder.\r
-  @param[in]  FieldName          Null terminated string which describes a field name. \r
+  @param[in]  FieldName          Null terminated string which describes a field name.\r
   @param[in]  FieldValue         Null terminated string which describes the corresponding field value.\r
 \r
   @retval  EFI_SUCCESS           The HTTP header has been set or updated.\r
   @retval  EFI_INVALID_PARAMETER Any input parameter is invalid.\r
   @retval  EFI_OUT_OF_RESOURCES  Insufficient resource to complete the operation.\r
   @retval  Other                 Unexpected error happened.\r
   @param[in]  FieldValue         Null terminated string which describes the corresponding field value.\r
 \r
   @retval  EFI_SUCCESS           The HTTP header has been set or updated.\r
   @retval  EFI_INVALID_PARAMETER Any input parameter is invalid.\r
   @retval  EFI_OUT_OF_RESOURCES  Insufficient resource to complete the operation.\r
   @retval  Other                 Unexpected error happened.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 HttpBootSetHeader (\r
 **/\r
 EFI_STATUS\r
 HttpBootSetHeader (\r
@@ -159,7 +159,7 @@ typedef enum {
   @param[in]    EventType      Indicate the Event type that occurs in the current callback.\r
   @param[in]    Message        HTTP message which will be send to, or just received from HTTP server.\r
   @param[in]    Context        The Callback Context pointer.\r
   @param[in]    EventType      Indicate the Event type that occurs in the current callback.\r
   @param[in]    Message        HTTP message which will be send to, or just received from HTTP server.\r
   @param[in]    Context        The Callback Context pointer.\r
-  \r
+\r
   @retval EFI_SUCCESS          Tells the HttpIo to continue the HTTP process.\r
   @retval Others               Tells the HttpIo to abort the current HTTP process.\r
 **/\r
   @retval EFI_SUCCESS          Tells the HttpIo to continue the HTTP process.\r
   @retval Others               Tells the HttpIo to abort the current HTTP process.\r
 **/\r
@@ -212,7 +212,7 @@ typedef struct {
   EFI_HANDLE                Image;\r
   EFI_HANDLE                Controller;\r
   EFI_HANDLE                Handle;\r
   EFI_HANDLE                Image;\r
   EFI_HANDLE                Controller;\r
   EFI_HANDLE                Handle;\r
-  \r
+\r
   EFI_HTTP_PROTOCOL         *Http;\r
 \r
   HTTP_IO_CALLBACK          Callback;\r
   EFI_HTTP_PROTOCOL         *Http;\r
 \r
   HTTP_IO_CALLBACK          Callback;\r
@@ -250,13 +250,13 @@ typedef struct {
 \r
   @retval EFI_SUCCESS             Operation succeeded.\r
   @retval EFI_DEVICE_ERROR        An unexpected network error occurred.\r
 \r
   @retval EFI_SUCCESS             Operation succeeded.\r
   @retval EFI_DEVICE_ERROR        An unexpected network error occurred.\r
-  @retval Others                  Other errors as indicated.  \r
+  @retval Others                  Other errors as indicated.\r
 **/\r
 EFI_STATUS\r
 HttpBootDns (\r
   IN     HTTP_BOOT_PRIVATE_DATA   *Private,\r
   IN     CHAR16                   *HostName,\r
 **/\r
 EFI_STATUS\r
 HttpBootDns (\r
   IN     HTTP_BOOT_PRIVATE_DATA   *Private,\r
   IN     CHAR16                   *HostName,\r
-     OUT EFI_IPv6_ADDRESS         *IpAddress \r
+     OUT EFI_IPv6_ADDRESS         *IpAddress\r
   );\r
 \r
 /**\r
   );\r
 \r
 /**\r
@@ -285,7 +285,7 @@ HttpBootCommonNotify (
                              HTTP_IO_CALLBACK_EVENT happened.\r
   @param[in]  Context        The Context data which will be passed to the Callback function.\r
   @param[out] HttpIo         The HTTP_IO.\r
                              HTTP_IO_CALLBACK_EVENT happened.\r
   @param[in]  Context        The Context data which will be passed to the Callback function.\r
   @param[out] HttpIo         The HTTP_IO.\r
-  \r
+\r
   @retval EFI_SUCCESS            The HTTP_IO is created and configured.\r
   @retval EFI_INVALID_PARAMETER  One or more parameters are invalid.\r
   @retval EFI_UNSUPPORTED        One or more of the control options are not\r
   @retval EFI_SUCCESS            The HTTP_IO is created and configured.\r
   @retval EFI_INVALID_PARAMETER  One or more parameters are invalid.\r
   @retval EFI_UNSUPPORTED        One or more of the control options are not\r
@@ -306,7 +306,7 @@ HttpIoCreateIo (
   );\r
 \r
 /**\r
   );\r
 \r
 /**\r
-  Destroy the HTTP_IO and release the resouces. \r
+  Destroy the HTTP_IO and release the resouces.\r
 \r
   @param[in]  HttpIo          The HTTP_IO which wraps the HTTP service to be destroyed.\r
 \r
 \r
   @param[in]  HttpIo          The HTTP_IO which wraps the HTTP service to be destroyed.\r
 \r
@@ -318,14 +318,14 @@ HttpIoDestroyIo (
 \r
 /**\r
   Synchronously send a HTTP REQUEST message to the server.\r
 \r
 /**\r
   Synchronously send a HTTP REQUEST message to the server.\r
-  \r
+\r
   @param[in]   HttpIo           The HttpIo wrapping the HTTP service.\r
   @param[in]   Request          A pointer to storage such data as URL and HTTP method.\r
   @param[in]   HttpIo           The HttpIo wrapping the HTTP service.\r
   @param[in]   Request          A pointer to storage such data as URL and HTTP method.\r
-  @param[in]   HeaderCount      Number of HTTP header structures in Headers list. \r
+  @param[in]   HeaderCount      Number of HTTP header structures in Headers list.\r
   @param[in]   Headers          Array containing list of HTTP headers.\r
   @param[in]   BodyLength       Length in bytes of the HTTP body.\r
   @param[in]   Headers          Array containing list of HTTP headers.\r
   @param[in]   BodyLength       Length in bytes of the HTTP body.\r
-  @param[in]   Body             Body associated with the HTTP request. \r
-  \r
+  @param[in]   Body             Body associated with the HTTP request.\r
+\r
   @retval EFI_SUCCESS            The HTTP request is trasmitted.\r
   @retval EFI_INVALID_PARAMETER  One or more parameters are invalid.\r
   @retval EFI_OUT_OF_RESOURCES   Failed to allocate memory.\r
   @retval EFI_SUCCESS            The HTTP request is trasmitted.\r
   @retval EFI_INVALID_PARAMETER  One or more parameters are invalid.\r
   @retval EFI_OUT_OF_RESOURCES   Failed to allocate memory.\r
@@ -345,12 +345,12 @@ HttpIoSendRequest (
 \r
 /**\r
   Synchronously receive a HTTP RESPONSE message from the server.\r
 \r
 /**\r
   Synchronously receive a HTTP RESPONSE message from the server.\r
-  \r
+\r
   @param[in]   HttpIo           The HttpIo wrapping the HTTP service.\r
   @param[in]   RecvMsgHeader    TRUE to receive a new HTTP response (from message header).\r
                                 FALSE to continue receive the previous response message.\r
   @param[out]  ResponseData     Point to a wrapper of the received response data.\r
   @param[in]   HttpIo           The HttpIo wrapping the HTTP service.\r
   @param[in]   RecvMsgHeader    TRUE to receive a new HTTP response (from message header).\r
                                 FALSE to continue receive the previous response message.\r
   @param[out]  ResponseData     Point to a wrapper of the received response data.\r
-  \r
+\r
   @retval EFI_SUCCESS            The HTTP response is received.\r
   @retval EFI_INVALID_PARAMETER  One or more parameters are invalid.\r
   @retval EFI_OUT_OF_RESOURCES   Failed to allocate memory.\r
   @retval EFI_SUCCESS            The HTTP response is received.\r
   @retval EFI_INVALID_PARAMETER  One or more parameters are invalid.\r
   @retval EFI_OUT_OF_RESOURCES   Failed to allocate memory.\r
@@ -369,7 +369,7 @@ HttpIoRecvResponse (
   This function checks the HTTP(S) URI scheme.\r
 \r
   @param[in]    Uri              The pointer to the URI string.\r
   This function checks the HTTP(S) URI scheme.\r
 \r
   @param[in]    Uri              The pointer to the URI string.\r
-  \r
+\r
   @retval EFI_SUCCESS            The URI scheme is valid.\r
   @retval EFI_INVALID_PARAMETER  The URI scheme is not HTTP or HTTPS.\r
   @retval EFI_ACCESS_DENIED      HTTP is disabled and the URI is HTTP.\r
   @retval EFI_SUCCESS            The URI scheme is valid.\r
   @retval EFI_INVALID_PARAMETER  The URI scheme is not HTTP or HTTPS.\r
   @retval EFI_ACCESS_DENIED      HTTP is disabled and the URI is HTTP.\r
@@ -384,10 +384,10 @@ HttpBootCheckUriScheme (
   Get the URI address string from the input device path.\r
 \r
   Caller need to free the buffer in the UriAddress pointer.\r
   Get the URI address string from the input device path.\r
 \r
   Caller need to free the buffer in the UriAddress pointer.\r
-  \r
+\r
   @param[in]   FilePath         Pointer to the device path which contains a URI device path node.\r
   @param[out]  UriAddress       The URI address string extract from the device path.\r
   @param[in]   FilePath         Pointer to the device path which contains a URI device path node.\r
   @param[out]  UriAddress       The URI address string extract from the device path.\r
-  \r
+\r
   @retval EFI_SUCCESS            The URI string is returned.\r
   @retval EFI_OUT_OF_RESOURCES   Failed to allocate memory.\r
 \r
   @retval EFI_SUCCESS            The URI string is returned.\r
   @retval EFI_OUT_OF_RESOURCES   Failed to allocate memory.\r
 \r
@@ -403,11 +403,11 @@ HttpBootParseFilePath (
   and also the image's URI info.\r
 \r
   @param[in]    Uri              The pointer to the image's URI string.\r
   and also the image's URI info.\r
 \r
   @param[in]    Uri              The pointer to the image's URI string.\r
-  @param[in]    UriParser        URI Parse result returned by NetHttpParseUrl(). \r
-  @param[in]    HeaderCount      Number of HTTP header structures in Headers list. \r
+  @param[in]    UriParser        URI Parse result returned by NetHttpParseUrl().\r
+  @param[in]    HeaderCount      Number of HTTP header structures in Headers list.\r
   @param[in]    Headers          Array containing list of HTTP headers.\r
   @param[out]   ImageType        The image type of the downloaded file.\r
   @param[in]    Headers          Array containing list of HTTP headers.\r
   @param[out]   ImageType        The image type of the downloaded file.\r
-  \r
+\r
   @retval EFI_SUCCESS            The image type is returned in ImageType.\r
   @retval EFI_INVALID_PARAMETER  ImageType, Uri or UriParser is NULL.\r
   @retval EFI_INVALID_PARAMETER  HeaderCount is not zero, and Headers is NULL.\r
   @retval EFI_SUCCESS            The image type is returned in ImageType.\r
   @retval EFI_INVALID_PARAMETER  ImageType, Uri or UriParser is NULL.\r
   @retval EFI_INVALID_PARAMETER  HeaderCount is not zero, and Headers is NULL.\r
@@ -426,7 +426,7 @@ HttpBootCheckImageType (
 \r
 /**\r
   This function register the RAM disk info to the system.\r
 \r
 /**\r
   This function register the RAM disk info to the system.\r
-  \r
+\r
   @param[in]       Private         The pointer to the driver's private data.\r
   @param[in]       BufferSize      The size of Buffer in bytes.\r
   @param[in]       Buffer          The base address of the RAM disk.\r
   @param[in]       Private         The pointer to the driver's private data.\r
   @param[in]       BufferSize      The size of Buffer in bytes.\r
   @param[in]       Buffer          The base address of the RAM disk.\r
@@ -448,7 +448,7 @@ HttpBootRegisterRamDisk (
 \r
 /**\r
   Indicate if the HTTP status code indicates a redirection.\r
 \r
 /**\r
   Indicate if the HTTP status code indicates a redirection.\r
-  \r
+\r
   @param[in]  StatusCode      HTTP status code from server.\r
 \r
   @return                     TRUE if it's redirection.\r
   @param[in]  StatusCode      HTTP status code from server.\r
 \r
   @return                     TRUE if it's redirection.\r