diff options
author | Max Kellermann <max@duempel.org> | 2009-01-03 23:29:45 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-01-03 23:29:45 +0100 |
commit | 700bd44fdaaa0b3ebc6924180daae8f5105d0cd8 (patch) | |
tree | 88455844f452f7b49fac139d39a823e7e5b8ffa0 /src/input_stream.h | |
parent | 4be479d20c2f81fb0303106b7080af93b3c456c6 (diff) | |
download | mpd-700bd44fdaaa0b3ebc6924180daae8f5105d0cd8.tar.gz mpd-700bd44fdaaa0b3ebc6924180daae8f5105d0cd8.tar.xz mpd-700bd44fdaaa0b3ebc6924180daae8f5105d0cd8.zip |
input_stream: added tag() method
The tag() method reads a tag from the stream. This replaces the
meta_name and meta_title attributes.
Diffstat (limited to '')
-rw-r--r-- | src/input_stream.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/input_stream.h b/src/input_stream.h index 7ed0039a3..5761adc12 100644 --- a/src/input_stream.h +++ b/src/input_stream.h @@ -29,6 +29,7 @@ struct input_plugin { bool (*open)(struct input_stream *is, const char *url); void (*close)(struct input_stream *is); + struct tag *(*tag)(struct input_stream *is); int (*buffer)(struct input_stream *is); size_t (*read)(struct input_stream *is, void *ptr, size_t size); bool (*eof)(struct input_stream *is); @@ -46,8 +47,6 @@ struct input_stream { char *mime; void *data; - char *meta_name; - char *meta_title; void *archive; }; @@ -67,6 +66,15 @@ input_stream_seek(struct input_stream *is, off_t offset, int whence); void input_stream_close(struct input_stream *is); bool input_stream_eof(struct input_stream *is); +/** + * Reads the tag from the stream. + * + * @return a tag object which must be freed with tag_free(), or NULL + * if the tag has not changed since the last call + */ +struct tag * +input_stream_tag(struct input_stream *is); + /* return value: -1 is error, 1 inidicates stuff was buffered, 0 means nothing was buffered */ int input_stream_buffer(struct input_stream *is); |