class JGEngine

A Jingle engine. More...

Full nameTelEngine::JGEngine
Definition#include <libs/yjingle/yatejingle.h>
InheritsTelEngine::JBService [public ], TelEngine::JBThreadList [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Protected Methods


Detailed Description

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

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

JGEngine

Constructor. Constructs a Jingle service

Parameters:
engineThe Jabber engine
paramsService's parameters
prioThe priority of this service

 ~JGEngine ()

~JGEngine

[virtual]

Destructor. Terminates all active sessions

inline u_int64_t  stanzaTimeout ()

stanzaTimeout

[const]

Get the timeout interval of a sent stanza

Returns: The timeout interval of a sent stanza

inline u_int64_t  pingInterval ()

pingInterval

[const]

Get the ping interval used by jingle sessions

Returns: The interval to ping the remote party of a jingle session

void  initialize (const NamedList& params)

initialize

[virtual]

Initialize this service

Parameters:
paramsService's parameters

Reimplemented from JBService.

JGEvent*  getEvent (u_int64_t time)

getEvent

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

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)

call

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)

defProcessEvent

Default event processor. Delete event.

Parameters:
eventThe event to process

void  processEvent (JGEvent* event)

processEvent

[virtual]

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

Parameters:
eventThe event to process

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

accept

[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.


Generated by: paulc on bussard on Mon Mar 8 12:18:15 2010, using kdoc 2.0a54.