jinglesessionmanager.h
/*
Copyright (c) 2013-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 JINGLESESSIONMANAGER_H__
#define JINGLESESSIONMANAGER_H__
#include "macros.h"
#include "iqhandler.h"
#include "jinglepluginfactory.h"
#include <list>
namespace gloox
{
class ClientBase;
namespace Jingle
{
class Session;
class SessionHandler;
class GLOOX_API SessionManager : public IqHandler
{
public:
SessionManager( ClientBase* parent, SessionHandler* sh );
virtual ~SessionManager();
void registerPlugin( Plugin* plugin );
Session* createSession( const JID& callee, SessionHandler* handler );
void discardSession( Session* session );
// reimplemented from IqHandler
virtual bool handleIq( const IQ& iq );
// reimplemented from IqHandler
virtual void handleIqID( const IQ& /*iq*/, int /*context*/ ) {}
private:
typedef std::list<Jingle::Session*> SessionList;
SessionList m_sessions;
ClientBase* m_parent;
SessionHandler* m_handler;
PluginFactory m_factory;
};
}
}
#endif // JINGLESESSIONMANAGER_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::IqHandler
A virtual interface which can be reimplemented to receive IQ stanzas.
Definition iqhandler.h:32
gloox::JID
An abstraction of a JID.
Definition jid.h:31
gloox::Jingle::PluginFactory
A factory for which creates Plugin instances based on Tags. This is part of Jingle (XEP-0166).
Definition jinglepluginfactory.h:37
gloox::Jingle::Plugin
An abstraction of a Jingle plugin. This is part of Jingle (XEP-0166 et al.).
Definition jingleplugin.h:68
gloox::Jingle::SessionHandler
A Jingle session handler.
Definition jinglesessionhandler.h:33
gloox::Jingle::SessionManager::handleIq
virtual bool handleIq(const IQ &iq)
Definition jinglesessionmanager.cpp:78
gloox::Jingle::SessionManager::SessionManager
SessionManager(ClientBase *parent, SessionHandler *sh)
Definition jinglesessionmanager.cpp:28
gloox::Jingle::SessionManager::registerPlugin
void registerPlugin(Plugin *plugin)
Definition jinglesessionmanager.cpp:44
gloox::Jingle::SessionManager::createSession
Session * createSession(const JID &callee, SessionHandler *handler)
Definition jinglesessionmanager.cpp:59
gloox::Jingle::SessionManager::handleIqID
virtual void handleIqID(const IQ &, int)
Definition jinglesessionmanager.h:101
gloox::Jingle::SessionManager::discardSession
void discardSession(Session *session)
Definition jinglesessionmanager.cpp:69
gloox::Jingle::Session
This is an implementation of a Jingle Session (XEP-0166).
Definition jinglesession.h:81
gloox::Jingle
The namespace containing Jingle-related (XEP-0166 et. al.) classes.
Definition jinglecontent.cpp:22
gloox
The namespace for the gloox library.
Definition adhoc.cpp:28