![]() |
AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
A mock AttachmentReader that mocks reading from an empty attachment (immediate EOF). More...
Public Member Functions | |
MOCK_METHOD1 (seek, bool(uint64_t offset)) | |
MOCK_CONST_METHOD0 (tell, uint64_t()) | |
MOCK_METHOD0 (getNumUnreadBytes, uint64_t()) | |
MOCK_METHOD1 (close, void(ClosePoint closePoint)) | |
size_t | read (void *buf, std::size_t numBytes, AttachmentReader::ReadStatus *readStatus, std::chrono::milliseconds timeoutMs) |
![]() | |
virtual | ~AttachmentReader ()=default |
virtual bool | seek (uint64_t offset)=0 |
virtual uint64_t | getNumUnreadBytes ()=0 |
virtual void | close (ClosePoint closePoint=ClosePoint::AFTER_DRAINING_CURRENT_BUFFER)=0 |
Additional Inherited Members | |
![]() | |
enum | ReadStatus { ReadStatus::OK, ReadStatus::OK_WOULDBLOCK, ReadStatus::OK_TIMEDOUT, ReadStatus::OK_OVERRUN_RESET, ReadStatus::CLOSED, ReadStatus::ERROR_OVERRUN, ReadStatus::ERROR_BYTES_LESS_THAN_WORD_SIZE, ReadStatus::ERROR_INTERNAL } |
enum | ClosePoint { ClosePoint::IMMEDIATELY, ClosePoint::AFTER_DRAINING_CURRENT_BUFFER } |
An enum class to indicate when the read() function should stop returning data after a call to close() . More... | |
A mock AttachmentReader that mocks reading from an empty attachment (immediate EOF).
alexaClientSDK::mediaPlayer::android::test::MockEmptyAttachmentReader::MOCK_CONST_METHOD0 | ( | tell | , |
uint64_t() | |||
) |
alexaClientSDK::mediaPlayer::android::test::MockEmptyAttachmentReader::MOCK_METHOD0 | ( | getNumUnreadBytes | , |
uint64_t() | |||
) |
alexaClientSDK::mediaPlayer::android::test::MockEmptyAttachmentReader::MOCK_METHOD1 | ( | seek | , |
bool(uint64_t offset) | |||
) |
alexaClientSDK::mediaPlayer::android::test::MockEmptyAttachmentReader::MOCK_METHOD1 | ( | close | , |
void(ClosePoint closePoint) | |||
) |
|
virtual |
The read function.
buf | The buffer where data should be copied to. | |
numBytes | The size of the buffer in bytes. | |
[out] | readStatus | The out-parameter where the resulting state of the read will be expressed. |
timeoutMs | The timeout for this read call in milliseconds. This value is only used for the BLOCKING reader policy. If this parameter is zero, there is no timeout and blocking reads will wait forever. |
Implements alexaClientSDK::avsCommon::avs::attachment::AttachmentReader.
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0