AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Public Member Functions | List of all members
alexaClientSDK::avsCommon::utils::http2::HTTP2MimeResponseDecoder Class Reference

#include <HTTP2MimeResponseDecoder.h>

Inheritance diagram for alexaClientSDK::avsCommon::utils::http2::HTTP2MimeResponseDecoder:
Inheritance graph
[legend]
Collaboration diagram for alexaClientSDK::avsCommon::utils::http2::HTTP2MimeResponseDecoder:
Collaboration graph
[legend]

Public Member Functions

 HTTP2MimeResponseDecoder (std::shared_ptr< HTTP2MimeResponseSinkInterface > sink)
 
 ~HTTP2MimeResponseDecoder ()=default
 
HTTP2ResponseSinkInterface methods.
bool onReceiveResponseCode (long responseCode) override
 
bool onReceiveHeaderLine (const std::string &line) override
 
HTTP2ReceiveDataStatus onReceiveData (const char *bytes, size_t size) override
 
void onResponseFinished (HTTP2ResponseFinishedStatus status) override
 
- Public Member Functions inherited from alexaClientSDK::avsCommon::utils::http2::HTTP2ResponseSinkInterface
virtual ~HTTP2ResponseSinkInterface ()=default
 

Detailed Description

Class that adapts between HTTPResponseSinkInterface and HTTP2MimeResponseSinkInterface providing mime decoding services.

Constructor & Destructor Documentation

◆ HTTP2MimeResponseDecoder()

alexaClientSDK::avsCommon::utils::http2::HTTP2MimeResponseDecoder::HTTP2MimeResponseDecoder ( std::shared_ptr< HTTP2MimeResponseSinkInterface sink)

Constructor.

Parameters
sinkPointer to the object to receive the mime parts.

◆ ~HTTP2MimeResponseDecoder()

alexaClientSDK::avsCommon::utils::http2::HTTP2MimeResponseDecoder::~HTTP2MimeResponseDecoder ( )
default

Destructor.

Member Function Documentation

◆ onReceiveData()

HTTP2ReceiveDataStatus alexaClientSDK::avsCommon::utils::http2::HTTP2MimeResponseDecoder::onReceiveData ( const char *  bytes,
size_t  size 
)
overridevirtual

Notification of receipt of body data in an HTTP2 response.

Note
Calls to this method may block network operations for the associated instance of HTTP2ConnectionInterface, so they should return quickly.
Parameters
bytesThe buffer containing the bytes to consume.
sizeThe number of bytes to consume.
Returns
Status of the operation.
See also
HTTP2ReceiveDataStatus.

Implements alexaClientSDK::avsCommon::utils::http2::HTTP2ResponseSinkInterface.

◆ onReceiveHeaderLine()

bool alexaClientSDK::avsCommon::utils::http2::HTTP2MimeResponseDecoder::onReceiveHeaderLine ( const std::string &  line)
overridevirtual

Notification than an HTTP header line was received.

Note
Calls to this method may block network operations for the associated instance of HTTP2ConnectionInterface, so they should return quickly.
Parameters
lineThe HTTP response header line that was received.
Returns
Whether receipt of the response should continue.

Implements alexaClientSDK::avsCommon::utils::http2::HTTP2ResponseSinkInterface.

◆ onReceiveResponseCode()

bool alexaClientSDK::avsCommon::utils::http2::HTTP2MimeResponseDecoder::onReceiveResponseCode ( long  responseCode)
overridevirtual

Notification that an HTTP response code was returned for the request.

Note
Calls to this method may block network operations for the associated instance of HTTP2ConnectionInterface, so they should return quickly.
Parameters
responseCodeThe response code received for the request.
Returns
Whether receipt of the response should continue.

Implements alexaClientSDK::avsCommon::utils::http2::HTTP2ResponseSinkInterface.

◆ onResponseFinished()

void alexaClientSDK::avsCommon::utils::http2::HTTP2MimeResponseDecoder::onResponseFinished ( HTTP2ResponseFinishedStatus  status)
overridevirtual

Notification that the request/response cycle has finished and no further notifications will be provided.

Note
Calls to this method may block network operations for the associated instance of HTTP2ConnectionInterface, so they should return quickly.
Parameters
statusThe status with which receiving the response finished.
See also
HTTP2ResponseFinishedStatus.

Implements alexaClientSDK::avsCommon::utils::http2::HTTP2ResponseSinkInterface.


The documentation for this class was generated from the following file:

AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0