class JBMessage

A Jabber message service. More...

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

Public Types

Public Methods

Public Static Methods

Public Members

Protected Methods


Detailed Description

This class is a message receiver service for the Jabber engine

enum MsgType { Chat, GroupChat, HeadLine, Normal, Error, None, }

MsgType

Message type enumeration

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

JBMessage

Constructor. Constructs a Jabber message service

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

 ~JBMessage ()

~JBMessage

[virtual]

Destructor. Cancel private thread(s)

void  initialize (const NamedList& params)

initialize

[virtual]

Initialize the service

Parameters:
paramsService's parameters

Reimplemented from JBService.

inline JBEvent*  getMessage ()

getMessage

Get a message from queue

Returns: JBEvent pointer or 0 if no messages

void  processMessage (JBEvent* event)

processMessage

[virtual]

Message processor. The derived classes must override this method to process received messages

Parameters:
eventThe event to process

XMLElement*  createMessage (const char* type, const char* from, const char* to, const char* id, const char* message)

createMessage

[static]

Create a 'message' element

Parameters:
typeMessage type string
fromThe 'from' attribute
toThe 'to' attribute
idThe 'id' attribute
messageThe message body

Returns: A valid XMLElement pointer

inline XMLElement*  createMessage (MsgType type, const char* from, const char* to, const char* id, const char* message)

createMessage

[static]

Create a 'message' element

Parameters:
typeMessage type as enumeration
fromThe 'from' attribute
toThe 'to' attribute
idThe 'id' attribute
messageThe message body

Returns: A valid XMLElement pointer

inline MsgType  msgType (const char* text)

msgType

[static]

Get the type of a 'message' stanza

Parameters:
textThe text to check

Returns: Message type as enumeration

inline const char*  msgText (MsgType msg)

msgText

[static]

Get the text from a message type

Parameters:
msgThe message type

Returns: The associated text or 0

static TokenDict s_msg[]

s_msg[]

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

accept

[protected virtual]

Accept an event from the engine and process it if configured to do that

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 Wed Oct 21 01:57:30 2009, using kdoc 2.0a54.