15 #include "uniquemucroom.h"
16 #include "clientbase.h"
24 UniqueMUCRoom::Unique::Unique(
const Tag* tag )
27 if( !tag || tag->name() !=
"unique" || tag->xmlns() != XMLNS_MUC_UNIQUE )
30 m_name = tag->cdata();
33 const std::string& UniqueMUCRoom::Unique::filterString()
const
35 static const std::string filter =
"/iq/unique[@xmlns='" +
XMLNS_MUC_UNIQUE +
"']";
39 Tag* UniqueMUCRoom::Unique::tag()
const
41 Tag* t =
new Tag(
"unique" );
42 t->setXmlns( XMLNS_MUC_UNIQUE );
44 t->setCData( m_name );
68 void UniqueMUCRoom::join()
70 if( !m_parent || m_joined )
74 iq.addExtension(
new Unique() );
78 void UniqueMUCRoom::handleIqID(
const IQ& iq,
int context )
80 switch( iq.subtype() )
85 const Unique* u = iq.findExtension<Unique>(
ExtMUCUnique );
88 if( !u->name().empty() )
97 s.feed( m_parent->
jid().
full() );
98 s.feed( m_parent->
getID() );
This is the common base class for a Jabber/XMPP Client and a Jabber Component.
const std::string getID()
void removeIDHandler(IqHandler *ih)
void registerStanzaExtension(StanzaExtension *ext)
An abstraction of an IQ stanza.
This class implements an instant MUC room.
const std::string & server() const
const std::string & full() const
This interface enables inheriting classes to be notified about certain events in a MUC room.
virtual void join(Presence::PresenceType type=Presence::Available, const std::string &status=EmptyString, int priority=0)
void setName(const std::string &name)
The namespace for the gloox library.
const std::string XMLNS_MUC_UNIQUE