Yate
|
A Jingle event. More...
#include <yatejingle.h>
Public Types | |
enum | Type { Jingle, ResultOk, ResultError, ResultTimeout, Terminated, Destroy } |
Public Member Functions | |
virtual | ~JGEvent () |
Type | type () const |
const char * | name () |
JGSession * | session () const |
XmlElement * | element () const |
XmlElement * | jingle () const |
JGSession::Action | action () const |
const char * | actionName () const |
const String & | id () const |
const String & | reason () const |
const String & | text () const |
XmlElement * | releaseXml () |
bool | final () const |
bool | confirmElement (XMPPError::Type error=XMPPError::NoError, const char *text=0, XMPPError::ErrorType type=XMPPError::TypeModify) |
void | setConfirmed () |
void | setAction (JGSession::Action act) |
Static Public Member Functions | |
static const char * | lookupType (int type) |
Public Attributes | |
ObjList | m_contents |
ObjList | m_streamHosts |
Static Public Attributes | |
static const TokenDict | s_typeName [] |
Protected Member Functions | |
JGEvent (Type type, JGSession *session, XmlElement *element=0, const char *reason=0, const char *text=0) | |
JGEvent (JGSession::Action act, JGSession *session, XmlElement *element, const char *reason=0, const char *text=0) | |
Friends | |
class | JGSession |
class | JGSession0 |
class | JGSession1 |
A Jingle event.
This class holds an event generated by a Jingle session
enum Type |
Jingle events enumeration
virtual ~JGEvent | ( | ) | [virtual] |
Destructor. Deref the session. Delete the XML element
JGEvent | ( | Type | type, |
JGSession * | session, | ||
XmlElement * | element = 0 , |
||
const char * | reason = 0 , |
||
const char * | text = 0 |
||
) | [inline, protected] |
Constructor. Set the id parameter if the element is valid
type | Event type |
session | The session that generated this event |
element | Optional XML element that generated this event |
reason | Optional reason data |
text | Optional text data |
JGEvent | ( | JGSession::Action | act, |
JGSession * | session, | ||
XmlElement * | element, | ||
const char * | reason = 0 , |
||
const char * | text = 0 |
||
) | [inline, protected] |
Constructor. Create a Jingle event. Set the id parameter if the element is valid
act | The jingle action |
session | The session that generated this event |
element | XML element that generated this event |
reason | Optional reason data |
text | Optional text data |
JGSession::Action action | ( | ) | const [inline] |
Get the jingle action as enumeration
const char* actionName | ( | ) | const [inline] |
bool confirmElement | ( | XMPPError::Type | error = XMPPError::NoError , |
const char * | text = 0 , |
||
XMPPError::ErrorType | type = XMPPError::TypeModify |
||
) | [inline] |
Confirm the element carryied by this event. See JGSession::confirm() for details
error | The error condition |
text | Optional text to add to the error element |
type | Error type |
XmlElement* element | ( | ) | const [inline] |
Get the XML element that generated this event
bool final | ( | ) | const [inline] |
Check if this event is a final one (Terminated or Destroy)
XmlElement* jingle | ( | ) | const [inline] |
Get the Jingle child of the XML element carried by the event Don't delete it after use: it is owned by the event
static const char* lookupType | ( | int | type | ) | [inline, static] |
const char* name | ( | ) | [inline] |
Get the name of this
XmlElement* releaseXml | ( | ) | [inline] |
Get the XML element that generated this event and set it to 0
Get the session that generated this event
void setAction | ( | JGSession::Action | act | ) |
Set the jingle action as enumeration. Set confirmation flag if the element don't require it
act | The jingle action as enumeration |
void setConfirmed | ( | ) | [inline] |
Set the confirmed flag. Use it for action with delayed response
Get the type of this event
The list of session contents if used
The list of stream hosts if used
const TokenDict s_typeName[] [static] |
Dictionary with event type names