14 #include "jinglesessionmanager.h"
16 #include "clientbase.h"
17 #include "jinglesession.h"
18 #include "jinglesessionhandler.h"
29 : m_parent( parent ), m_handler( sh )
53 StringList::const_iterator it = features.begin();
54 for( ; it != features.end(); ++it )
61 if( !( handler || m_handler ) || !callee )
64 Session* sess =
new Session( m_parent, callee, handler ? handler : m_handler );
65 m_sessions.push_back( sess );
74 m_sessions.remove( session );
86 SessionList::iterator it = m_sessions.begin();
87 for( ; it != m_sessions.end() && (*it)->sid() != j->
sid(); ++it ) ;
88 if( it == m_sessions.end() )
91 m_sessions.push_back( s );
97 (*it)->handleIq( iq );
An abstraction of a Jingle plugin. This is part of Jingle (XEP-0166 et al.)
void addFeature(const std::string &feature)
std::list< std::string > StringList
void clearList(std::list< T * > &L)
An abstraction of an IQ stanza.
void registerPlugin(Plugin *plugin)
void registerIqHandler(IqHandler *ih, int exttype)
const std::string & sid() const
void discardSession(Session *session)
void registerStanzaExtension(StanzaExtension *ext)
void addPlugins(Plugin &plugin, const Tag *tag)
virtual void handleIncomingSession(Session *session)=0
SessionManager(ClientBase *parent, SessionHandler *sh)
virtual ~SessionManager()
This is an implementation of a Jingle Session (XEP-0166).
The namespace for the gloox library.
virtual Disco * disco() const
Session * createSession(const JID &callee, SessionHandler *handler)
void registerPlugin(Plugin *plugin)
A Jingle session handler.
virtual const StringList features() const
This is an abstraction of Jingle's (XEP-0166) element as a StanzaExtension.
virtual bool handleIq(const IQ &iq)
Tag * embeddedTag() const
virtual bool handleIq(const IQ &iq)
const std::string XMLNS_JINGLE
This is the common base class for a Jabber/XMPP Client and a Jabber Component.
const StanzaExtension * findExtension(int type) const