diff options
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); +} + } |