Chromium Code Reviews| Index: courgette/streams.h |
| diff --git a/courgette/streams.h b/courgette/streams.h |
| index c23d710fb0fa88a6e21eece4e9721c9335979cc0..fbc4e5317253dedc0a4adf9ce514a93a3ebd758f 100644 |
| --- a/courgette/streams.h |
| +++ b/courgette/streams.h |
| @@ -33,6 +33,14 @@ class SinkStream; |
| // Maximum number of streams in a stream set. |
| static const unsigned int kMaxStreams = 10; |
| +// A simple interface for reading binary data. |
| +class BasicBuffer { |
| + public: |
| + BasicBuffer() {} |
|
chrisha
2017/04/24 18:15:50
Virtual destructor needed for interface classes.
huangs
2017/04/24 20:08:14
Done. Also getting the 2 implementations to overri
|
| + virtual const uint8_t* data() const = 0; |
| + virtual size_t length() const = 0; |
| +}; |
| + |
| // A SourceStream allows a region of memory to be scanned by a sequence of Read |
| // operations. The stream does not own the memory. |
| class SourceStream { |
| @@ -234,5 +242,6 @@ class SinkStreamSet { |
| DISALLOW_COPY_AND_ASSIGN(SinkStreamSet); |
| }; |
| -} // namespace |
| +} // namespace courgette |
| + |
| #endif // COURGETTE_STREAMS_H_ |