Yate
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Friends
JGEvent Class Reference

A Jingle event. More...

#include <yatejingle.h>

List of all members.

Public Types

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

Public Member Functions

virtual ~JGEvent ()
Type type () const
const char * name ()
JGSessionsession () const
XmlElementelement () const
XmlElementjingle () const
JGSession::Action action () const
const char * actionName () const
const Stringid () const
const Stringreason () const
const Stringtext () const
XmlElementreleaseXml ()
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

Detailed Description

A Jingle event.

This class holds an event generated by a Jingle session


Member Enumeration Documentation

enum Type

Jingle events enumeration


Constructor & Destructor Documentation

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

Parameters:
typeEvent type
sessionThe session that generated this event
elementOptional XML element that generated this event
reasonOptional reason data
textOptional 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

Parameters:
actThe jingle action
sessionThe session that generated this event
elementXML element that generated this event
reasonOptional reason data
textOptional text data

Member Function Documentation

JGSession::Action action ( ) const [inline]

Get the jingle action as enumeration

Returns:
The jingle action as enumeration
const char* actionName ( ) const [inline]

Get the name of an action

Returns:
The name of an action

References JGSession::lookupAction().

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

Parameters:
errorThe error condition
textOptional text to add to the error element
typeError type
Returns:
False if send failed or element is 0
XmlElement* element ( ) const [inline]

Get the XML element that generated this event

Returns:
The XML element that generated this event
bool final ( ) const [inline]

Check if this event is a final one (Terminated or Destroy)

Returns:
True if it is
const String& id ( ) const [inline]

Get the id

Returns:
The id
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

Returns:
The Jingle child of the XML element carried by the event
static const char* lookupType ( int  type) [inline, static]

Get the name of an event type

Returns:
The name of an event type

References TelEngine::lookup().

const char* name ( ) [inline]

Get the name of this

Returns:
The name of this event
const String& reason ( ) const [inline]

Get the reason

Returns:
The reason
XmlElement* releaseXml ( ) [inline]

Get the XML element that generated this event and set it to 0

Returns:
The XML element that generated this event
JGSession* session ( ) const [inline]

Get the session that generated this event

Returns:
The session that generated this event

Set the jingle action as enumeration. Set confirmation flag if the element don't require it

Parameters:
actThe jingle action as enumeration
void setConfirmed ( ) [inline]

Set the confirmed flag. Use it for action with delayed response

const String& text ( ) const [inline]

Get the text

Returns:
The text
Type type ( ) const [inline]

Get the type of this event

Returns:
The type of this event as enumeration

Member Data Documentation

The list of session contents if used

The list of stream hosts if used

const TokenDict s_typeName[] [static]

Dictionary with event type names


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