summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Jingle')
-rw-r--r--Swiften/Jingle/AbstractJingleSessionListener.cpp42
-rw-r--r--Swiften/Jingle/AbstractJingleSessionListener.h26
-rw-r--r--Swiften/Jingle/FakeJingleSession.cpp3
-rw-r--r--Swiften/Jingle/FakeJingleSession.h28
-rw-r--r--Swiften/Jingle/JingleResponder.cpp4
-rw-r--r--Swiften/Jingle/JingleSession.cpp10
-rw-r--r--Swiften/Jingle/JingleSession.h23
-rw-r--r--Swiften/Jingle/JingleSessionImpl.cpp47
-rw-r--r--Swiften/Jingle/JingleSessionImpl.h14
-rw-r--r--Swiften/Jingle/JingleSessionListener.cpp12
-rw-r--r--Swiften/Jingle/JingleSessionListener.h40
-rw-r--r--Swiften/Jingle/JingleSessionManager.cpp3
-rw-r--r--Swiften/Jingle/JingleSessionManager.h3
-rw-r--r--Swiften/Jingle/SConscript2
14 files changed, 206 insertions, 51 deletions
diff --git a/Swiften/Jingle/AbstractJingleSessionListener.cpp b/Swiften/Jingle/AbstractJingleSessionListener.cpp
new file mode 100644
index 0000000..eaa1a47
--- /dev/null
+++ b/Swiften/Jingle/AbstractJingleSessionListener.cpp
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2013 Remko Tronçon
+ * Licensed under the GNU General Public License.
+ * See the COPYING file for more information.
+ */
+
+#include <Swiften/Jingle/AbstractJingleSessionListener.h>
+
+#include <Swiften/Base/Log.h>
+
+using namespace Swift;
+
+void AbstractJingleSessionListener::handleSessionAcceptReceived(const JingleContentID&, boost::shared_ptr<JingleDescription>, boost::shared_ptr<JingleTransportPayload>) {
+ SWIFT_LOG(warning) << "Unimplemented" << std::endl;
+}
+
+void AbstractJingleSessionListener::handleSessionInfoReceived(boost::shared_ptr<JinglePayload>) {
+ SWIFT_LOG(warning) << "Unimplemented" << std::endl;
+}
+
+void AbstractJingleSessionListener::handleSessionTerminateReceived(boost::optional<JinglePayload::Reason>) {
+ SWIFT_LOG(warning) << "Unimplemented" << std::endl;
+}
+
+void AbstractJingleSessionListener::handleTransportAcceptReceived(const JingleContentID&, boost::shared_ptr<JingleTransportPayload>) {
+ SWIFT_LOG(warning) << "Unimplemented" << std::endl;
+}
+
+void AbstractJingleSessionListener::handleTransportInfoReceived(const JingleContentID&, boost::shared_ptr<JingleTransportPayload>) {
+ SWIFT_LOG(warning) << "Unimplemented" << std::endl;
+}
+
+void AbstractJingleSessionListener::handleTransportRejectReceived(const JingleContentID&, boost::shared_ptr<JingleTransportPayload>) {
+ SWIFT_LOG(warning) << "Unimplemented" << std::endl;
+}
+
+void AbstractJingleSessionListener::handleTransportReplaceReceived(const JingleContentID&, boost::shared_ptr<JingleTransportPayload>) {
+ SWIFT_LOG(warning) << "Unimplemented" << std::endl;
+}
+
+void AbstractJingleSessionListener::handleTransportInfoAcknowledged(const std::string&) {
+}
diff --git a/Swiften/Jingle/AbstractJingleSessionListener.h b/Swiften/Jingle/AbstractJingleSessionListener.h
new file mode 100644
index 0000000..4f76675
--- /dev/null
+++ b/Swiften/Jingle/AbstractJingleSessionListener.h
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2013 Remko Tronçon
+ * Licensed under the GNU General Public License.
+ * See the COPYING file for more information.
+ */
+
+#pragma once
+
+#include <Swiften/Base/API.h>
+#include <Swiften/Base/Override.h>
+#include <Swiften/Jingle/JingleSessionListener.h>
+
+namespace Swift {
+ class SWIFTEN_API AbstractJingleSessionListener : public JingleSessionListener {
+ public:
+ virtual void handleSessionAcceptReceived(const JingleContentID&, boost::shared_ptr<JingleDescription>, boost::shared_ptr<JingleTransportPayload>) SWIFTEN_OVERRIDE;
+ virtual void handleSessionInfoReceived(boost::shared_ptr<JinglePayload>) SWIFTEN_OVERRIDE;
+ virtual void handleSessionTerminateReceived(boost::optional<JinglePayload::Reason>) SWIFTEN_OVERRIDE;
+ virtual void handleTransportAcceptReceived(const JingleContentID&, boost::shared_ptr<JingleTransportPayload>) SWIFTEN_OVERRIDE;
+ virtual void handleTransportInfoReceived(const JingleContentID&, boost::shared_ptr<JingleTransportPayload>) SWIFTEN_OVERRIDE;
+ virtual void handleTransportRejectReceived(const JingleContentID&, boost::shared_ptr<JingleTransportPayload>) SWIFTEN_OVERRIDE;
+ virtual void handleTransportReplaceReceived(const JingleContentID&, boost::shared_ptr<JingleTransportPayload>) SWIFTEN_OVERRIDE;
+ virtual void handleTransportInfoAcknowledged(const std::string& id) SWIFTEN_OVERRIDE;
+ };
+}
+
diff --git a/Swiften/Jingle/FakeJingleSession.cpp b/Swiften/Jingle/FakeJingleSession.cpp
index 82ec631..1df106a 100644
--- a/Swiften/Jingle/FakeJingleSession.cpp
+++ b/Swiften/Jingle/FakeJingleSession.cpp
@@ -34,6 +34,7 @@ void FakeJingleSession::sendAccept(const JingleContentID& id, JingleDescription:
}
-void FakeJingleSession::sendTransportInfo(const JingleContentID& id, JingleTransportPayload::ref payload) {
+std::string FakeJingleSession::sendTransportInfo(const JingleContentID& id, JingleTransportPayload::ref payload) {
calledCommands.push_back(InfoTransportCall(id, payload));
+ return idGenerator.generateID();
}
diff --git a/Swiften/Jingle/FakeJingleSession.h b/Swiften/Jingle/FakeJingleSession.h
index fd3d7b7..651ac5f 100644
--- a/Swiften/Jingle/FakeJingleSession.h
+++ b/Swiften/Jingle/FakeJingleSession.h
@@ -5,4 +5,10 @@
*/
+/*
+ * Copyright (c) 2013 Remko Tronçon
+ * Licensed under the GNU General Public License.
+ * See the COPYING file for more information.
+ */
+
#pragma once
@@ -12,5 +18,8 @@
#include <boost/variant.hpp>
+#include <Swiften/Base/API.h>
+#include <Swiften/Base/SimpleIDGenerator.h>
#include <Swiften/Base/boost_bsignals.h>
+#include <Swiften/Base/Override.h>
#include <Swiften/JID/JID.h>
#include <Swiften/Elements/JinglePayload.h>
@@ -21,5 +30,5 @@ namespace Swift {
class JingleContentID;
- class FakeJingleSession : public JingleSession {
+ class SWIFTEN_API FakeJingleSession : public JingleSession {
public:
struct InitiateCall {
@@ -79,15 +88,16 @@ namespace Swift {
virtual ~FakeJingleSession();
- virtual void sendInitiate(const JingleContentID&, JingleDescription::ref, JingleTransportPayload::ref);
- virtual void sendTerminate(JinglePayload::Reason::Type reason);
- virtual void sendInfo(boost::shared_ptr<Payload>);
- virtual void sendAccept(const JingleContentID&, JingleDescription::ref, JingleTransportPayload::ref = JingleTransportPayload::ref());
- virtual void sendTransportInfo(const JingleContentID&, JingleTransportPayload::ref);
- virtual void sendTransportAccept(const JingleContentID&, JingleTransportPayload::ref);
- virtual void sendTransportReject(const JingleContentID&, JingleTransportPayload::ref);
- virtual void sendTransportReplace(const JingleContentID&, JingleTransportPayload::ref);
+ virtual void sendInitiate(const JingleContentID&, JingleDescription::ref, JingleTransportPayload::ref) SWIFTEN_OVERRIDE;
+ virtual void sendTerminate(JinglePayload::Reason::Type reason) SWIFTEN_OVERRIDE;
+ virtual void sendInfo(boost::shared_ptr<Payload>) SWIFTEN_OVERRIDE;
+ virtual void sendAccept(const JingleContentID&, JingleDescription::ref, JingleTransportPayload::ref = JingleTransportPayload::ref()) SWIFTEN_OVERRIDE;
+ virtual std::string sendTransportInfo(const JingleContentID&, JingleTransportPayload::ref) SWIFTEN_OVERRIDE;
+ virtual void sendTransportAccept(const JingleContentID&, JingleTransportPayload::ref) SWIFTEN_OVERRIDE;
+ virtual void sendTransportReject(const JingleContentID&, JingleTransportPayload::ref) SWIFTEN_OVERRIDE;
+ virtual void sendTransportReplace(const JingleContentID&, JingleTransportPayload::ref) SWIFTEN_OVERRIDE;
public:
std::vector<Command> calledCommands;
+ SimpleIDGenerator idGenerator;
};
}
diff --git a/Swiften/Jingle/JingleResponder.cpp b/Swiften/Jingle/JingleResponder.cpp
index 4c82f51..e963ef6 100644
--- a/Swiften/Jingle/JingleResponder.cpp
+++ b/Swiften/Jingle/JingleResponder.cpp
@@ -1,4 +1,4 @@
/*
- * Copyright (c) 2011 Remko Tronçon
+ * Copyright (c) 2011-2014 Remko Tronçon
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
@@ -52,5 +52,5 @@ bool JingleResponder::handleSetRequest(const JID& from, const JID& to, const std
}
else {
- std::cerr << "WARN: Didn't find jingle session!" << std::endl;
+ SWIFT_LOG(warning) << "Didn't find jingle session!";
// TODO: Add jingle-specific error
sendError(from, id, ErrorPayload::ItemNotFound, ErrorPayload::Cancel);
diff --git a/Swiften/Jingle/JingleSession.cpp b/Swiften/Jingle/JingleSession.cpp
index eb649f3..7e09014 100644
--- a/Swiften/Jingle/JingleSession.cpp
+++ b/Swiften/Jingle/JingleSession.cpp
@@ -1,4 +1,4 @@
/*
- * Copyright (c) 2010 Remko Tronçon
+ * Copyright (c) 2010-2013 Remko Tronçon
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
@@ -8,6 +8,10 @@
#include <boost/smart_ptr/make_shared.hpp>
+#include <algorithm>
+#include <boost/function.hpp>
-namespace Swift {
+#include <Swiften/Base/foreach.h>
+
+using namespace Swift;
JingleSession::JingleSession(const JID& initiator, const std::string& id) : initiator(initiator), id(id) {
@@ -19,4 +23,2 @@ JingleSession::JingleSession(const JID& initiator, const std::string& id) : init
JingleSession::~JingleSession() {
}
-
-}
diff --git a/Swiften/Jingle/JingleSession.h b/Swiften/Jingle/JingleSession.h
index 150ad79..8307311 100644
--- a/Swiften/Jingle/JingleSession.h
+++ b/Swiften/Jingle/JingleSession.h
@@ -1,4 +1,4 @@
/*
- * Copyright (c) 2011 Remko Tronçon
+ * Copyright (c) 2011-2013 Remko Tronçon
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
@@ -7,9 +7,10 @@
#pragma once
+#include <string>
+#include <vector>
#include <boost/shared_ptr.hpp>
#include <boost/optional.hpp>
-#include <string>
-
+#include <Swiften/Base/Listenable.h>
#include <Swiften/Base/boost_bsignals.h>
#include <Swiften/JID/JID.h>
@@ -17,7 +18,8 @@
namespace Swift {
+ class JingleSessionListener;
class JingleContentID;
- class JingleSession {
+ class JingleSession : public Listenable<JingleSessionListener> {
public:
typedef boost::shared_ptr<JingleSession> ref;
@@ -33,25 +35,18 @@ namespace Swift {
return id;
}
+
virtual void sendInitiate(const JingleContentID&, JingleDescription::ref, JingleTransportPayload::ref) = 0;
virtual void sendTerminate(JinglePayload::Reason::Type reason) = 0;
virtual void sendInfo(boost::shared_ptr<Payload>) = 0;
virtual void sendAccept(const JingleContentID&, JingleDescription::ref, JingleTransportPayload::ref = JingleTransportPayload::ref()) = 0;
- virtual void sendTransportInfo(const JingleContentID&, JingleTransportPayload::ref) = 0;
+ virtual std::string sendTransportInfo(const JingleContentID&, JingleTransportPayload::ref) = 0;
virtual void sendTransportAccept(const JingleContentID&, JingleTransportPayload::ref) = 0;
virtual void sendTransportReject(const JingleContentID&, JingleTransportPayload::ref) = 0;
virtual void sendTransportReplace(const JingleContentID&, JingleTransportPayload::ref) = 0;
- public:
- boost::signal<void (const JingleContentID&, JingleDescription::ref, JingleTransportPayload::ref)> onSessionAcceptReceived;
- boost::signal<void (JinglePayload::ref)> onSessionInfoReceived;
- boost::signal<void (boost::optional<JinglePayload::Reason>)> onSessionTerminateReceived;
- boost::signal<void (const JingleContentID&, JingleTransportPayload::ref)> onTransportAcceptReceived;
- boost::signal<void (const JingleContentID&, JingleTransportPayload::ref)> onTransportInfoReceived;
- boost::signal<void (const JingleContentID&, JingleTransportPayload::ref)> onTransportRejectReceived;
- boost::signal<void (const JingleContentID&, JingleTransportPayload::ref)> onTransportReplaceReceived;
-
private:
JID initiator;
std::string id;
+ std::vector<JingleSessionListener*> listeners;
};
}
diff --git a/Swiften/Jingle/JingleSessionImpl.cpp b/Swiften/Jingle/JingleSessionImpl.cpp
index 98c5196..ff22d11 100644
--- a/Swiften/Jingle/JingleSessionImpl.cpp
+++ b/Swiften/Jingle/JingleSessionImpl.cpp
@@ -1,4 +1,4 @@
/*
- * Copyright (c) 2010 Remko Tronçon
+ * Copyright (c) 2010-2013 Remko Tronçon
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
@@ -8,7 +8,10 @@
#include <boost/smart_ptr/make_shared.hpp>
+#include <boost/bind.hpp>
+#include <algorithm>
#include <Swiften/Parser/PayloadParsers/JingleParser.h>
#include <Swiften/Jingle/JingleContentID.h>
+#include <Swiften/Jingle/JingleSessionListener.h>
#include <Swiften/Elements/JingleContentPayload.h>
#include <Swiften/Queries/Request.h>
@@ -17,6 +20,5 @@
#include <Swiften/Base/Log.h>
-#include "Swiften/Serializer/PayloadSerializers/JinglePayloadSerializer.h"
-#include "Swiften/FileTransfer/JingleTransport.h"
+#include <Swiften/Serializer/PayloadSerializers/JinglePayloadSerializer.h>
namespace Swift {
@@ -28,9 +30,9 @@ JingleSessionImpl::JingleSessionImpl(const JID& initiator, const JID& peerJID, c
void JingleSessionImpl::handleIncomingAction(JinglePayload::ref action) {
if (action->getAction() == JinglePayload::SessionTerminate) {
- onSessionTerminateReceived(action->getReason());
+ notifyListeners(&JingleSessionListener::handleSessionTerminateReceived, action->getReason());
return;
}
if (action->getAction() == JinglePayload::SessionInfo) {
- onSessionInfoReceived(action);
+ notifyListeners(&JingleSessionListener::handleSessionInfoReceived, action);
return;
}
@@ -46,17 +48,17 @@ void JingleSessionImpl::handleIncomingAction(JinglePayload::ref action) {
switch(action->getAction()) {
case JinglePayload::SessionAccept:
- onSessionAcceptReceived(contentID, description, transport);
+ notifyListeners(&JingleSessionListener::handleSessionAcceptReceived, contentID, description, transport);
return;
case JinglePayload::TransportAccept:
- onTransportAcceptReceived(contentID, transport);
+ notifyListeners(&JingleSessionListener::handleTransportAcceptReceived, contentID, transport);
return;
case JinglePayload::TransportInfo:
- onTransportInfoReceived(contentID, transport);
+ notifyListeners(&JingleSessionListener::handleTransportInfoReceived, contentID, transport);
return;
case JinglePayload::TransportReject:
- onTransportRejectReceived(contentID, transport);
+ notifyListeners(&JingleSessionListener::handleTransportRejectReceived, contentID, transport);
return;
case JinglePayload::TransportReplace:
- onTransportReplaceReceived(contentID, transport);
+ notifyListeners(&JingleSessionListener::handleTransportReplaceReceived, contentID, transport);
return;
// following unused Jingle actions
@@ -77,5 +79,5 @@ void JingleSessionImpl::handleIncomingAction(JinglePayload::ref action) {
return;
}
- std::cerr << "Unhandled Jingle action!!! ACTION: " << action->getAction() << std::endl;
+ assert(false);
}
@@ -137,5 +139,5 @@ void JingleSessionImpl::sendTransportAccept(const JingleContentID& id, JingleTra
}
-void JingleSessionImpl::sendTransportInfo(const JingleContentID& id, JingleTransportPayload::ref transPayload) {
+std::string JingleSessionImpl::sendTransportInfo(const JingleContentID& id, JingleTransportPayload::ref transPayload) {
JinglePayload::ref payload = createPayload();
@@ -147,5 +149,5 @@ void JingleSessionImpl::sendTransportInfo(const JingleContentID& id, JingleTrans
payload->addPayload(content);
- sendSetRequest(payload);
+ return sendSetRequest(payload);
}
@@ -168,7 +170,11 @@ void JingleSessionImpl::sendTransportReplace(const JingleContentID& id, JingleTr
-void JingleSessionImpl::sendSetRequest(JinglePayload::ref payload) {
- boost::shared_ptr<GenericRequest<JinglePayload> > request = boost::make_shared<GenericRequest<JinglePayload> >(IQ::Set, peerJID, payload, iqRouter);
- request->send();
+std::string JingleSessionImpl::sendSetRequest(JinglePayload::ref payload) {
+ boost::shared_ptr<GenericRequest<JinglePayload> > request = boost::make_shared<GenericRequest<JinglePayload> >(
+ IQ::Set, peerJID, payload, iqRouter);
+ pendingRequests.insert(std::make_pair(
+ request,
+ request->onResponse.connect(boost::bind(&JingleSessionImpl::handleRequestResponse, this, request))));
+ return request->send();
}
@@ -181,4 +187,13 @@ JinglePayload::ref JingleSessionImpl::createPayload() const {
}
+void JingleSessionImpl::handleRequestResponse(RequestRef request) {
+ RequestsMap::iterator i = pendingRequests.find(request);
+ assert(i != pendingRequests.end());
+ if (i->first->getPayloadGeneric()->getAction() == JinglePayload::TransportInfo) {
+ notifyListeners(&JingleSessionListener::handleTransportInfoAcknowledged, i->first->getID());
+ }
+ i->second.disconnect();
+ pendingRequests.erase(i);
+}
diff --git a/Swiften/Jingle/JingleSessionImpl.h b/Swiften/Jingle/JingleSessionImpl.h
index 3c1559a..b7f4a55 100644
--- a/Swiften/Jingle/JingleSessionImpl.h
+++ b/Swiften/Jingle/JingleSessionImpl.h
@@ -1,4 +1,4 @@
/*
- * Copyright (c) 2011 Remko Tronçon
+ * Copyright (c) 2011-2013 Remko Tronçon
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
@@ -8,9 +8,12 @@
#include <boost/shared_ptr.hpp>
+#include <map>
#include <Swiften/Jingle/JingleSession.h>
+#include <Swiften/Queries/GenericRequest.h>
namespace Swift {
class IQRouter;
+ class Request;
class JingleSessionImpl : public JingleSession {
@@ -25,5 +28,5 @@ namespace Swift {
virtual void sendInfo(boost::shared_ptr<Payload>);
virtual void sendAccept(const JingleContentID&, JingleDescription::ref, JingleTransportPayload::ref);
- virtual void sendTransportInfo(const JingleContentID&, JingleTransportPayload::ref);
+ virtual std::string sendTransportInfo(const JingleContentID&, JingleTransportPayload::ref);
virtual void sendTransportAccept(const JingleContentID&, JingleTransportPayload::ref);
virtual void sendTransportReject(const JingleContentID&, JingleTransportPayload::ref);
@@ -31,12 +34,17 @@ namespace Swift {
private:
+ typedef boost::shared_ptr<GenericRequest<JinglePayload> > RequestRef;
+
void handleIncomingAction(JinglePayload::ref);
- void sendSetRequest(JinglePayload::ref payload);
+ std::string sendSetRequest(JinglePayload::ref payload);
JinglePayload::ref createPayload() const;
+ void handleRequestResponse(RequestRef);
private:
IQRouter *iqRouter;
JID peerJID;
+ typedef std::map<RequestRef, boost::bsignals::connection > RequestsMap;
+ RequestsMap pendingRequests;
};
}
diff --git a/Swiften/Jingle/JingleSessionListener.cpp b/Swiften/Jingle/JingleSessionListener.cpp
new file mode 100644
index 0000000..75d3be9
--- /dev/null
+++ b/Swiften/Jingle/JingleSessionListener.cpp
@@ -0,0 +1,12 @@
+/*
+ * Copyright (c) 2013 Remko Tronçon
+ * Licensed under the GNU General Public License.
+ * See the COPYING file for more information.
+ */
+
+#include <Swiften/Jingle/JingleSessionListener.h>
+
+using namespace Swift;
+
+JingleSessionListener::~JingleSessionListener() {
+}
diff --git a/Swiften/Jingle/JingleSessionListener.h b/Swiften/Jingle/JingleSessionListener.h
new file mode 100644
index 0000000..e1270c4
--- /dev/null
+++ b/Swiften/Jingle/JingleSessionListener.h
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2013 Remko Tronçon
+ * Licensed under the GNU General Public License.
+ * See the COPYING file for more information.
+ */
+
+#pragma once
+
+#include <Swiften/Base/API.h>
+#include <Swiften/Elements/JinglePayload.h>
+
+namespace Swift {
+ class JingleContentID;
+ class JingleTransportPayload;
+ class JingleDescription;
+
+ class SWIFTEN_API JingleSessionListener {
+ public:
+ virtual ~JingleSessionListener();
+
+ virtual void handleSessionAcceptReceived(
+ const JingleContentID&,
+ boost::shared_ptr<JingleDescription>,
+ boost::shared_ptr<JingleTransportPayload>) = 0;
+ virtual void handleSessionInfoReceived(boost::shared_ptr<JinglePayload>) = 0;
+ virtual void handleSessionTerminateReceived(boost::optional<JinglePayload::Reason>) = 0;
+ virtual void handleTransportAcceptReceived(
+ const JingleContentID&,
+ boost::shared_ptr<JingleTransportPayload>) = 0;
+ virtual void handleTransportInfoReceived(
+ const JingleContentID&,
+ boost::shared_ptr<JingleTransportPayload>) = 0;
+ virtual void handleTransportRejectReceived(
+ const JingleContentID&, boost::shared_ptr<JingleTransportPayload>) = 0;
+ virtual void handleTransportReplaceReceived(
+ const JingleContentID&, boost::shared_ptr<JingleTransportPayload>) = 0;
+
+ virtual void handleTransportInfoAcknowledged(const std::string& id) = 0;
+ };
+}
diff --git a/Swiften/Jingle/JingleSessionManager.cpp b/Swiften/Jingle/JingleSessionManager.cpp
index 2e15fcd..f31ddb8 100644
--- a/Swiften/Jingle/JingleSessionManager.cpp
+++ b/Swiften/Jingle/JingleSessionManager.cpp
@@ -1,4 +1,4 @@
/*
- * Copyright (c) 2011 Remko Tronçon
+ * Copyright (c) 2011-2013 Remko Tronçon
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
@@ -8,4 +8,5 @@
#include <Swiften/Jingle/JingleResponder.h>
#include <Swiften/Jingle/IncomingJingleSessionHandler.h>
+#include <Swiften/Base/Log.h>
#include <Swiften/Base/foreach.h>
#include <Swiften/Base/Algorithm.h>
diff --git a/Swiften/Jingle/JingleSessionManager.h b/Swiften/Jingle/JingleSessionManager.h
index b4f2846..3412709 100644
--- a/Swiften/Jingle/JingleSessionManager.h
+++ b/Swiften/Jingle/JingleSessionManager.h
@@ -10,4 +10,5 @@
#include <map>
+#include <Swiften/Base/API.h>
#include <Swiften/Base/boost_bsignals.h>
#include <Swiften/Jingle/JingleSessionImpl.h>
@@ -18,5 +19,5 @@ namespace Swift {
class IncomingJingleSessionHandler;
- class JingleSessionManager {
+ class SWIFTEN_API JingleSessionManager {
friend class JingleResponder;
public:
diff --git a/Swiften/Jingle/SConscript b/Swiften/Jingle/SConscript
index 5dcf293..546c1b2 100644
--- a/Swiften/Jingle/SConscript
+++ b/Swiften/Jingle/SConscript
@@ -3,4 +3,6 @@ Import("swiften_env")
sources = [
"JingleSession.cpp",
+ "JingleSessionListener.cpp",
+ "AbstractJingleSessionListener.cpp",
"JingleSessionImpl.cpp",
"IncomingJingleSessionHandler.cpp",