gloox
1.1-svn
|
#include <jinglesession.h>
Classes | |
class | Jingle |
This is an abstraction of the XEP-0166 (Jingle) <jingle> element as a StanzaExtension. More... | |
class | Reason |
An abstraction of a terminate reason. More... |
Public Types | |
enum | State { Ended, Pending, Active } |
Public Member Functions | |
Session (ClientBase *parent, const JID &callee, SessionHandler *jsh) | |
Session (ClientBase *parent, const Session::Jingle *jingle, SessionHandler *jsh) | |
virtual | ~Session () |
bool | initiate (const PluginList &plugins) |
bool | accept (const Content *content) |
bool | inform (Action action, const Plugin *plugin) |
bool | terminate (Reason *reason) |
State | state () const |
const std::string & | sid () const |
virtual bool | handleIq (const IQ &iq) |
virtual void | handleIqID (const IQ &iq, int context) |
Public Member Functions inherited from IqHandler | |
virtual | ~IqHandler () |
This is an implementation of a Jingle Session (XEP-0166).
Beware! The classes in the Jingle namespace implement the signaling part of Jingle only. At this point, there is no support for actually establishing any connection to a remote entity, nor for transfering any media in any way whatsoever.
XEP Version: 0.33
Definition at line 84 of file jinglesession.h.
enum State |
Session state.
Ended |
The session has ended or was not active yet. |
Pending |
The session has been initiated but has not yet been accepted by the remote party. |
Active |
The session is empty. |
Definition at line 91 of file jinglesession.h.
Session | ( | ClientBase * | parent, |
const JID & | callee, | ||
SessionHandler * | jsh | ||
) |
parent | The ClientBase to use for communication. |
callee | The remote end of the session. |
jsh | The handler to receive events and results. |
Definition at line 216 of file jinglesession.cpp.
Session | ( | ClientBase * | parent, |
const Session::Jingle * | jingle, | ||
SessionHandler * | jsh | ||
) |
Creates a new Session from the incoming Jingle object. This is a NOOP for Jingles that have an action() different from SessionInitiate.
param | The ClientBase to use for communication. |
jingle | The Jingle object to init the Session from. |
jsh | The handler to receive events and results. |
Definition at line 230 of file jinglesession.cpp.
|
virtual |
Virtual Destructor.
Definition at line 244 of file jinglesession.cpp.
bool accept | ( | const Content * | content | ) |
Accepts an incoming session with the given content.
content | A pair of Description and Transport that describe the accepted session parameters. |
Definition at line 264 of file jinglesession.cpp.
|
virtual |
Reimplement this function if you want to be notified about incoming IQs.
iq | The complete IQ stanza. |
Implements IqHandler.
Definition at line 306 of file jinglesession.cpp.
|
virtual |
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 378 of file jinglesession.cpp.
Sends an informational message (DescriptionInfo, TransportInfo, SessionInfo) to the remote party.
action | The type of message to send. |
plugin | The payload. May be 0. |
Definition at line 278 of file jinglesession.cpp.
bool initiate | ( | const PluginList & | plugins | ) |
Initiates a session with a remote entity.
plugins | A list of Content-derived objects. |
Definition at line 250 of file jinglesession.cpp.
|
inline |
|
inline |
Returns the session's state.
Definition at line 351 of file jinglesession.h.
bool terminate | ( | Session::Reason * | reason | ) |
Terminates the current session, if it is at least in Pending state, with the given reason. The sid parameter is ignored unless the reason is AlternativeSession.
reason | The reason for terminating the session. |
Definition at line 292 of file jinglesession.cpp.