diff options
Diffstat (limited to 'Swiften/Disco/CapsMemoryStorage.h')
-rw-r--r-- | Swiften/Disco/CapsMemoryStorage.h | 49 |
1 files changed, 25 insertions, 24 deletions
diff --git a/Swiften/Disco/CapsMemoryStorage.h b/Swiften/Disco/CapsMemoryStorage.h index 2503d7d..15a1fd3 100644 --- a/Swiften/Disco/CapsMemoryStorage.h +++ b/Swiften/Disco/CapsMemoryStorage.h @@ -1,38 +1,39 @@ /* - * Copyright (c) 2010 Remko Tronçon - * Licensed under the GNU General Public License v3. - * See Documentation/Licenses/GPLv3.txt for more information. + * Copyright (c) 2010-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/Disco/CapsStorage.h> namespace Swift { - class CapsMemoryStorage : public CapsStorage { - public: - CapsMemoryStorage() {} + class SWIFTEN_API CapsMemoryStorage : public CapsStorage { + public: + CapsMemoryStorage() {} - virtual DiscoInfo::ref getDiscoInfo(const std::string& hash) const { - CapsMap::const_iterator i = caps.find(hash); - if (i != caps.end()) { - return i->second; - } - else { - return DiscoInfo::ref(); - } - } + virtual DiscoInfo::ref getDiscoInfo(const std::string& hash) const { + CapsMap::const_iterator i = caps.find(hash); + if (i != caps.end()) { + return i->second; + } + else { + return DiscoInfo::ref(); + } + } - virtual void setDiscoInfo(const std::string& hash, DiscoInfo::ref discoInfo) { - caps[hash] = discoInfo; - } + virtual void setDiscoInfo(const std::string& hash, DiscoInfo::ref discoInfo) { + caps[hash] = discoInfo; + } - private: - typedef std::map<std::string, DiscoInfo::ref> CapsMap; - CapsMap caps; - }; + private: + typedef std::map<std::string, DiscoInfo::ref> CapsMap; + CapsMap caps; + }; } |