22 lines
554 B
C++
Raw Normal View History

2026-01-17 01:32:59 +03:00
#include "OpdsStream.h"
OpdsParserStream::OpdsParserStream(OpdsParser& parser) : parser(parser) {}
2026-01-17 01:46:52 +03:00
int OpdsParserStream::available() { return 0; }
2026-01-17 01:32:59 +03:00
2026-01-17 01:46:52 +03:00
int OpdsParserStream::peek() { abort(); }
2026-01-17 01:32:59 +03:00
2026-01-17 01:46:52 +03:00
int OpdsParserStream::read() { abort(); }
2026-01-17 01:32:59 +03:00
size_t OpdsParserStream::write(uint8_t c) {
2026-01-17 01:46:52 +03:00
parser.push(reinterpret_cast<const char*>(&c), 1);
return 1;
2026-01-17 01:32:59 +03:00
}
2026-01-17 01:46:52 +03:00
size_t OpdsParserStream::write(const uint8_t* buffer, size_t size) {
parser.push(reinterpret_cast<const char*>(buffer), size);
return size;
2026-01-17 01:32:59 +03:00
}
2026-01-17 01:46:52 +03:00
OpdsParserStream::~OpdsParserStream() { parser.finish(); }