MCPcopy Create free account
hub / github.com/SmingHub/Sming / nextSection

Method nextSection

Sming/Core/Data/Stream/SectionStream.cpp:97–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95}
96
97void SectionStream::nextSection()
98{
99 do {
100 ++currentSectionIndex;
101 if(currentSectionIndex >= sectionCount) {
102 finished = true;
103 return;
104 }
105 auto& sect = sections[currentSectionIndex];
106 sectionOffset = 0;
107 sect.recordCount = 0; // Wipe any existing count
108 sect.recordIndex = -1;
109 readOffset = stream->seekFrom(sect.start, SeekOrigin::Start);
110 if(readOffset != sect.start) {
111 debug_e("SectionStream: Failed to seek source");
112 finished = true;
113 return;
114 }
115
116 if(nextSectionCallback) {
117 nextSectionCallback();
118 }
119
120 } while(!nextRecord());
121
122 sections[currentSectionIndex].recordIndex = 0;
123}
124
125uint16_t SectionStream::readMemoryBlock(char* data, int bufSize)
126{

Callers

nothing calls this directly

Calls 1

seekFromMethod · 0.45

Tested by

no test coverage detected