![]() |
AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
#include <AVSDirective.h>
Public Member Functions | |
std::unique_ptr< avsCommon::avs::attachment::AttachmentReader > | getAttachmentReader (const std::string &contentId, utils::sds::ReaderPolicy readerPolicy) const |
std::string | getUnparsedDirective () const |
std::string | getAttachmentContextId () const |
Static Public Member Functions | |
static std::pair< std::unique_ptr< AVSDirective >, ParseStatus > | create (const std::string &unparsedDirective, std::shared_ptr< avsCommon::avs::attachment::AttachmentManagerInterface > attachmentManager, const std::string &attachmentContextId) |
static std::unique_ptr< AVSDirective > | create (const std::string &unparsedDirective, std::shared_ptr< AVSMessageHeader > avsMessageHeader, const std::string &payload, std::shared_ptr< avsCommon::avs::attachment::AttachmentManagerInterface > attachmentManager, const std::string &attachmentContextId, const utils::Optional< AVSMessageEndpoint > &endpoint=utils::Optional< AVSMessageEndpoint >()) |
A class representation of the AVS directive.
An enum to indicate the status of parsing an AVS Directive from a JSON string representation.
|
static |
Creates an AVSDirective.
unparsedDirective | The unparsed AVS Directive JSON string. |
attachmentManager | The attachment manager. |
attachmentContextId | The contextId required to get attachments from the AttachmentManager. |
|
static |
Creates an AVSDirective.
unparsedDirective | The unparsed AVS Directive JSON string. |
avsMessageHeader | The header fields of the Directive. |
payload | The payload of the Directive. |
attachmentManager | The attachment manager. |
attachmentContextId | The contextId required to get attachments from the AttachmentManager. |
endpoint | Optional parameter used to identify the target endpoint for the given directive. |
nullptr
if creation failed. std::string alexaClientSDK::avsCommon::avs::AVSDirective::getAttachmentContextId | ( | ) | const |
Returns the attachmentContextId.
std::unique_ptr<avsCommon::avs::attachment::AttachmentReader> alexaClientSDK::avsCommon::avs::AVSDirective::getAttachmentReader | ( | const std::string & | contentId, |
utils::sds::ReaderPolicy | readerPolicy | ||
) | const |
Returns a reader for the attachment associated with this directive.
contentId | The contentId associated with the attachment. |
readerPolicy | The policy with which to create the AttachmentReader . |
nullptr
if no attachment was found with the given contentId
. std::string alexaClientSDK::avsCommon::avs::AVSDirective::getUnparsedDirective | ( | ) | const |
Returns the underlying unparsed directive.
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0