2 The header files of Http Utilities functions for HttpUtilities driver.
4 Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
5 (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
7 This program and the accompanying materials
8 are licensed and made available under the terms and conditions of the BSD License
9 which accompanies this distribution. The full text of the license may be found at
10 http://opensource.org/licenses/bsd-license.php.
12 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
13 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
17 #ifndef __EFI_HTTP_UTILITIES_DXE_H__
18 #define __EFI_HTTP_UTILITIES_DXE_H__
25 #include <Library/UefiBootServicesTableLib.h>
26 #include <Library/MemoryAllocationLib.h>
27 #include <Library/BaseMemoryLib.h>
28 #include <Library/BaseLib.h>
29 #include <Library/UefiLib.h>
30 #include <Library/DebugLib.h>
31 #include <Library/HttpLib.h>
36 #include <Protocol/HttpUtilities.h>
37 #include <Protocol/Http.h>
42 extern EFI_HTTP_UTILITIES_PROTOCOL mHttpUtilitiesProtocol
;
45 Create HTTP header based on a combination of seed header, fields
46 to delete, and fields to append.
48 The Build() function is used to manage the headers portion of an
49 HTTP message by providing the ability to add, remove, or replace
52 @param[in] This Pointer to EFI_HTTP_UTILITIES_PROTOCOL instance.
53 @param[in] SeedMessageSize Size of the initial HTTP header. This can be zero.
54 @param[in] SeedMessage Initial HTTP header to be used as a base for
55 building a new HTTP header. If NULL,
56 SeedMessageSize is ignored.
57 @param[in] DeleteCount Number of null-terminated HTTP header field names
59 @param[in] DeleteList List of null-terminated HTTP header field names to
60 remove from SeedMessage. Only the field names are
61 in this list because the field values are irrelevant
63 @param[in] AppendCount Number of header fields in AppendList.
64 @param[in] AppendList List of HTTP headers to populate NewMessage with.
65 If SeedMessage is not NULL, AppendList will be
66 appended to the existing list from SeedMessage in
68 @param[out] NewMessageSize Pointer to number of header fields in NewMessage.
69 @param[out] NewMessage Pointer to a new list of HTTP headers based on.
71 @retval EFI_SUCCESS Add, remove, and replace operations succeeded.
72 @retval EFI_OUT_OF_RESOURCES Could not allocate memory for NewMessage.
73 @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
79 IN EFI_HTTP_UTILITIES_PROTOCOL
*This
,
80 IN UINTN SeedMessageSize
,
81 IN VOID
*SeedMessage
, OPTIONAL
83 IN CHAR8
*DeleteList
[], OPTIONAL
85 IN EFI_HTTP_HEADER
*AppendList
[], OPTIONAL
86 OUT UINTN
*NewMessageSize
,
92 Parses HTTP header and produces an array of key/value pairs.
94 The Parse() function is used to transform data stored in HttpHeader
95 into a list of fields paired with their corresponding values.
97 @param[in] This Pointer to EFI_HTTP_UTILITIES_PROTOCOL instance.
98 @param[in] HttpMessage Contains raw unformatted HTTP header string.
99 @param[in] HttpMessageSize Size of HTTP header.
100 @param[out] HeaderFields Array of key/value header pairs.
101 @param[out] FieldCount Number of headers in HeaderFields.
103 @retval EFI_SUCCESS Allocation succeeded.
104 @retval EFI_NOT_STARTED This EFI HTTP Protocol instance has not been
106 @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
109 HeaderFields is NULL.
115 IN EFI_HTTP_UTILITIES_PROTOCOL
*This
,
116 IN CHAR8
*HttpMessage
,
117 IN UINTN HttpMessageSize
,
118 OUT EFI_HTTP_HEADER
**HeaderFields
,
119 OUT UINTN
*FieldCount