gloox  1.0.16
mucroomhandler.h
1 /*
2  Copyright (c) 2006-2015 by Jakob Schröter <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 #include "presence.h"
20 #include "disco.h"
21 
22 #include <string>
23 
24 namespace gloox
25 {
26 
27  class JID;
28  class MUCRoom;
29  class Message;
30  class DataForm;
31 
36  {
37  JID* nick;
45  JID* jid;
49  int flags;
54  std::string reason;
62  std::string newNick;
72  std::string status;
77  };
78 
90  class GLOOX_API MUCRoomHandler
91  {
92  public:
96  virtual ~MUCRoomHandler() {}
97 
107  virtual void handleMUCParticipantPresence( MUCRoom* room, const MUCRoomParticipant participant,
108  const Presence& presence ) = 0;
109 
130  virtual void handleMUCMessage( MUCRoom* room, const Message& msg, bool priv ) = 0;
131 
149  virtual bool handleMUCRoomCreation( MUCRoom* room ) = 0;
150 
158  virtual void handleMUCSubject( MUCRoom* room, const std::string& nick,
159  const std::string& subject ) = 0;
160 
168  virtual void handleMUCInviteDecline( MUCRoom* room, const JID& invitee,
169  const std::string& reason ) = 0;
170 
187  virtual void handleMUCError( MUCRoom* room, StanzaError error ) = 0;
188 
201  virtual void handleMUCInfo( MUCRoom* room, int features, const std::string& name,
202  const DataForm* infoForm ) = 0;
203 
210  virtual void handleMUCItems( MUCRoom* room, const Disco::ItemList& items ) = 0;
211 
212  };
213 
214 }
215 
216 #endif// MUCROOMHANDLER_H__
std::list< Item * > ItemList
Definition: disco.h:261
This interface enables inheriting classes to be notified about certain events in a MUC room...
An abstraction of a XEP-0004 Data Form.
Definition: dataform.h:56
An abstraction of a presence stanza.
Definition: presence.h:32
An abstraction of a message stanza.
Definition: message.h:33
StanzaError
Definition: gloox.h:866
The namespace for the gloox library.
Definition: adhoc.cpp:27
An abstraction of a JID.
Definition: jid.h:30
This is an implementation of XEP-0045 (Multi-User Chat).
Definition: mucroom.h:85
MUCRoomAffiliation affiliation
MUCRoomAffiliation
Definition: gloox.h:1143
MUCRoomRole
Definition: gloox.h:1156