From d3b763a48c09a60a0c0b5ccb6cccd9376875c470 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 30 Dec 2009 23:27:37 +0100 Subject: input_stream: return allocated input_stream objects Major API redesign: don't let the caller allocate the input_stream object. Let each input plugin allocate its own (derived/extended) input_stream pointer. The "data" attribute can now be removed, and all input plugins simply cast the input_stream pointer to their own structure (with an "struct input_stream base" as the first attribute). --- src/input_plugin.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/input_plugin.h') diff --git a/src/input_plugin.h b/src/input_plugin.h index bc48b9d4b..10be48dbb 100644 --- a/src/input_plugin.h +++ b/src/input_plugin.h @@ -48,8 +48,7 @@ struct input_plugin { */ void (*finish)(void); - bool (*open)(struct input_stream *is, const char *url, - GError **error_r); + struct input_stream *(*open)(const char *uri, GError **error_r); void (*close)(struct input_stream *is); struct tag *(*tag)(struct input_stream *is); -- cgit v1.2.3