diff options
Diffstat (limited to 'Swiften')
126 files changed, 431 insertions, 374 deletions
diff --git a/Swiften/AdHoc/OutgoingAdHocCommandSession.h b/Swiften/AdHoc/OutgoingAdHocCommandSession.h index 48135c1..9a97ed0 100644 --- a/Swiften/AdHoc/OutgoingAdHocCommandSession.h +++ b/Swiften/AdHoc/OutgoingAdHocCommandSession.h @@ -10,8 +10,9 @@ #include <memory> #include <string> +#include <boost/signals2.hpp> + #include <Swiften/Base/API.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/Elements/Command.h> #include <Swiften/Elements/ErrorPayload.h> #include <Swiften/JID/JID.h> @@ -66,12 +67,12 @@ namespace Swift { /** * Emitted when the form for the next stage is available. */ - boost::signal<void (Command::ref)> onNextStageReceived; + boost::signals2::signal<void (Command::ref)> onNextStageReceived; /** * Emitted on error. */ - boost::signal<void (ErrorPayload::ref)> onError; + boost::signals2::signal<void (ErrorPayload::ref)> onError; /** * Get the state of a given action. @@ -93,6 +94,6 @@ namespace Swift { bool isMultiStage_; std::string sessionID_; std::map<Command::Action, ActionState> actionStates_; - boost::bsignals::connection connection_; + boost::signals2::connection connection_; }; } diff --git a/Swiften/Avatars/AvatarManager.h b/Swiften/Avatars/AvatarManager.h index ffd6608..a71d323 100644 --- a/Swiften/Avatars/AvatarManager.h +++ b/Swiften/Avatars/AvatarManager.h @@ -7,10 +7,10 @@ #pragma once #include <boost/filesystem/path.hpp> +#include <boost/signals2.hpp> #include <Swiften/Base/API.h> #include <Swiften/Base/ByteArray.h> -#include <Swiften/Base/boost_bsignals.h> namespace Swift { class JID; @@ -22,6 +22,6 @@ namespace Swift { virtual ByteArray getAvatar(const JID&) const = 0; virtual boost::filesystem::path getAvatarPath(const JID&) const = 0; - boost::signal<void (const JID&)> onAvatarChanged; + boost::signals2::signal<void (const JID&)> onAvatarChanged; }; } diff --git a/Swiften/Avatars/AvatarProvider.h b/Swiften/Avatars/AvatarProvider.h index 77d9cba..a92418f 100644 --- a/Swiften/Avatars/AvatarProvider.h +++ b/Swiften/Avatars/AvatarProvider.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010 Isode Limited. + * Copyright (c) 2010-2016 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ @@ -8,8 +8,9 @@ #include <string> +#include <boost/signals2.hpp> + #include <Swiften/Base/API.h> -#include <Swiften/Base/boost_bsignals.h> namespace Swift { class JID; @@ -20,6 +21,6 @@ namespace Swift { virtual boost::optional<std::string> getAvatarHash(const JID&) const = 0; - boost::signal<void (const JID&)> onAvatarChanged; + boost::signals2::signal<void (const JID&)> onAvatarChanged; }; } diff --git a/Swiften/Avatars/VCardUpdateAvatarManager.h b/Swiften/Avatars/VCardUpdateAvatarManager.h index c58d491..19ed672 100644 --- a/Swiften/Avatars/VCardUpdateAvatarManager.h +++ b/Swiften/Avatars/VCardUpdateAvatarManager.h @@ -23,7 +23,7 @@ namespace Swift { class VCardManager; class CryptoProvider; - class SWIFTEN_API VCardUpdateAvatarManager : public AvatarProvider, public boost::bsignals::trackable { + class SWIFTEN_API VCardUpdateAvatarManager : public AvatarProvider, public boost::signals2::trackable { public: VCardUpdateAvatarManager(VCardManager*, StanzaChannel*, AvatarStorage*, CryptoProvider* crypto, MUCRegistry* = nullptr); diff --git a/Swiften/Base/boost_bsignals.h b/Swiften/Base/boost_bsignals.h deleted file mode 100644 index 62f7cb3..0000000 --- a/Swiften/Base/boost_bsignals.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (c) 2010 Isode Limited. - * All rights reserved. - * See the COPYING file for more information. - */ - -// Work around for the boost::signals / Qt signals keyword clash. -// Based on an example from Frank Hess, improved by Niels Dekker - -#pragma once - -#if defined(signals) && defined(Q_SIGNALS) && !defined(QT_MOC_CPP) -#undef signals -#define signals signals -#endif - -#include <boost/signal.hpp> - -namespace boost { - namespace bsignals = signals; -} - -#if defined(signals) && defined(Q_SIGNALS) && !defined(QT_MOC_CPP) -#undef signals -#define signals Q_SIGNALS -#endif diff --git a/Swiften/Chat/ChatStateNotifier.h b/Swiften/Chat/ChatStateNotifier.h index a8cc86a..a7af9e4 100644 --- a/Swiften/Chat/ChatStateNotifier.h +++ b/Swiften/Chat/ChatStateNotifier.h @@ -8,8 +8,9 @@ #include <memory> +#include <boost/signals2.hpp> + #include <Swiften/Base/API.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/Elements/ChatState.h> #include <Swiften/Elements/Message.h> #include <Swiften/JID/JID.h> diff --git a/Swiften/Chat/ChatStateTracker.h b/Swiften/Chat/ChatStateTracker.h index 5bbc7ec..c903e3a 100644 --- a/Swiften/Chat/ChatStateTracker.h +++ b/Swiften/Chat/ChatStateTracker.h @@ -8,8 +8,9 @@ #include <memory> +#include <boost/signals2.hpp> + #include <Swiften/Base/API.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/Elements/ChatState.h> #include <Swiften/Elements/Message.h> #include <Swiften/Elements/Presence.h> @@ -20,7 +21,7 @@ namespace Swift { ChatStateTracker(); void handleMessageReceived(std::shared_ptr<Message> message); void handlePresenceChange(std::shared_ptr<Presence> newPresence); - boost::signal<void (ChatState::ChatStateType)> onChatStateChange; + boost::signals2::signal<void (ChatState::ChatStateType)> onChatStateChange; private: void changeState(ChatState::ChatStateType state); ChatState::ChatStateType currentState_; diff --git a/Swiften/Client/BlockList.h b/Swiften/Client/BlockList.h index c200f20..7a54626 100644 --- a/Swiften/Client/BlockList.h +++ b/Swiften/Client/BlockList.h @@ -8,8 +8,9 @@ #include <vector> +#include <boost/signals2.hpp> + #include <Swiften/Base/API.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/JID/JID.h> namespace Swift { @@ -30,8 +31,8 @@ namespace Swift { bool isBlocked(const JID& jid) const; public: - boost::signal<void ()> onStateChanged; - boost::signal<void (const JID&)> onItemAdded; - boost::signal<void (const JID&)> onItemRemoved; + boost::signals2::signal<void ()> onStateChanged; + boost::signals2::signal<void (const JID&)> onItemAdded; + boost::signals2::signal<void (const JID&)> onItemRemoved; }; } diff --git a/Swiften/Client/Client.h b/Swiften/Client/Client.h index 9c51065..af7da5d 100644 --- a/Swiften/Client/Client.h +++ b/Swiften/Client/Client.h @@ -169,7 +169,7 @@ namespace Swift { /** * This signal is emitted when a JID changes presence. */ - boost::signal<void (std::shared_ptr<Presence>)> onPresenceChange; + boost::signals2::signal<void (std::shared_ptr<Presence>)> onPresenceChange; private: Storages* getStorages() const; diff --git a/Swiften/Client/ClientBlockListManager.h b/Swiften/Client/ClientBlockListManager.h index 44e3ee1..5fc1335 100644 --- a/Swiften/Client/ClientBlockListManager.h +++ b/Swiften/Client/ClientBlockListManager.h @@ -8,8 +8,9 @@ #include <memory> +#include <boost/signals2.hpp> + #include <Swiften/Base/API.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/Client/BlockList.h> #include <Swiften/Client/BlockListImpl.h> #include <Swiften/Elements/BlockListPayload.h> diff --git a/Swiften/Client/ClientSession.h b/Swiften/Client/ClientSession.h index 7309218..ad1b78c 100644 --- a/Swiften/Client/ClientSession.h +++ b/Swiften/Client/ClientSession.h @@ -9,9 +9,10 @@ #include <memory> #include <string> +#include <boost/signals2.hpp> + #include <Swiften/Base/API.h> #include <Swiften/Base/Error.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/Elements/ToplevelElement.h> #include <Swiften/JID/JID.h> #include <Swiften/Session/SessionStream.h> @@ -138,11 +139,11 @@ namespace Swift { } public: - boost::signal<void ()> onNeedCredentials; - boost::signal<void ()> onInitialized; - boost::signal<void (std::shared_ptr<Swift::Error>)> onFinished; - boost::signal<void (std::shared_ptr<Stanza>)> onStanzaReceived; - boost::signal<void (std::shared_ptr<Stanza>)> onStanzaAcked; + boost::signals2::signal<void ()> onNeedCredentials; + boost::signals2::signal<void ()> onInitialized; + boost::signals2::signal<void (std::shared_ptr<Swift::Error>)> onFinished; + boost::signals2::signal<void (std::shared_ptr<Stanza>)> onStanzaReceived; + boost::signals2::signal<void (std::shared_ptr<Stanza>)> onStanzaAcked; private: ClientSession( diff --git a/Swiften/Client/ClientXMLTracer.h b/Swiften/Client/ClientXMLTracer.h index ccecb41..ad28fe2 100644 --- a/Swiften/Client/ClientXMLTracer.h +++ b/Swiften/Client/ClientXMLTracer.h @@ -24,7 +24,7 @@ namespace Swift { private: XMLBeautifier *beautifier; bool bosh; - boost::bsignals::scoped_connection onDataReadConnection; - boost::bsignals::scoped_connection onDataWrittenConnection; + boost::signals2::scoped_connection onDataReadConnection; + boost::signals2::scoped_connection onDataWrittenConnection; }; } diff --git a/Swiften/Client/CoreClient.h b/Swiften/Client/CoreClient.h index a1e4681..27031c0 100644 --- a/Swiften/Client/CoreClient.h +++ b/Swiften/Client/CoreClient.h @@ -9,9 +9,10 @@ #include <memory> #include <string> +#include <boost/signals2.hpp> + #include <Swiften/Base/API.h> #include <Swiften/Base/SafeByteArray.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/Client/ClientError.h> #include <Swiften/Client/ClientOptions.h> #include <Swiften/Entity/Entity.h> @@ -149,13 +150,13 @@ namespace Swift { * If the connection was due to a non-recoverable error, the type * of error will be passed as a parameter. */ - boost::signal<void (const boost::optional<ClientError>&)> onDisconnected; + boost::signals2::signal<void (const boost::optional<ClientError>&)> onDisconnected; /** * Emitted when the client is connected and authenticated, * and stanzas can be sent. */ - boost::signal<void ()> onConnected; + boost::signals2::signal<void ()> onConnected; /** * Emitted when the client receives data. @@ -163,7 +164,7 @@ namespace Swift { * This signal is emitted before the XML data is parsed, * so this data is unformatted. */ - boost::signal<void (const SafeByteArray&)> onDataRead; + boost::signals2::signal<void (const SafeByteArray&)> onDataRead; /** * Emitted when the client sends data. @@ -171,17 +172,17 @@ namespace Swift { * This signal is emitted after the XML was serialized, and * is unformatted. */ - boost::signal<void (const SafeByteArray&)> onDataWritten; + boost::signals2::signal<void (const SafeByteArray&)> onDataWritten; /** * Emitted when a message is received. */ - boost::signal<void (std::shared_ptr<Message>)> onMessageReceived; + boost::signals2::signal<void (std::shared_ptr<Message>)> onMessageReceived; /** * Emitted when a presence stanza is received. */ - boost::signal<void (std::shared_ptr<Presence>) > onPresenceReceived; + boost::signals2::signal<void (std::shared_ptr<Presence>) > onPresenceReceived; /** * Emitted when the server acknowledges receipt of a @@ -189,7 +190,7 @@ namespace Swift { * * \see getStreamManagementEnabled() */ - boost::signal<void (std::shared_ptr<Stanza>)> onStanzaAcked; + boost::signals2::signal<void (std::shared_ptr<Stanza>)> onStanzaAcked; protected: std::shared_ptr<ClientSession> getSession() const { diff --git a/Swiften/Client/NickManager.h b/Swiften/Client/NickManager.h index 4769bad..c5f0e58 100644 --- a/Swiften/Client/NickManager.h +++ b/Swiften/Client/NickManager.h @@ -8,8 +8,9 @@ #include <string> +#include <boost/signals2.hpp> + #include <Swiften/Base/API.h> -#include <Swiften/Base/boost_bsignals.h> namespace Swift { class SWIFTEN_API NickManager { @@ -19,6 +20,6 @@ namespace Swift { virtual std::string getOwnNick() const = 0; virtual void setOwnNick(const std::string& nick) = 0; - boost::signal<void (const std::string&)> onOwnNickChanged; + boost::signals2::signal<void (const std::string&)> onOwnNickChanged; }; } diff --git a/Swiften/Client/NickResolver.h b/Swiften/Client/NickResolver.h index 0e46411..a19c244 100644 --- a/Swiften/Client/NickResolver.h +++ b/Swiften/Client/NickResolver.h @@ -10,8 +10,9 @@ #include <memory> #include <string> +#include <boost/signals2.hpp> + #include <Swiften/Base/API.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/Elements/VCard.h> #include <Swiften/JID/JID.h> @@ -26,7 +27,7 @@ namespace Swift { std::string jidToNick(const JID& jid); - boost::signal<void (const JID&, const std::string& /*previousNick*/)> onNickChanged; + boost::signals2::signal<void (const JID&, const std::string& /*previousNick*/)> onNickChanged; private: void handleVCardReceived(const JID& jid, VCard::ref vCard); diff --git a/Swiften/Client/StanzaChannel.h b/Swiften/Client/StanzaChannel.h index 933d39d..930bae1 100644 --- a/Swiften/Client/StanzaChannel.h +++ b/Swiften/Client/StanzaChannel.h @@ -8,8 +8,9 @@ #include <memory> +#include <boost/signals2.hpp> + #include <Swiften/Base/API.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/Elements/Message.h> #include <Swiften/Elements/Presence.h> #include <Swiften/Queries/IQChannel.h> @@ -24,9 +25,9 @@ namespace Swift { virtual bool getStreamManagementEnabled() const = 0; virtual std::vector<Certificate::ref> getPeerCertificateChain() const = 0; - boost::signal<void (bool /* isAvailable */)> onAvailableChanged; - boost::signal<void (std::shared_ptr<Message>)> onMessageReceived; - boost::signal<void (std::shared_ptr<Presence>) > onPresenceReceived; - boost::signal<void (std::shared_ptr<Stanza>)> onStanzaAcked; + boost::signals2::signal<void (bool /* isAvailable */)> onAvailableChanged; + boost::signals2::signal<void (std::shared_ptr<Message>)> onMessageReceived; + boost::signals2::signal<void (std::shared_ptr<Presence>) > onPresenceReceived; + boost::signals2::signal<void (std::shared_ptr<Stanza>)> onStanzaAcked; }; } diff --git a/Swiften/Client/XMLBeautifier.h b/Swiften/Client/XMLBeautifier.h index a765bc5..8da935a 100644 --- a/Swiften/Client/XMLBeautifier.h +++ b/Swiften/Client/XMLBeautifier.h @@ -16,8 +16,9 @@ #include <stack> #include <string> +#include <boost/signals2.hpp> + #include <Swiften/Base/API.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/Parser/XMLParser.h> #include <Swiften/Parser/XMLParserClient.h> #include <Swiften/Parser/XMLParserFactory.h> diff --git a/Swiften/Component/ComponentConnector.h b/Swiften/Component/ComponentConnector.h index 831851a..ab36901 100644 --- a/Swiften/Component/ComponentConnector.h +++ b/Swiften/Component/ComponentConnector.h @@ -10,8 +10,9 @@ #include <memory> #include <string> +#include <boost/signals2.hpp> + #include <Swiften/Base/API.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/Network/Connection.h> #include <Swiften/Network/DomainNameResolveError.h> #include <Swiften/Network/HostAddressPort.h> @@ -23,7 +24,7 @@ namespace Swift { class ConnectionFactory; class TimerFactory; - class SWIFTEN_API ComponentConnector : public boost::bsignals::trackable, public std::enable_shared_from_this<ComponentConnector> { + class SWIFTEN_API ComponentConnector : public boost::signals2::trackable, public std::enable_shared_from_this<ComponentConnector> { public: typedef std::shared_ptr<ComponentConnector> ref; @@ -36,7 +37,7 @@ namespace Swift { void start(); void stop(); - boost::signal<void (std::shared_ptr<Connection>)> onConnectFinished; + boost::signals2::signal<void (std::shared_ptr<Connection>)> onConnectFinished; private: ComponentConnector(const std::string& hostname, int port, DomainNameResolver*, ConnectionFactory*, TimerFactory*); diff --git a/Swiften/Component/ComponentSession.h b/Swiften/Component/ComponentSession.h index 97f5378..9d963a1 100644 --- a/Swiften/Component/ComponentSession.h +++ b/Swiften/Component/ComponentSession.h @@ -9,9 +9,10 @@ #include <memory> #include <string> +#include <boost/signals2.hpp> + #include <Swiften/Base/API.h> #include <Swiften/Base/Error.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/Elements/Stanza.h> #include <Swiften/Elements/ToplevelElement.h> #include <Swiften/JID/JID.h> @@ -56,9 +57,9 @@ namespace Swift { void sendStanza(std::shared_ptr<Stanza>); public: - boost::signal<void ()> onInitialized; - boost::signal<void (std::shared_ptr<Swift::Error>)> onFinished; - boost::signal<void (std::shared_ptr<Stanza>)> onStanzaReceived; + boost::signals2::signal<void ()> onInitialized; + boost::signals2::signal<void (std::shared_ptr<Swift::Error>)> onFinished; + boost::signals2::signal<void (std::shared_ptr<Stanza>)> onStanzaReceived; private: ComponentSession(const JID& jid, const std::string& secret, std::shared_ptr<SessionStream>, CryptoProvider*); diff --git a/Swiften/Component/CoreComponent.h b/Swiften/Component/CoreComponent.h index 3368671..669be97 100644 --- a/Swiften/Component/CoreComponent.h +++ b/Swiften/Component/CoreComponent.h @@ -9,10 +9,11 @@ #include <memory> #include <string> +#include <boost/signals2.hpp> + #include <Swiften/Base/API.h> #include <Swiften/Base/Error.h> #include <Swiften/Base/SafeByteArray.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/Component/ComponentConnector.h> #include <Swiften/Component/ComponentError.h> #include <Swiften/Component/ComponentSession.h> @@ -73,13 +74,13 @@ namespace Swift { } public: - boost::signal<void (const ComponentError&)> onError; - boost::signal<void ()> onConnected; - boost::signal<void (const SafeByteArray&)> onDataRead; - boost::signal<void (const SafeByteArray&)> onDataWritten; + boost::signals2::signal<void (const ComponentError&)> onError; + boost::signals2::signal<void ()> onConnected; + boost::signals2::signal<void (const SafeByteArray&)> onDataRead; + boost::signals2::signal<void (const SafeByteArray&)> onDataWritten; - boost::signal<void (std::shared_ptr<Message>)> onMessageReceived; - boost::signal<void (std::shared_ptr<Presence>) > onPresenceReceived; + boost::signals2::signal<void (std::shared_ptr<Message>)> onMessageReceived; + boost::signals2::signal<void (std::shared_ptr<Presence>) > onPresenceReceived; private: void handleConnectorFinished(std::shared_ptr<Connection>); diff --git a/Swiften/Disco/CapsManager.h b/Swiften/Disco/CapsManager.h index e5d80aa..e57730e 100644 --- a/Swiften/Disco/CapsManager.h +++ b/Swiften/Disco/CapsManager.h @@ -9,8 +9,9 @@ #include <map> #include <set> +#include <boost/signals2.hpp> + #include <Swiften/Base/API.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/Disco/CapsProvider.h> #include <Swiften/Elements/CapsInfo.h> #include <Swiften/Elements/DiscoInfo.h> @@ -24,7 +25,7 @@ namespace Swift { class CapsStorage; class CryptoProvider; - class SWIFTEN_API CapsManager : public CapsProvider, public boost::bsignals::trackable { + class SWIFTEN_API CapsManager : public CapsProvider, public boost::signals2::trackable { public: CapsManager(CapsStorage*, StanzaChannel*, IQRouter*, CryptoProvider*); diff --git a/Swiften/Disco/CapsProvider.h b/Swiften/Disco/CapsProvider.h index 9cba027..b9e2d21 100644 --- a/Swiften/Disco/CapsProvider.h +++ b/Swiften/Disco/CapsProvider.h @@ -6,8 +6,9 @@ #pragma once +#include <boost/signals2.hpp> + #include <Swiften/Base/API.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/Elements/CapsInfo.h> #include <Swiften/Elements/DiscoInfo.h> @@ -20,6 +21,6 @@ namespace Swift { virtual DiscoInfo::ref getCaps(const std::string&) const = 0; - boost::signal<void (const std::string&)> onCapsAvailable; + boost::signals2::signal<void (const std::string&)> onCapsAvailable; }; } diff --git a/Swiften/Disco/DiscoServiceWalker.h b/Swiften/Disco/DiscoServiceWalker.h index 43bd910..f7e1e6d 100644 --- a/Swiften/Disco/DiscoServiceWalker.h +++ b/Swiften/Disco/DiscoServiceWalker.h @@ -11,8 +11,9 @@ #include <string> #include <vector> +#include <boost/signals2.hpp> + #include <Swiften/Base/API.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/Disco/GetDiscoInfoRequest.h> #include <Swiften/Disco/GetDiscoItemsRequest.h> #include <Swiften/Elements/DiscoInfo.h> @@ -47,13 +48,13 @@ namespace Swift { } /** Emitted for each service found. */ - boost::signal<void(const JID&, std::shared_ptr<DiscoInfo>)> onServiceFound; + boost::signals2::signal<void(const JID&, std::shared_ptr<DiscoInfo>)> onServiceFound; /** Emitted when walking is aborted. */ - boost::signal<void()> onWalkAborted; + boost::signals2::signal<void()> onWalkAborted; /** Emitted when walking is complete.*/ - boost::signal<void()> onWalkComplete; + boost::signals2::signal<void()> onWalkComplete; private: void walkNode(const JID& jid); diff --git a/Swiften/Disco/EntityCapsManager.h b/Swiften/Disco/EntityCapsManager.h index 00b685b..4236326 100644 --- a/Swiften/Disco/EntityCapsManager.h +++ b/Swiften/Disco/EntityCapsManager.h @@ -8,8 +8,9 @@ #include <map> +#include <boost/signals2.hpp> + #include <Swiften/Base/API.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/Disco/EntityCapsProvider.h> #include <Swiften/Elements/DiscoInfo.h> #include <Swiften/Elements/ErrorPayload.h> @@ -25,7 +26,7 @@ namespace Swift { * This information is provided in the form of service discovery * information. */ - class SWIFTEN_API EntityCapsManager : public EntityCapsProvider, public boost::bsignals::trackable { + class SWIFTEN_API EntityCapsManager : public EntityCapsProvider, public boost::signals2::trackable { public: EntityCapsManager(CapsProvider*, StanzaChannel*); diff --git a/Swiften/Disco/EntityCapsProvider.h b/Swiften/Disco/EntityCapsProvider.h index 34984ca..5f4af18 100644 --- a/Swiften/Disco/EntityCapsProvider.h +++ b/Swiften/Disco/EntityCapsProvider.h @@ -6,8 +6,9 @@ #pragma once +#include <boost/signals2.hpp> + #include <Swiften/Base/API.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/Elements/DiscoInfo.h> #include <Swiften/JID/JID.h> @@ -29,6 +30,6 @@ namespace Swift { /** * Emitted when the capabilities of a JID changes. */ - boost::signal<void (const JID&)> onCapsChanged; + boost::signals2::signal<void (const JID&)> onCapsChanged; }; } diff --git a/Swiften/Examples/ConnectivityTest/ConnectivityTest.cpp b/Swiften/Examples/ConnectivityTest/ConnectivityTest.cpp index c539691..8c2df38 100644 --- a/Swiften/Examples/ConnectivityTest/ConnectivityTest.cpp +++ b/Swiften/Examples/ConnectivityTest/ConnectivityTest.cpp @@ -28,7 +28,7 @@ static BoostNetworkFactories networkFactories(&eventLoop); static Client* client = nullptr; static JID recipient; static int exitCode = CANNOT_CONNECT; -static boost::bsignals::connection errorConnection; +static boost::signals2::connection errorConnection; static void handleServerDiscoInfoResponse(std::shared_ptr<DiscoInfo> /*info*/, ErrorPayload::ref error) { if (!error) { diff --git a/Swiften/Examples/SendMessage/SendMessage.cpp b/Swiften/Examples/SendMessage/SendMessage.cpp index 2458e65..87e595d 100644 --- a/Swiften/Examples/SendMessage/SendMessage.cpp +++ b/Swiften/Examples/SendMessage/SendMessage.cpp @@ -26,7 +26,7 @@ static Client* client = nullptr; static JID recipient; static std::string messageBody; static int exitCode = 2; -static boost::bsignals::connection errorConnection; +static boost::signals2::connection errorConnection; static void handleConnected() { diff --git a/Swiften/FileTransfer/FileTransfer.h b/Swiften/FileTransfer/FileTransfer.h index e6442b7..1d74a84 100644 --- a/Swiften/FileTransfer/FileTransfer.h +++ b/Swiften/FileTransfer/FileTransfer.h @@ -16,9 +16,9 @@ #include <boost/cstdint.hpp> #include <boost/optional.hpp> +#include <boost/signals2.hpp> #include <Swiften/Base/API.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/FileTransfer/FileTransferError.h> namespace Swift { @@ -72,9 +72,9 @@ namespace Swift { } public: - boost::signal<void (size_t /* proccessedBytes */)> onProcessedBytes; - boost::signal<void (const State&)> onStateChanged; - boost::signal<void (boost::optional<FileTransferError>)> onFinished; + boost::signals2::signal<void (size_t /* proccessedBytes */)> onProcessedBytes; + boost::signals2::signal<void (const State&)> onStateChanged; + boost::signals2::signal<void (boost::optional<FileTransferError>)> onFinished; protected: void setState(const State& state); diff --git a/Swiften/FileTransfer/FileTransferManager.h b/Swiften/FileTransfer/FileTransferManager.h index 60deeaa..e315c67 100644 --- a/Swiften/FileTransfer/FileTransferManager.h +++ b/Swiften/FileTransfer/FileTransferManager.h @@ -16,9 +16,9 @@ #include <boost/date_time/posix_time/posix_time.hpp> #include <boost/filesystem/path.hpp> +#include <boost/signals2.hpp> #include <Swiften/Base/API.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/Elements/DiscoInfo.h> #include <Swiften/FileTransfer/FileTransferOptions.h> #include <Swiften/FileTransfer/IncomingFileTransfer.h> @@ -49,6 +49,6 @@ namespace Swift { static bool isSupportedBy(const DiscoInfo::ref info); - boost::signal<void (IncomingFileTransfer::ref)> onIncomingFileTransfer; + boost::signals2::signal<void (IncomingFileTransfer::ref)> onIncomingFileTransfer; }; } diff --git a/Swiften/FileTransfer/FileTransferManagerImpl.h b/Swiften/FileTransfer/FileTransferManagerImpl.h index 3566e92..026c8b7 100644 --- a/Swiften/FileTransfer/FileTransferManagerImpl.h +++ b/Swiften/FileTransfer/FileTransferManagerImpl.h @@ -18,11 +18,11 @@ #include <boost/date_time/posix_time/posix_time.hpp> #include <boost/filesystem/path.hpp> #include <boost/optional.hpp> +#include <boost/signals2.hpp> #include <Swiften/Base/API.h> #include <Swiften/Base/IDGenerator.h> #include <Swiften/Base/Override.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/Elements/S5BProxyRequest.h> #include <Swiften/FileTransfer/FileTransferManager.h> #include <Swiften/FileTransfer/FileTransferOptions.h> diff --git a/Swiften/FileTransfer/FileTransferTransporter.h b/Swiften/FileTransfer/FileTransferTransporter.h index a680ca2..5af830c 100644 --- a/Swiften/FileTransfer/FileTransferTransporter.h +++ b/Swiften/FileTransfer/FileTransferTransporter.h @@ -9,9 +9,9 @@ #include <vector> #include <boost/optional/optional_fwd.hpp> +#include <boost/signals2.hpp> #include <Swiften/Base/API.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/Elements/JingleS5BTransportPayload.h> namespace Swift { @@ -53,8 +53,8 @@ namespace Swift { virtual std::shared_ptr<TransportSession> createLocalCandidateSession( std::shared_ptr<WriteBytestream>, const JingleS5BTransportPayload::Candidate& candidate) = 0; - boost::signal<void (const std::string& /* sessionID */, const std::vector<JingleS5BTransportPayload::Candidate>&, const std::string& /* dstAddr */)> onLocalCandidatesGenerated; - boost::signal<void (const std::string& /* sessionID */, const boost::optional<JingleS5BTransportPayload::Candidate>&)> onRemoteCandidateSelectFinished; - boost::signal<void (const std::string& /* sessionID */, std::shared_ptr<ErrorPayload>)> onProxyActivated; + boost::signals2::signal<void (const std::string& /* sessionID */, const std::vector<JingleS5BTransportPayload::Candidate>&, const std::string& /* dstAddr */)> onLocalCandidatesGenerated; + boost::signals2::signal<void (const std::string& /* sessionID */, const boost::optional<JingleS5BTransportPayload::Candidate>&)> onRemoteCandidateSelectFinished; + boost::signals2::signal<void (const std::string& /* sessionID */, std::shared_ptr<ErrorPayload>)> onProxyActivated; }; } diff --git a/Swiften/FileTransfer/IBBReceiveSession.h b/Swiften/FileTransfer/IBBReceiveSession.h index c383455..11dfb63 100644 --- a/Swiften/FileTransfer/IBBReceiveSession.h +++ b/Swiften/FileTransfer/IBBReceiveSession.h @@ -9,9 +9,9 @@ #include <memory> #include <boost/optional/optional_fwd.hpp> +#include <boost/signals2.hpp> #include <Swiften/Base/API.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/Elements/IBB.h> #include <Swiften/FileTransfer/FileTransferError.h> #include <Swiften/FileTransfer/WriteBytestream.h> @@ -42,7 +42,7 @@ namespace Swift { return to; } - boost::signal<void (boost::optional<FileTransferError>)> onFinished; + boost::signals2::signal<void (boost::optional<FileTransferError>)> onFinished; private: bool handleSetRequest(const JID& from, const JID& to, const std::string& id, IBB::ref payload); diff --git a/Swiften/FileTransfer/IBBReceiveTransportSession.h b/Swiften/FileTransfer/IBBReceiveTransportSession.h index 65488d9..8b304c3 100644 --- a/Swiften/FileTransfer/IBBReceiveTransportSession.h +++ b/Swiften/FileTransfer/IBBReceiveTransportSession.h @@ -6,8 +6,9 @@ #pragma once +#include <boost/signals2.hpp> + #include <Swiften/Base/API.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/FileTransfer/IBBReceiveSession.h> #include <Swiften/FileTransfer/TransportSession.h> @@ -23,8 +24,8 @@ class SWIFTEN_API IBBReceiveTransportSession : public TransportSession { private: std::shared_ptr<IBBReceiveSession> session; - boost::bsignals::scoped_connection finishedConnection; - boost::bsignals::scoped_connection bytesSentConnection; + boost::signals2::scoped_connection finishedConnection; + boost::signals2::scoped_connection bytesSentConnection; }; } diff --git a/Swiften/FileTransfer/IBBSendSession.h b/Swiften/FileTransfer/IBBSendSession.h index 7988398..e45532d 100644 --- a/Swiften/FileTransfer/IBBSendSession.h +++ b/Swiften/FileTransfer/IBBSendSession.h @@ -9,9 +9,9 @@ #include <memory> #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/IBB.h> #include <Swiften/FileTransfer/FileTransferError.h> @@ -47,8 +47,8 @@ namespace Swift { this->blockSize = blockSize; } - boost::signal<void (boost::optional<FileTransferError>)> onFinished; - boost::signal<void (size_t)> onBytesSent; + boost::signals2::signal<void (boost::optional<FileTransferError>)> onFinished; + boost::signals2::signal<void (size_t)> onBytesSent; private: void handleIBBResponse(IBB::ref, ErrorPayload::ref); diff --git a/Swiften/FileTransfer/IBBSendTransportSession.h b/Swiften/FileTransfer/IBBSendTransportSession.h index 5b55215..d1e786b 100644 --- a/Swiften/FileTransfer/IBBSendTransportSession.h +++ b/Swiften/FileTransfer/IBBSendTransportSession.h @@ -6,8 +6,9 @@ #pragma once +#include <boost/signals2.hpp> + #include <Swiften/Base/API.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/FileTransfer/IBBSendSession.h> #include <Swiften/FileTransfer/TransportSession.h> @@ -23,8 +24,8 @@ class SWIFTEN_API IBBSendTransportSession : public TransportSession { private: std::shared_ptr<IBBSendSession> session; - boost::bsignals::scoped_connection finishedConnection; - boost::bsignals::scoped_connection bytesSentConnection; + boost::signals2::scoped_connection finishedConnection; + boost::signals2::scoped_connection bytesSentConnection; }; } diff --git a/Swiften/FileTransfer/IncomingFileTransfer.h b/Swiften/FileTransfer/IncomingFileTransfer.h index 2976216..7236c35 100644 --- a/Swiften/FileTransfer/IncomingFileTransfer.h +++ b/Swiften/FileTransfer/IncomingFileTransfer.h @@ -8,8 +8,9 @@ #include <memory> +#include <boost/signals2.hpp> + #include <Swiften/Base/API.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/FileTransfer/FileTransfer.h> #include <Swiften/FileTransfer/FileTransferOptions.h> diff --git a/Swiften/FileTransfer/IncomingFileTransferManager.h b/Swiften/FileTransfer/IncomingFileTransferManager.h index fa1b3bb..a0cce10 100644 --- a/Swiften/FileTransfer/IncomingFileTransferManager.h +++ b/Swiften/FileTransfer/IncomingFileTransferManager.h @@ -8,8 +8,9 @@ #include <memory> +#include <boost/signals2.hpp> + #include <Swiften/Base/API.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/FileTransfer/IncomingFileTransfer.h> #include <Swiften/Jingle/IncomingJingleSessionHandler.h> @@ -28,7 +29,7 @@ namespace Swift { CryptoProvider* crypto); virtual ~IncomingFileTransferManager(); - boost::signal<void (IncomingFileTransfer::ref)> onIncomingFileTransfer; + boost::signals2::signal<void (IncomingFileTransfer::ref)> onIncomingFileTransfer; private: bool handleIncomingJingleSession( diff --git a/Swiften/FileTransfer/IncomingJingleFileTransfer.h b/Swiften/FileTransfer/IncomingJingleFileTransfer.h index 36b76b1..3dd206d 100644 --- a/Swiften/FileTransfer/IncomingJingleFileTransfer.h +++ b/Swiften/FileTransfer/IncomingJingleFileTransfer.h @@ -122,8 +122,8 @@ namespace Swift { std::map<std::string, ByteArray> hashes; FileTransferOptions options; - boost::bsignals::scoped_connection writeStreamDataReceivedConnection; - boost::bsignals::scoped_connection waitOnHashTimerTickedConnection; - boost::bsignals::connection transferFinishedConnection; + boost::signals2::scoped_connection writeStreamDataReceivedConnection; + boost::signals2::scoped_connection waitOnHashTimerTickedConnection; + boost::signals2::connection transferFinishedConnection; }; } diff --git a/Swiften/FileTransfer/JingleFileTransfer.h b/Swiften/FileTransfer/JingleFileTransfer.h index 8a80e06..5b9dd62 100644 --- a/Swiften/FileTransfer/JingleFileTransfer.h +++ b/Swiften/FileTransfer/JingleFileTransfer.h @@ -9,8 +9,9 @@ #include <memory> #include <vector> +#include <boost/signals2.hpp> + #include <Swiften/Base/API.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/Elements/ErrorPayload.h> #include <Swiften/Elements/JingleS5BTransportPayload.h> #include <Swiften/FileTransfer/FileTransfer.h> @@ -88,8 +89,8 @@ namespace Swift { std::shared_ptr<TransportSession> transportSession; - boost::bsignals::scoped_connection localTransportCandidatesGeneratedConnection; - boost::bsignals::scoped_connection remoteTransportCandidateSelectFinishedConnection; - boost::bsignals::scoped_connection proxyActivatedConnection; + boost::signals2::scoped_connection localTransportCandidatesGeneratedConnection; + boost::signals2::scoped_connection remoteTransportCandidateSelectFinishedConnection; + boost::signals2::scoped_connection proxyActivatedConnection; }; } diff --git a/Swiften/FileTransfer/LocalJingleTransportCandidateGenerator.h b/Swiften/FileTransfer/LocalJingleTransportCandidateGenerator.h index 66b035e..2159063 100644 --- a/Swiften/FileTransfer/LocalJingleTransportCandidateGenerator.h +++ b/Swiften/FileTransfer/LocalJingleTransportCandidateGenerator.h @@ -14,9 +14,10 @@ #include <Swiften/FileTransfer/LocalJingleTransportCandidateGenerator.h> +#include <boost/signals2.hpp> + #include <Swiften/Base/IDGenerator.h> #include <Swiften/Base/Override.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/Elements/JingleS5BTransportPayload.h> #include <Swiften/FileTransfer/FileTransferOptions.h> #include <Swiften/FileTransfer/SOCKS5BytestreamProxyFinder.h> @@ -43,7 +44,7 @@ namespace Swift { virtual void start(); virtual void stop(); - boost::signal<void (const std::vector<JingleS5BTransportPayload::Candidate>&)> onLocalTransportCandidatesGenerated; + boost::signals2::signal<void (const std::vector<JingleS5BTransportPayload::Candidate>&)> onLocalTransportCandidatesGenerated; private: void handleS5BServerInitialized(bool success); diff --git a/Swiften/FileTransfer/OutgoingJingleFileTransfer.h b/Swiften/FileTransfer/OutgoingJingleFileTransfer.h index 4f28433..cd45948 100644 --- a/Swiften/FileTransfer/OutgoingJingleFileTransfer.h +++ b/Swiften/FileTransfer/OutgoingJingleFileTransfer.h @@ -116,8 +116,8 @@ namespace Swift { Timer::ref waitForRemoteTermination; - boost::bsignals::connection processedBytesConnection; - boost::bsignals::connection transferFinishedConnection; + boost::signals2::connection processedBytesConnection; + boost::signals2::connection transferFinishedConnection; }; } diff --git a/Swiften/FileTransfer/ReadBytestream.h b/Swiften/FileTransfer/ReadBytestream.h index 62542bc..f146c04 100644 --- a/Swiften/FileTransfer/ReadBytestream.h +++ b/Swiften/FileTransfer/ReadBytestream.h @@ -9,8 +9,9 @@ #include <memory> #include <vector> +#include <boost/signals2.hpp> + #include <Swiften/Base/API.h> -#include <Swiften/Base/boost_bsignals.h> namespace Swift { class SWIFTEN_API ReadBytestream { @@ -26,7 +27,7 @@ namespace Swift { virtual bool isFinished() const = 0; public: - boost::signal<void ()> onDataAvailable; - boost::signal<void (const std::vector<unsigned char>&)> onRead; + boost::signals2::signal<void ()> onDataAvailable; + boost::signals2::signal<void (const std::vector<unsigned char>&)> onRead; }; } diff --git a/Swiften/FileTransfer/RemoteJingleTransportCandidateSelector.cpp b/Swiften/FileTransfer/RemoteJingleTransportCandidateSelector.cpp index c29fd5c..a0e7a6f 100644 --- a/Swiften/FileTransfer/RemoteJingleTransportCandidateSelector.cpp +++ b/Swiften/FileTransfer/RemoteJingleTransportCandidateSelector.cpp @@ -15,9 +15,9 @@ #include <memory> #include <boost/bind.hpp> +#include <boost/signals2.hpp> #include <Swiften/Base/Log.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/Base/foreach.h> #include <Swiften/Elements/JingleS5BTransportPayload.h> #include <Swiften/FileTransfer/SOCKS5BytestreamRegistry.h> diff --git a/Swiften/FileTransfer/RemoteJingleTransportCandidateSelector.h b/Swiften/FileTransfer/RemoteJingleTransportCandidateSelector.h index 1f24b6a..c4257f6 100644 --- a/Swiften/FileTransfer/RemoteJingleTransportCandidateSelector.h +++ b/Swiften/FileTransfer/RemoteJingleTransportCandidateSelector.h @@ -39,7 +39,7 @@ namespace Swift { virtual void startSelectingCandidate(); virtual void stopSelectingCandidate(); - boost::signal<void (const boost::optional<JingleS5BTransportPayload::Candidate>&, std::shared_ptr<SOCKS5BytestreamClientSession>)> onCandidateSelectFinished; + boost::signals2::signal<void (const boost::optional<JingleS5BTransportPayload::Candidate>&, std::shared_ptr<SOCKS5BytestreamClientSession>)> onCandidateSelectFinished; private: void tryNextCandidate(); @@ -54,7 +54,7 @@ namespace Swift { std::vector<JingleS5BTransportPayload::Candidate>, JingleS5BTransportPayload::CompareCandidate> candidates; std::shared_ptr<SOCKS5BytestreamClientSession> s5bSession; - boost::bsignals::connection sessionReadyConnection; + boost::signals2::connection sessionReadyConnection; JingleS5BTransportPayload::Candidate lastCandidate; std::string socks5DstAddr; FileTransferOptions options; diff --git a/Swiften/FileTransfer/S5BTransportSession.h b/Swiften/FileTransfer/S5BTransportSession.h index 683e9c4..3e064fa 100644 --- a/Swiften/FileTransfer/S5BTransportSession.h +++ b/Swiften/FileTransfer/S5BTransportSession.h @@ -7,9 +7,9 @@ #pragma once #include <boost/bind.hpp> +#include <boost/signals2.hpp> #include <Swiften/Base/API.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/FileTransfer/ReadBytestream.h> #include <Swiften/FileTransfer/TransportSession.h> #include <Swiften/FileTransfer/WriteBytestream.h> @@ -62,8 +62,8 @@ class SWIFTEN_API S5BTransportSession : public TransportSession { std::shared_ptr<ReadBytestream> readStream; std::shared_ptr<WriteBytestream> writeStream; - boost::bsignals::scoped_connection finishedConnection; - boost::bsignals::scoped_connection bytesSentConnection; + boost::signals2::scoped_connection finishedConnection; + boost::signals2::scoped_connection bytesSentConnection; }; } diff --git a/Swiften/FileTransfer/SOCKS5BytestreamClientSession.h b/Swiften/FileTransfer/SOCKS5BytestreamClientSession.h index 2a73a79..b819910 100644 --- a/Swiften/FileTransfer/SOCKS5BytestreamClientSession.h +++ b/Swiften/FileTransfer/SOCKS5BytestreamClientSession.h @@ -67,11 +67,11 @@ public: HostAddressPort getAddressPort() const; - boost::signal<void (bool /*error*/)> onSessionReady; + boost::signals2::signal<void (bool /*error*/)> onSessionReady; - boost::signal<void (boost::optional<FileTransferError>)> onFinished; - boost::signal<void (size_t)> onBytesSent; - // boost::signal<void (size_t)> onBytesReceived; + boost::signals2::signal<void (boost::optional<FileTransferError>)> onFinished; + boost::signals2::signal<void (size_t)> onBytesSent; + // boost::signals2::signal<void (size_t)> onBytesReceived; private: void process(); @@ -103,10 +103,10 @@ private: Timer::ref weFailedTimeout; - boost::bsignals::scoped_connection connectFinishedConnection; - boost::bsignals::scoped_connection dataWrittenConnection; - boost::bsignals::scoped_connection dataReadConnection; - boost::bsignals::scoped_connection disconnectedConnection; + boost::signals2::scoped_connection connectFinishedConnection; + boost::signals2::scoped_connection dataWrittenConnection; + boost::signals2::scoped_connection dataReadConnection; + boost::signals2::scoped_connection disconnectedConnection; }; } diff --git a/Swiften/FileTransfer/SOCKS5BytestreamProxiesManager.h b/Swiften/FileTransfer/SOCKS5BytestreamProxiesManager.h index 0b566f3..b5c5173 100644 --- a/Swiften/FileTransfer/SOCKS5BytestreamProxiesManager.h +++ b/Swiften/FileTransfer/SOCKS5BytestreamProxiesManager.h @@ -54,7 +54,7 @@ namespace Swift { std::shared_ptr<SOCKS5BytestreamClientSession> createSOCKS5BytestreamClientSession(HostAddressPort addressPort, const std::string& destAddr); public: - boost::signal<void ()> onDiscoveredProxiesChanged; + boost::signals2::signal<void ()> onDiscoveredProxiesChanged; private: void handleProxiesFound(std::vector<S5BProxyRequest::ref> proxyHosts); diff --git a/Swiften/FileTransfer/SOCKS5BytestreamProxyFinder.h b/Swiften/FileTransfer/SOCKS5BytestreamProxyFinder.h index 55e499e..893f475 100644 --- a/Swiften/FileTransfer/SOCKS5BytestreamProxyFinder.h +++ b/Swiften/FileTransfer/SOCKS5BytestreamProxyFinder.h @@ -36,7 +36,7 @@ class SWIFTEN_API SOCKS5BytestreamProxyFinder { void start(); void stop(); - boost::signal<void(std::vector<std::shared_ptr<S5BProxyRequest> >)> onProxiesFound; + boost::signals2::signal<void(std::vector<std::shared_ptr<S5BProxyRequest> >)> onProxiesFound; private: void sendBytestreamQuery(const JID&); diff --git a/Swiften/FileTransfer/SOCKS5BytestreamServerManager.h b/Swiften/FileTransfer/SOCKS5BytestreamServerManager.h index 98b5bea..6dbdd1b 100644 --- a/Swiften/FileTransfer/SOCKS5BytestreamServerManager.h +++ b/Swiften/FileTransfer/SOCKS5BytestreamServerManager.h @@ -9,8 +9,9 @@ #include <memory> #include <vector> +#include <boost/signals2.hpp> + #include <Swiften/Base/API.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/Network/HostAddressPort.h> #include <Swiften/Network/NATPortMapping.h> @@ -65,8 +66,8 @@ namespace Swift { void handleForwardPortResult(boost::optional<NATPortMapping> mapping); void handleUnforwardPortResult(boost::optional<bool> result); - boost::signal<void (bool /* success */)> onInitialized; - boost::signal<void (bool /* success */)> onPortForwardingSetup; + boost::signals2::signal<void (bool /* success */)> onInitialized; + boost::signals2::signal<void (bool /* success */)> onPortForwardingSetup; private: friend class SOCKS5BytestreamServerInitializeRequest; diff --git a/Swiften/FileTransfer/SOCKS5BytestreamServerPortForwardingUser.h b/Swiften/FileTransfer/SOCKS5BytestreamServerPortForwardingUser.h index 5d1f59a..19f3897 100644 --- a/Swiften/FileTransfer/SOCKS5BytestreamServerPortForwardingUser.h +++ b/Swiften/FileTransfer/SOCKS5BytestreamServerPortForwardingUser.h @@ -1,13 +1,14 @@ /* - * Copyright (c) 2015 Isode Limited. + * Copyright (c) 2015-2016 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ #pragma once +#include <boost/signals2.hpp> + #include <Swiften/Base/API.h> -#include <Swiften/Base/boost_bsignals.h> namespace Swift { @@ -20,14 +21,14 @@ class SWIFTEN_API SOCKS5BytestreamServerPortForwardingUser { bool isForwardingSetup() const; - boost::signal<void (bool /* success */)> onSetup; + boost::signals2::signal<void (bool /* success */)> onSetup; private: void handleServerManagerPortForwardingSetup(bool successful); private: SOCKS5BytestreamServerManager* s5bServerManager_; - boost::bsignals::scoped_connection onPortForwardingSetupConnection_; + boost::signals2::scoped_connection onPortForwardingSetupConnection_; }; } diff --git a/Swiften/FileTransfer/SOCKS5BytestreamServerResourceUser.h b/Swiften/FileTransfer/SOCKS5BytestreamServerResourceUser.h index b369184..8e42637 100644 --- a/Swiften/FileTransfer/SOCKS5BytestreamServerResourceUser.h +++ b/Swiften/FileTransfer/SOCKS5BytestreamServerResourceUser.h @@ -6,8 +6,9 @@ #pragma once +#include <boost/signals2.hpp> + #include <Swiften/Base/API.h> -#include <Swiften/Base/boost_bsignals.h> namespace Swift { @@ -20,14 +21,14 @@ class SWIFTEN_API SOCKS5BytestreamServerResourceUser { bool isInitialized() const; - boost::signal<void (bool /* success */)> onSuccessfulInitialized; + boost::signals2::signal<void (bool /* success */)> onSuccessfulInitialized; private: void handleServerManagerInitialized(bool successfulInitialize); private: SOCKS5BytestreamServerManager* s5bServerManager_; - boost::bsignals::scoped_connection onInitializedConnection_; + boost::signals2::scoped_connection onInitializedConnection_; }; } diff --git a/Swiften/FileTransfer/SOCKS5BytestreamServerSession.h b/Swiften/FileTransfer/SOCKS5BytestreamServerSession.h index d530a06..c7e252c 100644 --- a/Swiften/FileTransfer/SOCKS5BytestreamServerSession.h +++ b/Swiften/FileTransfer/SOCKS5BytestreamServerSession.h @@ -8,8 +8,9 @@ #include <memory> +#include <boost/signals2.hpp> + #include <Swiften/Base/API.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/FileTransfer/FileTransferError.h> #include <Swiften/FileTransfer/ReadBytestream.h> #include <Swiften/FileTransfer/WriteBytestream.h> @@ -48,8 +49,8 @@ namespace Swift { HostAddressPort getAddressPort() const; - boost::signal<void (boost::optional<FileTransferError>)> onFinished; - boost::signal<void (unsigned long long)> onBytesSent; + boost::signals2::signal<void (boost::optional<FileTransferError>)> onFinished; + boost::signals2::signal<void (unsigned long long)> onBytesSent; const std::string& getStreamID() const { return streamID; @@ -74,10 +75,10 @@ namespace Swift { std::shared_ptr<WriteBytestream> writeBytestream; bool waitingForData; - boost::bsignals::connection disconnectedConnection; - boost::bsignals::connection dataReadConnection; - boost::bsignals::connection dataWrittenConnection; - boost::bsignals::connection dataAvailableConnection; + boost::signals2::connection disconnectedConnection; + boost::signals2::connection dataReadConnection; + boost::signals2::connection dataWrittenConnection; + boost::signals2::connection dataAvailableConnection; }; } diff --git a/Swiften/FileTransfer/TransportSession.h b/Swiften/FileTransfer/TransportSession.h index b42f0bd..dc6e59a 100644 --- a/Swiften/FileTransfer/TransportSession.h +++ b/Swiften/FileTransfer/TransportSession.h @@ -6,9 +6,10 @@ #pragma once +#include <boost/signals2.hpp> + #include <Swiften/Base/API.h> #include <Swiften/Base/Override.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/FileTransfer/FileTransferError.h> namespace Swift { @@ -19,7 +20,7 @@ namespace Swift { virtual void start() = 0; virtual void stop() = 0; - boost::signal<void (size_t)> onBytesSent; - boost::signal<void (boost::optional<FileTransferError>)> onFinished; + boost::signals2::signal<void (size_t)> onBytesSent; + boost::signals2::signal<void (boost::optional<FileTransferError>)> onFinished; }; } diff --git a/Swiften/FileTransfer/UnitTest/SOCKS5BytestreamClientSessionTest.cpp b/Swiften/FileTransfer/UnitTest/SOCKS5BytestreamClientSessionTest.cpp index 5408cd4..b241320 100644 --- a/Swiften/FileTransfer/UnitTest/SOCKS5BytestreamClientSessionTest.cpp +++ b/Swiften/FileTransfer/UnitTest/SOCKS5BytestreamClientSessionTest.cpp @@ -296,7 +296,7 @@ private: onDataSent(data); } - boost::signal<void (const SafeByteArray&)> onDataSent; + boost::signals2::signal<void (const SafeByteArray&)> onDataSent; EventLoop* eventLoop; boost::optional<HostAddressPort> hostAddressPort; diff --git a/Swiften/FileTransfer/WriteBytestream.h b/Swiften/FileTransfer/WriteBytestream.h index ccc7880..5d9c3f8 100644 --- a/Swiften/FileTransfer/WriteBytestream.h +++ b/Swiften/FileTransfer/WriteBytestream.h @@ -9,8 +9,9 @@ #include <memory> #include <vector> +#include <boost/signals2.hpp> + #include <Swiften/Base/API.h> -#include <Swiften/Base/boost_bsignals.h> namespace Swift { class SWIFTEN_API WriteBytestream { @@ -26,6 +27,6 @@ namespace Swift { */ virtual bool write(const std::vector<unsigned char>&) = 0; - boost::signal<void (const std::vector<unsigned char>&)> onWrite; + boost::signals2::signal<void (const std::vector<unsigned char>&)> onWrite; }; } diff --git a/Swiften/Jingle/FakeJingleSession.h b/Swiften/Jingle/FakeJingleSession.h index d961d1d..6218544 100644 --- a/Swiften/Jingle/FakeJingleSession.h +++ b/Swiften/Jingle/FakeJingleSession.h @@ -16,12 +16,12 @@ #include <string> #include <vector> +#include <boost/signals2.hpp> #include <boost/variant.hpp> #include <Swiften/Base/API.h> #include <Swiften/Base/Override.h> #include <Swiften/Base/SimpleIDGenerator.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/Elements/JinglePayload.h> #include <Swiften/JID/JID.h> #include <Swiften/Jingle/JingleContentID.h> diff --git a/Swiften/Jingle/JingleSession.h b/Swiften/Jingle/JingleSession.h index 993e8de..22e6901 100644 --- a/Swiften/Jingle/JingleSession.h +++ b/Swiften/Jingle/JingleSession.h @@ -11,10 +11,10 @@ #include <vector> #include <boost/optional.hpp> +#include <boost/signals2.hpp> #include <Swiften/Base/API.h> #include <Swiften/Base/Listenable.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/Elements/JinglePayload.h> #include <Swiften/JID/JID.h> diff --git a/Swiften/Jingle/JingleSessionImpl.h b/Swiften/Jingle/JingleSessionImpl.h index 4dd32ed..b42b790 100644 --- a/Swiften/Jingle/JingleSessionImpl.h +++ b/Swiften/Jingle/JingleSessionImpl.h @@ -44,7 +44,7 @@ namespace Swift { private: IQRouter *iqRouter; JID peerJID; - typedef std::map<RequestRef, boost::bsignals::connection > RequestsMap; + typedef std::map<RequestRef, boost::signals2::connection > RequestsMap; RequestsMap pendingRequests; }; } diff --git a/Swiften/Jingle/JingleSessionManager.h b/Swiften/Jingle/JingleSessionManager.h index 0c0f775..f67a0fe 100644 --- a/Swiften/Jingle/JingleSessionManager.h +++ b/Swiften/Jingle/JingleSessionManager.h @@ -9,8 +9,9 @@ #include <map> #include <memory> +#include <boost/signals2.hpp> + #include <Swiften/Base/API.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/Jingle/JingleSessionImpl.h> namespace Swift { diff --git a/Swiften/LinkLocal/DNSSD/DNSSDBrowseQuery.h b/Swiften/LinkLocal/DNSSD/DNSSDBrowseQuery.h index 5502678..f598be1 100644 --- a/Swiften/LinkLocal/DNSSD/DNSSDBrowseQuery.h +++ b/Swiften/LinkLocal/DNSSD/DNSSDBrowseQuery.h @@ -6,7 +6,8 @@ #pragma once -#include <Swiften/Base/boost_bsignals.h> +#include <boost/signals2.hpp> + #include <Swiften/LinkLocal/DNSSD/DNSSDServiceID.h> namespace Swift { @@ -17,8 +18,8 @@ namespace Swift { virtual void startBrowsing() = 0; virtual void stopBrowsing() = 0; - boost::signal<void (const DNSSDServiceID&)> onServiceAdded; - boost::signal<void (const DNSSDServiceID&)> onServiceRemoved; - boost::signal<void ()> onError; + boost::signals2::signal<void (const DNSSDServiceID&)> onServiceAdded; + boost::signals2::signal<void (const DNSSDServiceID&)> onServiceRemoved; + boost::signals2::signal<void ()> onError; }; } diff --git a/Swiften/LinkLocal/DNSSD/DNSSDRegisterQuery.h b/Swiften/LinkLocal/DNSSD/DNSSDRegisterQuery.h index e8e07bd..6639a85 100644 --- a/Swiften/LinkLocal/DNSSD/DNSSDRegisterQuery.h +++ b/Swiften/LinkLocal/DNSSD/DNSSDRegisterQuery.h @@ -7,9 +7,9 @@ #pragma once #include <boost/optional.hpp> +#include <boost/signals2.hpp> #include <Swiften/Base/ByteArray.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/LinkLocal/DNSSD/DNSSDServiceID.h> namespace Swift { @@ -21,6 +21,6 @@ namespace Swift { virtual void unregisterService() = 0; virtual void updateServiceInfo(const ByteArray& info) = 0; - boost::signal<void (boost::optional<DNSSDServiceID>)> onRegisterFinished; + boost::signals2::signal<void (boost::optional<DNSSDServiceID>)> onRegisterFinished; }; } diff --git a/Swiften/LinkLocal/DNSSD/DNSSDResolveHostnameQuery.h b/Swiften/LinkLocal/DNSSD/DNSSDResolveHostnameQuery.h index a4f818c..f14c248 100644 --- a/Swiften/LinkLocal/DNSSD/DNSSDResolveHostnameQuery.h +++ b/Swiften/LinkLocal/DNSSD/DNSSDResolveHostnameQuery.h @@ -7,8 +7,8 @@ #pragma once #include <boost/optional.hpp> +#include <boost/signals2.hpp> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/Network/HostAddress.h> namespace Swift { @@ -19,6 +19,6 @@ namespace Swift { virtual void run() = 0; virtual void finish() = 0; - boost::signal<void (const boost::optional<HostAddress>&)> onHostnameResolved; + boost::signals2::signal<void (const boost::optional<HostAddress>&)> onHostnameResolved; }; } diff --git a/Swiften/LinkLocal/DNSSD/DNSSDResolveServiceQuery.h b/Swiften/LinkLocal/DNSSD/DNSSDResolveServiceQuery.h index 4d25075..b55447a 100644 --- a/Swiften/LinkLocal/DNSSD/DNSSDResolveServiceQuery.h +++ b/Swiften/LinkLocal/DNSSD/DNSSDResolveServiceQuery.h @@ -7,9 +7,9 @@ #pragma once #include <boost/optional.hpp> +#include <boost/signals2.hpp> #include <Swiften/Base/ByteArray.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/LinkLocal/DNSSD/DNSSDServiceID.h> namespace Swift { @@ -29,6 +29,6 @@ namespace Swift { virtual void start() = 0; virtual void stop() = 0; - boost::signal<void (const boost::optional<Result>&)> onServiceResolved; + boost::signals2::signal<void (const boost::optional<Result>&)> onServiceResolved; }; } diff --git a/Swiften/LinkLocal/IncomingLinkLocalSession.h b/Swiften/LinkLocal/IncomingLinkLocalSession.h index b3f0866..9760bb7 100644 --- a/Swiften/LinkLocal/IncomingLinkLocalSession.h +++ b/Swiften/LinkLocal/IncomingLinkLocalSession.h @@ -8,8 +8,9 @@ #include <memory> +#include <boost/signals2.hpp> + #include <Swiften/Base/API.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/JID/JID.h> #include <Swiften/Network/Connection.h> #include <Swiften/Session/Session.h> @@ -30,7 +31,7 @@ namespace Swift { PayloadSerializerCollection* payloadSerializers, XMLParserFactory* xmlParserFactory); - boost::signal<void ()> onSessionStarted; + boost::signals2::signal<void ()> onSessionStarted; private: void handleElement(std::shared_ptr<ToplevelElement>); diff --git a/Swiften/LinkLocal/LinkLocalConnector.h b/Swiften/LinkLocal/LinkLocalConnector.h index a55d1b6..2c49185 100644 --- a/Swiften/LinkLocal/LinkLocalConnector.h +++ b/Swiften/LinkLocal/LinkLocalConnector.h @@ -9,8 +9,9 @@ #include <memory> #include <vector> +#include <boost/signals2.hpp> + #include <Swiften/Base/API.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/LinkLocal/LinkLocalService.h> #include <Swiften/Network/Connection.h> @@ -47,7 +48,7 @@ namespace Swift { return connection; } - boost::signal<void (bool)> onConnectFinished; + boost::signals2::signal<void (bool)> onConnectFinished; private: void handleHostnameResolved(const boost::optional<HostAddress>& address); @@ -57,9 +58,9 @@ namespace Swift { LinkLocalService service; std::shared_ptr<DNSSDQuerier> querier; std::shared_ptr<DNSSDResolveHostnameQuery> resolveQuery; - boost::bsignals::connection resolveQueryHostNameResolvedConnection; + boost::signals2::connection resolveQueryHostNameResolvedConnection; std::shared_ptr<Connection> connection; - boost::bsignals::connection connectionConnectFinishedConnection; + boost::signals2::connection connectionConnectFinishedConnection; std::vector<std::shared_ptr<ToplevelElement> > queuedElements; }; } diff --git a/Swiften/LinkLocal/LinkLocalServiceBrowser.h b/Swiften/LinkLocal/LinkLocalServiceBrowser.h index 2b0545e..c59a4d0 100644 --- a/Swiften/LinkLocal/LinkLocalServiceBrowser.h +++ b/Swiften/LinkLocal/LinkLocalServiceBrowser.h @@ -12,9 +12,9 @@ #include <vector> #include <boost/optional.hpp> +#include <boost/signals2.hpp> #include <Swiften/Base/API.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/LinkLocal/DNSSD/DNSSDQuerier.h> #include <Swiften/LinkLocal/DNSSD/DNSSDRegisterQuery.h> #include <Swiften/LinkLocal/DNSSD/DNSSDResolveServiceQuery.h> @@ -49,11 +49,11 @@ namespace Swift { return querier; } - boost::signal<void (const LinkLocalService&)> onServiceAdded; - boost::signal<void (const LinkLocalService&)> onServiceChanged; - boost::signal<void (const LinkLocalService&)> onServiceRemoved; - boost::signal<void (const DNSSDServiceID&)> onServiceRegistered; - boost::signal<void (bool)> onStopped; + boost::signals2::signal<void (const LinkLocalService&)> onServiceAdded; + boost::signals2::signal<void (const LinkLocalService&)> onServiceChanged; + boost::signals2::signal<void (const LinkLocalService&)> onServiceRemoved; + boost::signals2::signal<void (const DNSSDServiceID&)> onServiceRegistered; + boost::signals2::signal<void (bool)> onStopped; private: void handleServiceAdded(const DNSSDServiceID&); diff --git a/Swiften/LinkLocal/OutgoingLinkLocalSession.h b/Swiften/LinkLocal/OutgoingLinkLocalSession.h index 2f08ed3..34f7af9 100644 --- a/Swiften/LinkLocal/OutgoingLinkLocalSession.h +++ b/Swiften/LinkLocal/OutgoingLinkLocalSession.h @@ -9,8 +9,9 @@ #include <memory> #include <vector> +#include <boost/signals2.hpp> + #include <Swiften/Base/API.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/JID/JID.h> #include <Swiften/Session/Session.h> 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> diff --git a/Swiften/Network/BOSHConnection.h b/Swiften/Network/BOSHConnection.h index 485e86a..b75e51f 100644 --- a/Swiften/Network/BOSHConnection.h +++ b/Swiften/Network/BOSHConnection.h @@ -81,14 +81,14 @@ namespace Swift { std::vector<Certificate::ref> getPeerCertificateChain() const; CertificateVerificationError::ref getPeerCertificateVerificationError() const; - boost::signal<void (bool /* error */)> onConnectFinished; - boost::signal<void (bool /* error */)> onDisconnected; - boost::signal<void (BOSHError::ref)> onSessionTerminated; - boost::signal<void (const std::string& /*sid*/, size_t /*requests*/)> onSessionStarted; - boost::signal<void (const SafeByteArray&)> onXMPPDataRead; - boost::signal<void (const SafeByteArray&)> onBOSHDataRead; - boost::signal<void (const SafeByteArray&)> onBOSHDataWritten; - boost::signal<void (const std::string&)> onHTTPError; + boost::signals2::signal<void (bool /* error */)> onConnectFinished; + boost::signals2::signal<void (bool /* error */)> onDisconnected; + boost::signals2::signal<void (BOSHError::ref)> onSessionTerminated; + boost::signals2::signal<void (const std::string& /*sid*/, size_t /*requests*/)> onSessionStarted; + boost::signals2::signal<void (const SafeByteArray&)> onXMPPDataRead; + boost::signals2::signal<void (const SafeByteArray&)> onBOSHDataRead; + boost::signals2::signal<void (const SafeByteArray&)> onBOSHDataWritten; + boost::signals2::signal<void (const std::string&)> onHTTPError; private: friend class ::BOSHConnectionTest; diff --git a/Swiften/Network/BOSHConnectionPool.h b/Swiften/Network/BOSHConnectionPool.h index b288505..1a805de 100644 --- a/Swiften/Network/BOSHConnectionPool.h +++ b/Swiften/Network/BOSHConnectionPool.h @@ -24,7 +24,7 @@ namespace Swift { class CachingDomainNameResolver; class EventLoop; - class SWIFTEN_API BOSHConnectionPool : public boost::bsignals::trackable { + class SWIFTEN_API BOSHConnectionPool : public boost::signals2::trackable { public: BOSHConnectionPool(const URL& boshURL, DomainNameResolver* resolver, ConnectionFactory* connectionFactory, XMLParserFactory* parserFactory, TLSContextFactory* tlsFactory, TimerFactory* timerFactory, EventLoop* eventLoop, const std::string& to, unsigned long long initialRID, const URL& boshHTTPConnectProxyURL, const SafeString& boshHTTPConnectProxyAuthID, const SafeString& boshHTTPConnectProxyAuthPassword, const TLSOptions& tlsOptions, std::shared_ptr<HTTPTrafficFilter> trafficFilter = std::shared_ptr<HTTPTrafficFilter>()); ~BOSHConnectionPool(); @@ -41,11 +41,11 @@ namespace Swift { std::vector<Certificate::ref> getPeerCertificateChain() const; std::shared_ptr<CertificateVerificationError> getPeerCertificateVerificationError() const; - boost::signal<void (BOSHError::ref)> onSessionTerminated; - boost::signal<void ()> onSessionStarted; - boost::signal<void (const SafeByteArray&)> onXMPPDataRead; - boost::signal<void (const SafeByteArray&)> onBOSHDataRead; - boost::signal<void (const SafeByteArray&)> onBOSHDataWritten; + boost::signals2::signal<void (BOSHError::ref)> onSessionTerminated; + boost::signals2::signal<void ()> onSessionStarted; + boost::signals2::signal<void (const SafeByteArray&)> onXMPPDataRead; + boost::signals2::signal<void (const SafeByteArray&)> onBOSHDataRead; + boost::signals2::signal<void (const SafeByteArray&)> onBOSHDataWritten; private: void handleDataRead(const SafeByteArray& data); diff --git a/Swiften/Network/BoostConnectionServer.h b/Swiften/Network/BoostConnectionServer.h index b8a1c64..41fdbe2 100644 --- a/Swiften/Network/BoostConnectionServer.h +++ b/Swiften/Network/BoostConnectionServer.h @@ -11,9 +11,9 @@ #include <boost/asio/io_service.hpp> #include <boost/asio/ip/tcp.hpp> #include <boost/optional/optional_fwd.hpp> +#include <boost/signals2.hpp> #include <Swiften/Base/API.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/EventLoop/EventOwner.h> #include <Swiften/Network/BoostConnection.h> #include <Swiften/Network/ConnectionServer.h> @@ -37,7 +37,7 @@ namespace Swift { virtual HostAddressPort getAddressPort() const; - boost::signal<void (boost::optional<Error>)> onStopped; + boost::signals2::signal<void (boost::optional<Error>)> onStopped; private: BoostConnectionServer(int port, std::shared_ptr<boost::asio::io_service> ioService, EventLoop* eventLoop); diff --git a/Swiften/Network/ChainedConnector.h b/Swiften/Network/ChainedConnector.h index bba9bfa..a00d7e5 100644 --- a/Swiften/Network/ChainedConnector.h +++ b/Swiften/Network/ChainedConnector.h @@ -12,10 +12,10 @@ #include <vector> #include <boost/optional.hpp> +#include <boost/signals2.hpp> #include <Swiften/Base/API.h> #include <Swiften/Base/Error.h> -#include <Swiften/Base/boost_bsignals.h> namespace Swift { class Connection; @@ -33,7 +33,7 @@ namespace Swift { void start(); void stop(); - boost::signal<void (std::shared_ptr<Connection>, std::shared_ptr<Error>)> onConnectFinished; + boost::signals2::signal<void (std::shared_ptr<Connection>, std::shared_ptr<Error>)> onConnectFinished; private: void finish(std::shared_ptr<Connection> connection, std::shared_ptr<Error>); diff --git a/Swiften/Network/Connection.h b/Swiften/Network/Connection.h index 1ef5824..85f33a8 100644 --- a/Swiften/Network/Connection.h +++ b/Swiften/Network/Connection.h @@ -8,9 +8,10 @@ #include <memory> +#include <boost/signals2.hpp> + #include <Swiften/Base/API.h> #include <Swiften/Base/SafeByteArray.h> -#include <Swiften/Base/boost_bsignals.h> namespace Swift { class HostAddressPort; @@ -36,9 +37,9 @@ namespace Swift { virtual HostAddressPort getRemoteAddress() const = 0; public: - boost::signal<void (bool /* error */)> onConnectFinished; - boost::signal<void (const boost::optional<Error>&)> onDisconnected; - boost::signal<void (std::shared_ptr<SafeByteArray>)> onDataRead; - boost::signal<void ()> onDataWritten; + boost::signals2::signal<void (bool /* error */)> onConnectFinished; + boost::signals2::signal<void (const boost::optional<Error>&)> onDisconnected; + boost::signals2::signal<void (std::shared_ptr<SafeByteArray>)> onDataRead; + boost::signals2::signal<void ()> onDataWritten; }; } diff --git a/Swiften/Network/ConnectionServer.h b/Swiften/Network/ConnectionServer.h index ae510e5..0c8a000 100644 --- a/Swiften/Network/ConnectionServer.h +++ b/Swiften/Network/ConnectionServer.h @@ -9,9 +9,9 @@ #include <memory> #include <boost/optional/optional_fwd.hpp> +#include <boost/signals2.hpp> #include <Swiften/Base/API.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/Network/Connection.h> #include <Swiften/Network/HostAddressPort.h> @@ -33,6 +33,6 @@ namespace Swift { virtual void stop() = 0; - boost::signal<void (std::shared_ptr<Connection>)> onNewConnection; + boost::signals2::signal<void (std::shared_ptr<Connection>)> onNewConnection; }; } diff --git a/Swiften/Network/Connector.h b/Swiften/Network/Connector.h index 8114dd1..d8a1b88 100644 --- a/Swiften/Network/Connector.h +++ b/Swiften/Network/Connector.h @@ -11,9 +11,9 @@ #include <string> #include <boost/optional.hpp> +#include <boost/signals2.hpp> #include <Swiften/Base/API.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/Network/Connection.h> #include <Swiften/Network/DomainNameResolveError.h> #include <Swiften/Network/DomainNameServiceQuery.h> @@ -26,7 +26,7 @@ namespace Swift { class ConnectionFactory; class TimerFactory; - class SWIFTEN_API Connector : public boost::bsignals::trackable, public std::enable_shared_from_this<Connector> { + class SWIFTEN_API Connector : public boost::signals2::trackable, public std::enable_shared_from_this<Connector> { public: typedef std::shared_ptr<Connector> ref; @@ -43,7 +43,7 @@ namespace Swift { void start(); void stop(); - boost::signal<void (std::shared_ptr<Connection>, std::shared_ptr<Error>)> onConnectFinished; + boost::signals2::signal<void (std::shared_ptr<Connection>, std::shared_ptr<Error>)> onConnectFinished; private: Connector(const std::string& hostname, int port, const boost::optional<std::string>& serviceLookupPrefix, DomainNameResolver*, ConnectionFactory*, TimerFactory*); diff --git a/Swiften/Network/DomainNameAddressQuery.h b/Swiften/Network/DomainNameAddressQuery.h index f6650c6..7f89546 100644 --- a/Swiften/Network/DomainNameAddressQuery.h +++ b/Swiften/Network/DomainNameAddressQuery.h @@ -9,8 +9,8 @@ #include <memory> #include <boost/optional.hpp> +#include <boost/signals2.hpp> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/Network/DomainNameResolveError.h> #include <Swiften/Network/HostAddress.h> @@ -23,6 +23,6 @@ namespace Swift { virtual void run() = 0; - boost::signal<void (const std::vector<HostAddress>&, boost::optional<DomainNameResolveError>)> onResult; + boost::signals2::signal<void (const std::vector<HostAddress>&, boost::optional<DomainNameResolveError>)> onResult; }; } diff --git a/Swiften/Network/DomainNameServiceQuery.h b/Swiften/Network/DomainNameServiceQuery.h index b8e0e7c..b27f32e 100644 --- a/Swiften/Network/DomainNameServiceQuery.h +++ b/Swiften/Network/DomainNameServiceQuery.h @@ -11,9 +11,9 @@ #include <vector> #include <boost/optional.hpp> +#include <boost/signals2.hpp> #include <Swiften/Base/API.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/Network/DomainNameResolveError.h> namespace Swift { @@ -36,6 +36,6 @@ namespace Swift { virtual void run() = 0; static void sortResults(std::vector<DomainNameServiceQuery::Result>& queries, RandomGenerator& generator); - boost::signal<void (const std::vector<Result>&)> onResult; + boost::signals2::signal<void (const std::vector<Result>&)> onResult; }; } diff --git a/Swiften/Network/DummyConnection.h b/Swiften/Network/DummyConnection.h index f7b9e29..e58edf6 100644 --- a/Swiften/Network/DummyConnection.h +++ b/Swiften/Network/DummyConnection.h @@ -41,7 +41,7 @@ namespace Swift { return remoteAddress; } - boost::signal<void (const SafeByteArray&)> onDataSent; + boost::signals2::signal<void (const SafeByteArray&)> onDataSent; EventLoop* eventLoop; HostAddressPort localAddress; diff --git a/Swiften/Network/NATTraversalForwardPortRequest.h b/Swiften/Network/NATTraversalForwardPortRequest.h index 0565b4c..0f9c62c 100644 --- a/Swiften/Network/NATTraversalForwardPortRequest.h +++ b/Swiften/Network/NATTraversalForwardPortRequest.h @@ -12,8 +12,9 @@ #pragma once +#include <boost/signals2.hpp> + #include <Swiften/Base/API.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/Network/NATPortMapping.h> namespace Swift { @@ -24,6 +25,6 @@ namespace Swift { virtual void start() = 0; virtual void stop() = 0; - boost::signal<void (boost::optional<NATPortMapping>)> onResult; + boost::signals2::signal<void (boost::optional<NATPortMapping>)> onResult; }; } diff --git a/Swiften/Network/NATTraversalGetPublicIPRequest.h b/Swiften/Network/NATTraversalGetPublicIPRequest.h index 8cdc067..8b34e0f 100644 --- a/Swiften/Network/NATTraversalGetPublicIPRequest.h +++ b/Swiften/Network/NATTraversalGetPublicIPRequest.h @@ -5,15 +5,16 @@ */ /* - * Copyright (c) 2015 Isode Limited. + * Copyright (c) 2015-2016 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ #pragma once +#include <boost/signals2.hpp> + #include <Swiften/Base/API.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/Network/HostAddress.h> namespace Swift { @@ -24,6 +25,6 @@ namespace Swift { virtual void start() = 0; virtual void stop() = 0; - boost::signal<void (boost::optional<HostAddress>)> onResult; + boost::signals2::signal<void (boost::optional<HostAddress>)> onResult; }; } diff --git a/Swiften/Network/NATTraversalRemovePortForwardingRequest.h b/Swiften/Network/NATTraversalRemovePortForwardingRequest.h index 8200197..3db9ee1 100644 --- a/Swiften/Network/NATTraversalRemovePortForwardingRequest.h +++ b/Swiften/Network/NATTraversalRemovePortForwardingRequest.h @@ -5,15 +5,16 @@ */ /* - * Copyright (c) 2015 Isode Limited. + * Copyright (c) 2015-2016 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ #pragma once +#include <boost/signals2.hpp> + #include <Swiften/Base/API.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/Network/HostAddress.h> namespace Swift { @@ -37,6 +38,6 @@ namespace Swift { virtual void start() = 0; virtual void stop() = 0; - boost::signal<void (boost::optional<bool> /* failure */)> onResult; + boost::signals2::signal<void (boost::optional<bool> /* failure */)> onResult; }; } diff --git a/Swiften/Network/NetworkEnvironment.h b/Swiften/Network/NetworkEnvironment.h index c98a78f..0f68c29 100644 --- a/Swiften/Network/NetworkEnvironment.h +++ b/Swiften/Network/NetworkEnvironment.h @@ -4,12 +4,19 @@ * See Documentation/Licenses/BSD-simplified.txt for more information. */ +/* + * Copyright (c) 2016 Isode Limited. + * All rights reserved. + * See the COPYING file for more information. + */ + #pragma once #include <vector> +#include <boost/signals2.hpp> + #include <Swiften/Base/API.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/Network/NetworkInterface.h> namespace Swift { diff --git a/Swiften/Network/SolarisNetworkEnvironment.cpp b/Swiften/Network/SolarisNetworkEnvironment.cpp index 4a1012b..db8c740 100644 --- a/Swiften/Network/SolarisNetworkEnvironment.cpp +++ b/Swiften/Network/SolarisNetworkEnvironment.cpp @@ -21,6 +21,7 @@ #include <vector> #include <boost/optional.hpp> +#include <boost/signals2.hpp> #include <net/if.h> #include <sys/socket.h> @@ -28,7 +29,6 @@ #include <sys/types.h> #include <unistd.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/Network/HostAddress.h> #include <Swiften/Network/NetworkInterface.h> diff --git a/Swiften/Network/SolarisNetworkEnvironment.h b/Swiften/Network/SolarisNetworkEnvironment.h index 6dc9673..199fc6f 100644 --- a/Swiften/Network/SolarisNetworkEnvironment.h +++ b/Swiften/Network/SolarisNetworkEnvironment.h @@ -14,7 +14,8 @@ #include <vector> -#include <Swiften/Base/boost_bsignals.h> +#include <boost/signals2.hpp> + #include <Swiften/Network/NetworkEnvironment.h> #include <Swiften/Network/NetworkInterface.h> diff --git a/Swiften/Network/TLSConnection.h b/Swiften/Network/TLSConnection.h index fdcdb6d..0c395d1 100644 --- a/Swiften/Network/TLSConnection.h +++ b/Swiften/Network/TLSConnection.h @@ -8,9 +8,10 @@ #include <memory> +#include <boost/signals2.hpp> + #include <Swiften/Base/API.h> #include <Swiften/Base/SafeByteArray.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/Network/Connection.h> #include <Swiften/TLS/TLSOptions.h> diff --git a/Swiften/Network/Timer.h b/Swiften/Network/Timer.h index 501fbd8..977ed89 100644 --- a/Swiften/Network/Timer.h +++ b/Swiften/Network/Timer.h @@ -6,8 +6,9 @@ #pragma once +#include <boost/signals2.hpp> + #include <Swiften/Base/API.h> -#include <Swiften/Base/boost_bsignals.h> namespace Swift { /** @@ -36,6 +37,6 @@ namespace Swift { /** * Emitted when the timer expires. */ - boost::signal<void ()> onTick; + boost::signals2::signal<void ()> onTick; }; } diff --git a/Swiften/Network/UnixNetworkEnvironment.cpp b/Swiften/Network/UnixNetworkEnvironment.cpp index 91754ae..dc90589 100644 --- a/Swiften/Network/UnixNetworkEnvironment.cpp +++ b/Swiften/Network/UnixNetworkEnvironment.cpp @@ -12,20 +12,22 @@ #include <Swiften/Network/UnixNetworkEnvironment.h> +#include <map> #include <string> #include <vector> -#include <map> + #include <boost/optional.hpp> -#include <sys/types.h> -#include <sys/socket.h> +#include <boost/signals2.hpp> + #include <arpa/inet.h> #include <net/if.h> +#include <sys/socket.h> +#include <sys/types.h> #ifndef __ANDROID__ #include <ifaddrs.h> #endif -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/Network/HostAddress.h> #include <Swiften/Network/NetworkInterface.h> diff --git a/Swiften/Network/UnixNetworkEnvironment.h b/Swiften/Network/UnixNetworkEnvironment.h index 4e31e35..89a01ab 100644 --- a/Swiften/Network/UnixNetworkEnvironment.h +++ b/Swiften/Network/UnixNetworkEnvironment.h @@ -14,7 +14,8 @@ #include <vector> -#include <Swiften/Base/boost_bsignals.h> +#include <boost/signals2.hpp> + #include <Swiften/Network/NetworkEnvironment.h> #include <Swiften/Network/NetworkInterface.h> diff --git a/Swiften/Network/WindowsNetworkEnvironment.h b/Swiften/Network/WindowsNetworkEnvironment.h index 2e3a641..81de826 100644 --- a/Swiften/Network/WindowsNetworkEnvironment.h +++ b/Swiften/Network/WindowsNetworkEnvironment.h @@ -4,12 +4,19 @@ * See Documentation/Licenses/BSD-simplified.txt for more information. */ +/* + * Copyright (c) 2016 Isode Limited. + * All rights reserved. + * See the COPYING file for more information. + */ + #pragma once #include <vector> +#include <boost/signals2.hpp> + #include <Swiften/Base/API.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/Network/NetworkEnvironment.h> namespace Swift { diff --git a/Swiften/Parser/Tree/ParserElement.h b/Swiften/Parser/Tree/ParserElement.h index cffd59a..38f2dee 100644 --- a/Swiften/Parser/Tree/ParserElement.h +++ b/Swiften/Parser/Tree/ParserElement.h @@ -11,8 +11,9 @@ #include <string> #include <vector> +#include <boost/signals2.hpp> + #include <Swiften/Base/API.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/Parser/AttributeMap.h> namespace Swift { diff --git a/Swiften/Presence/PresenceOracle.h b/Swiften/Presence/PresenceOracle.h index 7285a3a..decc0ee 100644 --- a/Swiften/Presence/PresenceOracle.h +++ b/Swiften/Presence/PresenceOracle.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,8 +9,9 @@ #include <map> #include <string> +#include <boost/signals2.hpp> + #include <Swiften/Base/API.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/Elements/Presence.h> namespace Swift { @@ -60,7 +61,7 @@ namespace Swift { Presence::ref getAccountPresence(const JID& jid) const; public: - boost::signal<void (Presence::ref)> onPresenceChange; + boost::signals2::signal<void (Presence::ref)> onPresenceChange; private: void handleIncomingPresence(Presence::ref presence); diff --git a/Swiften/Presence/SubscriptionManager.h b/Swiften/Presence/SubscriptionManager.h index d752820..c1997bd 100644 --- a/Swiften/Presence/SubscriptionManager.h +++ b/Swiften/Presence/SubscriptionManager.h @@ -9,8 +9,9 @@ #include <map> #include <string> +#include <boost/signals2.hpp> + #include <Swiften/Base/API.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/Elements/Presence.h> #include <Swiften/JID/JID.h> @@ -34,9 +35,9 @@ namespace Swift { * received. This is useful when the subscriber adds extensions to * the request. */ - boost::signal<void (const JID&, const std::string&, Presence::ref)> onPresenceSubscriptionRequest; + boost::signals2::signal<void (const JID&, const std::string&, Presence::ref)> onPresenceSubscriptionRequest; - boost::signal<void (const JID&, const std::string&)> onPresenceSubscriptionRevoked; + boost::signals2::signal<void (const JID&, const std::string&)> onPresenceSubscriptionRevoked; private: void handleIncomingPresence(Presence::ref presence); diff --git a/Swiften/PubSub/PubSubManager.h b/Swiften/PubSub/PubSubManager.h index c143a81..eba5dd9 100644 --- a/Swiften/PubSub/PubSubManager.h +++ b/Swiften/PubSub/PubSubManager.h @@ -8,9 +8,10 @@ #include <memory> +#include <boost/signals2.hpp> + #include <Swiften/Base/API.h> #include <Swiften/Base/Override.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/Elements/IQ.h> #include <Swiften/Elements/PubSub.h> #include <Swiften/Elements/PubSubAffiliations.h> @@ -47,6 +48,6 @@ namespace Swift { SWIFTEN_PUBSUB_FOREACH_PUBSUB_PAYLOAD_TYPE( SWIFTEN_PUBSUBMANAGER_DECLARE_CREATE_REQUEST) - boost::signal<void (const JID&, const std::shared_ptr<PubSubEventPayload>)> onEvent; + boost::signals2::signal<void (const JID&, const std::shared_ptr<PubSubEventPayload>)> onEvent; }; } diff --git a/Swiften/QA/StorageTest/FileWriteBytestreamTest.cpp b/Swiften/QA/StorageTest/FileWriteBytestreamTest.cpp index d6963a4..7823519 100644 --- a/Swiften/QA/StorageTest/FileWriteBytestreamTest.cpp +++ b/Swiften/QA/StorageTest/FileWriteBytestreamTest.cpp @@ -6,12 +6,12 @@ #include <boost/bind.hpp> #include <boost/filesystem.hpp> +#include <boost/signals2.hpp> #include <cppunit/extensions/HelperMacros.h> #include <cppunit/extensions/TestFactoryRegistry.h> #include <Swiften/Base/ByteArray.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/FileTransfer/FileWriteBytestream.h> using namespace Swift; diff --git a/Swiften/Queries/GenericRequest.h b/Swiften/Queries/GenericRequest.h index 2795a54..312ecf2 100644 --- a/Swiften/Queries/GenericRequest.h +++ b/Swiften/Queries/GenericRequest.h @@ -6,8 +6,9 @@ #pragma once +#include <boost/signals2.hpp> + #include <Swiften/Base/API.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/Queries/Request.h> namespace Swift { @@ -74,6 +75,6 @@ namespace Swift { /** * Signal emitted when a reply to the iq has been received. Contains a payload if one was present, and an error if one was present. */ - boost::signal<void (std::shared_ptr<PAYLOAD_TYPE>, ErrorPayload::ref)> onResponse; + boost::signals2::signal<void (std::shared_ptr<PAYLOAD_TYPE>, ErrorPayload::ref)> onResponse; }; } diff --git a/Swiften/Queries/IQChannel.h b/Swiften/Queries/IQChannel.h index 2974ecc..fe32d89 100644 --- a/Swiften/Queries/IQChannel.h +++ b/Swiften/Queries/IQChannel.h @@ -9,8 +9,9 @@ #include <memory> #include <string> +#include <boost/signals2.hpp> + #include <Swiften/Base/API.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/Elements/IQ.h> namespace Swift { @@ -23,6 +24,6 @@ namespace Swift { virtual bool isAvailable() const = 0; - boost::signal<void (std::shared_ptr<IQ>)> onIQReceived; + boost::signals2::signal<void (std::shared_ptr<IQ>)> onIQReceived; }; } diff --git a/Swiften/Queries/PubSubRequest.h b/Swiften/Queries/PubSubRequest.h index 888b531..b439748 100644 --- a/Swiften/Queries/PubSubRequest.h +++ b/Swiften/Queries/PubSubRequest.h @@ -8,8 +8,9 @@ #include <memory> +#include <boost/signals2.hpp> + #include <Swiften/Base/API.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/Elements/ContainerPayload.h> #include <Swiften/Elements/PubSub.h> #include <Swiften/Elements/PubSubAffiliations.h> @@ -86,6 +87,6 @@ namespace Swift { } public: - boost::signal<void (std::shared_ptr<ResponseType>, ErrorPayload::ref)> onResponse; + boost::signals2::signal<void (std::shared_ptr<ResponseType>, ErrorPayload::ref)> onResponse; }; } diff --git a/Swiften/Queries/RawRequest.h b/Swiften/Queries/RawRequest.h index 90290e8..76c84f9 100644 --- a/Swiften/Queries/RawRequest.h +++ b/Swiften/Queries/RawRequest.h @@ -9,8 +9,9 @@ #include <memory> #include <typeinfo> +#include <boost/signals2.hpp> + #include <Swiften/Base/API.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/Elements/ErrorPayload.h> #include <Swiften/Elements/RawXMLPayload.h> #include <Swiften/Queries/Request.h> @@ -27,7 +28,7 @@ namespace Swift { return ref(new RawRequest(type, recipient, data, router)); } - boost::signal<void (const std::string&)> onResponse; + boost::signals2::signal<void (const std::string&)> onResponse; private: RawRequest(IQ::Type type, const JID& receiver, const std::string& data, IQRouter* router) : Request(type, receiver, std::make_shared<RawXMLPayload>(data), router) { diff --git a/Swiften/Queries/Requests/GetPrivateStorageRequest.h b/Swiften/Queries/Requests/GetPrivateStorageRequest.h index e5904fe..5fb0de5 100644 --- a/Swiften/Queries/Requests/GetPrivateStorageRequest.h +++ b/Swiften/Queries/Requests/GetPrivateStorageRequest.h @@ -8,8 +8,9 @@ #include <memory> +#include <boost/signals2.hpp> + #include <Swiften/Base/API.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/Elements/ErrorPayload.h> #include <Swiften/Elements/PrivateStorage.h> #include <Swiften/Queries/Request.h> @@ -39,6 +40,6 @@ namespace Swift { } public: - boost::signal<void (std::shared_ptr<PAYLOAD_TYPE>, ErrorPayload::ref)> onResponse; + boost::signals2::signal<void (std::shared_ptr<PAYLOAD_TYPE>, ErrorPayload::ref)> onResponse; }; } diff --git a/Swiften/Queries/Requests/SetPrivateStorageRequest.h b/Swiften/Queries/Requests/SetPrivateStorageRequest.h index 7cc47fb..f1dc77a 100644 --- a/Swiften/Queries/Requests/SetPrivateStorageRequest.h +++ b/Swiften/Queries/Requests/SetPrivateStorageRequest.h @@ -8,8 +8,9 @@ #include <memory> +#include <boost/signals2.hpp> + #include <Swiften/Base/API.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/Elements/ErrorPayload.h> #include <Swiften/Elements/PrivateStorage.h> #include <Swiften/Queries/Request.h> @@ -33,6 +34,6 @@ namespace Swift { } public: - boost::signal<void (ErrorPayload::ref)> onResponse; + boost::signals2::signal<void (ErrorPayload::ref)> onResponse; }; } diff --git a/Swiften/Queries/Requests/SubmitInBandRegistrationFormRequest.h b/Swiften/Queries/Requests/SubmitInBandRegistrationFormRequest.h index e2ed751..1cf28c5 100644 --- a/Swiften/Queries/Requests/SubmitInBandRegistrationFormRequest.h +++ b/Swiften/Queries/Requests/SubmitInBandRegistrationFormRequest.h @@ -8,8 +8,9 @@ #include <memory> +#include <boost/signals2.hpp> + #include <Swiften/Base/API.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/Elements/InBandRegistrationPayload.h> #include <Swiften/Queries/Request.h> @@ -31,6 +32,6 @@ namespace Swift { } public: - boost::signal<void (std::shared_ptr<Payload>, ErrorPayload::ref)> onResponse; + boost::signals2::signal<void (std::shared_ptr<Payload>, ErrorPayload::ref)> onResponse; }; } diff --git a/Swiften/Queries/UnitTest/RequestTest.cpp b/Swiften/Queries/UnitTest/RequestTest.cpp index 56daffa..b46f1d4 100644 --- a/Swiften/Queries/UnitTest/RequestTest.cpp +++ b/Swiften/Queries/UnitTest/RequestTest.cpp @@ -66,7 +66,7 @@ class RequestTest : public CppUnit::TestFixture { } public: - boost::signal<void (std::shared_ptr<Payload>, ErrorPayload::ref)> onResponse; + boost::signals2::signal<void (std::shared_ptr<Payload>, ErrorPayload::ref)> onResponse; }; public: diff --git a/Swiften/Roster/RosterPushResponder.h b/Swiften/Roster/RosterPushResponder.h index 10986f5..00411df 100644 --- a/Swiften/Roster/RosterPushResponder.h +++ b/Swiften/Roster/RosterPushResponder.h @@ -6,8 +6,9 @@ #pragma once +#include <boost/signals2.hpp> + #include <Swiften/Base/API.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/Elements/RosterPayload.h> #include <Swiften/Queries/SetResponder.h> @@ -17,7 +18,7 @@ namespace Swift { RosterPushResponder(IQRouter* router) : SetResponder<RosterPayload>(router) {} public: - boost::signal<void (std::shared_ptr<RosterPayload>)> onRosterReceived; + boost::signals2::signal<void (std::shared_ptr<RosterPayload>)> onRosterReceived; private: virtual bool handleSetRequest(const JID& from, const JID&, const std::string& id, std::shared_ptr<RosterPayload> payload) { diff --git a/Swiften/Roster/SetRosterRequest.h b/Swiften/Roster/SetRosterRequest.h index 7615abc..0f71ab7 100644 --- a/Swiften/Roster/SetRosterRequest.h +++ b/Swiften/Roster/SetRosterRequest.h @@ -8,8 +8,9 @@ #include <memory> +#include <boost/signals2.hpp> + #include <Swiften/Base/API.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/Elements/RosterPayload.h> #include <Swiften/Queries/Request.h> @@ -35,6 +36,6 @@ namespace Swift { } public: - boost::signal<void (ErrorPayload::ref)> onResponse; + boost::signals2::signal<void (ErrorPayload::ref)> onResponse; }; } diff --git a/Swiften/Roster/XMPPRoster.h b/Swiften/Roster/XMPPRoster.h index 5e3a6b1..ae2dbc7 100644 --- a/Swiften/Roster/XMPPRoster.h +++ b/Swiften/Roster/XMPPRoster.h @@ -11,9 +11,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/RosterItemPayload.h> #include <Swiften/JID/JID.h> #include <Swiften/Roster/XMPPRosterItem.h> @@ -69,30 +69,30 @@ namespace Swift { /** * Emitted when the given JID is added to the roster. */ - boost::signal<void (const JID&)> onJIDAdded; + boost::signals2::signal<void (const JID&)> onJIDAdded; /** * Emitted when the given JID is removed from the roster. */ - boost::signal<void (const JID&)> onJIDRemoved; + boost::signals2::signal<void (const JID&)> onJIDRemoved; /** * Emitted when the name or the groups of the roster item with the * given JID changes. */ - boost::signal<void (const JID&, const std::string&, const std::vector<std::string>&)> onJIDUpdated; + boost::signals2::signal<void (const JID&, const std::string&, const std::vector<std::string>&)> onJIDUpdated; /** * Emitted when the roster is reset (e.g. due to logging in/logging out). * After this signal is emitted, the roster is empty. It will be repopulated through * onJIDAdded and onJIDRemoved events. */ - boost::signal<void ()> onRosterCleared; + boost::signals2::signal<void ()> onRosterCleared; /** * Emitted after the last contact of the initial roster request response * was added. */ - boost::signal<void ()> onInitialRosterPopulated; + boost::signals2::signal<void ()> onInitialRosterPopulated; }; } diff --git a/Swiften/Roster/XMPPRosterController.h b/Swiften/Roster/XMPPRosterController.h index 3803cd5..f952c60 100644 --- a/Swiften/Roster/XMPPRosterController.h +++ b/Swiften/Roster/XMPPRosterController.h @@ -9,8 +9,9 @@ #include <memory> #include <string> +#include <boost/signals2.hpp> + #include <Swiften/Base/API.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/Elements/IQ.h> #include <Swiften/Elements/RosterPayload.h> #include <Swiften/JID/JID.h> diff --git a/Swiften/SASL/WindowsAuthentication.h b/Swiften/SASL/WindowsAuthentication.h index e5705a3..311c4c1 100644 --- a/Swiften/SASL/WindowsAuthentication.h +++ b/Swiften/SASL/WindowsAuthentication.h @@ -13,7 +13,7 @@ #include <Sspi.h> #include <Swiften/Base/API.h> -#include <Swiften/Base/boost_bsignals.h> +#include <boost/signals2.hpp> #include <Swiften/Base/SafeByteArray.h> namespace Swift { diff --git a/Swiften/Session/Session.h b/Swiften/Session/Session.h index 911bd34..23cc656 100644 --- a/Swiften/Session/Session.h +++ b/Swiften/Session/Session.h @@ -9,10 +9,10 @@ #include <memory> #include <boost/optional.hpp> +#include <boost/signals2.hpp> #include <Swiften/Base/API.h> #include <Swiften/Base/SafeByteArray.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/Elements/ToplevelElement.h> #include <Swiften/JID/JID.h> #include <Swiften/Network/Connection.h> @@ -64,10 +64,10 @@ namespace Swift { return remoteJID; } - boost::signal<void (std::shared_ptr<ToplevelElement>)> onElementReceived; - boost::signal<void (const boost::optional<SessionError>&)> onSessionFinished; - boost::signal<void (const SafeByteArray&)> onDataWritten; - boost::signal<void (const SafeByteArray&)> onDataRead; + boost::signals2::signal<void (std::shared_ptr<ToplevelElement>)> onElementReceived; + boost::signals2::signal<void (const boost::optional<SessionError>&)> onSessionFinished; + boost::signals2::signal<void (const SafeByteArray&)> onDataWritten; + boost::signals2::signal<void (const SafeByteArray&)> onDataRead; protected: void setRemoteJID(const JID& j) { diff --git a/Swiften/Session/SessionStream.h b/Swiften/Session/SessionStream.h index 4b86cee..f56f495 100644 --- a/Swiften/Session/SessionStream.h +++ b/Swiften/Session/SessionStream.h @@ -9,11 +9,11 @@ #include <memory> #include <boost/optional.hpp> +#include <boost/signals2.hpp> #include <Swiften/Base/API.h> #include <Swiften/Base/Error.h> #include <Swiften/Base/SafeByteArray.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/Elements/ProtocolHeader.h> #include <Swiften/Elements/ToplevelElement.h> #include <Swiften/TLS/Certificate.h> @@ -74,12 +74,12 @@ namespace Swift { virtual ByteArray getTLSFinishMessage() const = 0; - boost::signal<void (const ProtocolHeader&)> onStreamStartReceived; - boost::signal<void (std::shared_ptr<ToplevelElement>)> onElementReceived; - boost::signal<void (std::shared_ptr<Error>)> onClosed; - boost::signal<void ()> onTLSEncrypted; - boost::signal<void (const SafeByteArray&)> onDataRead; - boost::signal<void (const SafeByteArray&)> onDataWritten; + boost::signals2::signal<void (const ProtocolHeader&)> onStreamStartReceived; + boost::signals2::signal<void (std::shared_ptr<ToplevelElement>)> onElementReceived; + boost::signals2::signal<void (std::shared_ptr<Error>)> onClosed; + boost::signals2::signal<void ()> onTLSEncrypted; + boost::signals2::signal<void (const SafeByteArray&)> onDataRead; + boost::signals2::signal<void (const SafeByteArray&)> onDataWritten; protected: CertificateWithKey::ref getTLSCertificate() const { diff --git a/Swiften/StreamManagement/StanzaAckRequester.h b/Swiften/StreamManagement/StanzaAckRequester.h index dda1395..422efbd 100644 --- a/Swiften/StreamManagement/StanzaAckRequester.h +++ b/Swiften/StreamManagement/StanzaAckRequester.h @@ -9,8 +9,9 @@ #include <deque> #include <memory> +#include <boost/signals2.hpp> + #include <Swiften/Base/API.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/Elements/Stanza.h> namespace Swift { @@ -22,8 +23,8 @@ namespace Swift { void handleAckReceived(unsigned int handledStanzasCount); public: - boost::signal<void ()> onRequestAck; - boost::signal<void (std::shared_ptr<Stanza>)> onStanzaAcked; + boost::signals2::signal<void ()> onRequestAck; + boost::signals2::signal<void (std::shared_ptr<Stanza>)> onStanzaAcked; private: friend class StanzaAckRequesterTest; diff --git a/Swiften/StreamManagement/StanzaAckResponder.h b/Swiften/StreamManagement/StanzaAckResponder.h index 389606e..c90bbff 100644 --- a/Swiften/StreamManagement/StanzaAckResponder.h +++ b/Swiften/StreamManagement/StanzaAckResponder.h @@ -8,8 +8,9 @@ #include <memory> +#include <boost/signals2.hpp> + #include <Swiften/Base/API.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/Elements/Stanza.h> namespace Swift { @@ -21,7 +22,7 @@ namespace Swift { void handleAckRequestReceived(); public: - boost::signal<void (unsigned int /* handledStanzaCount */)> onAck; + boost::signals2::signal<void (unsigned int /* handledStanzaCount */)> onAck; private: friend class StanzaAckResponderTest; diff --git a/Swiften/StreamStack/CompressionLayer.h b/Swiften/StreamStack/CompressionLayer.h index 32fad37..04a9251 100644 --- a/Swiften/StreamStack/CompressionLayer.h +++ b/Swiften/StreamStack/CompressionLayer.h @@ -7,10 +7,10 @@ #pragma once #include <boost/noncopyable.hpp> +#include <boost/signals2.hpp> #include <Swiften/Base/API.h> #include <Swiften/Base/SafeByteArray.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/Compress/ZLibCompressor.h> #include <Swiften/Compress/ZLibDecompressor.h> #include <Swiften/Compress/ZLibException.h> @@ -43,7 +43,7 @@ namespace Swift { } public: - boost::signal<void ()> onError; + boost::signals2::signal<void ()> onError; private: ZLibCompressor compressor_; diff --git a/Swiften/StreamStack/StreamStack.h b/Swiften/StreamStack/StreamStack.h index 62bd026..b12a69f 100644 --- a/Swiften/StreamStack/StreamStack.h +++ b/Swiften/StreamStack/StreamStack.h @@ -9,8 +9,9 @@ #include <memory> #include <vector> +#include <boost/signals2.hpp> + #include <Swiften/Base/API.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/Elements/Stanza.h> namespace Swift { diff --git a/Swiften/StreamStack/TLSLayer.h b/Swiften/StreamStack/TLSLayer.h index 8782753..415a3f0 100644 --- a/Swiften/StreamStack/TLSLayer.h +++ b/Swiften/StreamStack/TLSLayer.h @@ -6,9 +6,10 @@ #pragma once +#include <boost/signals2.hpp> + #include <Swiften/Base/API.h> #include <Swiften/Base/SafeByteArray.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/StreamStack/StreamLayer.h> #include <Swiften/TLS/Certificate.h> #include <Swiften/TLS/CertificateVerificationError.h> @@ -40,8 +41,8 @@ namespace Swift { } public: - boost::signal<void (std::shared_ptr<TLSError>)> onError; - boost::signal<void ()> onConnected; + boost::signals2::signal<void (std::shared_ptr<TLSError>)> onError; + boost::signals2::signal<void ()> onConnected; private: TLSContext* context; diff --git a/Swiften/StreamStack/UnitTest/StreamStackTest.cpp b/Swiften/StreamStack/UnitTest/StreamStackTest.cpp index 6d50b77..f0f82c9 100644 --- a/Swiften/StreamStack/UnitTest/StreamStackTest.cpp +++ b/Swiften/StreamStack/UnitTest/StreamStackTest.cpp @@ -4,10 +4,10 @@ * See the COPYING file for more information. */ +#include <memory> #include <vector> #include <boost/bind.hpp> -#include <boost/smart_ptr.hpp> #include <QA/Checker/IO.h> diff --git a/Swiften/StreamStack/XMPPLayer.h b/Swiften/StreamStack/XMPPLayer.h index 74ea519..1d4abf8 100644 --- a/Swiften/StreamStack/XMPPLayer.h +++ b/Swiften/StreamStack/XMPPLayer.h @@ -9,10 +9,10 @@ #include <memory> #include <boost/noncopyable.hpp> +#include <boost/signals2.hpp> #include <Swiften/Base/API.h> #include <Swiften/Base/SafeByteArray.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/Elements/StreamType.h> #include <Swiften/Elements/ToplevelElement.h> #include <Swiften/Parser/XMPPParserClient.h> @@ -50,11 +50,11 @@ namespace Swift { void writeDataInternal(const SafeByteArray& data); public: - boost::signal<void (const ProtocolHeader&)> onStreamStart; - boost::signal<void (std::shared_ptr<ToplevelElement>)> onElement; - boost::signal<void (const SafeByteArray&)> onWriteData; - boost::signal<void (const SafeByteArray&)> onDataRead; - boost::signal<void ()> onError; + boost::signals2::signal<void (const ProtocolHeader&)> onStreamStart; + boost::signals2::signal<void (std::shared_ptr<ToplevelElement>)> onElement; + boost::signals2::signal<void (const SafeByteArray&)> onWriteData; + boost::signals2::signal<void (const SafeByteArray&)> onDataRead; + boost::signals2::signal<void ()> onError; private: void handleStreamStart(const ProtocolHeader&); diff --git a/Swiften/TLS/CAPICertificate.h b/Swiften/TLS/CAPICertificate.h index 5322a03..0259db5 100644 --- a/Swiften/TLS/CAPICertificate.h +++ b/Swiften/TLS/CAPICertificate.h @@ -13,7 +13,7 @@ #pragma once #include <Swiften/Base/API.h> -#include <Swiften/Base/boost_bsignals.h> +#include <boost/signals2.hpp> #include <Swiften/Base/SafeByteArray.h> #include <Swiften/TLS/CertificateWithKey.h> #include <Swiften/Network/Timer.h> @@ -43,7 +43,7 @@ namespace Swift { const std::string& getSmartCardReaderName() const; public: - boost::signal<void ()> onCertificateCardRemoved; + boost::signals2::signal<void ()> onCertificateCardRemoved; private: void setUri (const std::string& capiUri); diff --git a/Swiften/TLS/OpenSSL/OpenSSLContext.h b/Swiften/TLS/OpenSSL/OpenSSLContext.h index 54a8dcb..e75b3c9 100644 --- a/Swiften/TLS/OpenSSL/OpenSSLContext.h +++ b/Swiften/TLS/OpenSSL/OpenSSLContext.h @@ -7,11 +7,11 @@ #pragma once #include <boost/noncopyable.hpp> +#include <boost/signals2.hpp> #include <openssl/ssl.h> #include <Swiften/Base/ByteArray.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/TLS/CertificateWithKey.h> #include <Swiften/TLS/TLSContext.h> diff --git a/Swiften/TLS/Schannel/SchannelContext.h b/Swiften/TLS/Schannel/SchannelContext.h index 4cb086e..a3748fe 100644 --- a/Swiften/TLS/Schannel/SchannelContext.h +++ b/Swiften/TLS/Schannel/SchannelContext.h @@ -12,7 +12,7 @@ #pragma once -#include <Swiften/Base/boost_bsignals.h> +#include <boost/signals2.hpp> #include <Swiften/TLS/TLSContext.h> #include <Swiften/TLS/Schannel/SchannelUtil.h> diff --git a/Swiften/TLS/TLSContext.h b/Swiften/TLS/TLSContext.h index b0d9296..79e3485 100644 --- a/Swiften/TLS/TLSContext.h +++ b/Swiften/TLS/TLSContext.h @@ -8,9 +8,10 @@ #include <memory> +#include <boost/signals2.hpp> + #include <Swiften/Base/API.h> #include <Swiften/Base/SafeByteArray.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/TLS/Certificate.h> #include <Swiften/TLS/CertificateVerificationError.h> #include <Swiften/TLS/CertificateWithKey.h> @@ -36,9 +37,9 @@ namespace Swift { virtual ByteArray getFinishMessage() const = 0; public: - boost::signal<void (const SafeByteArray&)> onDataForNetwork; - boost::signal<void (const SafeByteArray&)> onDataForApplication; - boost::signal<void (std::shared_ptr<TLSError>)> onError; - boost::signal<void ()> onConnected; + boost::signals2::signal<void (const SafeByteArray&)> onDataForNetwork; + boost::signals2::signal<void (const SafeByteArray&)> onDataForApplication; + boost::signals2::signal<void (std::shared_ptr<TLSError>)> onError; + boost::signals2::signal<void ()> onConnected; }; } diff --git a/Swiften/VCards/VCardManager.h b/Swiften/VCards/VCardManager.h index fbad221..d987862 100644 --- a/Swiften/VCards/VCardManager.h +++ b/Swiften/VCards/VCardManager.h @@ -9,9 +9,9 @@ #include <set> #include <boost/date_time/posix_time/posix_time.hpp> +#include <boost/signals2.hpp> #include <Swiften/Base/API.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/Elements/ErrorPayload.h> #include <Swiften/Elements/VCard.h> #include <Swiften/JID/JID.h> @@ -22,7 +22,7 @@ namespace Swift { class JID; class VCardStorage; - class SWIFTEN_API VCardManager : public boost::bsignals::trackable { + class SWIFTEN_API VCardManager : public boost::signals2::trackable { public: VCardManager(const JID& ownJID, IQRouter* iqRouter, VCardStorage* vcardStorage); ~VCardManager(); @@ -41,19 +41,19 @@ namespace Swift { /** * The JID will always be bare. */ - boost::signal<void (const JID&, VCard::ref)> onVCardChanged; + boost::signals2::signal<void (const JID&, VCard::ref)> onVCardChanged; /** * Emitted when we received an error on looking up a vCard. */ - boost::signal<void (const JID&, ErrorPayload::ref)> onVCardRetrievalError; + boost::signals2::signal<void (const JID&, ErrorPayload::ref)> onVCardRetrievalError; /** * Emitted when our own vcard changes. * * onVCardChanged will also be emitted. */ - boost::signal<void (VCard::ref)> onOwnVCardChanged; + boost::signals2::signal<void (VCard::ref)> onOwnVCardChanged; private: void handleVCardReceived(const JID& from, VCard::ref, ErrorPayload::ref); diff --git a/Swiften/Whiteboard/WhiteboardSession.h b/Swiften/Whiteboard/WhiteboardSession.h index 63d9670..0871f94 100644 --- a/Swiften/Whiteboard/WhiteboardSession.h +++ b/Swiften/Whiteboard/WhiteboardSession.h @@ -14,9 +14,10 @@ #include <memory> +#include <boost/signals2.hpp> + #include <Swiften/Base/API.h> #include <Swiften/Base/IDGenerator.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/Elements/Whiteboard/WhiteboardElement.h> #include <Swiften/Elements/Whiteboard/WhiteboardOperation.h> #include <Swiften/JID/JID.h> @@ -41,11 +42,11 @@ namespace Swift { const JID& getTo() const; public: - boost::signal< void(const WhiteboardElement::ref element)> onElementReceived; - boost::signal< void(const WhiteboardOperation::ref operation)> onOperationReceived; - boost::signal< void(const JID& contact)> onSessionTerminated; - boost::signal< void(const JID& contact)> onRequestAccepted; - boost::signal< void(const JID& contact)> onRequestRejected; + boost::signals2::signal< void(const WhiteboardElement::ref element)> onElementReceived; + boost::signals2::signal< void(const WhiteboardOperation::ref operation)> onOperationReceived; + boost::signals2::signal< void(const JID& contact)> onSessionTerminated; + boost::signals2::signal< void(const JID& contact)> onRequestAccepted; + boost::signals2::signal< void(const JID& contact)> onRequestRejected; private: virtual void handleIncomingOperation(WhiteboardOperation::ref operation) = 0; diff --git a/Swiften/Whiteboard/WhiteboardSessionManager.h b/Swiften/Whiteboard/WhiteboardSessionManager.h index 44ce14a..4f14665 100644 --- a/Swiften/Whiteboard/WhiteboardSessionManager.h +++ b/Swiften/Whiteboard/WhiteboardSessionManager.h @@ -14,8 +14,9 @@ #include <map> +#include <boost/signals2.hpp> + #include <Swiften/Base/API.h> -#include <Swiften/Base/boost_bsignals.h> #include <Swiften/Client/StanzaChannel.h> #include <Swiften/JID/JID.h> #include <Swiften/Queries/IQRouter.h> @@ -39,7 +40,7 @@ namespace Swift { WhiteboardSession::ref requestSession(const JID& to); public: - boost::signal< void (IncomingWhiteboardSession::ref)> onSessionRequest; + boost::signals2::signal< void (IncomingWhiteboardSession::ref)> onSessionRequest; private: JID getFullJID(const JID& bareJID); |