class JGSession1

The version 1 of a jingle session. More...

Full nameTelEngine::JGSession1
Definition#include <libs/yjingle/yatejingle.h>
InheritsTelEngine::JGSession [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Protected Methods


Detailed Description

A session implementing the Jingle protocol including session transfer and file transfer

 ~JGSession1 ()

~JGSession1

[virtual]

Destructor

XMLElement*  checkJingle (XMLElement* xml)

checkJingle

[virtual]

Check if a given XML element is valid jingle one

Parameters:
xmlElement to check

Returns: The given element if it's a valid jingle element, 0 otherwise

Reimplemented from JGSession.

bool  accept (const ObjList& contents, String* stanzaId = 0)

accept

[virtual]

Accept a Pending incoming session. This method is thread safe

Parameters:
contentsThe list of accepted contents
stanzaIdOptional string to be filled with sent stanza id (used to track the response)

Returns: False if send failed

Reimplemented from JGSession.

XMLElement*  createHoldXml ()

createHoldXml

[virtual]

Create a 'hold' child to be added to a session-info element

Returns: Valid XMLElement pointer or 0

Reimplemented from JGSession.

XMLElement*  createActiveXml ()

createActiveXml

[virtual]

Create an 'active' child to be added to a session-info element

Returns: Valid XMLElement pointer or 0

Reimplemented from JGSession.

bool  sendContent (Action action, const ObjList& contents, String* stanzaId = 0)

sendContent

[virtual]

Send a stanza with session content(s) This method is thread safe

Parameters:
actionMust be a transport- or content- action
contentsNon empty list with content(s) to send
stanzaIdOptional string to be filled with sent stanza id (used to track the response)

Returns: False if send failed

Reimplemented from JGSession.

bool  sendStreamHosts (const ObjList& hosts, String* stanzaId = 0)

sendStreamHosts

[virtual]

Send a stanza with stream hosts This method is thread safe

Parameters:
hostsThe list of hosts to send
stanzaIdOptional string to be filled with sent stanza id (used to track the response)

Returns: False if send failed

Reimplemented from JGSession.

bool  sendStreamHostUsed (const char* jid, const char* stanzaId)

sendStreamHostUsed

[virtual]

Send a stanza with a stream host used. If the jid is empty, send an item-not-found error response This method is thread safe

Parameters:
jidThe stream host to send
stanzaIdThe id of the stanza to confirm

Returns: False if send failed

Reimplemented from JGSession.

 JGSession1 (JGEngine* engine, JBStream* stream, const String& callerJID, const String& calledJID, const char* msg = 0)

JGSession1

[protected]

Constructor. Create an outgoing session

Parameters:
engineThe engine that owns this session
streamThe stream this session is bound to
callerJIDThe caller's full JID
calledJIDThe called party's full JID
msgOptional message to be sent before session initiate

 JGSession1 (JGEngine* engine, JBEvent* event, const String& id)

JGSession1

[protected]

Constructor. Create an incoming session.

Parameters:
engineThe engine that owns this session
eventA valid Jabber Jingle event with action session initiate
idSession id

bool  initiate (const ObjList& contents, XMLElement* extra, const char* subject = 0)

initiate

[protected virtual]

Build and send the initial message on an outgoing session

Parameters:
contentsThe session contents to be sent with session initiate element
extraOptional extra child to be added to the session initiate element
subjectOptional session subject

Returns: True on success

Reimplemented from JGSession.

JGEvent*  decodeJingle (JBEvent* jbev)

decodeJingle

[protected virtual]

Decode a valid jingle set event. Set the event's data on success

Parameters:
jbevThe event to decode

Returns: JGEvent pointer or 0

Reimplemented from JGSession.

XMLElement*  createJingle (Action action, XMLElement* element1 = 0, XMLElement* element2 = 0, XMLElement* element3 = 0)

createJingle

[protected virtual]

Create an 'iq' of type 'set' with a 'jingle' child

Parameters:
actionThe action of the Jingle stanza
element1Optional child element
element2Optional child element
element3Optional child element

Returns: Valid XMLElement pointer

Reimplemented from JGSession.

XMLElement*  createDtmf (const char* dtmf, unsigned int msDuration = 0)

createDtmf

[protected virtual]

Create a dtmf XML element

Parameters:
dtmfThe dtmf string
msDurationThe tone duration in miliseconds. Ignored if 0

Returns: Valid XMLElement pointer or 0

Reimplemented from JGSession.

void  processJabberIqEvent (JBEvent& ev)

processJabberIqEvent

[protected virtual]

Parameters:
evThe event to process

Reimplemented from JGSession.


Generated by: paulc on bussard on Mon Mar 8 12:18:15 2010, using kdoc 2.0a54.