diff options
Diffstat (limited to 'Swiften/Roster/UnitTest/XMPPRosterSignalHandler.h')
-rw-r--r-- | Swiften/Roster/UnitTest/XMPPRosterSignalHandler.h | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/Swiften/Roster/UnitTest/XMPPRosterSignalHandler.h b/Swiften/Roster/UnitTest/XMPPRosterSignalHandler.h index 5c51ec3..0535578 100644 --- a/Swiften/Roster/UnitTest/XMPPRosterSignalHandler.h +++ b/Swiften/Roster/UnitTest/XMPPRosterSignalHandler.h @@ -1,12 +1,12 @@ /* - * Copyright (c) 2010-2011 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 <memory> #include <vector> #include <Swiften/Roster/XMPPRosterImpl.h> @@ -15,50 +15,50 @@ enum XMPPRosterEvents {None, Add, Remove, Update}; class XMPPRosterSignalHandler { public: - XMPPRosterSignalHandler(Swift::XMPPRoster* roster); + XMPPRosterSignalHandler(Swift::XMPPRoster* roster); - XMPPRosterEvents getLastEvent() { - return lastEvent_; - } + XMPPRosterEvents getLastEvent() { + return lastEvent_; + } - Swift::JID getLastJID() { - return lastJID_; - } + Swift::JID getLastJID() { + return lastJID_; + } - std::string getLastOldName() { - return lastOldName_; - } + std::string getLastOldName() { + return lastOldName_; + } - std::vector<std::string> getLastOldGroups() { - return lastOldGroups_; - } + std::vector<std::string> getLastOldGroups() { + return lastOldGroups_; + } - void reset() { - lastEvent_ = None; - } + void reset() { + lastEvent_ = None; + } - int getEventCount() const { - return eventCount; - } + int getEventCount() const { + return eventCount; + } private: - void handleJIDAdded(const Swift::JID& jid) { - lastJID_ = jid; - lastEvent_ = Add; - eventCount++; - } + void handleJIDAdded(const Swift::JID& jid) { + lastJID_ = jid; + lastEvent_ = Add; + eventCount++; + } - void handleJIDRemoved(const Swift::JID& jid) { - lastJID_ = jid; - lastEvent_ = Remove; - eventCount++; - } + void handleJIDRemoved(const Swift::JID& jid) { + lastJID_ = jid; + lastEvent_ = Remove; + eventCount++; + } - void handleJIDUpdated(const Swift::JID& jid, const std::string& oldName, const std::vector<std::string>& oldGroups); + void handleJIDUpdated(const Swift::JID& jid, const std::string& oldName, const std::vector<std::string>& oldGroups); - XMPPRosterEvents lastEvent_; - Swift::JID lastJID_; - std::string lastOldName_; - std::vector<std::string> lastOldGroups_; - int eventCount; + XMPPRosterEvents lastEvent_; + Swift::JID lastJID_; + std::string lastOldName_; + std::vector<std::string> lastOldGroups_; + int eventCount; }; |