diff options
author | Remko Tronçon <git@el-tramo.be> | 2010-09-12 18:29:39 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2010-09-13 19:19:52 (GMT) |
commit | ef1052bbdb315aaa1c6254098ea05638d9a25b2f (patch) | |
tree | 482277f649f6c0fc00027514ea8986861fe33437 /Swiften/Presence/PresenceSender.cpp | |
parent | 3ae8cccfe9c6bfed5dda5f024a5cb046ccfc9793 (diff) | |
download | swift-contrib-ef1052bbdb315aaa1c6254098ea05638d9a25b2f.zip swift-contrib-ef1052bbdb315aaa1c6254098ea05638d9a25b2f.tar.bz2 |
Added presence notifier.
Diffstat (limited to 'Swiften/Presence/PresenceSender.cpp')
-rw-r--r-- | Swiften/Presence/PresenceSender.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Swiften/Presence/PresenceSender.cpp b/Swiften/Presence/PresenceSender.cpp index e4562a9..082c841 100644 --- a/Swiften/Presence/PresenceSender.cpp +++ b/Swiften/Presence/PresenceSender.cpp @@ -52,4 +52,26 @@ void PresenceSender::removeDirectedPresenceReceiver(const JID& jid) { } } +void PresenceSender::cancelSubscription(const JID& jid) { + boost::shared_ptr<Presence> stanza(new Presence()); + stanza->setType(Presence::Unsubscribed); + stanza->setTo(jid); + channel->sendPresence(stanza); +} + +void PresenceSender::confirmSubscription(const JID& jid) { + boost::shared_ptr<Presence> stanza(new Presence()); + stanza->setType(Presence::Subscribed); + stanza->setTo(jid); + channel->sendPresence(stanza); +} + + +void PresenceSender::requestSubscription(const JID& jid) { + boost::shared_ptr<Presence> stanza(new Presence()); + stanza->setType(Presence::Subscribe); + stanza->setTo(jid); + channel->sendPresence(stanza); +} + } |