summaryrefslogtreecommitdiff
path: root/src/decoder/DecoderPlugin.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2016-11-18 07:13:35 +0100
committerMax Kellermann <max@musicpd.org>2016-11-18 09:03:39 +0100
commitfd77acc217340aeee3dc80173b6000815ebb709f (patch)
tree05c4ef7d1c604efd7315abc32b9e962ed1361402 /src/decoder/DecoderPlugin.hxx
parent595d1942cb795adcc0c037389aeb8238c788a3c0 (diff)
decoder/Client: new interface which wraps struct Decoder
Prepare for a Decoder API redesign based on an abstract class with virtual methods.
Diffstat (limited to 'src/decoder/DecoderPlugin.hxx')
-rw-r--r--src/decoder/DecoderPlugin.hxx19
1 files changed, 7 insertions, 12 deletions
diff --git a/src/decoder/DecoderPlugin.hxx b/src/decoder/DecoderPlugin.hxx
index 1c3042a18..c83944b5f 100644
--- a/src/decoder/DecoderPlugin.hxx
+++ b/src/decoder/DecoderPlugin.hxx
@@ -27,12 +27,7 @@ class InputStream;
struct TagHandler;
class Path;
template<typename T> class AllocatedString;
-
-/**
- * Opaque handle which the decoder plugin passes to the functions in
- * this header.
- */
-struct Decoder;
+class DecoderClient;
struct DecoderPlugin {
const char *name;
@@ -60,14 +55,14 @@ struct DecoderPlugin {
* possible, it is recommended to implement this method,
* because it is more versatile.
*/
- void (*stream_decode)(Decoder &decoder, InputStream &is);
+ void (*stream_decode)(DecoderClient &client, InputStream &is);
/**
* Decode a local file.
*
* Either implement this method or stream_decode().
*/
- void (*file_decode)(Decoder &decoder, Path path_fs);
+ void (*file_decode)(DecoderClient &client, Path path_fs);
/**
* Scan metadata of a file.
@@ -127,16 +122,16 @@ struct DecoderPlugin {
/**
* Decode a stream.
*/
- void StreamDecode(Decoder &decoder, InputStream &is) const {
- stream_decode(decoder, is);
+ void StreamDecode(DecoderClient &client, InputStream &is) const {
+ stream_decode(client, is);
}
/**
* Decode a file.
*/
template<typename P>
- void FileDecode(Decoder &decoder, P path_fs) const {
- file_decode(decoder, path_fs);
+ void FileDecode(DecoderClient &client, P path_fs) const {
+ file_decode(client, path_fs);
}
/**