gloox  1.0.20
uniquemucroom.h
1 /*
2  Copyright (c) 2007-2017 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 UNIQUEMUCROOM_H__
16 #define UNIQUEMUCROOM_H__
17 
18 #include "instantmucroom.h"
19 #include "stanzaextension.h"
20 
21 namespace gloox
22 {
23 
34  class GLOOX_API UniqueMUCRoom : public InstantMUCRoom
35  {
36  public:
48  UniqueMUCRoom( ClientBase* parent, const JID& nick, MUCRoomHandler* mrh );
49 
53  virtual ~UniqueMUCRoom();
54 
55  // reimplemented from MUCRoom
56  virtual void join();
57 
58  private:
59 #ifdef UNIQUEMUCROOM_TEST
60  public:
61 #endif
62 
68  class Unique : public StanzaExtension
69  {
70  public:
75  Unique( const Tag* tag = 0 );
76 
80  virtual ~Unique() {}
81 
86  const std::string& name() const { return m_name; }
87 
88  // reimplemented from StanzaExtension
89  virtual const std::string& filterString() const;
90 
91  // reimplemented from StanzaExtension
92  virtual StanzaExtension* newInstance( const Tag* tag ) const
93  {
94  return new Unique( tag );
95  }
96 
97  // reimplemented from StanzaExtension
98  virtual Tag* tag() const;
99 
100  // reimplemented from StanzaExtension
101  virtual StanzaExtension* clone() const
102  {
103  return new Unique( *this );
104  }
105 
106  private:
107  std::string m_name;
108  };
109 
110  // reimplemented from MUCRoom (IqHandler)
111  void handleIqID( const IQ& iq, int context );
112 
113  };
114 
115 }
116 
117 #endif // UNIQUEMUCROOM_H__
This interface enables inheriting classes to be notified about certain events in a MUC room...
This class implements an instant MUC room.
An abstraction of an IQ stanza.
Definition: iq.h:33
The namespace for the gloox library.
Definition: adhoc.cpp:27
This class abstracts a stanza extension, which is usually an XML child element in a specific namespac...
An abstraction of a JID.
Definition: jid.h:30
This class implements a unique MUC room.
Definition: uniquemucroom.h:34
This is the common base class for a Jabber/XMPP Client and a Jabber Component.
Definition: clientbase.h:76
This is an abstraction of an XML element.
Definition: tag.h:46