gloox  0.9.9.12
mucroomhandler.h
1 /*
2  Copyright (c) 2006-2008 by Jakob Schroeter <js@camaya.net>
3  This file is part of the gloox library. http://camaya.net/gloox
4 
5  This software is distributed under a license. The full license
6  agreement can be found in the file LICENSE in this distribution.
7  This software may not be copied, modified, sold or distributed
8  other than expressed in the named license agreement.
9 
10  This software is distributed without any warranty.
11 */
12 
13 
14 
15 #ifndef MUCROOMHANDLER_H__
16 #define MUCROOMHANDLER_H__
17 
18 #include "gloox.h"
19 
20 #include <string>
21 
22 namespace gloox
23 {
24 
25  class JID;
26  class MUCRoom;
27  class DataForm;
28 
33  {
34  JID *nick;
42  JID *jid;
46  int flags;
51  std::string reason;
59  std::string newNick;
69  std::string status;
74  };
75 
87  class GLOOX_API MUCRoomHandler
88  {
89  public:
93  virtual ~MUCRoomHandler() {}
94 
104  virtual void handleMUCParticipantPresence( MUCRoom *room, const MUCRoomParticipant participant,
105  Presence presence ) = 0;
106 
121  virtual void handleMUCMessage( MUCRoom *room, const std::string& nick,
122  const std::string& message, bool history,
123  const std::string& when, bool privateMessage ) = 0;
124 
142  virtual bool handleMUCRoomCreation( MUCRoom *room ) = 0;
143 
151  virtual void handleMUCSubject( MUCRoom *room, const std::string& nick,
152  const std::string& subject ) = 0;
153 
161  virtual void handleMUCInviteDecline( MUCRoom *room, const JID& invitee,
162  const std::string& reason ) = 0;
163 
180  virtual void handleMUCError( MUCRoom *room, StanzaError error ) = 0;
181 
194  virtual void handleMUCInfo( MUCRoom *room, int features, const std::string& name,
195  const DataForm *infoForm ) = 0;
196 
203  virtual void handleMUCItems( MUCRoom *room, const StringMap& items ) = 0;
204 
205  };
206 
207 }
208 
209 #endif// MUCROOMHANDLER_H__