diff options
Diffstat (limited to 'Swiften/FileTransfer/UnitTest')
-rw-r--r-- | Swiften/FileTransfer/UnitTest/IncomingJingleFileTransferTest.cpp | 15 | ||||
-rw-r--r-- | Swiften/FileTransfer/UnitTest/OutgoingJingleFileTransferTest.cpp | 19 |
2 files changed, 20 insertions, 14 deletions
diff --git a/Swiften/FileTransfer/UnitTest/IncomingJingleFileTransferTest.cpp b/Swiften/FileTransfer/UnitTest/IncomingJingleFileTransferTest.cpp index 4c6ae72..9d180a0 100644 --- a/Swiften/FileTransfer/UnitTest/IncomingJingleFileTransferTest.cpp +++ b/Swiften/FileTransfer/UnitTest/IncomingJingleFileTransferTest.cpp @@ -10,6 +10,7 @@ #include <boost/smart_ptr/make_shared.hpp> #include <Swiften/Base/ByteArray.h> +#include <Swiften/Base/Override.h> #include <Swiften/Base/Log.h> #include <Swiften/Client/DummyStanzaChannel.h> #include <Swiften/Elements/IBB.h> @@ -80,12 +81,6 @@ public: class FakeLocalJingleTransportCandidateGenerator : public LocalJingleTransportCandidateGenerator { public: - virtual void generateLocalTransportCandidates(JingleTransportPayload::ref payload) { - JingleS5BTransportPayload::ref payL = make_shared<JingleS5BTransportPayload>(); - payL->setSessionID(payload->getSessionID()); - onLocalTransportCandidatesGenerated(payL); - } - void emitonLocalTransportCandidatesGenerated(JingleTransportPayload::ref payload) { onLocalTransportCandidatesGenerated(payload); } @@ -101,6 +96,14 @@ public: virtual JingleTransport::ref selectTransport(JingleTransportPayload::ref) { return JingleTransport::ref(); } + + virtual void start(JingleTransportPayload::ref payload) SWIFTEN_OVERRIDE { + JingleS5BTransportPayload::ref payL = make_shared<JingleS5BTransportPayload>(); + payL->setSessionID(payload->getSessionID()); + onLocalTransportCandidatesGenerated(payL); + } + + virtual void stop() SWIFTEN_OVERRIDE {} }; class FakeLocalJingleTransportCandidateGeneratorFactory : public LocalJingleTransportCandidateGeneratorFactory { diff --git a/Swiften/FileTransfer/UnitTest/OutgoingJingleFileTransferTest.cpp b/Swiften/FileTransfer/UnitTest/OutgoingJingleFileTransferTest.cpp index 0c324bf..73b496a 100644 --- a/Swiften/FileTransfer/UnitTest/OutgoingJingleFileTransferTest.cpp +++ b/Swiften/FileTransfer/UnitTest/OutgoingJingleFileTransferTest.cpp @@ -28,6 +28,7 @@ #include <Swiften/Elements/JingleFileTransferDescription.h> #include <Swiften/Elements/IBB.h> #include <Swiften/Base/ByteArray.h> +#include <Swiften/Base/Override.h> #include <Swiften/Base/IDGenerator.h> #include <Swiften/EventLoop/DummyEventLoop.h> #include <Swiften/Network/PlatformNATTraversalWorker.h> @@ -87,14 +88,6 @@ public: class OFakeLocalJingleTransportCandidateGenerator : public LocalJingleTransportCandidateGenerator { public: - virtual void generateLocalTransportCandidates(JingleTransportPayload::ref /* payload */) { - //JingleTransportPayload::ref payL = make_shared<JingleTransportPayload>(); - //payL->setSessionID(payload->getSessionID()); - JingleS5BTransportPayload::ref payL = boost::make_shared<JingleS5BTransportPayload>(); - - onLocalTransportCandidatesGenerated(payL); - } - void emitonLocalTransportCandidatesGenerated(JingleTransportPayload::ref payload) { onLocalTransportCandidatesGenerated(payload); } @@ -110,6 +103,16 @@ public: virtual JingleTransport::ref selectTransport(JingleTransportPayload::ref) { return JingleTransport::ref(); } + + virtual void start(JingleTransportPayload::ref /* payload */) SWIFTEN_OVERRIDE { + //JingleTransportPayload::ref payL = make_shared<JingleTransportPayload>(); + //payL->setSessionID(payload->getSessionID()); + JingleS5BTransportPayload::ref payL = boost::make_shared<JingleS5BTransportPayload>(); + + onLocalTransportCandidatesGenerated(payL); + } + + virtual void stop() SWIFTEN_OVERRIDE {} }; class OFakeLocalJingleTransportCandidateGeneratorFactory : public LocalJingleTransportCandidateGeneratorFactory { |