summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2016-04-05 13:17:19 (GMT)
committerTobias Markmann <tm@ayena.de>2016-04-05 19:42:39 (GMT)
commit2b560b129b7a31fc8cc07f618e763c95a22bf832 (patch)
tree73e72cdc758b79d01485dc28dcedd48b26859ae8 /Swiften/MUC
parent3c560e31b0f168da917e8d566db01fd1cd997d86 (diff)
downloadswift-2b560b129b7a31fc8cc07f618e763c95a22bf832.zip
swift-2b560b129b7a31fc8cc07f618e763c95a22bf832.tar.bz2
Migrate to Boost.Signals2 from Boost.Signals
Boost.Signals was deprecated and is not improved further. This patch removes Boost.Signals from 3rdParty and adds Boost.Signals2 and its dependencies. Also removed the Qt signals compatibility file Swiften/Base/boost_bsignals.h. Test-Information: Build and ran unit tests on OS X 10.11.4. Confirmed successful login using Swift client. Change-Id: Ie6e3b2d15aac2462cda95401582f5287a479fb54
Diffstat (limited to 'Swiften/MUC')
-rw-r--r--Swiften/MUC/MUC.h38
-rw-r--r--Swiften/MUC/MUCBookmarkManager.h8
-rw-r--r--Swiften/MUC/MUCImpl.h6
-rw-r--r--Swiften/MUC/UnitTest/MockMUC.h4
4 files changed, 28 insertions, 28 deletions
diff --git a/Swiften/MUC/MUC.h b/Swiften/MUC/MUC.h
index d0c2bab..cfb38f6 100644
--- a/Swiften/MUC/MUC.h
+++ b/Swiften/MUC/MUC.h
@@ -10,10 +10,10 @@
#include <memory>
#include <string>
-#include <boost/signals/connection.hpp>
+#include <boost/signals2.hpp>
+#include <boost/signals2/connection.hpp>
#include <Swiften/Base/API.h>
-#include <Swiften/Base/boost_bsignals.h>
#include <Swiften/Elements/Form.h>
#include <Swiften/Elements/MUCAdminPayload.h>
#include <Swiften/Elements/MUCOccupant.h>
@@ -78,23 +78,23 @@ namespace Swift {
virtual void setPassword(const boost::optional<std::string>& password) = 0;
public:
- boost::signal<void (const std::string& /*nick*/)> onJoinComplete;
- boost::signal<void (ErrorPayload::ref)> onJoinFailed;
- boost::signal<void (ErrorPayload::ref, const JID&, MUCOccupant::Role)> onRoleChangeFailed;
- boost::signal<void (ErrorPayload::ref, const JID&, MUCOccupant::Affiliation)> onAffiliationChangeFailed;
- boost::signal<void (ErrorPayload::ref)> onConfigurationFailed;
- boost::signal<void (ErrorPayload::ref)> onAffiliationListFailed;
- boost::signal<void (Presence::ref)> onOccupantPresenceChange;
- boost::signal<void (const std::string&, const MUCOccupant& /*now*/, const MUCOccupant::Role& /*old*/)> onOccupantRoleChanged;
- boost::signal<void (const std::string&, const MUCOccupant::Affiliation& /*new*/, const MUCOccupant::Affiliation& /*old*/)> onOccupantAffiliationChanged;
- boost::signal<void (const MUCOccupant&)> onOccupantJoined;
- boost::signal<void (const std::string& /*oldNickname*/, const std::string& /*newNickname*/ )> onOccupantNicknameChanged;
- boost::signal<void (const MUCOccupant&, LeavingType, const std::string& /*reason*/)> onOccupantLeft;
- boost::signal<void (Form::ref)> onConfigurationFormReceived;
- boost::signal<void (MUCOccupant::Affiliation, const std::vector<JID>&)> onAffiliationListReceived;
- boost::signal<void ()> onUnlocked;
- /* boost::signal<void (const MUCInfo&)> onInfoResult; */
- /* boost::signal<void (const blah&)> onItemsResult; */
+ boost::signals2::signal<void (const std::string& /*nick*/)> onJoinComplete;
+ boost::signals2::signal<void (ErrorPayload::ref)> onJoinFailed;
+ boost::signals2::signal<void (ErrorPayload::ref, const JID&, MUCOccupant::Role)> onRoleChangeFailed;
+ boost::signals2::signal<void (ErrorPayload::ref, const JID&, MUCOccupant::Affiliation)> onAffiliationChangeFailed;
+ boost::signals2::signal<void (ErrorPayload::ref)> onConfigurationFailed;
+ boost::signals2::signal<void (ErrorPayload::ref)> onAffiliationListFailed;
+ boost::signals2::signal<void (Presence::ref)> onOccupantPresenceChange;
+ boost::signals2::signal<void (const std::string&, const MUCOccupant& /*now*/, const MUCOccupant::Role& /*old*/)> onOccupantRoleChanged;
+ boost::signals2::signal<void (const std::string&, const MUCOccupant::Affiliation& /*new*/, const MUCOccupant::Affiliation& /*old*/)> onOccupantAffiliationChanged;
+ boost::signals2::signal<void (const MUCOccupant&)> onOccupantJoined;
+ boost::signals2::signal<void (const std::string& /*oldNickname*/, const std::string& /*newNickname*/ )> onOccupantNicknameChanged;
+ boost::signals2::signal<void (const MUCOccupant&, LeavingType, const std::string& /*reason*/)> onOccupantLeft;
+ boost::signals2::signal<void (Form::ref)> onConfigurationFormReceived;
+ boost::signals2::signal<void (MUCOccupant::Affiliation, const std::vector<JID>&)> onAffiliationListReceived;
+ boost::signals2::signal<void ()> onUnlocked;
+ /* boost::signals2::signal<void (const MUCInfo&)> onInfoResult; */
+ /* boost::signals2::signal<void (const blah&)> onItemsResult; */
};
}
diff --git a/Swiften/MUC/MUCBookmarkManager.h b/Swiften/MUC/MUCBookmarkManager.h
index 58aaeee..78fbbb0 100644
--- a/Swiften/MUC/MUCBookmarkManager.h
+++ b/Swiften/MUC/MUCBookmarkManager.h
@@ -10,9 +10,9 @@
#include <vector>
#include <boost/optional.hpp>
+#include <boost/signals2.hpp>
#include <Swiften/Base/API.h>
-#include <Swiften/Base/boost_bsignals.h>
#include <Swiften/Elements/ErrorPayload.h>
#include <Swiften/Elements/Storage.h>
#include <Swiften/MUC/MUCBookmark.h>
@@ -31,12 +31,12 @@ namespace Swift {
const std::vector<MUCBookmark>& getBookmarks() const;
public:
- boost::signal<void (const MUCBookmark&)> onBookmarkAdded;
- boost::signal<void (const MUCBookmark&)> onBookmarkRemoved;
+ boost::signals2::signal<void (const MUCBookmark&)> onBookmarkAdded;
+ boost::signals2::signal<void (const MUCBookmark&)> onBookmarkRemoved;
/**
* When server bookmarks are ready to be used (request response has been received).
*/
- boost::signal<void ()> onBookmarksReady;
+ boost::signals2::signal<void ()> onBookmarksReady;
private:
bool containsEquivalent(const std::vector<MUCBookmark>& list, const MUCBookmark& bookmark);
diff --git a/Swiften/MUC/MUCImpl.h b/Swiften/MUC/MUCImpl.h
index f9802af..5009bc2 100644
--- a/Swiften/MUC/MUCImpl.h
+++ b/Swiften/MUC/MUCImpl.h
@@ -10,10 +10,10 @@
#include <memory>
#include <string>
-#include <boost/signals/connection.hpp>
+#include <boost/signals2.hpp>
+#include <boost/signals2/connection.hpp>
#include <Swiften/Base/API.h>
-#include <Swiften/Base/boost_bsignals.h>
#include <Swiften/Elements/Form.h>
#include <Swiften/Elements/MUCAdminPayload.h>
#include <Swiften/Elements/MUCOccupant.h>
@@ -119,7 +119,7 @@ namespace Swift {
std::map<std::string, MUCOccupant> occupants;
bool joinSucceeded_;
bool joinComplete_;
- boost::bsignals::scoped_connection scopedConnection_;
+ boost::signals2::scoped_connection scopedConnection_;
boost::posix_time::ptime joinSince_;
bool createAsReservedIfNew;
bool unlocking;
diff --git a/Swiften/MUC/UnitTest/MockMUC.h b/Swiften/MUC/UnitTest/MockMUC.h
index 575c8e7..becfa72 100644
--- a/Swiften/MUC/UnitTest/MockMUC.h
+++ b/Swiften/MUC/UnitTest/MockMUC.h
@@ -10,10 +10,10 @@
#include <memory>
#include <string>
-#include <boost/signals/connection.hpp>
+#include <boost/signals2.hpp>
+#include <boost/signals2/connection.hpp>
#include <Swiften/Base/API.h>
-#include <Swiften/Base/boost_bsignals.h>
#include <Swiften/Elements/Form.h>
#include <Swiften/Elements/MUCAdminPayload.h>
#include <Swiften/Elements/MUCOccupant.h>