Yate
ChanAssistList Class Referenceabstract

#include <yatepbx.h>

Inheritance diagram for ChanAssistList:

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

anonymous enum

Message realy IDs

Constructor & Destructor Documentation

◆ ~ChanAssistList()

virtual ~ChanAssistList ( )
inlinevirtual

Destructor

◆ ChanAssistList()

ChanAssistList ( const char * name,
bool earlyInit = false )
inlineprotected

Constructor

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

Member Function Documentation

◆ calls() [1/2]

HashList & calls ( )
inlineprotected

Access to the assisted calls list

Returns
The HashList holding the calls

◆ calls() [2/2]

const HashList & calls ( ) const
inlineprotected

Access to the assisted calls list

Returns
The HashList holding the calls

◆ create()

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

◆ find()

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

◆ init()

virtual void init ( int priority = 15)
virtual

Initialize the plugin for the first time

Parameters
priorityPriority used to install message handlers

◆ initialize()

virtual void initialize ( )
virtual

Method to (re)initialize the plugin

◆ received() [1/2]

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

◆ received() [2/2]

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

◆ removeAssist()

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: