TianoCore EDK2 master
Loading...
Searching...
No Matches
RedfishContentCodingLib.h File Reference

Go to the source code of this file.

Functions

EFI_STATUS RedfishContentEncode (IN CHAR8 *ContentEncodedValue, IN CHAR8 *OriginalContent, IN UINTN OriginalContentLength, OUT VOID **EncodedContentPointer, OUT UINTN *EncodedLength)
 
EFI_STATUS RedfishContentDecode (IN CHAR8 *ContentEncodedValue, IN VOID *ContentPointer, IN UINTN ContentLength, OUT VOID **DecodedContentPointer, OUT UINTN *DecodedLength)
 

Detailed Description

Definitinos of RedfishContentCodingLib.

(C) Copyright 2021 Hewlett Packard Enterprise Development LP

SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file RedfishContentCodingLib.h.

Function Documentation

◆ RedfishContentDecode()

EFI_STATUS RedfishContentDecode ( IN CHAR8 *  ContentDecodedValue,
IN VOID *  ContentPointer,
IN UINTN  ContentLength,
OUT VOID **  DecodedContentPointer,
OUT UINTN DecodedContentLength 
)

This is the function to decode the content use the algorithm indicated in ContentEncodedValue. The naming of ContentEncodedValue is follow HTTP spec or could be a platform-specific value.

Parameters
[in]ContentDecodedValueHTTP conent decoded value. The value could be one of below or any which is platform-specific.
  • HTTP_CONTENT_ENCODING_IDENTITY "identity"
  • HTTP_CONTENT_ENCODING_GZIP "gzip"
  • HTTP_CONTENT_ENCODING_COMPRESS "compress"
  • HTTP_CONTENT_ENCODING_DEFLATE "deflate"
  • HTTP_CONTENT_ENCODING_BROTLI "br"
[in]ContentPointerOriginal content.
[in]ContentLengthThe length of original content.
[out]DecodedContentPointerPointer to receive decoded content pointer.
[out]DecodedContentLengthLength of decoded content.
Return values
EFI_SUCCESSContent is decoded successfully.
EFI_UNSUPPORTEDNo supported decoding funciton,
EFI_INVALID_PARAMETEROne of the given parameter is invalid.

Definition at line 72 of file RedfishContentCodingLibNull.c.

◆ RedfishContentEncode()

EFI_STATUS RedfishContentEncode ( IN CHAR8 *  ContentEncodedValue,
IN CHAR8 *  OriginalContent,
IN UINTN  OriginalContentLength,
OUT VOID **  EncodedContentPointer,
OUT UINTN EncodedContentLength 
)

This is the function to encode the content use the algorithm indicated in ContentEncodedValue. The naming of ContentEncodedValue is follow HTTP spec or could be a platform-specific value.

Parameters
[in]ContentEncodedValueHTTP conent encoded value. The value could be one of below or any which is platform-specific.
  • HTTP_CONTENT_ENCODING_IDENTITY "identity"
  • HTTP_CONTENT_ENCODING_GZIP "gzip"
  • HTTP_CONTENT_ENCODING_COMPRESS "compress"
  • HTTP_CONTENT_ENCODING_DEFLATE "deflate"
  • HTTP_CONTENT_ENCODING_BROTLI "br"
[in]OriginalContentOriginal content.
[in]OriginalContentLengthThe length of original content.
[out]EncodedContentPointerPointer to receive the encoded content pointer.
[out]EncodedContentLengthLength of encoded content.
Return values
EFI_SUCCESSContent is encoded successfully.
EFI_UNSUPPORTEDNo supported encoding funciton,
EFI_INVALID_PARAMETEROne of the given parameter is invalid.

Definition at line 36 of file RedfishContentCodingLibNull.c.