SectionStream.h
Go to the documentation of this file.
38 };
65 SectionStream(IDataSourceStream* source, uint8_t maxSections, const String& startTag, const String& endTag)
75 }
140 nextRecordCallback = callback;
int available() override
Return the total length of the stream.
Definition: SectionStream.h:82
bool isFinished() override
Check if all data has been read.
Definition: SectionStream.h:91
int seekFrom(int offset, SeekOrigin origin) override
Change position in stream.
void onNextSection(NextSection callback)
Register a callback to be invoked when moving to a new section.
Definition: SectionStream.h:140
size_t count() const
Get number of sections in this stream.
Definition: SectionStream.h:110
Delegate< void()> NextSection
Application notification callback when section changes.
Definition: SectionStream.h:53
const Section * getSection() const
Get description of the current section.
Definition: SectionStream.h:119
SectionStream(IDataSourceStream *source, uint8_t maxSections=5)
Construct a section stream with default options.
Definition: SectionStream.h:64
void onNextRecord(NextRecord callback)
Register a callback to be invoked when moving to a new record.
Definition: SectionStream.h:148
uint16_t readMemoryBlock(char *data, int bufSize) override
Read a block of memory.
Presents each section within a source stream as a separate stream.
Definition: SectionStream.h:25
bool setNewSection(int8_t index)
Goto a new section after current tag has been processed.
Definition: SectionStream.h:161
#define F(string_literal)
Wrap a string literal stored in flash and access it using a String object.
Definition: WString.h:113
Definition: SectionStream.h:38
virtual bool nextRecord()
Move to first/next record.
Definition: SectionStream.h:180
Delegate< bool()> NextRecord
Application callback to move to next record.
Definition: SectionStream.h:59