aboutsummaryrefslogtreecommitdiffstats
path: root/src/input_plugin.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2011-09-16 21:06:12 +0200
committerMax Kellermann <max@duempel.org>2011-09-16 21:22:02 +0200
commit29241c4f835797f635816a9f37528aa981f722b5 (patch)
treeda166b242c4d960619498b9b7bd13ec44415915d /src/input_plugin.h
parent6f655eb9b90e0855112038c0779eb61194cb7ef6 (diff)
downloadmpd-29241c4f835797f635816a9f37528aa981f722b5.tar.gz
mpd-29241c4f835797f635816a9f37528aa981f722b5.tar.xz
mpd-29241c4f835797f635816a9f37528aa981f722b5.zip
input_plugin: add method check()
To check for errors without reading. The decoder thread wants to do that, before it passes the input stream to the plugin.
Diffstat (limited to 'src/input_plugin.h')
-rw-r--r--src/input_plugin.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/input_plugin.h b/src/input_plugin.h
index 3ac0bdf40..4e0993d12 100644
--- a/src/input_plugin.h
+++ b/src/input_plugin.h
@@ -52,6 +52,14 @@ struct input_plugin {
void (*close)(struct input_stream *is);
/**
+ * Check for errors that may have occurred in the I/O thread.
+ * May be unimplemented for synchronous plugins.
+ *
+ * @return false on error
+ */
+ bool (*check)(struct input_stream *is, GError **error_r);
+
+ /**
* Update the public attributes. Call before access. Can be
* NULL if the plugin always keeps its attributes up to date.
*/