aboutsummaryrefslogtreecommitdiffstats
path: root/src/DecoderBuffer.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-01-06 21:38:25 +0100
committerMax Kellermann <max@duempel.org>2014-01-06 22:17:30 +0100
commita9e849ff4f7e0d8e3f8c46de53f495e47c3019cc (patch)
treedf309f4cb572cf691fd8fba56c90b73fe1987f3b /src/DecoderBuffer.hxx
parent4c95a4d7c67cb161fe42f8cd3a62c90208b515cc (diff)
downloadmpd-a9e849ff4f7e0d8e3f8c46de53f495e47c3019cc.tar.gz
mpd-a9e849ff4f7e0d8e3f8c46de53f495e47c3019cc.tar.xz
mpd-a9e849ff4f7e0d8e3f8c46de53f495e47c3019cc.zip
DecoderBuffer: _read() returns ConstBuffer object
Diffstat (limited to 'src/DecoderBuffer.hxx')
-rw-r--r--src/DecoderBuffer.hxx11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/DecoderBuffer.hxx b/src/DecoderBuffer.hxx
index d09416b06..f298d4429 100644
--- a/src/DecoderBuffer.hxx
+++ b/src/DecoderBuffer.hxx
@@ -34,6 +34,8 @@ struct DecoderBuffer;
struct Decoder;
struct InputStream;
+template<typename T> struct ConstBuffer;
+
/**
* Creates a new buffer.
*
@@ -80,13 +82,10 @@ decoder_buffer_fill(DecoderBuffer *buffer);
* decoder_buffer_consume() call.
*
* @param buffer the decoder_buffer object
- * @param length_r pointer to a size_t where you will receive the
- * number of bytes available
- * @return a pointer to the read buffer, or nullptr if there is no data
- * available
*/
-const void *
-decoder_buffer_read(const DecoderBuffer *buffer, size_t *length_r);
+gcc_pure
+ConstBuffer<void>
+decoder_buffer_read(const DecoderBuffer *buffer);
/**
* Consume (delete, invalidate) a part of the buffer. The "nbytes"