![]() |
AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
#include <MockHTTP2MimeRequestEncodeSource.h>
Public Member Functions | |
MockHTTP2MimeRequestEncodeSource (const std::vector< std::string > &m_data, const std::vector< std::vector< std::string >> &m_headers) | |
~MockHTTP2MimeRequestEncodeSource ()=default | |
HTTP2MimeRequestSourceInterface methods. | |
HTTP2GetMimeHeadersResult | getMimePartHeaderLines () override |
HTTP2SendDataResult | onSendMimePartData (char *bytes, size_t size) override |
std::vector< std::string > | getRequestHeaderLines () override |
![]() | |
virtual | ~HTTP2MimeRequestSourceInterface ()=default |
Public Attributes | |
std::vector< std::string > | m_data |
Stores the MIME data parts. More... | |
std::vector< std::vector< std::string > > | m_headers |
Stores the MIME header parts. More... | |
size_t | m_bytesWritten |
Index into the current MIME data part. More... | |
size_t | m_index |
Index of current MIME part being read. More... | |
bool | m_slowSource |
Enable sending PAUSE intermittently. More... | |
bool | m_abort |
If ABORT is to be sent. More... | |
size_t | m_pauseCount |
PAUSE count. More... | |
Mock class which implements the HTTP2MIMERequestSourceInterface to allow testing
alexaClientSDK::avsCommon::utils::http2::MockHTTP2MimeRequestEncodeSource::MockHTTP2MimeRequestEncodeSource | ( | const std::vector< std::string > & | m_data, |
const std::vector< std::vector< std::string >> & | m_headers | ||
) |
Constructor which accepts the various MIME parts to be passed onto the encoder as the request source
m_data | vector of MIME data parts |
m_headers | vector of MIME headers |
|
default |
Destructor
|
overridevirtual |
Get the header lines that should be output with the next mime part. This will be called once before onSendMimePartData()
is called for the first mime part and after each call to onSendMimePartData()
that returns HTTP2SendDataResult.status
== COMPLETE.
HTTP2GetMimeHeadersResult
specifying the status of the operation and a vector of header lines if the status was CONTINUE. Implements alexaClientSDK::avsCommon::utils::http2::HTTP2MimeRequestSourceInterface.
|
overridevirtual |
Get the header lines that should be output with this HTTP2 request.
Implements alexaClientSDK::avsCommon::utils::http2::HTTP2MimeRequestSourceInterface.
|
overridevirtual |
Notification to copy data to be mime encoded in to an HTTP2 request.
bytes | The buffer to receive the bytes to send. |
size | The max number of bytes to copy. |
Implements alexaClientSDK::avsCommon::utils::http2::HTTP2MimeRequestSourceInterface.
bool alexaClientSDK::avsCommon::utils::http2::MockHTTP2MimeRequestEncodeSource::m_abort |
If ABORT is to be sent.
size_t alexaClientSDK::avsCommon::utils::http2::MockHTTP2MimeRequestEncodeSource::m_bytesWritten |
Index into the current MIME data part.
std::vector<std::string> alexaClientSDK::avsCommon::utils::http2::MockHTTP2MimeRequestEncodeSource::m_data |
Stores the MIME data parts.
These will be kept public to help testing
std::vector<std::vector<std::string> > alexaClientSDK::avsCommon::utils::http2::MockHTTP2MimeRequestEncodeSource::m_headers |
Stores the MIME header parts.
size_t alexaClientSDK::avsCommon::utils::http2::MockHTTP2MimeRequestEncodeSource::m_index |
Index of current MIME part being read.
size_t alexaClientSDK::avsCommon::utils::http2::MockHTTP2MimeRequestEncodeSource::m_pauseCount |
PAUSE count.
bool alexaClientSDK::avsCommon::utils::http2::MockHTTP2MimeRequestEncodeSource::m_slowSource |
Enable sending PAUSE intermittently.
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0