11 #ifndef _SMING_CORE_DATA_STREAM_DATA_SOURCE_STREAM_H_ 12 #define _SMING_CORE_DATA_STREAM_DATA_SOURCE_STREAM_H_ 14 #include <user_config.h> 84 virtual bool seek(
int len) = 0;
103 size_t write(uint8_t charToWrite)
override 122 void flush()
override virtual bool isValid() const
Determine if the stream object contains valid data.
Definition: DataSourceStream.h:55
Memory data stream.
Definition: DataSourceStream.h:24
Base class for data source stream.
Definition: DataSourceStream.h:39
int read() override
Read one character and moves the stream pointer.
virtual bool isFinished()=0
Check if all data has been read.
virtual uint16_t readMemoryBlock(char *data, int bufSize)=0
Read a block of memory.
The string class.
Definition: WString.h:104
JSON object data stream.
Definition: DataSourceStream.h:27
virtual bool seek(int len)=0
Move read cursor.
Unknown data stream type.
Definition: DataSourceStream.h:29
virtual String id() const
Returns unique id of the resource.
Definition: DataSourceStream.h:130
virtual StreamType getStreamType() const
Get the stream type.
Definition: DataSourceStream.h:45
StreamType
Data stream type.
Definition: DataSourceStream.h:22
File data stream.
Definition: DataSourceStream.h:25
Template data stream.
Definition: DataSourceStream.h:26
Stream content not valid.
Definition: DataSourceStream.h:23
int peek() override
Read a character without advancing the stream pointer.
size_t write(uint8_t charToWrite) override
Writes a single character to output stream.
Definition: DataSourceStream.h:103
User defined data stream.
Definition: DataSourceStream.h:28
virtual int available()
Return the total length of the stream.
Definition: DataSourceStream.h:95
int length() SMING_DEPRECATED
Return the total length of the stream.
Definition: DataSourceStream.h:114
virtual String getName() const
Returns name of the resource.
Definition: DataSourceStream.h:140