|
|
This class holds an event generated by a Jingle session
enum Type { Jingle, ResultOk, ResultError, ResultTimeout, Terminated, Destroy, } | Type |
Jingle events enumeration
~JGEvent ()
| ~JGEvent |
[virtual]
Destructor. Deref the session. Delete the XML element
inline Type type ()
| type |
[const]
Get the type of this event
Returns: The type of this event as enumeration
inline const char* name ()
| name |
Get the name of this
Returns: The name of this event
inline JGSession* session ()
| session |
[const]
Get the session that generated this event
Returns: The session that generated this event
inline XmlElement* element ()
| element |
[const]
Get the XML element that generated this event
Returns: The XML element that generated this event
inline XmlElement* jingle ()
| jingle |
[const]
Get the Jingle child of the XML element carried by the event Don't delete it after use: it is owned by the event
Returns: The Jingle child of the XML element carried by the event
inline JGSession::Action action ()
| action |
[const]
Get the jingle action as enumeration
Returns: The jingle action as enumeration
inline const char* actionName ()
| actionName |
[const]
Get the name of an action
Returns: The name of an action
inline const String& id ()
| id |
[const]
Get the id
Returns: The id
inline const String& reason ()
| reason |
[const]
Get the reason
Returns: The reason
inline const String& text ()
| text |
[const]
Get the text
Returns: The text
inline XmlElement* releaseXml ()
| releaseXml |
Get the XML element that generated this event and set it to 0
Returns: The XML element that generated this event
inline bool final ()
| final |
[const]
Check if this event is a final one (Terminated or Destroy)
Returns: True if it is
inline bool confirmElement (XMPPError::Type error = XMPPError::NoError,
const char* text = 0, XMPPError::ErrorType type = XMPPError::TypeModify)
| confirmElement |
Confirm the element carryied by this event. See JGSession::confirm() for details
Parameters:
error | The error condition |
text | Optional text to add to the error element |
type | Error type |
Returns: False if send failed or element is 0
inline void setConfirmed ()
| setConfirmed |
Set the confirmed flag. Use it for action with delayed response
void setAction (JGSession::Action act)
| setAction |
Set the jingle action as enumeration. Set confirmation flag if the element don't require it
Parameters:
act | The jingle action as enumeration |
inline const char* lookupType (int type)
| lookupType |
[static]
Get the name of an event type
Returns: The name of an event type
static const TokenDict s_typeName[] | s_typeName[] |
ObjList m_contents | m_contents |
ObjList m_streamHosts | m_streamHosts |
inline JGEvent (Type type, JGSession* session, XmlElement* element = 0,
const char* reason = 0, const char* text = 0)
| JGEvent |
[protected]
Constructor. Set the id parameter if the element is valid
Parameters:
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 |
inline JGEvent (JGSession::Action act, JGSession* session, XmlElement* element,
const char* reason = 0, const char* text = 0)
| JGEvent |
[protected]
Constructor. Create a Jingle event. Set the id parameter if the element is valid
Parameters:
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 |
Generated by: paulc on bussard on Tue Apr 12 17:15:21 2011, using kdoc 2.0a54. |