summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-10-24 12:51:45 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-10-24 15:56:44 (GMT)
commit8234b6357de00f8355bef5af4b316329d4297033 (patch)
treef63398ecf29c5117df52e65b0f0cd292e7efd313 /Swiften/Client
parent50355ba2db929486e279ccca2e6231ecf188d881 (diff)
downloadswift-8234b6357de00f8355bef5af4b316329d4297033.zip
swift-8234b6357de00f8355bef5af4b316329d4297033.tar.bz2
Moved PresenceSender to client.
Diffstat (limited to 'Swiften/Client')
-rw-r--r--Swiften/Client/Client.cpp6
-rw-r--r--Swiften/Client/Client.h6
2 files changed, 11 insertions, 1 deletions
diff --git a/Swiften/Client/Client.cpp b/Swiften/Client/Client.cpp
index f1ca207..1b07b65 100644
--- a/Swiften/Client/Client.cpp
+++ b/Swiften/Client/Client.cpp
@@ -10,6 +10,7 @@
#include "Swiften/Roster/XMPPRosterImpl.h"
#include "Swiften/Roster/XMPPRosterController.h"
#include "Swiften/Presence/PresenceOracle.h"
+#include "Swiften/Presence/PresenceSender.h"
namespace Swift {
@@ -23,11 +24,14 @@ Client::Client(const JID& jid, const String& password) : CoreClient(jid, passwor
presenceOracle = new PresenceOracle(getStanzaChannel());
presenceOracle->onPresenceChange.connect(boost::ref(onPresenceChange));
presenceOracle->onPresenceSubscriptionRequest.connect(boost::ref(onPresenceSubscriptionRequest));
+
+ presenceSender = new PresenceSender(getStanzaChannel());
}
Client::~Client() {
- delete presenceOracle;
+ delete presenceSender;
+ delete presenceOracle;
delete rosterController;
delete roster;
diff --git a/Swiften/Client/Client.h b/Swiften/Client/Client.h
index 4de630c..590e040 100644
--- a/Swiften/Client/Client.h
+++ b/Swiften/Client/Client.h
@@ -14,6 +14,7 @@ namespace Swift {
class XMPPRosterImpl;
class XMPPRosterController;
class PresenceOracle;
+ class PresenceSender;
/**
* Provides the core functionality for writing XMPP client software.
@@ -70,6 +71,10 @@ namespace Swift {
return presenceOracle;
}
+ PresenceSender* getPresenceSender() const {
+ return presenceSender;
+ }
+
public:
/**
* This signal is emitted when a JID changes presence.
@@ -86,5 +91,6 @@ namespace Swift {
XMPPRosterImpl* roster;
XMPPRosterController* rosterController;
PresenceOracle* presenceOracle;
+ PresenceSender* presenceSender;
};
}