AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
#include <MessageRequestHandler.h>
Static Public Member Functions | |
static std::shared_ptr< MessageRequestHandler > | create (std::shared_ptr< ExchangeHandlerContextInterface > context, const std::string &authToken, std::shared_ptr< avsCommon::avs::MessageRequest > messageRequest, std::shared_ptr< MessageConsumerInterface > messageConsumer, std::shared_ptr< avsCommon::avs::attachment::AttachmentManagerInterface > attachmentManager, std::shared_ptr< avsCommon::utils::metrics::MetricRecorderInterface > metricRecorder, std::shared_ptr< avsCommon::sdkInterfaces::EventTracerInterface > eventTracer=nullptr, const std::shared_ptr< avsCommon::utils::power::PowerResource > &powerResource=nullptr) |
Additional Inherited Members | |
Protected Attributes inherited from alexaClientSDK::acl::ExchangeHandler | |
std::shared_ptr< ExchangeHandlerContextInterface > | m_context |
The HTTP2Transport instance for which this exchange is to be performed. More... | |
const std::string | m_authToken |
The auth token used to make the request. More... | |
const std::string | m_authHeader |
The AVS authorization header to send in the request. More... | |
Handle an HTTP2 request and response for a specific MessageRequest
.
|
override |
Destructor.
|
static |
Create a MessageRequestHandler and send the message request.
context | The ExchangeContext in which this MessageRequest handler will operate. |
authToken | The token to use to authorize the request. |
messageRequest | The MessageRequest to send. |
messageConsumer | Where to send messages. |
attachmentManager | Where to get attachments to write to. |
metricRecorder | The metric recorder. |
eventTracer | The object to trace events sent to AVS. |
powerResource | The optional PowerResource to prevent device from going into LPM. |
|
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 of network activity between this client and AVS. (this is used to detect sustained inactivity requiring the send of a ping).
Implements alexaClientSDK::acl::MimeResponseStatusHandlerInterface.
|
overridevirtual |
Notification that an HTTP response code was returned for the request.
responseCode | The response code received for the request. |
Implements alexaClientSDK::acl::MimeResponseStatusHandlerInterface.
|
overridevirtual |
Notification that the request/response cycle has finished and no further notifications will be provided.
status | The status included in the response. |
nonMimeBody | The body of the reply (for non HTTPResponseCode::SUCCESS_OK responses) |
Implements alexaClientSDK::acl::MimeResponseStatusHandlerInterface.
|
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.
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0