# class JGEvent | A Jingle event. More...
Full name | `TelEngine::JGEvent`
Definition | `#include <libs/yjabber/yatejingle.h>`
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Types

- enum Type { Jingle, ResultOk, ResultError, ResultTimeout, Terminated, Destroy, }

#### Public Methods

- virtual ~JGEvent ()
- inline Type type () const
- inline const char* name ()
- inline JGSession* session () const
- inline XmlElement* element () const
- inline XmlElement* jingle () const
- inline JGSession::Action action () const
- inline const char* actionName () const
- inline const String& id () const
- inline const String& reason () const
- inline const String& text () const
- inline XmlElement* releaseXml ()
- inline bool final () const
- inline bool confirmElement (XMPPError::Type error = XMPPError::NoError, const char* text = 0, XMPPError::ErrorType type = XMPPError::TypeModify)
- inline void setConfirmed ()
- void setAction (JGSession::Action act)

#### Public Static Methods

- static inline const char* lookupType (int type)

#### Public Members

- static const TokenDict s_typeName[]
- ObjList m_contents
- ObjList m_streamHosts

#### Protected Methods

- inline JGEvent (Type type, JGSession* session, XmlElement* element = 0, const char* reason = 0, const char* text = 0)
- inline JGEvent (JGSession::Action act, JGSession* session, XmlElement* element, const char* reason = 0, const char* text = 0)

## Detailed Description

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 Mon Feb 10 13:15:47 2014, using kdoc 2.0a54.