Yate
Public Member Functions | Protected Member Functions | Protected Attributes | Friends
JGSession0 Class Reference

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

#include <yatejingle.h>

Inheritance diagram for JGSession0:
JGSession RefObject Mutex GenObject Lockable

List of all members.

Public Member Functions

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

Protected Member Functions

 JGSession0 (JGEngine *engine, const JabberID &caller, const JabberID &called)
 JGSession0 (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 bool sendContent (Action action, const ObjList &contents, String *stanzaId=0)
virtual JGEventdecodeJingle (XmlElement *&xml, XmlElement *child)
virtual XmlElementcreateJingle (Action action, XmlElement *element1=0, XmlElement *element2=0, XmlElement *element3=0)
virtual XmlElementcreateDtmf (const char *dtmf, unsigned int msDuration=0)

Protected Attributes

String m_sessContentName
Action m_candidatesAction

Friends

class JGEvent
class JGEngine

Detailed Description

The version 0 of a jingle session.

A session implementing the old jingle protocol


Constructor & Destructor Documentation

virtual ~JGSession0 ( ) [virtual]

Destructor

JGSession0 ( JGEngine engine,
const JabberID caller,
const JabberID called 
) [protected]

Constructor. Create an outgoing session

Parameters:
engineThe engine owning this session
callerThe caller's full JID
calledThe called party's full JID
JGSession0 ( JGEngine engine,
const JabberID caller,
const JabberID called,
XmlElement xml,
const String id 
) [protected]

Constructor. Create an incoming session.

Parameters:
engineThe engine owning this session
callerThe caller's full JID
calledThe called party's full JID
xmlA valid Jabber Jingle xml with action session initiate
idSession id

Member Function Documentation

virtual bool accept ( const ObjList contents,
String stanzaId = 0 
) [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.

virtual XmlElement* createDtmf ( const char *  dtmf,
unsigned int  msDuration = 0 
) [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

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

Parameters:
actionThe action of the Jingle stanza
element1Optional child element
element2Optional child element
element3Optional child element
Returns:
Valid XmlElement pointer
virtual JGEvent* decodeJingle ( XmlElement *&  xml,
XmlElement child 
) [protected, virtual]

Decode a jingle element

Parameters:
xmlThe element to decode
childThe element's first child
Returns:
JGEvent pointer or 0

Implements JGSession.

virtual bool initiate ( const ObjList contents,
XmlElement extra,
const char *  subject = 0 
) [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

Implements JGSession.

virtual bool sendContent ( Action  action,
const ObjList contents,
String stanzaId = 0 
) [protected, virtual]

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

Parameters:
actionMust be a transport- 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

The documentation for this class was generated from the following file: