• Main Page
  • Classes
  • Files
  • File List

Swiften/Presence/SubscriptionManager.h

00001 /*
00002  * Copyright (c) 2010 Remko Tronçon
00003  * Licensed under the GNU General Public License v3.
00004  * See Documentation/Licenses/GPLv3.txt for more information.
00005  */
00006 
00007 #pragma once
00008 
00009 #include <map>
00010 
00011 #include <string>
00012 #include <Swiften/JID/JID.h>
00013 #include <Swiften/Base/boost_bsignals.h>
00014 #include <Swiften/Elements/Presence.h>
00015 #include <Swiften/Base/API.h>
00016 
00017 namespace Swift {
00018   class StanzaChannel;
00019 
00020   class SWIFTEN_API SubscriptionManager {
00021     public:
00022       SubscriptionManager(StanzaChannel* stanzaChannel);
00023       ~SubscriptionManager();
00024 
00025       void cancelSubscription(const JID& jid);
00026       void confirmSubscription(const JID& jid);
00027       void requestSubscription(const JID& jid);
00028 
00037       boost::signal<void (const JID&, const std::string&, Presence::ref)> onPresenceSubscriptionRequest;
00038 
00039       boost::signal<void (const JID&, const std::string&)> onPresenceSubscriptionRevoked;
00040 
00041     private:
00042       void handleIncomingPresence(Presence::ref presence);
00043 
00044     private:
00045       StanzaChannel* stanzaChannel;
00046   };
00047 }

Generated on Fri Oct 12 2012 21:00:19 for Swiften by  doxygen 1.7.1