diff options
author | Max Kellermann <max@duempel.org> | 2010-01-18 09:26:10 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2010-01-18 10:18:41 +0100 |
commit | 9cb7760c5eb63cb6b7034ec9d2cdf9af2f198652 (patch) | |
tree | c15ed352beb3637c4186f3000152bf1a39008896 /src/input_stream.h | |
parent | fb9bd53328e3ff57ea4b3cfee24068f9fb54927b (diff) | |
download | mpd-9cb7760c5eb63cb6b7034ec9d2cdf9af2f198652.tar.gz mpd-9cb7760c5eb63cb6b7034ec9d2cdf9af2f198652.tar.xz mpd-9cb7760c5eb63cb6b7034ec9d2cdf9af2f198652.zip |
input_stream: added attribute "uri"
Diffstat (limited to 'src/input_stream.h')
-rw-r--r-- | src/input_stream.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/input_stream.h b/src/input_stream.h index 05ef257f9..056d008a7 100644 --- a/src/input_stream.h +++ b/src/input_stream.h @@ -39,6 +39,12 @@ struct input_stream { const struct input_plugin *plugin; /** + * The absolute URI which was used to open this stream. May + * be NULL if this is unknown. + */ + char *uri; + + /** * indicates whether the stream is ready for reading and * whether the other attributes in this struct are valid */ @@ -66,9 +72,11 @@ struct input_stream { }; static inline void -input_stream_init(struct input_stream *is, const struct input_plugin *plugin) +input_stream_init(struct input_stream *is, const struct input_plugin *plugin, + const char *uri) { is->plugin = plugin; + is->uri = g_strdup(uri); is->ready = false; is->seekable = false; is->size = -1; @@ -79,6 +87,7 @@ input_stream_init(struct input_stream *is, const struct input_plugin *plugin) static inline void input_stream_deinit(struct input_stream *is) { + g_free(is->uri); g_free(is->mime); } |