13 #include "messagesession.h"
14 #include "messagefilter.h"
15 #include "messagehandler.h"
16 #include "clientbase.h"
25 : m_parent( parent ), m_target( jid ), m_messageHandler( 0 ),
26 m_types( types ), m_wantResourceTracking( wantResourceTracking ), m_hadMessages( false ), m_honorThreadID( honorTID )
47 m_thread =
"gloox" + m_parent->
getID();
54 MessageFilterList::const_iterator it = m_messageFilterList.begin();
55 for( ; it != m_messageFilterList.end(); ++it )
58 if( m_messageHandler )
71 m_thread =
"gloox" + m_parent->
getID();
81 StanzaExtensionList::const_iterator it = sel.begin();
82 for( ; it != sel.end(); ++it )
91 m_parent->
send( msg );
94 void MessageSession::decorate(
Message& msg )
104 void MessageSession::setResource(
const std::string& resource )
This is the common base class for a Jabber/XMPP Client and a Jabber Component.
const std::string getID()
void registerMessageSession(MessageSession *session)
const std::string & resource() const
const std::string & full() const
bool setResource(const std::string &resource)
Virtual base class for message filters.
virtual void decorate(Message &msg)=0
virtual void handleMessage(const Message &msg, MessageSession *session=0)=0
void disposeMessageFilter(MessageFilter *mf)
virtual void send(const std::string &message)
MessageSession(ClientBase *parent, const JID &jid, bool wantUpgrade=true, int types=0, bool honorTID=true)
void removeMessageFilter(MessageFilter *mf)
virtual ~MessageSession()
virtual void handleMessage(Message &msg)
An abstraction of a message stanza.
void setID(const std::string &id)
const std::string & thread() const
void setThread(const std::string &thread)
void addExtension(const StanzaExtension *se)
void clearList(std::list< T * > &L)
The namespace for the gloox library.
std::list< const StanzaExtension * > StanzaExtensionList
const std::string EmptyString