VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/FirmwareNew/RedfishPkg/Include/Library/RedfishContentCodingLib.h@ 89983

Last change on this file since 89983 was 89983, checked in by vboxsync, 3 years ago

Devices/EFI: Merge edk-stable202105 and openssl 1.1.1j and make it build, bugref:4643

  • Property svn:eol-style set to native
File size: 3.2 KB
Line 
1/** @file
2 Definitinos of RedfishContentCodingLib.
3
4 (C) Copyright 2021 Hewlett Packard Enterprise Development LP<BR>
5
6 SPDX-License-Identifier: BSD-2-Clause-Patent
7
8**/
9#ifndef REDFISH_CONTENT_CODING_LIB_H_
10#define REDFISH_CONTENT_CODING_LIB_H_
11
12/**
13 This is the function to encode the content use the
14 algorithm indicated in ContentEncodedValue. The naming of
15 ContentEncodedValue is follow HTTP spec or could be a
16 platform-specific value.
17
18 @param[in] ContentEncodedValue HTTP conent encoded value.
19 The value could be one of below
20 or any which is platform-specific.
21 - HTTP_CONTENT_ENCODING_IDENTITY "identity"
22 - HTTP_CONTENT_ENCODING_GZIP "gzip"
23 - HTTP_CONTENT_ENCODING_COMPRESS "compress"
24 - HTTP_CONTENT_ENCODING_DEFLATE "deflate"
25 - HTTP_CONTENT_ENCODING_BROTLI "br"
26 @param[in] OriginalContent Original content.
27 @param[in] OriginalContentLength The length of original content.
28 @param[out] EncodedContentPointer Pointer to receive the encoded content pointer.
29 @param[out] EncodedContentLength Length of encoded content.
30
31 @retval EFI_SUCCESS Content is encoded successfully.
32 @retval EFI_UNSUPPORTED No supported encoding funciton,
33 @retval EFI_INVALID_PARAMETER One of the given parameter is invalid.
34
35**/
36
37EFI_STATUS
38RedfishContentEncode (
39 IN CHAR8 *ContentEncodedValue,
40 IN CHAR8 *OriginalContent,
41 IN UINTN OriginalContentLength,
42 OUT VOID **EncodedContentPointer,
43 OUT UINTN *EncodedLength
44 );
45
46/**
47 This is the function to decode the content use the
48 algorithm indicated in ContentEncodedValue. The naming of
49 ContentEncodedValue is follow HTTP spec or could be a
50 platform-specific value.
51
52 @param[in] ContentDecodedValue HTTP conent decoded value.
53 The value could be one of below
54 or any which is platform-specific.
55 - HTTP_CONTENT_ENCODING_IDENTITY "identity"
56 - HTTP_CONTENT_ENCODING_GZIP "gzip"
57 - HTTP_CONTENT_ENCODING_COMPRESS "compress"
58 - HTTP_CONTENT_ENCODING_DEFLATE "deflate"
59 - HTTP_CONTENT_ENCODING_BROTLI "br"
60 @param[in] ContentPointer Original content.
61 @param[in] ContentLength The length of original content.
62 @param[out] DecodedContentPointer Pointer to receive decoded content pointer.
63 @param[out] DecodedContentLength Length of decoded content.
64
65 @retval EFI_SUCCESS Content is decoded successfully.
66 @retval EFI_UNSUPPORTED No supported decoding funciton,
67 @retval EFI_INVALID_PARAMETER One of the given parameter is invalid.
68
69**/
70EFI_STATUS
71RedfishContentDecode (
72 IN CHAR8 *ContentEncodedValue,
73 IN VOID *ContentPointer,
74 IN UINTN ContentLength,
75 OUT VOID **DecodedContentPointer,
76 OUT UINTN *DecodedLength
77 );
78#endif
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette