Yate
Public Types | Public Member Functions | Protected Member Functions | Friends
ChanAssistList Class Reference

#include <yatepbx.h>

Inheritance diagram for ChanAssistList:
Module Plugin Mutex MessageReceiver GenObject DebugEnabler Lockable GenObject

List of all members.

Public Types

enum  { Startup = Private, Hangup, Disconnected, AssistPrivate }

Public Member Functions

virtual ~ChanAssistList ()
virtual bool received (Message &msg, int id)
virtual bool received (Message &msg, int id, ChanAssist *assist)
virtual void initialize ()
virtual ChanAssistcreate (Message &msg, const String &id)=0
virtual void init (int priority=15)
ChanAssistfind (const String &id) const

Protected Member Functions

 ChanAssistList (const char *name, bool earlyInit=false)
void removeAssist (ChanAssist *assist)
HashListcalls ()
const HashListcalls () const

Friends

class ChanAssist

Detailed Description

Class keeping a list of ChanAssist objects. It also serves as base to implement channel assisting plugins.


Member Enumeration Documentation

anonymous enum

Message realy IDs


Constructor & Destructor Documentation

virtual ~ChanAssistList ( ) [inline, virtual]

Destructor

ChanAssistList ( const char *  name,
bool  earlyInit = false 
) [inline, protected]

Constructor

Parameters:
nameName of the module
earlyInitTrue to attempt to initialize module before others

Member Function Documentation

HashList& calls ( ) [inline, protected]

Access to the assisted calls list

Returns:
The HashList holding the calls
const HashList& calls ( ) const [inline, protected]

Access to the assisted calls list

Returns:
The HashList holding the calls
virtual ChanAssist* create ( Message msg,
const String id 
) [pure virtual]

Create a new channel assistant

Parameters:
msgMessage that triggered the creation
idChannel's identifier
Returns:
Pointer to new assistant object, NULL if unacceptable
ChanAssist* find ( const String id) const [inline]

Find a channel assistant by channel ID

Parameters:
idIdentifier of the assisted channel
Returns:
Pointer to the assistant object
virtual void init ( int  priority = 15) [virtual]

Initialize the plugin for the first time

Parameters:
priorityPriority used to install message handlers
virtual void initialize ( ) [virtual]

Method to (re)initialize the plugin

Reimplemented from Module.

virtual bool received ( Message msg,
int  id 
) [virtual]

Message handler called internally

Parameters:
msgReceived nessage
idNumeric identifier of the message type
Returns:
True if the message was handled and further processing should stop

Reimplemented from Module.

virtual bool received ( Message msg,
int  id,
ChanAssist assist 
) [virtual]

Message handler for an assistant object

Parameters:
msgReceived nessage
idNumeric identifier of the message type
assistPointer to the matching assistant object
Returns:
True if the message was handled and further processing should stop
void removeAssist ( ChanAssist assist) [protected]

Removes an assistant object from list

Parameters:
assistObject to remove from list

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