mucroomhandler.h

00001 /*
00002   Copyright (c) 2006-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 
00015 #ifndef MUCROOMHANDLER_H__
00016 #define MUCROOMHANDLER_H__
00017 
00018 #include "gloox.h"
00019 
00020 #include <string>
00021 
00022 namespace gloox
00023 {
00024 
00025   class JID;
00026   class MUCRoom;
00027   class DataForm;
00028 
00032   struct MUCRoomParticipant
00033   {
00034     JID *nick;                      
00040     MUCRoomAffiliation affiliation; 
00041     MUCRoomRole role;               
00042     JID *jid;                       
00046     int flags;                      
00051     std::string reason;             
00054     JID *actor;                     
00059     std::string newNick;            
00069     std::string status;             
00071     JID* alternate;                 
00074   };
00075 
00087   class GLOOX_API MUCRoomHandler
00088   {
00089     public:
00093       virtual ~MUCRoomHandler() {}
00094 
00104       virtual void handleMUCParticipantPresence( MUCRoom *room, const MUCRoomParticipant participant,
00105                                                  Presence presence ) = 0;
00106 
00121       virtual void handleMUCMessage( MUCRoom *room, const std::string& nick,
00122                                      const std::string& message, bool history,
00123                                      const std::string& when, bool privateMessage ) = 0;
00124 
00142       virtual bool handleMUCRoomCreation( MUCRoom *room ) = 0;
00143 
00151       virtual void handleMUCSubject( MUCRoom *room, const std::string& nick,
00152                                      const std::string& subject ) = 0;
00153 
00161       virtual void handleMUCInviteDecline( MUCRoom *room, const JID& invitee,
00162                                            const std::string& reason ) = 0;
00163 
00180       virtual void handleMUCError( MUCRoom *room, StanzaError error ) = 0;
00181 
00194       virtual void handleMUCInfo( MUCRoom *room, int features, const std::string& name,
00195                                   const DataForm *infoForm ) = 0;
00196 
00203       virtual void handleMUCItems( MUCRoom *room, const StringMap& items ) = 0;
00204 
00205   };
00206 
00207 }
00208 
00209 #endif// MUCROOMHANDLER_H__

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