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 )
83 m.addExtension( (*it));
91 m_parent->
send( msg );
94 void MessageSession::decorate(
Message& msg )
104 void MessageSession::setResource(
const std::string& resource )
virtual void decorate(Message &msg)=0
bool setResource(const std::string &resource)
std::list< const StanzaExtension * > StanzaExtensionList
MessageSession(ClientBase *parent, const JID &jid, bool wantUpgrade=true, int types=0, bool honorTID=true)
virtual void handleMessage(Message &msg)
void clearList(std::list< T * > &L)
virtual ~MessageSession()
void setID(const std::string &id)
An abstraction of a message stanza.
The namespace for the gloox library.
virtual void send(const std::string &message)
void registerMessageSession(MessageSession *session)
const std::string & thread() const
void setThread(const std::string &thread)
const std::string & resource() const
const std::string getID()
const std::string & full() const
Virtual base class for message filters.
void disposeMessageFilter(MessageFilter *mf)
void removeMessageFilter(MessageFilter *mf)
virtual void handleMessage(const Message &msg, MessageSession *session=0)=0
const std::string EmptyString
This is the common base class for a Jabber/XMPP Client and a Jabber Component.