Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

Module Class Reference

Modules are used for protocol modules and detached threads used to service key Bayonne protocols and interfaces. Module interface class. More...

#include <bayonne.h>

List of all members.

Public Methods

Module* getNext (void)
virtual char* getName (void) = 0
 Get the "name" identifer of this module. More...

virtual char* Dispatch (Trunk *trunk)
 Execute the script request. More...

virtual unsigned Sleep (Trunk *trunk)
 This is used to determine if a timeout/sleep should occur or if script advance is immediate. More...

virtual void Detach (Trunk *trunk)
 Notify for detach. More...

virtual void Attach (Trunk *trunk)
 Notify for attach. More...


Protected Methods

 Module ()
Module* getFirst (void)
virtual modtype_t getType (void) = 0
 Get the "type" identifer of this module. More...

void addSession (void)
 Add as a session handling module.

void addCommand (void)
 Add fifo command handling module.

void addPrompts (void)
 Add module as url processing.

void addRequest (void)
 Add request handler back-end.

virtual bool Command (char **argv, ostream *out)
 fifo command extension.

virtual void Reload (void)
 reload provisioning interface for fifos.

virtual char* getPrompt (const char *original)
 Parse a url/prompt file into a fixed file path.

virtual void Expires (Request *request)
 Notify an expired request.

virtual void Running (Request *request)
 Notify a running request.

virtual void Cancelled (Request *request)
 Notify a cancelled request.


Friends

class  Fifo
class  AudioService
class  TrunkGroup
void cancel (TrunkGroup *grp, const char *tag)
Module* getModule (modtype_t mod, const char *name = NULL)
void detachModules (Trunk *trunk)
void attachModules (Trunk *trunk)


Detailed Description

Modules are used for protocol modules and detached threads used to service key Bayonne protocols and interfaces. Module interface class.

These are done as loadable modules and may be replaced with application specific interfaces.

Author(s):
David Sugar <dyfet@ostel.com>


Constructor & Destructor Documentation

Module::Module ( ) [protected]
 


Member Function Documentation

void Module::Attach ( Trunk * trunk ) [inline, virtual]
 

Notify for attach.

This can be used to set constants in the trunks symbol space for this module's use at call setup.

Parameters:
trunk   to attach to.

void Module::Cancelled ( Request * request ) [inline, protected, virtual]
 

Notify a cancelled request.

bool Module::Command ( char ** argv,
ostream * out ) [inline, protected, virtual]
 

fifo command extension.

void Module::Detach ( Trunk * trunk ) [inline, virtual]
 

Notify for detach.

As each call is detached, this will get called.

Parameters:
trunk   to detach from.

char * Module::Dispatch ( Trunk * trunk ) [inline, virtual]
 

Execute the script request.

Usually this involves creating a detached service thread.

Returns:
error message or NULL.
Parameters:
trunk   object to reference.

void Module::Expires ( Request * request ) [inline, protected, virtual]
 

Notify an expired request.

void Module::Reload ( void ) [inline, protected, virtual]
 

reload provisioning interface for fifos.

void Module::Running ( Request * request ) [inline, protected, virtual]
 

Notify a running request.

unsigned Module::Sleep ( Trunk * trunk ) [inline, virtual]
 

This is used to determine if a timeout/sleep should occur or if script advance is immediate.

Returns:
number of seconds in sleep state.
Parameters:
trunk   object to reference.

void Module::addCommand ( void ) [protected]
 

Add fifo command handling module.

void Module::addPrompts ( void ) [protected]
 

Add module as url processing.

void Module::addRequest ( void ) [protected]
 

Add request handler back-end.

void Module::addSession ( void ) [protected]
 

Add as a session handling module.

Module * Module::getFirst ( void ) [inline, protected]
 

char * Module::getName ( void ) [pure virtual]
 

Get the "name" identifer of this module.

Returns:
name string.

Module * Module::getNext ( void ) [inline]
 

char * Module::getPrompt ( const char * original ) [inline, protected, virtual]
 

Parse a url/prompt file into a fixed file path.

modtype_t Module::getType ( void ) [protected, pure virtual]
 

Get the "type" identifer of this module.

Returns:
type id.


Friends And Related Function Documentation

class AudioService [friend]
 

class Fifo [friend]
 

class TrunkGroup [friend]
 

void attachModules ( Trunk * trunk ) [friend]
 

void cancel ( TrunkGroup * grp,
const char * tag ) [friend]
 

void detachModules ( Trunk * trunk ) [friend]
 

Module* getModule ( modtype_t mod,
const char * name = NULL ) [friend]
 


The documentation for this class was generated from the following file:
Generated at Sat Feb 10 11:10:49 2001 for Bayonne by doxygen1.2.1 written by Dimitri van Heesch, © 1997-2000