aboutsummaryrefslogtreecommitdiffstats
path: root/src/DecoderAPI.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-12-14 12:43:06 +0100
committerMax Kellermann <max@duempel.org>2014-07-09 19:03:58 +0200
commit0759421d119d8d3d829978ede81683ca54d65d69 (patch)
treeecb6968a7842e6b12de5f2c8b1e194358d697872 /src/DecoderAPI.hxx
parentbf7417981f2527348fb261f40f4de15f9b350db5 (diff)
downloadmpd-0759421d119d8d3d829978ede81683ca54d65d69.tar.gz
mpd-0759421d119d8d3d829978ede81683ca54d65d69.tar.xz
mpd-0759421d119d8d3d829978ede81683ca54d65d69.zip
DecoderAPI: add function decoder_read_full()
Move code from the "mad" plugin.
Diffstat (limited to '')
-rw-r--r--src/DecoderAPI.hxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/DecoderAPI.hxx b/src/DecoderAPI.hxx
index 50cd3e74a..a9da76305 100644
--- a/src/DecoderAPI.hxx
+++ b/src/DecoderAPI.hxx
@@ -113,6 +113,17 @@ decoder_read(Decoder &decoder, InputStream &is,
}
/**
+ * Blocking read from the input stream. Attempts to fill the buffer
+ * completely; there is no partial result.
+ *
+ * @return true on success, false on error or command or not enough
+ * data
+ */
+bool
+decoder_read_full(Decoder *decoder, InputStream &is,
+ void *buffer, size_t size);
+
+/**
* Skip data on the #InputStream.
*
* @return true on success, false on error or command