aboutsummaryrefslogtreecommitdiffstats
path: root/src/TextInputStream.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-10-15 10:28:52 +0200
committerMax Kellermann <max@duempel.org>2013-10-15 10:28:52 +0200
commit84d20d9e433028125bfe36557ad54a28b97914b2 (patch)
tree9c0b9469ac91e14b90eebd08b5a04ba3a9f3b4a3 /src/TextInputStream.hxx
parent0c13703da3641951bf061cac7c5cef034eda16f9 (diff)
downloadmpd-84d20d9e433028125bfe36557ad54a28b97914b2.tar.gz
mpd-84d20d9e433028125bfe36557ad54a28b97914b2.tar.xz
mpd-84d20d9e433028125bfe36557ad54a28b97914b2.zip
util/FifoBuffer: C++ version of the fifo_buffer library
Diffstat (limited to 'src/TextInputStream.hxx')
-rw-r--r--src/TextInputStream.hxx14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/TextInputStream.hxx b/src/TextInputStream.hxx
index 2608184e2..f3d87c90a 100644
--- a/src/TextInputStream.hxx
+++ b/src/TextInputStream.hxx
@@ -20,6 +20,8 @@
#ifndef MPD_TEXT_INPUT_STREAM_HXX
#define MPD_TEXT_INPUT_STREAM_HXX
+#include "util/FifoBuffer.hxx"
+
#include <string>
struct input_stream;
@@ -27,7 +29,8 @@ struct fifo_buffer;
class TextInputStream {
struct input_stream *is;
- struct fifo_buffer *buffer;
+ FifoBuffer<char, 4096> buffer;
+
public:
/**
* Wraps an existing #input_stream object into a #TextInputStream,
@@ -35,13 +38,8 @@ public:
*
* @param _is an open #input_stream object
*/
- explicit TextInputStream(struct input_stream *_is);
-
- /**
- * Frees the #TextInputStream object. Does not close or free the
- * underlying #input_stream.
- */
- ~TextInputStream();
+ explicit TextInputStream(struct input_stream *_is)
+ :is(_is) {}
TextInputStream(const TextInputStream &) = delete;
TextInputStream& operator=(const TextInputStream &) = delete;