diff options
author | Max Kellermann <max@duempel.org> | 2013-12-14 12:43:06 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-12-14 12:43:06 +0100 |
commit | d37b788ea81e4b282e3f24aa5cad31d85229cc30 (patch) | |
tree | e5bfb0d14e4bdf0c50a1ec34b73b0098b18fc685 /src/DecoderAPI.hxx | |
parent | cb336ff666a8fb2958cfb35c36ffcf613b02cd70 (diff) | |
download | mpd-d37b788ea81e4b282e3f24aa5cad31d85229cc30.tar.gz mpd-d37b788ea81e4b282e3f24aa5cad31d85229cc30.tar.xz mpd-d37b788ea81e4b282e3f24aa5cad31d85229cc30.zip |
DecoderAPI: add function decoder_read_full()
Move code from the "mad" plugin.
Diffstat (limited to 'src/DecoderAPI.hxx')
-rw-r--r-- | src/DecoderAPI.hxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/DecoderAPI.hxx b/src/DecoderAPI.hxx index f88503fed..bb693dbc4 100644 --- a/src/DecoderAPI.hxx +++ b/src/DecoderAPI.hxx @@ -117,6 +117,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 |