#include <yatejabber.h>
Public Member Functions | |
JBService (JBEngine *engine, const char *name, const NamedList *params, int prio) | |
virtual | ~JBService () |
JBEngine * | engine () |
int | priority () const |
bool | received (JBEvent *event) |
virtual void | initialize (const NamedList ¶ms) |
virtual void | destruct () |
Protected Member Functions | |
virtual bool | accept (JBEvent *event, bool &processed, bool &insert) |
JBEvent * | deque () |
Protected Attributes | |
bool | m_initialized |
This class is the base class for a Jabber service who wants to get specific protocol data from the Jabber engine
Constructor
engine | The Jabber engine | |
name | This service's name | |
params | Service's parameters | |
prio | The priority of this service |
virtual ~JBService | ( | ) | [virtual] |
Destructor. Remove from engine
virtual bool accept | ( | JBEvent * | event, | |
bool & | processed, | |||
bool & | insert | |||
) | [protected, virtual] |
Accept an event from the 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 in JBMessage, JBPresence, and JGEngine.
JBEvent* deque | ( | ) | [protected] |
Get an event from queue
virtual void destruct | ( | ) | [virtual] |
Remove from engine. Release memory
Reimplemented from GenObject.
JBEngine* engine | ( | ) | [inline] |
Get the Jabber engine
virtual void initialize | ( | const NamedList & | params | ) | [inline, virtual] |
Initialize the service
params | Service's parameters |
Reimplemented in JBMessage, JBPresence, and JGEngine.
int priority | ( | ) | const [inline] |
Get the Jabber engine
bool received | ( | JBEvent * | event | ) |
Accept an event from the engine. If accepted, the event is enqueued and the stream that generated the event is notified on event terminated to allow it to process other data. This method is thread safe
event | The event to accept |
bool m_initialized [protected] |
True if already initialized