JGEngine Class Reference
A Jingle engine.
More...
#include <yatejingle.h>
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 ¶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 |
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
Constructor. Constructs a Jingle service
- Parameters:
-
| engine | The Jabber engine |
| params | Service's parameters |
| prio | The priority of this service |
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:
-
| 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.
Make an outgoing call. 'media' and 'transport' will be invalid on exit. Don't delete them
- Parameters:
-
| 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 |
- Returns:
- Valid JGSession pointer (referenced) on success
void defProcessEvent |
( |
JGEvent * |
event |
) |
|
Default event processor. Delete event.
- Parameters:
-
| 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
- Parameters:
-
| time | Current time in miliseconds |
- Returns:
- The first generated event
virtual void initialize |
( |
const NamedList & |
params |
) |
[virtual] |
Initialize this service
- Parameters:
-
| params | Service'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:
-
| event | The 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: