diff options
Diffstat (limited to 'Swiften/Elements/JingleFileTransferHash.h')
-rw-r--r-- | Swiften/Elements/JingleFileTransferHash.h | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/Swiften/Elements/JingleFileTransferHash.h b/Swiften/Elements/JingleFileTransferHash.h index 5603531..4669e1c 100644 --- a/Swiften/Elements/JingleFileTransferHash.h +++ b/Swiften/Elements/JingleFileTransferHash.h @@ -4,32 +4,38 @@ * See Documentation/Licenses/BSD-simplified.txt for more information. */ +/* + * Copyright (c) 2014-2016 Isode Limited. + * All rights reserved. + * See the COPYING file for more information. + */ + #pragma once -#include <boost/shared_ptr.hpp> #include <map> +#include <memory> #include <string> +#include <Swiften/Base/API.h> #include <Swiften/Elements/JingleDescription.h> +#include <Swiften/Elements/JingleFileTransferFileInfo.h> namespace Swift { -class JingleFileTransferHash : public Payload { +class SWIFTEN_API JingleFileTransferHash : public Payload { public: - typedef std::map<std::string, std::string> HashesMap; -public: - typedef boost::shared_ptr<JingleFileTransferHash> ref; + typedef std::shared_ptr<JingleFileTransferHash> ref; - void setHash(const std::string& algo, const std::string& hash) { - hashes[algo] = hash; - } + void setFileInfo(const JingleFileTransferFileInfo& fileInfo) { + fileInfo_ = fileInfo; + } - const HashesMap& getHashes() const { - return hashes; - } + JingleFileTransferFileInfo& getFileInfo() { + return fileInfo_; + } private: - HashesMap hashes; + JingleFileTransferFileInfo fileInfo_; }; - + } |