gloox
1.0.9
|
#include <jinglesessionmanager.h>
Public Member Functions | |
SessionManager (ClientBase *parent, SessionHandler *sh) | |
virtual | ~SessionManager () |
void | registerPlugin (Plugin *plugin) |
Session * | createSession (const JID &callee, SessionHandler *handler) |
void | discardSession (Session *session) |
virtual bool | handleIq (const IQ &iq) |
virtual void | handleIqID (const IQ &, int) |
Public Member Functions inherited from IqHandler | |
virtual | ~IqHandler () |
The SessionManager is responsible for creating and destroying Jingle sessions, as well as for delegating incoming IQs to their respective sessions. This is part of Jingle (XEP-0166).
To use Jingle with gloox you should first instantiate a Jingle::SessionManager. The SessionManager will let you create new Jingle sessions and notify the respective handler about incoming Jingle session requests. It will also announce generic Jingle support via Disco. You have to register any Jingle plugins you want to use using registerPlugin(). These will automatically announce any additional features via Disco.
Use createSession() to create a new Session.
Implement SessionHandler::handleIncomingSession() to receive incoming session requests.
Use discardSession() to get rid of a session. Do not delete a session manually.
There is no limit to the number of concurrent sessions.
Definition at line 59 of file jinglesessionmanager.h.
SessionManager | ( | ClientBase * | parent, |
SessionHandler * | sh | ||
) |
Creates new instance. There should be only one SessionManager per ClientBase.
parent | A ClientBase instance used for sending and receiving. |
sh | A session handler that will be notified about incoming session requests. Only handleIncomingSession() will be called in that handler. |
Definition at line 28 of file jinglesessionmanager.cpp.
|
virtual |
Virtual destructor.
Definition at line 39 of file jinglesessionmanager.cpp.
Session * createSession | ( | const JID & | callee, |
SessionHandler * | handler | ||
) |
Lets you create a new Jingle session.
callee | The remote entity's JID. |
handler | The handler responsible for handling events assicoated with the new session. |
Definition at line 59 of file jinglesessionmanager.cpp.
void discardSession | ( | Session * | session | ) |
Removes a given session from the nternal queue and deletes it.
session | The session to delete. |
Definition at line 69 of file jinglesessionmanager.cpp.
|
virtual |
Reimplement this function if you want to be notified about incoming IQs.
iq | The complete IQ stanza. |
Implements IqHandler.
Definition at line 78 of file jinglesessionmanager.cpp.
|
inlinevirtual |
Reimplement this function if you want to be notified about incoming IQs with a specific value of the id
attribute. You have to enable tracking of those IDs using Client::trackID(). This is usually useful for IDs that generate a positive reply, i.e. <iq type='result' id='reg'/> where a namespace filter wouldn't work.
iq | The complete IQ stanza. |
context | A value to restore context, stored with ClientBase::trackID(). |
Implements IqHandler.
Definition at line 101 of file jinglesessionmanager.h.
void registerPlugin | ( | Plugin * | plugin | ) |
Registers an empty Plugin as a template with the manager.
plugin | The plugin to register. |
Definition at line 44 of file jinglesessionmanager.cpp.