JBService Class Reference

A Jabber service. More...

#include <yatejabber.h>

Inheritance diagram for JBService:

DebugEnabler Mutex GenObject JBMessage JBPresence JGEngine

List of all members.

Public Member Functions

 JBService (JBEngine *engine, const char *name, const NamedList *params, int prio)
virtual ~JBService ()
JBEngineengine ()
int priority () const
bool received (JBEvent *event)
virtual void initialize (const NamedList &params)
virtual void destruct ()

Protected Member Functions

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

Protected Attributes

bool m_initialized


Detailed Description

A Jabber service.

This class is the base class for a Jabber service who wants to get specific protocol data from the Jabber engine


Constructor & Destructor Documentation

JBService ( JBEngine engine,
const char *  name,
const NamedList params,
int  prio 
)

Constructor

Parameters:
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


Member Function Documentation

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

Accept an event from the 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 in JBMessage, JBPresence, and JGEngine.

JBEvent* deque (  )  [protected]

Get an event from queue

Returns:
JBEvent pointer or 0 if queue is empty

virtual void destruct (  )  [virtual]

Remove from engine. Release memory

Reimplemented from GenObject.

JBEngine* engine (  )  [inline]

Get the Jabber engine

Returns:
The Jabber engine

virtual void initialize ( const NamedList params  )  [inline, virtual]

Initialize the service

Parameters:
params Service's parameters

Reimplemented in JBMessage, JBPresence, and JGEngine.

int priority (  )  const [inline]

Get the Jabber engine

Returns:
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

Parameters:
event The event to accept
Returns:
False if not accepted, let the engine try another service


Member Data Documentation

bool m_initialized [protected]

True if already initialized


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

Generated on Sun Dec 7 21:36:13 2008 for Yate by  doxygen 1.5.7.1