![]() |
AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
#include <Attachment.h>
Public Member Functions | |
Attachment (const std::string &attachmentId) | |
virtual | ~Attachment ()=default |
virtual std::unique_ptr< AttachmentWriter > | createWriter (utils::sds::WriterPolicy policy=utils::sds::WriterPolicy::ALL_OR_NOTHING)=0 |
virtual std::unique_ptr< AttachmentReader > | createReader (utils::sds::ReaderPolicy policy)=0 |
std::string | getId () const |
bool | hasCreatedReader () |
bool | hasCreatedWriter () |
Protected Attributes | |
const std::string | m_id |
The id for this attachment object. More... | |
std::mutex | m_mutex |
mutex to protext access to the createReader and createWriter API. More... | |
std::atomic< bool > | m_hasCreatedWriter |
An atomic tracking variable to tell whether this object has created a writer. More... | |
std::atomic< size_t > | m_numReaders |
An atomic tracking variable to tell how many readers have been created. More... | |
A class that represents an AVS attachment.
alexaClientSDK::avsCommon::avs::attachment::Attachment::Attachment | ( | const std::string & | attachmentId | ) |
Constructor.
attachmentId | The id for this attachment. |
|
virtualdefault |
Destructor.
|
pure virtual |
Creates a reader object, with which the Attachment may be read from.
The | policy used to configure the reader. |
|
pure virtual |
Creates a writer object, with which the Attachment may be written to.
std::string alexaClientSDK::avsCommon::avs::attachment::Attachment::getId | ( | ) | const |
An accessor to get the attachmentId.
bool alexaClientSDK::avsCommon::avs::attachment::Attachment::hasCreatedReader | ( | ) |
Utility function to tell if a reader has been created for this object.
bool alexaClientSDK::avsCommon::avs::attachment::Attachment::hasCreatedWriter | ( | ) |
Utility function to tell if a writer has been created for this object.
|
protected |
An atomic tracking variable to tell whether this object has created a writer.
|
protected |
The id for this attachment object.
|
protected |
mutex to protext access to the createReader and createWriter API.
|
protected |
An atomic tracking variable to tell how many readers have been created.
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0