]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Include/Library/HttpLib.h
MdeModulePkg/DxeHttpLib: Refine some coding style.
[mirror_edk2.git] / MdeModulePkg / Include / Library / HttpLib.h
index af9ab5f012c6b71e8353875bb10856ffee320bbc..9975aea676de09bd7b02b90bd37cd9d698824095 100644 (file)
@@ -286,8 +286,9 @@ HttpInitMsgParser (
 \r
   @retval EFI_SUCCESS                Successfully parse the message-body.\r
   @retval EFI_INVALID_PARAMETER      MsgParser is NULL or Body is NULL or BodyLength is 0.\r
-  @retval Others                     Operation aborted.\r
-\r
+  @retval EFI_ABORTED                Operation aborted.\r
+  @retval Other                      Error happened while parsing message body.\r
+  \r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -372,6 +373,7 @@ HttpFindHeader (
 \r
 \r
   @retval EFI_SUCCESS             The FieldName and FieldValue are set into HttpHeader successfully.\r
+  @retval EFI_INVALID_PARAMETER   The parameter is invalid.\r
   @retval EFI_OUT_OF_RESOURCES    Failed to allocate resources.\r
 \r
 **/\r
@@ -417,24 +419,33 @@ HttpFreeHeaderFields (
   );\r
 \r
 /**\r
-  Generate HTTP request string.\r
+  Generate HTTP request message.\r
+\r
+  This function will allocate memory for the whole HTTP message and generate a\r
+  well formatted HTTP Request message in it, include the Request-Line, header\r
+  fields and also the message body. It is the caller's responsibility to free\r
+  the buffer returned in *RequestMsg.\r
 \r
-  @param[in]   Message            Pointer to storage containing HTTP message data.\r
+  @param[in]   Message            Pointer to the EFI_HTTP_MESSAGE structure which\r
+                                  contains the required information to generate\r
+                                  the HTTP request message.\r
   @param[in]   Url                The URL of a remote host.\r
-  @param[out]  RequestString      Pointer to the created HTTP request string.\r
+  @param[out]  RequestMsg         Pointer to the created HTTP request message.\r
                                   NULL if any error occured.\r
+  @param[out]  RequestMsgSize     Size of the RequestMsg (in bytes).\r
 \r
-  @return EFI_SUCCESS             If HTTP request string was created successfully\r
+  @retval EFI_SUCCESS             If HTTP request string was created successfully.\r
   @retval EFI_OUT_OF_RESOURCES    Failed to allocate resources.\r
-  @retval EFI_INVALID_PARAMETER   The input arguments are invalid\r
+  @retval EFI_INVALID_PARAMETER   The input arguments are invalid.\r
 \r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
-HttpGenRequestString (\r
+HttpGenRequestMessage (\r
   IN     CONST EFI_HTTP_MESSAGE        *Message,\r
   IN     CONST CHAR8                   *Url,\r
-     OUT CHAR8                         **RequestString\r
+     OUT CHAR8                         **RequestMsg,\r
+     OUT UINTN                         *RequestMsgSize\r
   );\r
 \r
 /**\r