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 SPDX-License-Identifier: BSD-2-Clause-Patent
11 #ifndef __EFI_HTTP_UTILITIES_DXE_H__
12 #define __EFI_HTTP_UTILITIES_DXE_H__
19 #include <Library/UefiBootServicesTableLib.h>
20 #include <Library/MemoryAllocationLib.h>
21 #include <Library/BaseMemoryLib.h>
22 #include <Library/BaseLib.h>
23 #include <Library/UefiLib.h>
24 #include <Library/DebugLib.h>
25 #include <Library/HttpLib.h>
30 #include <Protocol/HttpUtilities.h>
31 #include <Protocol/Http.h>
36 extern EFI_HTTP_UTILITIES_PROTOCOL mHttpUtilitiesProtocol
;
39 Create HTTP header based on a combination of seed header, fields
40 to delete, and fields to append.
42 The Build() function is used to manage the headers portion of an
43 HTTP message by providing the ability to add, remove, or replace
46 @param[in] This Pointer to EFI_HTTP_UTILITIES_PROTOCOL instance.
47 @param[in] SeedMessageSize Size of the initial HTTP header. This can be zero.
48 @param[in] SeedMessage Initial HTTP header to be used as a base for
49 building a new HTTP header. If NULL,
50 SeedMessageSize is ignored.
51 @param[in] DeleteCount Number of null-terminated HTTP header field names
53 @param[in] DeleteList List of null-terminated HTTP header field names to
54 remove from SeedMessage. Only the field names are
55 in this list because the field values are irrelevant
57 @param[in] AppendCount Number of header fields in AppendList.
58 @param[in] AppendList List of HTTP headers to populate NewMessage with.
59 If SeedMessage is not NULL, AppendList will be
60 appended to the existing list from SeedMessage in
62 @param[out] NewMessageSize Pointer to number of header fields in NewMessage.
63 @param[out] NewMessage Pointer to a new list of HTTP headers based on.
65 @retval EFI_SUCCESS Add, remove, and replace operations succeeded.
66 @retval EFI_OUT_OF_RESOURCES Could not allocate memory for NewMessage.
67 @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
73 IN EFI_HTTP_UTILITIES_PROTOCOL
*This
,
74 IN UINTN SeedMessageSize
,
75 IN VOID
*SeedMessage
, OPTIONAL
77 IN CHAR8
*DeleteList
[], OPTIONAL
79 IN EFI_HTTP_HEADER
*AppendList
[], OPTIONAL
80 OUT UINTN
*NewMessageSize
,
86 Parses HTTP header and produces an array of key/value pairs.
88 The Parse() function is used to transform data stored in HttpHeader
89 into a list of fields paired with their corresponding values.
91 @param[in] This Pointer to EFI_HTTP_UTILITIES_PROTOCOL instance.
92 @param[in] HttpMessage Contains raw unformatted HTTP header string.
93 @param[in] HttpMessageSize Size of HTTP header.
94 @param[out] HeaderFields Array of key/value header pairs.
95 @param[out] FieldCount Number of headers in HeaderFields.
97 @retval EFI_SUCCESS Allocation succeeded.
98 @retval EFI_NOT_STARTED This EFI HTTP Protocol instance has not been
100 @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
103 HeaderFields is NULL.
109 IN EFI_HTTP_UTILITIES_PROTOCOL
*This
,
110 IN CHAR8
*HttpMessage
,
111 IN UINTN HttpMessageSize
,
112 OUT EFI_HTTP_HEADER
**HeaderFields
,
113 OUT UINTN
*FieldCount