00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
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__