JGEvent Class Reference

A Jingle event. More...

#include <yatejingle.h>

List of all members.

Public Types

enum  Type {
  Jingle, ResultOk, ResultError, ResultWriteFail,
  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 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:
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

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

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:
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
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

References TelEngine::destruct().

JGSession* session (  )  const [inline]

Get the session that generated this event

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

Parameters:
act The 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

TokenDict s_typeName[] [static]

Dictionary with event type names


The documentation for this class was generated from the following file:
Generated on Thu Apr 8 18:22:38 2010 for Yate by  doxygen 1.6.3