Yate
|
The version 1 of a jingle session. More...
#include <yatejingle.h>
Public Member Functions | |
virtual | ~JGSession1 () |
virtual bool | accept (const ObjList &contents, String *stanzaId=0) |
virtual XmlElement * | createRtpInfoXml (RtpInfo info) |
virtual XmlElement * | createReason (int reason, const char *text=0, XmlElement *child=0) |
virtual XmlElement * | createTransferReason (int reason) |
virtual XmlElement * | createRtpSessionReason (int reason) |
virtual bool | sendContent (Action action, const ObjList &contents, String *stanzaId=0) |
virtual bool | sendStreamHosts (const ObjList &hosts, String *stanzaId=0) |
virtual bool | sendStreamHostUsed (const char *jid, const char *stanzaId) |
Protected Member Functions | |
JGSession1 (JGEngine *engine, const JabberID &caller, const JabberID &called) | |
JGSession1 (JGEngine *engine, const JabberID &caller, const JabberID &called, XmlElement *xml, const String &id) | |
virtual bool | initiate (const ObjList &contents, XmlElement *extra, const char *subject=0) |
virtual JGEvent * | decodeJingle (XmlElement *&xml, XmlElement *child) |
virtual XmlElement * | createJingle (Action action, XmlElement *element1=0, XmlElement *element2=0, XmlElement *element3=0) |
virtual XmlElement * | createDtmf (const char *dtmf, unsigned int msDuration=0) |
virtual JGEvent * | processFileTransfer (bool set, XmlElement *&xml, XmlElement *child) |
Friends | |
class | JGEvent |
class | JGEngine |
The version 1 of a jingle session.
A session implementing the Jingle protocol including session transfer and file transfer
virtual ~JGSession1 | ( | ) | [virtual] |
Destructor
JGSession1 | ( | JGEngine * | engine, |
const JabberID & | caller, | ||
const JabberID & | called | ||
) | [protected] |
Constructor. Create an outgoing session
engine | The engine owning this session |
caller | The caller's full JID |
called | The called party's full JID |
JGSession1 | ( | JGEngine * | engine, |
const JabberID & | caller, | ||
const JabberID & | called, | ||
XmlElement * | xml, | ||
const String & | id | ||
) | [protected] |
Constructor. Create an incoming session.
engine | The engine owning this session |
caller | The caller's full JID |
called | The called party's full JID |
xml | A valid Jabber Jingle xml with action session initiate |
id | Session id |
Accept a Pending incoming session. This method is thread safe
contents | The list of accepted contents |
stanzaId | Optional string to be filled with sent stanza id (used to track the response) |
Reimplemented from JGSession.
virtual XmlElement* createDtmf | ( | const char * | dtmf, |
unsigned int | msDuration = 0 |
||
) | [protected, virtual] |
Create a dtmf XML element
dtmf | The dtmf string |
msDuration | The tone duration in miliseconds. Ignored if 0 |
Implements JGSession.
virtual XmlElement* createJingle | ( | Action | action, |
XmlElement * | element1 = 0 , |
||
XmlElement * | element2 = 0 , |
||
XmlElement * | element3 = 0 |
||
) | [protected, virtual] |
Create an 'iq' of type 'set' with a 'jingle' child
action | The action of the Jingle stanza |
element1 | Optional child element |
element2 | Optional child element |
element3 | Optional child element |
Implements JGSession.
virtual XmlElement* createReason | ( | int | reason, |
const char * | text = 0 , |
||
XmlElement * | child = 0 |
||
) | [virtual] |
Create a termination reason element
reason | The reason code |
text | Optional reason text child |
child | Optional additional reason child |
Reimplemented from JGSession.
virtual XmlElement* createRtpInfoXml | ( | RtpInfo | info | ) | [virtual] |
Create a RTP info child to be added to a session-info element
info | The informational tag as enumeration |
Reimplemented from JGSession.
virtual XmlElement* createRtpSessionReason | ( | int | reason | ) | [virtual] |
Create a RTP session reason element
reason | The reason code |
Reimplemented from JGSession.
virtual XmlElement* createTransferReason | ( | int | reason | ) | [virtual] |
Create a transfer reason element
reason | The reason code |
Reimplemented from JGSession.
virtual JGEvent* decodeJingle | ( | XmlElement *& | xml, |
XmlElement * | child | ||
) | [protected, virtual] |
virtual bool initiate | ( | const ObjList & | contents, |
XmlElement * | extra, | ||
const char * | subject = 0 |
||
) | [protected, virtual] |
Build and send the initial message on an outgoing session
contents | The session contents to be sent with session initiate element |
extra | Optional extra child to be added to the session initiate element |
subject | Optional session subject |
Implements JGSession.
virtual JGEvent* processFileTransfer | ( | bool | set, |
XmlElement *& | xml, | ||
XmlElement * | child | ||
) | [protected, virtual] |
virtual bool sendContent | ( | Action | action, |
const ObjList & | contents, | ||
String * | stanzaId = 0 |
||
) | [virtual] |
Send a stanza with session content(s) This method is thread safe
action | Must be a transport- or content- action |
contents | Non empty list with content(s) to send |
stanzaId | Optional string to be filled with sent stanza id (used to track the response) |
Reimplemented from JGSession.
virtual bool sendStreamHosts | ( | const ObjList & | hosts, |
String * | stanzaId = 0 |
||
) | [virtual] |
Send a stanza with stream hosts This method is thread safe
hosts | The list of hosts to send |
stanzaId | Optional string to be filled with sent stanza id (used to track the response) |
Reimplemented from JGSession.
virtual bool sendStreamHostUsed | ( | const char * | jid, |
const char * | stanzaId | ||
) | [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
jid | The stream host to send |
stanzaId | The id of the stanza to confirm |
Reimplemented from JGSession.