Yate
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | Friends
ClientDriver Class Reference

Base Driver with client specific functions. More...

#include <yatecbase.h>

Inheritance diagram for ClientDriver:
Driver Module Plugin Mutex MessageReceiver GenObject DebugEnabler 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, bool buildFromChan=false)
static ClientChannelfindChan (const String &id)
static ClientChannelfindChanByPeer (const String &peer)
static ClientChannelfindActiveChan ()
static void dropChan (const String &chan, const char *reason=0, bool peer=false)

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:
reasonOptional drop reason
static void dropChan ( const String chan,
const char *  reason = 0,
bool  peer = false 
) [static]

Drop a channel

Parameters:
chanChannel id
reasonOptional reason
peerSet it to true to drop a client channel peer used to reconnect
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:
idThe 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:
peerPeer id to check
Returns:
Referenced ClientChannel pointer or 0
ClientChannel* findLine ( int  line)

Find a channel by its line

Parameters:
lineThe 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:
msgCall execute message
destDestination 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:
msgCall 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:
msgTime message

Reimplemented from Module.

virtual bool received ( Message msg,
int  id 
) [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 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:
idThe 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:
idThe id of the channel to tranfer
targetThe 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,
bool  buildFromChan = false 
) [static]

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

Parameters:
idThe id of the channel to process
inTrue to enter the conference room, false to exit from it
confNameOptional id of the conference. Set to 0 to use the default one Ignored if 'in' is false
buildFromChanBuild conference name from channel id if true
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: