diff options
Diffstat (limited to 'Swiften')
-rw-r--r-- | Swiften/Client/Client.cpp | 6 | ||||
-rw-r--r-- | Swiften/Client/Client.h | 6 |
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; }; } |