Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | Related Pages

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 #include "presence.h"
00020 #include "disco.h"
00021 
00022 #include <string>
00023 
00024 namespace gloox
00025 {
00026 
00027   class JID;
00028   class MUCRoom;
00029   class Message;
00030   class DataForm;
00031 
00035   struct MUCRoomParticipant
00036   {
00037     JID* nick;                      
00043     MUCRoomAffiliation affiliation; 
00044     MUCRoomRole role;               
00045     JID* jid;                       
00049     int flags;                      
00054     std::string reason;             
00057     JID* actor;                     
00062     std::string newNick;            
00072     std::string status;             
00074     JID* alternate;                 
00077   };
00078 
00090   class GLOOX_API MUCRoomHandler
00091   {
00092     public:
00096       virtual ~MUCRoomHandler() {}
00097 
00107       virtual void handleMUCParticipantPresence( MUCRoom* room, const MUCRoomParticipant participant,
00108                                                  Presence::PresenceType presence ) = 0;
00109 
00125       virtual GLOOX_DEPRECATED void handleMUCMessage( MUCRoom* room, const std::string& nick,
00126                                                       const std::string& message, bool history,
00127                                                       const std::string& when, bool privateMessage )
00128       {
00129         (void)room;
00130         (void)nick;
00131         (void)message;
00132         (void)history;
00133         (void)when;
00134         (void)privateMessage;
00135       };
00136 
00157       virtual void handleMUCMessage( MUCRoom* room, const Message& msg, bool priv ) = 0;
00158 
00176       virtual bool handleMUCRoomCreation( MUCRoom* room ) = 0;
00177 
00185       virtual void handleMUCSubject( MUCRoom* room, const std::string& nick,
00186                                      const std::string& subject ) = 0;
00187 
00195       virtual void handleMUCInviteDecline( MUCRoom* room, const JID& invitee,
00196                                            const std::string& reason ) = 0;
00197 
00214       virtual void handleMUCError( MUCRoom* room, StanzaError error ) = 0;
00215 
00228       virtual void handleMUCInfo( MUCRoom* room, int features, const std::string& name,
00229                                   const DataForm* infoForm ) = 0;
00230 
00237       virtual void handleMUCItems( MUCRoom* room, const Disco::ItemList& items ) = 0;
00238 
00239   };
00240 
00241 }
00242 
00243 #endif// MUCROOMHANDLER_H__

Generated on Tue Apr 22 15:10:11 2008 for gloox by  doxygen 1.4.1