decoder/Client: new interface which wraps struct Decoder

Prepare for a Decoder API redesign based on an abstract class with
virtual methods.
This commit is contained in:
Max Kellermann
2016-11-18 07:13:35 +01:00
parent 595d1942cb
commit fd77acc217
46 changed files with 460 additions and 407 deletions

View File

@@ -24,7 +24,7 @@
#include "fs/io/Reader.hxx"
#include "Compiler.h"
struct Decoder;
class DecoderClient;
class InputStream;
/**
@@ -32,15 +32,15 @@ class InputStream;
* interface.
*/
class DecoderReader final : public Reader {
Decoder &decoder;
DecoderClient &client;
InputStream &is;
public:
DecoderReader(Decoder &_decoder, InputStream &_is)
:decoder(_decoder), is(_is) {}
DecoderReader(DecoderClient &_client, InputStream &_is)
:client(_client), is(_is) {}
Decoder &GetDecoder() {
return decoder;
DecoderClient &GetClient() {
return client;
}
InputStream &GetInputStream() {