summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2016-04-05 13:17:19 (GMT)
committerTobias Markmann <tm@ayena.de>2016-04-05 19:42:39 (GMT)
commit2b560b129b7a31fc8cc07f618e763c95a22bf832 (patch)
tree73e72cdc758b79d01485dc28dcedd48b26859ae8 /Swiften/FileTransfer
parent3c560e31b0f168da917e8d566db01fd1cd997d86 (diff)
downloadswift-2b560b129b7a31fc8cc07f618e763c95a22bf832.zip
swift-2b560b129b7a31fc8cc07f618e763c95a22bf832.tar.bz2
Migrate to Boost.Signals2 from Boost.Signals
Boost.Signals was deprecated and is not improved further. This patch removes Boost.Signals from 3rdParty and adds Boost.Signals2 and its dependencies. Also removed the Qt signals compatibility file Swiften/Base/boost_bsignals.h. Test-Information: Build and ran unit tests on OS X 10.11.4. Confirmed successful login using Swift client. Change-Id: Ie6e3b2d15aac2462cda95401582f5287a479fb54
Diffstat (limited to 'Swiften/FileTransfer')
-rw-r--r--Swiften/FileTransfer/FileTransfer.h8
-rw-r--r--Swiften/FileTransfer/FileTransferManager.h4
-rw-r--r--Swiften/FileTransfer/FileTransferManagerImpl.h2
-rw-r--r--Swiften/FileTransfer/FileTransferTransporter.h8
-rw-r--r--Swiften/FileTransfer/IBBReceiveSession.h4
-rw-r--r--Swiften/FileTransfer/IBBReceiveTransportSession.h7
-rw-r--r--Swiften/FileTransfer/IBBSendSession.h6
-rw-r--r--Swiften/FileTransfer/IBBSendTransportSession.h7
-rw-r--r--Swiften/FileTransfer/IncomingFileTransfer.h3
-rw-r--r--Swiften/FileTransfer/IncomingFileTransferManager.h5
-rw-r--r--Swiften/FileTransfer/IncomingJingleFileTransfer.h6
-rw-r--r--Swiften/FileTransfer/JingleFileTransfer.h9
-rw-r--r--Swiften/FileTransfer/LocalJingleTransportCandidateGenerator.h5
-rw-r--r--Swiften/FileTransfer/OutgoingJingleFileTransfer.h4
-rw-r--r--Swiften/FileTransfer/ReadBytestream.h7
-rw-r--r--Swiften/FileTransfer/RemoteJingleTransportCandidateSelector.cpp2
-rw-r--r--Swiften/FileTransfer/RemoteJingleTransportCandidateSelector.h4
-rw-r--r--Swiften/FileTransfer/S5BTransportSession.h6
-rw-r--r--Swiften/FileTransfer/SOCKS5BytestreamClientSession.h16
-rw-r--r--Swiften/FileTransfer/SOCKS5BytestreamProxiesManager.h2
-rw-r--r--Swiften/FileTransfer/SOCKS5BytestreamProxyFinder.h2
-rw-r--r--Swiften/FileTransfer/SOCKS5BytestreamServerManager.h7
-rw-r--r--Swiften/FileTransfer/SOCKS5BytestreamServerPortForwardingUser.h9
-rw-r--r--Swiften/FileTransfer/SOCKS5BytestreamServerResourceUser.h7
-rw-r--r--Swiften/FileTransfer/SOCKS5BytestreamServerSession.h15
-rw-r--r--Swiften/FileTransfer/TransportSession.h7
-rw-r--r--Swiften/FileTransfer/UnitTest/SOCKS5BytestreamClientSessionTest.cpp2
-rw-r--r--Swiften/FileTransfer/WriteBytestream.h5
28 files changed, 91 insertions, 78 deletions
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;
};
}