Files
Crosspoint/test/shims/Print.h
T
Joel Goguen 1986092522 feat(opds): Allow selecting the download format
When downloading a book via OPDS, the last acquisition link is chosen when there are multiple. This allows choosing which format to download when there are many. Having only one format will automatically download that.
2026-04-19 23:15:54 -04:00

22 lines
365 B
C++

#pragma once
#include <cstddef>
#include <cstdint>
class Print {
public:
virtual ~Print() = default;
virtual size_t write(uint8_t) = 0;
virtual size_t write(const uint8_t* buffer, size_t size) {
size_t written = 0;
for (size_t i = 0; i < size; i++) {
written += write(buffer[i]);
}
return written;
}
virtual void flush() {}
};