diff options
Diffstat (limited to 'Swiften/FileTransfer/ByteArrayReadBytestream.h')
-rw-r--r-- | Swiften/FileTransfer/ByteArrayReadBytestream.h | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/Swiften/FileTransfer/ByteArrayReadBytestream.h b/Swiften/FileTransfer/ByteArrayReadBytestream.h index 308d8c5..d90e5cc 100644 --- a/Swiften/FileTransfer/ByteArrayReadBytestream.h +++ b/Swiften/FileTransfer/ByteArrayReadBytestream.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2015 Isode Limited. + * Copyright (c) 2010-2016 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ @@ -9,30 +9,30 @@ #include <vector> #include <Swiften/Base/API.h> -#include <Swiften/FileTransfer/ReadBytestream.h> #include <Swiften/Base/ByteArray.h> +#include <Swiften/FileTransfer/ReadBytestream.h> namespace Swift { - class SWIFTEN_API ByteArrayReadBytestream : public ReadBytestream { - public: - ByteArrayReadBytestream(const std::vector<unsigned char>& data) : data(data), position(0), dataComplete(true) { - } + class SWIFTEN_API ByteArrayReadBytestream : public ReadBytestream { + public: + ByteArrayReadBytestream(const std::vector<unsigned char>& data) : data(data), position(0), dataComplete(true) { + } - virtual boost::shared_ptr<ByteArray> read(size_t size); + virtual std::shared_ptr<ByteArray> read(size_t size); - virtual bool isFinished() const { - return position >= data.size() && dataComplete; - } + virtual bool isFinished() const { + return position >= data.size() && dataComplete; + } - virtual void setDataComplete(bool b) { - dataComplete = b; - } + virtual void setDataComplete(bool b) { + dataComplete = b; + } - void addData(const std::vector<unsigned char>& moreData); + void addData(const std::vector<unsigned char>& moreData); - private: - std::vector<unsigned char> data; - size_t position; - bool dataComplete; - }; + private: + std::vector<unsigned char> data; + size_t position; + bool dataComplete; + }; } |