rosterlistener.h

00001 /*
00002   Copyright (c) 2004-2008 by Jakob Schroeter <js@camaya.net>
00003   This file is part of the gloox library. http://camaya.net/gloox
00004 
00005   This software is distributed under a license. The full license
00006   agreement can be found in the file LICENSE in this distribution.
00007   This software may not be copied, modified, sold or distributed
00008   other than expressed in the named license agreement.
00009 
00010   This software is distributed without any warranty.
00011 */
00012 
00013 
00014 #ifndef ROSTERLISTENER_H__
00015 #define ROSTERLISTENER_H__
00016 
00017 #include "rosteritem.h"
00018 
00019 #include <string>
00020 #include <map>
00021 
00022 namespace gloox
00023 {
00024 
00025   class Stanza;
00026 
00030   typedef std::map<const std::string, RosterItem*> Roster;
00031 
00042   class GLOOX_API RosterListener
00043   {
00044     public:
00048       virtual ~RosterListener() {}
00049 
00058       virtual void handleItemAdded( const JID& jid ) = 0;
00059 
00065       virtual void handleItemSubscribed( const JID& jid ) = 0;
00066 
00074       virtual void handleItemRemoved( const JID& jid ) = 0;
00075 
00086       virtual void handleItemUpdated( const JID& jid ) = 0;
00087 
00093       virtual void handleItemUnsubscribed( const JID& jid ) = 0;
00094 
00103       virtual void handleRoster( const Roster& roster ) = 0;
00104 
00115       virtual void handleRosterPresence( const RosterItem& item, const std::string& resource,
00116                                          Presence presence, const std::string& msg ) = 0;
00117 
00129       virtual void handleSelfPresence( const RosterItem& item, const std::string& resource,
00130                                        Presence presence, const std::string& msg ) = 0;
00131 
00142       virtual bool handleSubscriptionRequest( const JID& jid, const std::string& msg ) = 0;
00143 
00154       virtual bool handleUnsubscriptionRequest( const JID& jid, const std::string& msg ) = 0;
00155 
00161       virtual void handleNonrosterPresence( Stanza* stanza ) = 0;
00162 
00167       virtual void handleRosterError( Stanza* stanza ) = 0;
00168   };
00169 
00170 }
00171 
00172 #endif // ROSTERLISTENER_H__

Generated on Mon Dec 7 13:28:19 2009 for gloox by  doxygen 1.6.1