![]() |
AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
#include <InProcessAttachment.h>
Public Types | |
using | SDSType = avsCommon::utils::sds::InProcessSDS |
Type aliases for convenience. More... | |
using | SDSBufferType = avsCommon::utils::sds::InProcessSDSTraits::Buffer |
Public Member Functions | |
InProcessAttachment (const std::string &id, std::unique_ptr< SDSType > sds=nullptr, size_t maxNumReaders=1) | |
std::unique_ptr< AttachmentWriter > | createWriter (InProcessAttachmentWriter::SDSTypeWriter::Policy policy=InProcessAttachmentWriter::SDSTypeWriter::Policy::ALL_OR_NOTHING) override |
std::unique_ptr< AttachmentReader > | createReader (InProcessAttachmentReader::SDSTypeReader::Policy policy) override |
![]() | |
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 () |
Static Public Attributes | |
static const int | SDS_BUFFER_DEFAULT_SIZE_IN_BYTES = 0x100000 |
Default size of underlying SDS when created internally. More... | |
Additional Inherited Members | |
![]() | |
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 following an in-process memory management model.
using alexaClientSDK::avsCommon::avs::attachment::InProcessAttachment::SDSBufferType = avsCommon::utils::sds::InProcessSDSTraits::Buffer |
using alexaClientSDK::avsCommon::avs::attachment::InProcessAttachment::SDSType = avsCommon::utils::sds::InProcessSDS |
Type aliases for convenience.
alexaClientSDK::avsCommon::avs::attachment::InProcessAttachment::InProcessAttachment | ( | const std::string & | id, |
std::unique_ptr< SDSType > | sds = nullptr , |
||
size_t | maxNumReaders = 1 |
||
) |
Constructor.
id | The attachment id. |
sds | The underlying SharedDataStream object. If not specified, then this class will create its own. |
maxNumReaders | The maximum number of readers allowed. |
|
override |
|
override |
|
static |
Default size of underlying SDS when created internally.
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0