gloox
1.0.9
|
#include <jinglesession.h>
Classes | |
class | Jingle |
This is an abstraction of Jingle's (XEP-0166) <jingle> element as a StanzaExtension. More... | |
class | Reason |
An abstraction of a Jingle (XEP-0166) session terminate reason. More... |
Public Types | |
enum | State { Ended, Pending, Active } |
Public Member Functions | |
virtual | ~Session () |
bool | contentAccept (const Content *content) |
bool | contentAdd (const Content *content) |
bool | contentAdd (const PluginList &contents) |
bool | contentModify (const Content *content) |
bool | contentReject (const Content *content) |
bool | contentRemove (const Content *content) |
bool | descriptionInfo (const Plugin *info) |
bool | securityInfo (const Plugin *info) |
bool | sessionAccept (const Content *content) |
bool | sessionInfo (const Plugin *info) |
bool | sessionInitiate (const Content *content) |
bool | sessionInitiate (const PluginList &plugins) |
bool | sessionTerminate (Session::Reason *reason) |
bool | transportAccept (const Content *content) |
bool | transportInfo (const Plugin *info) |
bool | transportReject (const Content *content) |
bool | transportReplace (const Content *content) |
State | state () const |
void | setSID (const std::string &sid) |
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).
See Jingle::SessionManager for info on how to use Jingle in gloox.
XEP Version: 1.1
Definition at line 80 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 active. |
Definition at line 89 of file jinglesession.h.
|
virtual |
Virtual Destructor.
Definition at line 251 of file jinglesession.cpp.
bool contentAccept | ( | const Content * | content | ) |
Sends a 'content-accept' notification.
content | The accepted content. |
Definition at line 257 of file jinglesession.cpp.
bool contentAdd | ( | const Content * | content | ) |
Sends a 'content-add' request.
content | The proposed content to be added. |
Definition at line 265 of file jinglesession.cpp.
bool contentAdd | ( | const PluginList & | contents | ) |
Sends a 'content-add' request.
contents | A list of proposed content to be added. |
Definition at line 273 of file jinglesession.cpp.
bool contentModify | ( | const Content * | content | ) |
Sends a 'content-modify' request.
content | The proposed content type to be modified. |
Definition at line 281 of file jinglesession.cpp.
bool contentReject | ( | const Content * | content | ) |
Sends a 'content-reject' reply.
content | The rejected content. |
Definition at line 289 of file jinglesession.cpp.
bool contentRemove | ( | const Content * | content | ) |
Sends a 'content-remove' request.
content | The content type to be removed. |
Definition at line 297 of file jinglesession.cpp.
bool descriptionInfo | ( | const Plugin * | info | ) |
Sends a 'description-info' notice.
info | The payload. |
Definition at line 305 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 417 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 447 of file jinglesession.cpp.
bool securityInfo | ( | const Plugin * | info | ) |
Sends a 'security-info' notice.
info | A security pre-condition. |
Definition at line 313 of file jinglesession.cpp.
bool sessionAccept | ( | const Content * | content | ) |
Accepts an incoming session with the given content.
content | A pair of application description and transport method wrapped in a Content that describes the accepted session parameters. |
Definition at line 321 of file jinglesession.cpp.
bool sessionInfo | ( | const Plugin * | info | ) |
Sends a 'session-info' notice.
info | The payload. |
Definition at line 330 of file jinglesession.cpp.
bool sessionInitiate | ( | const Content * | content | ) |
Initiates a session with a remote entity.
content | A Content object. You may use initiate( const PluginList& contents ) for more than one Content. |
Definition at line 338 of file jinglesession.cpp.
bool sessionInitiate | ( | const PluginList & | plugins | ) |
Initiates a session with a remote entity.
plugins | A list of Content objects. It is important to pass a (list of) Content objects here. Even though e.g. Jingle::ICEUDP are Plugin-derived, too, using anything other than Content here will result in erroneous behaviour at best. You may use sessionInitiate( const Content* content ) for just one Content. |
Definition at line 347 of file jinglesession.cpp.
bool sessionTerminate | ( | 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 356 of file jinglesession.cpp.
|
inline |
Sets the session's ID.
sid | The session's id. |
Definition at line 458 of file jinglesession.h.
|
inline |
|
inline |
Returns the session's state.
Definition at line 452 of file jinglesession.h.
bool transportAccept | ( | const Content * | content | ) |
Sends a 'transport-accept' reply.
content | The accepted transport wrapped in a Content. |
Definition at line 366 of file jinglesession.cpp.
bool transportInfo | ( | const Plugin * | info | ) |
Sends a 'transport-info' notice.
info | The payload. |
Definition at line 374 of file jinglesession.cpp.
bool transportReject | ( | const Content * | content | ) |
Sends a 'transport-reject' reply.
content | The rejected transport wrapped in a Content. |
Definition at line 382 of file jinglesession.cpp.
bool transportReplace | ( | const Content * | content | ) |
Sends a 'transport-replace' request.
content | The proposed transport to be replaced wrapped in a Content. |
Definition at line 390 of file jinglesession.cpp.