Yate
|
A Jingle engine. More...
#include <yatejingle.h>
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 ¶ms) |
JGEvent * | getEvent (u_int64_t time) |
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) |
void | defProcessEvent (JGEvent *event) |
virtual void | processEvent (JGEvent *event) |
Protected Member Functions | |
virtual bool | accept (JBEvent *event, bool &processed, bool &insert) |
Friends | |
class | JGSession |
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. Constructs a Jingle service
engine | The Jabber engine |
params | Service's parameters |
prio | The priority of this service |
virtual ~JGEngine | ( | ) | [virtual] |
Destructor. Terminates all active sessions
virtual bool accept | ( | JBEvent * | event, |
bool & | processed, | ||
bool & | insert | ||
) | [protected, virtual] |
Accept an event from the Jabber engine
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 |
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
ver | The session version to use |
callerName | The local peer's username |
remoteJID | The remote peer's JID |
contents | The list of session content(s) |
extra | Optional extra child for session initiate element |
msg | Optional message to send before call |
subject | Optional session subject |
void defProcessEvent | ( | JGEvent * | event | ) |
Default event processor. Delete event.
event | The 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
time | Current time in miliseconds |
virtual void initialize | ( | const NamedList & | params | ) | [virtual] |
u_int64_t pingInterval | ( | ) | const [inline] |
Get the ping interval used by jingle sessions
virtual void processEvent | ( | JGEvent * | event | ) | [virtual] |
Process events from the sessions. Default action: Delete event. Descendants must override this method to process generated events
event | The event to process |
u_int64_t stanzaTimeout | ( | ) | const [inline] |
Get the timeout interval of a sent stanza