uniquemucroom.h
/*
Copyright (c) 2007-2023 by Jakob Schröter <js@camaya.net>
This file is part of the gloox library. http://camaya.net/gloox
This software is distributed under a license. The full license
agreement can be found in the file LICENSE in this distribution.
This software may not be copied, modified, sold or distributed
other than expressed in the named license agreement.
This software is distributed without any warranty.
*/
#ifndef UNIQUEMUCROOM_H__
#define UNIQUEMUCROOM_H__
#include "instantmucroom.h"
#include "stanzaextension.h"
namespace gloox
{
class GLOOX_API UniqueMUCRoom : public InstantMUCRoom
{
public:
UniqueMUCRoom( ClientBase* parent, const JID& nick, MUCRoomHandler* mrh );
virtual ~UniqueMUCRoom();
// reimplemented from MUCRoom
virtual void join();
private:
#ifdef UNIQUEMUCROOM_TEST
public:
#endif
class Unique : public StanzaExtension
{
public:
Unique( const Tag* tag = 0 );
virtual ~Unique() {}
const std::string& name() const { return m_name; }
// reimplemented from StanzaExtension
virtual const std::string& filterString() const;
// reimplemented from StanzaExtension
virtual StanzaExtension* newInstance( const Tag* tag ) const
{
return new Unique( tag );
}
// reimplemented from StanzaExtension
virtual Tag* tag() const;
// reimplemented from StanzaExtension
virtual StanzaExtension* clone() const
{
return new Unique( *this );
}
private:
std::string m_name;
};
// reimplemented from MUCRoom (IqHandler)
void handleIqID( const IQ& iq, int context );
};
}
#endif // UNIQUEMUCROOM_H__
gloox::ClientBase
This is the common base class for a Jabber/XMPP Client and a Jabber Component.
Definition clientbase.h:79
gloox::IQ
An abstraction of an IQ stanza.
Definition iq.h:34
gloox::InstantMUCRoom::InstantMUCRoom
InstantMUCRoom(ClientBase *parent, const JID &nick, MUCRoomHandler *mrh)
Definition instantmucroom.cpp:22
gloox::JID
An abstraction of a JID.
Definition jid.h:31
gloox::MUCRoomHandler
This interface enables inheriting classes to be notified about certain events in a MUC room.
Definition mucroomhandler.h:91
gloox::MUCRoom::name
const std::string name() const
Definition mucroom.h:376
gloox::MUCRoom::nick
const std::string nick() const
Definition mucroom.h:389
gloox::StanzaExtension
This class abstracts a stanza extension, which is usually an XML child element in a specific namespac...
Definition stanzaextension.h:204
gloox::Tag
This is an abstraction of an XML element.
Definition tag.h:47
gloox::UniqueMUCRoom::UniqueMUCRoom
UniqueMUCRoom(ClientBase *parent, const JID &nick, MUCRoomHandler *mrh)
Definition uniquemucroom.cpp:50
gloox
The namespace for the gloox library.
Definition adhoc.cpp:28