gloox 1.0
|
00001 /* 00002 Copyright (c) 2006-2009 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 const Presence& presence ) = 0; 00109 00130 virtual void handleMUCMessage( MUCRoom* room, const Message& msg, bool priv ) = 0; 00131 00149 virtual bool handleMUCRoomCreation( MUCRoom* room ) = 0; 00150 00158 virtual void handleMUCSubject( MUCRoom* room, const std::string& nick, 00159 const std::string& subject ) = 0; 00160 00168 virtual void handleMUCInviteDecline( MUCRoom* room, const JID& invitee, 00169 const std::string& reason ) = 0; 00170 00187 virtual void handleMUCError( MUCRoom* room, StanzaError error ) = 0; 00188 00201 virtual void handleMUCInfo( MUCRoom* room, int features, const std::string& name, 00202 const DataForm* infoForm ) = 0; 00203 00210 virtual void handleMUCItems( MUCRoom* room, const Disco::ItemList& items ) = 0; 00211 00212 }; 00213 00214 } 00215 00216 #endif// MUCROOMHANDLER_H__