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

#include <HTTP2MimeResponseSinkInterface.h>

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

Public Member Functions

virtual ~HTTP2MimeResponseSinkInterface ()=default
 
virtual bool onReceiveResponseCode (long responseCode)=0
 
virtual bool onReceiveHeaderLine (const std::string &line)=0
 
virtual bool onBeginMimePart (const std::multimap< std::string, std::string > &headers)=0
 
virtual HTTP2ReceiveDataStatus onReceiveMimeData (const char *bytes, size_t size)=0
 
virtual bool onEndMimePart ()=0
 
virtual HTTP2ReceiveDataStatus onReceiveNonMimeData (const char *bytes, size_t size)=0
 
virtual void onResponseFinished (HTTP2ResponseFinishedStatus status)=0
 

Detailed Description

Interface for receiving a mime encoded HTTP2 response.

Mock class which implements the to allow testing

Constructor & Destructor Documentation

◆ ~HTTP2MimeResponseSinkInterface()

virtual alexaClientSDK::avsCommon::utils::http2::HTTP2MimeResponseSinkInterface::~HTTP2MimeResponseSinkInterface ( )
virtualdefault

Default destructor.

Member Function Documentation

◆ onBeginMimePart()

virtual bool alexaClientSDK::avsCommon::utils::http2::HTTP2MimeResponseSinkInterface::onBeginMimePart ( const std::multimap< std::string, std::string > &  headers)
pure virtual

Notification of the start of a new mime part.

Note
Calls to this method may block network operations for the associated instance of HTTP2ConnectionInterface, so they should return quickly.
Parameters
headersA multimap from header names to header values.
Returns
Whether receipt of the response should continue.

Implemented in alexaClientSDK::acl::MimeResponseSink, alexaClientSDK::acl::test::MockMimeResponseSink, and alexaClientSDK::avsCommon::utils::http2::MockHTTP2MimeResponseDecodeSink.

◆ onEndMimePart()

virtual bool alexaClientSDK::avsCommon::utils::http2::HTTP2MimeResponseSinkInterface::onEndMimePart ( )
pure virtual

Notification of the end of the current mime part.

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

Implemented in alexaClientSDK::acl::MimeResponseSink, alexaClientSDK::acl::test::MockMimeResponseSink, and alexaClientSDK::avsCommon::utils::http2::MockHTTP2MimeResponseDecodeSink.

◆ onReceiveHeaderLine()

virtual bool alexaClientSDK::avsCommon::utils::http2::HTTP2MimeResponseSinkInterface::onReceiveHeaderLine ( const std::string &  line)
pure virtual

Notification that 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.

Implemented in alexaClientSDK::acl::MimeResponseSink, alexaClientSDK::acl::test::MockMimeResponseSink, and alexaClientSDK::avsCommon::utils::http2::MockHTTP2MimeResponseDecodeSink.

◆ onReceiveMimeData()

virtual HTTP2ReceiveDataStatus alexaClientSDK::avsCommon::utils::http2::HTTP2MimeResponseSinkInterface::onReceiveMimeData ( const char *  bytes,
size_t  size 
)
pure virtual

Notification of new body data received from 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

Implemented in alexaClientSDK::acl::MimeResponseSink, alexaClientSDK::acl::test::MockMimeResponseSink, and alexaClientSDK::avsCommon::utils::http2::MockHTTP2MimeResponseDecodeSink.

◆ onReceiveNonMimeData()

virtual HTTP2ReceiveDataStatus alexaClientSDK::avsCommon::utils::http2::HTTP2MimeResponseSinkInterface::onReceiveNonMimeData ( const char *  bytes,
size_t  size 
)
pure virtual

Notification of receipt of non-mime 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.

Implemented in alexaClientSDK::acl::MimeResponseSink, alexaClientSDK::acl::test::MockMimeResponseSink, and alexaClientSDK::avsCommon::utils::http2::MockHTTP2MimeResponseDecodeSink.

◆ onReceiveResponseCode()

virtual bool alexaClientSDK::avsCommon::utils::http2::HTTP2MimeResponseSinkInterface::onReceiveResponseCode ( long  responseCode)
pure virtual

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.

Implemented in alexaClientSDK::acl::MimeResponseSink, alexaClientSDK::acl::test::MockMimeResponseSink, and alexaClientSDK::avsCommon::utils::http2::MockHTTP2MimeResponseDecodeSink.

◆ onResponseFinished()

virtual void alexaClientSDK::avsCommon::utils::http2::HTTP2MimeResponseSinkInterface::onResponseFinished ( HTTP2ResponseFinishedStatus  status)
pure virtual

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 the response finished.
See also
HTTP2ResponseFinishedStatus.

Implemented in alexaClientSDK::acl::MimeResponseSink, alexaClientSDK::acl::test::MockMimeResponseSink, and alexaClientSDK::avsCommon::utils::http2::MockHTTP2MimeResponseDecodeSink.


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

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