Yate
Public Member Functions | Protected Member Functions | Friends

JGEngine Class Reference

A Jingle engine. More...

#include <yatejingle.h>

Inheritance diagram for JGEngine:
JBService JBThreadList DebugEnabler Mutex GenObject Lockable

List of all members.

Public Member Functions

 JGEngine (JBEngine *engine, const NamedList *params, int prio=0)
virtual ~JGEngine ()
u_int64_t stanzaTimeout () const
u_int64_t pingInterval () const
virtual void initialize (const NamedList &params)
JGEventgetEvent (u_int64_t time)
JGSessioncall (JGSession::Version ver, const String &callerName, const String &remoteJID, const ObjList &contents, XMLElement *extra=0, const char *msg=0, const char *subject=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:
engineThe Jabber engine
paramsService's parameters
prioThe priority of this service
virtual ~JGEngine ( ) [virtual]

Destructor. Terminates all active sessions


Member Function Documentation

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

Accept an event from the Jabber engine

Parameters:
eventThe event to accept
processedSet to true on exit to signal that the event was already processed
insertSet 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.

JGSession* call ( JGSession::Version  ver,
const String callerName,
const String remoteJID,
const ObjList contents,
XMLElement extra = 0,
const char *  msg = 0,
const char *  subject = 0 
)

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

Parameters:
verThe session version to use
callerNameThe local peer's username
remoteJIDThe remote peer's JID
contentsThe list of session content(s)
extraOptional extra child for session initiate element
msgOptional message to send before call
subjectOptional session subject
Returns:
Valid JGSession pointer (referenced) on success
void defProcessEvent ( JGEvent event)

Default event processor. Delete event.

Parameters:
eventThe event to process
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:
timeCurrent time in miliseconds
Returns:
The first generated event
virtual void initialize ( const NamedList params) [virtual]

Initialize this service

Parameters:
paramsService's parameters

Reimplemented from JBService.

u_int64_t pingInterval ( ) const [inline]

Get the ping interval used by jingle sessions

Returns:
The interval to ping the remote party of a jingle session
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:
eventThe event to process
u_int64_t stanzaTimeout ( ) const [inline]

Get the timeout interval of a sent stanza

Returns:
The timeout interval of a sent stanza

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