ClientDriver Class Reference

Base Driver with client specific functions. More...

#include <yatecbase.h>

Inheritance diagram for ClientDriver:
Driver Module Plugin Mutex MessageReceiver DebugEnabler GenObject Lockable GenObject

List of all members.

Public Member Functions

virtual void initialize ()=0
virtual bool msgExecute (Message &msg, String &dest)
virtual void msgTimer (Message &msg)
virtual bool msgRoute (Message &msg)
virtual bool received (Message &msg, int id)
const StringactiveId () const
bool setActive (const String &id=String::empty())
ClientChannelfindLine (int line)

Static Public Member Functions

static ClientDriverself ()
static const Stringdevice ()
static void dropCalls (const char *reason=0)
static bool setAudioTransfer (const String &id, const String &target=String::empty())
static bool setConference (const String &id, bool in, const String *confName=0)
static ClientChannelfindChan (const String &id)
static ClientChannelfindChanByPeer (const String &peer)
static ClientChannelfindActiveChan ()

Static Public Attributes

static String s_confName
static bool s_dropConfPeer

Protected Member Functions

void setup ()

Protected Attributes

String m_activeId

Static Protected Attributes

static ClientDrivers_driver
static String s_device

Friends

class ClientChannel

Detailed Description

Base Driver with client specific functions.

Abstract client Driver that implements some of the specific functionality


Member Function Documentation

const String& activeId (  )  const [inline]

Get the active channel's id

Returns:
The active channel's id
static const String& device (  )  [inline, static]

Get the current audio device's name

Returns:
The current audio device's name
static void dropCalls ( const char *  reason = 0  )  [static]

Drop all calls belonging to the active driver

Parameters:
reason Optional drop reason
static ClientChannel* findActiveChan (  )  [inline, static]

Get the active channel

Returns:
Referenced ClientChannel pointer or 0
static ClientChannel* findChan ( const String id  )  [static]

Get a referenced channel found by its id

Parameters:
id The id of the channel to find
Returns:
Referenced ClientChannel pointer or 0
static ClientChannel* findChanByPeer ( const String peer  )  [static]

Get a referenced channel whose stored peer is the given one

Parameters:
peer Peer id to check
Returns:
Referenced ClientChannel pointer or 0
ClientChannel* findLine ( int  line  ) 

Find a channel by its line

Parameters:
line The line to find
Returns:
ClientChannel pointer of 0
virtual void initialize (  )  [pure virtual]

This method is called to initialize the loaded module

Reimplemented from Driver.

virtual bool msgExecute ( Message msg,
String dest 
) [virtual]

Create an outgoing calling channel

Parameters:
msg Call execute message
dest Destination of the new call
Returns:
True if outgoing call was created

Implements Driver.

virtual bool msgRoute ( Message msg  )  [virtual]

Routing message handler. The default implementation routes to this driver if it owns a line named in the "account" or "line" parameter.

Parameters:
msg Call routing message
Returns:
True to stop processing the message, false to try other handlers

Reimplemented from Driver.

virtual void msgTimer ( Message msg  )  [virtual]

Timer message handler.

Parameters:
msg Time message

Reimplemented from Module.

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

Message receiver handler

Parameters:
msg The received message
id The identifier with which the relay was created
Returns:
True to stop processing, false to try other handlers

Reimplemented from Driver.

static ClientDriver* self (  )  [inline, static]

Get the global client driver object's address

Returns:
The global client driver object's address
bool setActive ( const String id = String::empty()  ) 

Set/reset the active channel. Does nothing if the selected channel is the active one. Put the active channel on hold before trying to set the active channel

Parameters:
id The new active channel's id. Set to empty if don't want to set a new active channel
Returns:
True on success
static bool setAudioTransfer ( const String id,
const String target = String::empty() 
) [static]

Attach/detach client channels peers' source/consumer

Parameters:
id The id of the channel to tranfer
target The transfer target. Leave blank to reset the channel's transfer id
Returns:
True on success
static bool setConference ( const String id,
bool  in,
const String confName = 0 
) [static]

Attach/detach a client channel to/from a conference room

Parameters:
id The id of the channel to process
in True to enter the conference room, false to exit from it
confName Optional id of the conference. Set to 0 to use the default one Ignored if 'in' is false
Returns:
True on success
void setup (  )  [protected]

Install standard message relays

Reimplemented from Module.


Member Data Documentation

String s_confName [static]

The name to use when the client is in conference

bool s_dropConfPeer [static]

Indicates wether a channel should drop its former peer when terminated while in conference


The documentation for this class was generated from the following file:
Generated on Thu Apr 8 18:19:42 2010 for Yate by  doxygen 1.6.3