class Driver

A Channel driver module. More...

Contains pure virtuals
Full nameTelEngine::Driver
Definition#include <yatephone.h>
InheritsTelEngine::Module [public ]
Inherited byClientDriver
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Protected Methods


Detailed Description

Driver is a module specialized for implementing channel drivers

void*  getObject (const String& name)

getObject

[const virtual]

Get a pointer to a derived class given that class name

Parameters:
nameName of the class we are asking for

Returns: Pointer to the requested class or NULL if this object doesn't implement it

Reimplemented from Module.

inline const String&  prefix ()

prefix

[const]

Retrive the prefix that is used as base for all channels

Returns: The driver's prefix

inline bool  varchan ()

varchan

[const]

Check if this driver is for dynamic (variable number) channels

Returns: True if the channels are dynamic, false for fixed

inline ObjList&  channels ()

channels

Get the list of channels of this driver

Returns: A reference to the channel list

Channel*  find (const String& id)

find

[const virtual]

Find a channel by id

Parameters:
idUnique identifier of the channel to find

Returns: Pointer to the channel or NULL if not found

bool  isBusy ()

isBusy

[const virtual]

Check if the driver is actively used.

Returns: True if the driver is in use, false if should be ok to restart

Reimplemented from Plugin.

void  dropAll (Message &msg)

dropAll

[virtual]

Drop all current channels

Parameters:
msgNotification message

bool  canAccept (bool routers = true)

canAccept

[virtual]

Check if new connections can be accepted

Parameters:
routersSet to true to check routing threads for incoming connections

Returns: True if at least one new connection can be accepted, false if not

bool  canRoute ()

canRoute

[virtual]

Check if new incoming connections can be routed

Returns: True if at least one new connection can be routed, false if not

unsigned int  nextid ()

nextid

Get the next unique numeric id from a sequence

Returns: A driver unique number that increments by 1 at each call

inline unsigned int  lastid ()

lastid

[const]

Get the current (last used) unique numeric id from a sequence

Returns: The driver unique number

inline int  timeout ()

timeout

[const]

Get the default driver timeout

Returns: Timeout value in milliseconds

inline int  routing ()

routing

[const]

Get the number of calls currently in the routing stage

Returns: Number of router threads currently running

inline int  routed ()

routed

[const]

Get the number of calls successfully routed

Returns: Number of calls that have gone past the routing stage

inline int  total ()

total

[const]

Get the total number of calls ever created

Returns: Number of channels ever created for this driver

 Driver (const char* name, const char* type = 0)

Driver

[protected]

Constructor

Parameters:
namePlugin name of this driver
typeType of the driver: "fixchans", "varchans", etc.

void  initialize ()

initialize

[protected virtual]

This method is called to initialize the loaded module

Reimplemented from Module.

void  setup (const char* prefix = 0, bool minimal = false)

setup

[protected]

Install standard message relays and set up the prefix

Parameters:
prefixPrefix to use with channels of this driver
minimalInstall just a minimal set of message relays

Reimplemented from Module.

bool  received (Message &msg, int id)

received

[protected virtual]

Message receiver handler

Parameters:
msgThe received message
idThe identifier with which the relay was created

Returns: True to stop processing, false to try other handlers

Reimplemented from Module.

void  genUpdate (Message& msg)

genUpdate

[protected virtual]

Opportunity to modify the update message

Parameters:
msgStatus update message

Reimplemented from Module.

bool  msgExecute (Message& msg, String& dest)

msgExecute

[protected pure virtual]

Create an outgoing calling channel

Parameters:
msgCall execute message
destDestination of the new call

Returns: True if outgoing call was created

bool  commandComplete (Message& msg, const String& partLine, const String& partWord)

commandComplete

[protected virtual]

Complete a command line

Parameters:
msgMessage to return completion into
partLinePartial line to complete, excluding the last word
partWordPartial word to complete

Returns: True to stop processing the message, false to try other handlers

Reimplemented from Module.

void  msgStatus (Message& msg)

msgStatus

[protected virtual]

Status message handler that is invoked only for matching messages.

Parameters:
msgStatus message

Reimplemented from Module.

void  statusModule (String& str)

statusModule

[protected virtual]

Build the module identification part of the status answer

Parameters:
strString variable to fill up

Reimplemented from Module.

void  statusParams (String& str)

statusParams

[protected virtual]

Build the parameter reporting part of the status answer

Parameters:
strString variable to fill up

Reimplemented from Module.

void  statusDetail (String& str)

statusDetail

[protected virtual]

Build the channel list part of the status answer

Parameters:
strString variable to fill up

Reimplemented from Module.

bool  setDebug (Message& msg, const String& target)

setDebug

[protected virtual]

Set the local debugging level

Parameters:
msgDebug setting message
targetString to match for local settings

Reimplemented from Module.

void  loadLimits ()

loadLimits

[protected virtual]

Load the global limits from the main config file

inline void  varchan (bool variable)

varchan

[protected]

Set if this driver is for dynamic (variable number) channels

Parameters:
variableTrue if the channels are dynamic, false for fixed

inline void  timeout (int tout)

timeout

[protected]

Set the default driver timeout

Parameters:
toutNew timeout in milliseconds or zero to disable

inline void  maxRoute (int ncalls)

maxRoute

[protected]

Set the maximum number of routing messages for this driver

Parameters:
ncallsNumber of calls to route simultaneously, zero to accept all

inline void  maxChans (int ncalls)

maxChans

[protected]

Set the maximum number of running channels for this driver

Parameters:
ncallsNumber of calls to run simultaneously, zero to accept all


Generated by: root on dragoshel on Sat Apr 14 01:50:50 2007, using kdoc 2.0a54.