VirtualBox

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

Last change on this file since 99404 was 99404, checked in by vboxsync, 23 months ago

Devices/EFI/FirmwareNew: Update to edk2-stable202302 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
10#ifndef REDFISH_CONTENT_CODING_LIB_H_
11#define REDFISH_CONTENT_CODING_LIB_H_
12
13/**
14 This is the function to encode the content use the
15 algorithm indicated in ContentEncodedValue. The naming of
16 ContentEncodedValue is follow HTTP spec or could be a
17 platform-specific value.
18
19 @param[in] ContentEncodedValue HTTP conent encoded value.
20 The value could be one of below
21 or any which is platform-specific.
22 - HTTP_CONTENT_ENCODING_IDENTITY "identity"
23 - HTTP_CONTENT_ENCODING_GZIP "gzip"
24 - HTTP_CONTENT_ENCODING_COMPRESS "compress"
25 - HTTP_CONTENT_ENCODING_DEFLATE "deflate"
26 - HTTP_CONTENT_ENCODING_BROTLI "br"
27 @param[in] OriginalContent Original content.
28 @param[in] OriginalContentLength The length of original content.
29 @param[out] EncodedContentPointer Pointer to receive the encoded content pointer.
30 @param[out] EncodedContentLength Length of encoded content.
31
32 @retval EFI_SUCCESS Content is encoded successfully.
33 @retval EFI_UNSUPPORTED No supported encoding funciton,
34 @retval EFI_INVALID_PARAMETER One of the given parameter is invalid.
35
36**/
37
38EFI_STATUS
39RedfishContentEncode (
40 IN CHAR8 *ContentEncodedValue,
41 IN CHAR8 *OriginalContent,
42 IN UINTN OriginalContentLength,
43 OUT VOID **EncodedContentPointer,
44 OUT UINTN *EncodedLength
45 );
46
47/**
48 This is the function to decode the content use the
49 algorithm indicated in ContentEncodedValue. The naming of
50 ContentEncodedValue is follow HTTP spec or could be a
51 platform-specific value.
52
53 @param[in] ContentDecodedValue HTTP conent decoded value.
54 The value could be one of below
55 or any which is platform-specific.
56 - HTTP_CONTENT_ENCODING_IDENTITY "identity"
57 - HTTP_CONTENT_ENCODING_GZIP "gzip"
58 - HTTP_CONTENT_ENCODING_COMPRESS "compress"
59 - HTTP_CONTENT_ENCODING_DEFLATE "deflate"
60 - HTTP_CONTENT_ENCODING_BROTLI "br"
61 @param[in] ContentPointer Original content.
62 @param[in] ContentLength The length of original content.
63 @param[out] DecodedContentPointer Pointer to receive decoded content pointer.
64 @param[out] DecodedContentLength Length of decoded content.
65
66 @retval EFI_SUCCESS Content is decoded successfully.
67 @retval EFI_UNSUPPORTED No supported decoding funciton,
68 @retval EFI_INVALID_PARAMETER One of the given parameter is invalid.
69
70**/
71EFI_STATUS
72RedfishContentDecode (
73 IN CHAR8 *ContentEncodedValue,
74 IN VOID *ContentPointer,
75 IN UINTN ContentLength,
76 OUT VOID **DecodedContentPointer,
77 OUT UINTN *DecodedLength
78 );
79
80#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