16 #ifndef ALEXA_CLIENT_SDK_AVSCOMMON_AVS_INCLUDE_AVSCOMMON_AVS_ATTACHMENT_INPROCESSATTACHMENTREADER_H_ 17 #define ALEXA_CLIENT_SDK_AVSCOMMON_AVS_INCLUDE_AVSCOMMON_AVS_ATTACHMENT_INPROCESSATTACHMENTREADER_H_ 27 namespace attachment {
55 static std::unique_ptr<InProcessAttachmentReader>
create(
56 SDSTypeReader::Policy policy,
57 std::shared_ptr<SDSType> sds,
60 bool resetOnOverrun =
false);
71 std::chrono::milliseconds timeoutMs = std::chrono::milliseconds(0))
override;
75 bool seek(uint64_t offset)
override;
88 std::unique_ptr<AttachmentReader> m_delegate;
96 #endif // ALEXA_CLIENT_SDK_AVSCOMMON_AVS_INCLUDE_AVSCOMMON_AVS_ATTACHMENT_INPROCESSATTACHMENTREADER_H_ ~InProcessAttachmentReader()=default
Reference
Specifies a reference to measure seek()/tell()/close() offsets against.
Definition: Reader.h:51
avsCommon::utils::sds::InProcessSDS SDSType
Type aliases for convenience.
Definition: InProcessAttachmentReader.h:38
Definition: AttachmentReader.h:33
SDSType::Reader SDSTypeReader
Definition: InProcessAttachmentReader.h:40
static std::unique_ptr< InProcessAttachmentReader > create(SDSTypeReader::Policy policy, std::shared_ptr< SDSType > sds, SDSTypeIndex offset=0, SDSTypeReader::Reference reference=SDSTypeReader::Reference::ABSOLUTE, bool resetOnOverrun=false)
Stop returning data when all of the data in the buffer at the time close() was called has been read...
void close(ClosePoint closePoint=ClosePoint::AFTER_DRAINING_CURRENT_BUFFER) override
avsCommon::utils::sds::InProcessSDS::Index SDSTypeIndex
Definition: InProcessAttachmentReader.h:39
bool seek(uint64_t offset) override
ReadStatus
Definition: AttachmentReader.h:38
SharedDataStream< InProcessSDSTraits > InProcessSDS
Type alias for a SharedDataStream which works between threads in a single process.
Definition: InProcessSDS.h:54
Index
Index used for setting access.
Definition: StateReportGeneratorTest.cpp:41
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
Definition: InProcessAttachmentReader.h:35
uint64_t getNumUnreadBytes() override
std::size_t read(void *buf, std::size_t numBytes, ReadStatus *readStatus, std::chrono::milliseconds timeoutMs=std::chrono::milliseconds(0)) override
ClosePoint
An enum class to indicate when the read() function should stop returning data after a call to close()...
Definition: AttachmentReader.h:59