JGEngine Class Reference

A Jingle engine. More...

#include <yatejingle.h>

Inheritance diagram for JGEngine:

JBService JBThreadList DebugEnabler Mutex GenObject

List of all members.

Public Member Functions

 JGEngine (JBEngine *engine, const NamedList *params, int prio=0)
virtual ~JGEngine ()
u_int64_t stanzaTimeout () const
virtual void initialize (const NamedList &params)
JGEventgetEvent (u_int64_t time)
JGSessioncall (const String &callerName, const String &remoteJID, XMLElement *media, XMLElement *transport, const char *msg=0)
void defProcessEvent (JGEvent *event)
virtual void processEvent (JGEvent *event)

Protected Member Functions

virtual bool accept (JBEvent *event, bool &processed, bool &insert)

Friends

class JGSession


Detailed Description

A Jingle engine.

This class holds a Jingle service for the Jabber engine. Handle jingle stanzas, stanza write fail events and stream termination events


Constructor & Destructor Documentation

JGEngine ( JBEngine engine,
const NamedList params,
int  prio = 0 
)

Constructor. Constructs a Jingle service

Parameters:
engine The Jabber engine
params Service's parameters
prio The priority of this service

virtual ~JGEngine (  )  [virtual]

Destructor. Terminates all active sessions


Member Function Documentation

u_int64_t stanzaTimeout (  )  const [inline]

Get the timeout interval of a sent stanza

Returns:
The timeout interval of a sent stanza

virtual void initialize ( const NamedList params  )  [virtual]

Initialize this service

Parameters:
params Service's parameters

Reimplemented from JBService.

JGEvent* getEvent ( u_int64_t  time  ) 

Call getEvent() for each session list until an event is generated or the end is reached This method is thread safe

Parameters:
time Current time in miliseconds
Returns:
The first generated event

JGSession* call ( const String callerName,
const String remoteJID,
XMLElement media,
XMLElement transport,
const char *  msg = 0 
)

Make an outgoing call. 'media' and 'transport' will be invalid on exit. Don't delete them

Parameters:
callerName The local peer's username
remoteJID The remote peer's JID
media A valid 'description' XML element
transport A valid 'transport' XML element
msg Optional message to send before call
Returns:
Valid JGSession pointer (referenced) on success

void defProcessEvent ( JGEvent event  ) 

Default event processor. Delete event.

Parameters:
event The event to process

virtual void processEvent ( JGEvent event  )  [virtual]

Process events from the sessions. Default action: Delete event. Descendants must override this method to process generated events

Parameters:
event The event to process

virtual bool accept ( JBEvent event,
bool &  processed,
bool &  insert 
) [protected, virtual]

Accept an event from the Jabber engine

Parameters:
event The event to accept
processed Set to true on exit to signal that the event was already processed
insert Set to true if accepted to insert on top of the event queue
Returns:
False if not accepted, let the engine try another service

Reimplemented from JBService.


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

Generated on Mon Aug 11 16:17:54 2008 for Yate by  doxygen 1.5.6