#include <yatephone.h>
Inheritance diagram for Driver:
Public Member Functions | |
virtual void * | getObject (const String &name) const |
const String & | prefix () const |
bool | varchan () const |
ObjList & | channels () |
virtual Channel * | find (const String &id) const |
virtual bool | isBusy () const |
virtual void | dropAll (Message &msg) |
virtual bool | canAccept (bool routers=true) |
virtual bool | canRoute () |
unsigned int | nextid () |
unsigned int | lastid () const |
int | timeout () const |
int | routing () const |
int | routed () const |
int | total () const |
Protected Member Functions | |
Driver (const char *name, const char *type=0) | |
virtual void | initialize () |
void | setup (const char *prefix=0, bool minimal=false) |
virtual bool | received (Message &msg, int id) |
virtual void | genUpdate (Message &msg) |
virtual bool | msgExecute (Message &msg, String &dest)=0 |
virtual bool | commandComplete (Message &msg, const String &partLine, const String &partWord) |
virtual void | statusModule (String &str) |
virtual void | statusParams (String &str) |
virtual void | statusDetail (String &str) |
virtual bool | setDebug (Message &msg, const String &target) |
virtual void | loadLimits () |
void | varchan (bool variable) |
void | timeout (int tout) |
void | maxRoute (int ncalls) |
void | maxChans (int ncalls) |
Friends | |
class | Router |
class | Channel |
Driver is a module specialized for implementing channel drivers
Driver | ( | const char * | name, | |
const char * | type = 0 | |||
) | [protected] |
Constructor
name | Plugin name of this driver | |
type | Type of the driver: "fixchans", "varchans", etc. |
virtual void* getObject | ( | const String & | name | ) | const [virtual] |
Get a pointer to a derived class given that class name
name | Name of the class we are asking for |
Reimplemented from Module.
const String& prefix | ( | ) | const [inline] |
Retrive the prefix that is used as base for all channels
bool varchan | ( | ) | const [inline] |
Check if this driver is for dynamic (variable number) channels
ObjList& channels | ( | ) | [inline] |
Get the list of channels of this driver
Find a channel by id
id | Unique identifier of the channel to find |
virtual bool isBusy | ( | ) | const [virtual] |
Check if the driver is actively used.
Reimplemented from Plugin.
virtual void dropAll | ( | Message & | msg | ) | [virtual] |
Drop all current channels
msg | Notification message |
virtual bool canAccept | ( | bool | routers = true |
) | [virtual] |
Check if new connections can be accepted
routers | Set to true to check routing threads for incoming connections |
virtual bool canRoute | ( | ) | [virtual] |
Check if new incoming connections can be routed
unsigned int nextid | ( | ) |
Get the next unique numeric id from a sequence
unsigned int lastid | ( | ) | const [inline] |
Get the current (last used) unique numeric id from a sequence
int timeout | ( | ) | const [inline] |
Get the default driver timeout
int routing | ( | ) | const [inline] |
Get the number of calls currently in the routing stage
int routed | ( | ) | const [inline] |
Get the number of calls successfully routed
int total | ( | ) | const [inline] |
Get the total number of calls ever created
virtual void initialize | ( | ) | [protected, virtual] |
This method is called to initialize the loaded module
Reimplemented from Module.
Reimplemented in ClientDriver.
void setup | ( | const char * | prefix = 0 , |
|
bool | minimal = false | |||
) | [protected] |
Install standard message relays and set up the prefix
prefix | Prefix to use with channels of this driver | |
minimal | Install just a minimal set of message relays |
virtual bool received | ( | Message & | msg, | |
int | id | |||
) | [protected, virtual] |
virtual void genUpdate | ( | Message & | msg | ) | [protected, virtual] |
Opportunity to modify the update message
msg | Status update message |
Reimplemented from Module.
Create an outgoing calling channel
msg | Call execute message | |
dest | Destination of the new call |
Implemented in ClientDriver.
virtual void statusModule | ( | String & | str | ) | [protected, virtual] |
virtual void statusParams | ( | String & | str | ) | [protected, virtual] |
virtual void statusDetail | ( | String & | str | ) | [protected, virtual] |
virtual void loadLimits | ( | ) | [protected, virtual] |
Load the global limits from the main config file
void varchan | ( | bool | variable | ) | [inline, protected] |
Set if this driver is for dynamic (variable number) channels
variable | True if the channels are dynamic, false for fixed |
void timeout | ( | int | tout | ) | [inline, protected] |
Set the default driver timeout
tout | New timeout in milliseconds or zero to disable |
void maxRoute | ( | int | ncalls | ) | [inline, protected] |
Set the maximum number of routing messages for this driver
ncalls | Number of calls to route simultaneously, zero to accept all |
void maxChans | ( | int | ncalls | ) | [inline, protected] |
Set the maximum number of running channels for this driver
ncalls | Number of calls to run simultaneously, zero to accept all |