diff options
Diffstat (limited to 'Swiften/FileTransfer/ReadBytestream.h')
-rw-r--r-- | Swiften/FileTransfer/ReadBytestream.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Swiften/FileTransfer/ReadBytestream.h b/Swiften/FileTransfer/ReadBytestream.h index 9e070f7..0e95f7b 100644 --- a/Swiften/FileTransfer/ReadBytestream.h +++ b/Swiften/FileTransfer/ReadBytestream.h @@ -7,7 +7,6 @@ #pragma once #include <vector> -#include <cstring> #include <Swiften/Base/boost_bsignals.h> @@ -15,10 +14,17 @@ namespace Swift { class ReadBytestream { public: virtual ~ReadBytestream(); + + /** + * Return an empty vector if no more data is available. + * Use onDataAvailable signal for signaling there is data available again. + */ virtual std::vector<unsigned char> read(size_t size) = 0; + virtual bool isFinished() const = 0; public: - boost::signal<void (std::vector<unsigned char>)> onRead; + boost::signal<void ()> onDataAvailable; + boost::signal<void (const std::vector<unsigned char>&)> onRead; }; } |