class ClientChannel

Channel used by client programs. More...

Full nameTelEngine::ClientChannel
Definition#include <yatecbase.h>
InheritsTelEngine::Channel [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Types

Public Methods

Public Static Methods

Public Members

Protected Methods

Protected Members


Detailed Description

This class implements a Channel used by client programs

enum Notification { Startup, Destroyed, Active, OnHold, Mute, Noticed, AddrChanged, Routed, Accepted, Rejected, Progressing, Ringing, Answered, Transfer, Conference, AudioSet, Unknown }

Notification

Channel notifications

enum SlaveType { SlaveNone = 0, SlaveTransfer, SlaveConference, }

SlaveType

Channel slave type

 ClientChannel (const Message& msg, const String& peerid)

ClientChannel

Incoming (from engine) constructor

Parameters:
msgThe call.execute message
peeridThe peer's id

 ClientChannel (const String& target, const NamedList& params, int st = SlaveNone, const String& masterChan = String::empty())

ClientChannel

Outgoing (to engine) constructor

Parameters:
targetThe target to call
paramsCall parameters
stOptional slave
masterChanMaster channel id if slave, ignored otherwise

explicit  ClientChannel (const String& soundId)

ClientChannel

Constructor for utility channels used to play notifications

Parameters:
soundIdThe id of the sound to play

 ~ClientChannel ()

~ClientChannel

[virtual]

bool  start (const String& target, const NamedList& params)

start

Init and start router for an outgoing (to engine), not utility, channel

Parameters:
targetThe target to call
paramsCall parameters

Returns: True on success

bool  msgProgress (Message& msg)

msgProgress

[virtual]

Reimplemented from Channel.

bool  msgRinging (Message& msg)

msgRinging

[virtual]

Reimplemented from Channel.

bool  msgAnswered (Message& msg)

msgAnswered

[virtual]

Reimplemented from Channel.

bool  msgDrop (Message& msg, const char* reason)

msgDrop

[virtual]

Reimplemented from Channel.

bool  callRouted (Message& msg)

callRouted

[virtual]

Reimplemented from Channel.

void  callAccept (Message& msg)

callAccept

[virtual]

Reimplemented from Channel.

void  callRejected (const char* error, const char* reason, const Message* msg)

callRejected

[virtual]

Reimplemented from Channel.

void  callAnswer (bool setActive = true)

callAnswer

Answer an incoming call. Set media channels. Enqueue a clientchan.update message

Parameters:
setActiveTrue to activate the channel

inline int  slave ()

slave

[const]

Get the slave type of this channel

Returns: The slave type of this channel

inline ObjList&  slaves ()

slaves

Retrieve channel slaves. This method is not thread safe

Returns: Channel slaves list

inline unsigned int  slavesCount ()

slavesCount

[const]

Retrieve channel slaves number. This method is thread safe

Returns: Channel slaves list

inline void  addSlave (const String& sid)

addSlave

Add a slave id. This method is thread safe

Parameters:
sidSlave id to add

inline void  removeSlave (const String& sid)

removeSlave

Remove a slave id. This method is thread safe

Parameters:
sidSlave id to remove

inline const String&  master ()

master

[const]

Get the master channel id if any

Returns: The master channel id of this channel

inline const NamedList&  clientParams ()

clientParams

[const]

Retrieve channel client parameters

Returns: Channel client parameters list

inline const String&  party ()

party

[const]

Get the remote party of this channel

Returns: The remote party of this channel

inline const String&  partyName ()

partyName

[const]

Get the remote party name of this channel

Returns: The remote party name of this channel

inline bool  conference ()

conference

[const]

Check if this channel is in conference

Returns: True if this channel is in conference

inline const String&  transferId ()

transferId

[const]

Get the transferred peer's id

Returns: The transferred peer's id

inline RefObject*  clientData ()

clientData

[const]

Get the client data

Returns: RefObject pointer or 0

inline void  setClientData (RefObject* obj = 0)

setClientData

Set/reset the client data. If a new client data is set its reference counter is increased

Parameters:
objThe new client data

bool  setMedia (bool open = false, bool replace = false)

setMedia

Attach/detach media channels

Parameters:
openTrue to open, false to close
replaceTrue to replace media if already open. Ignored if open is false

Returns: True on success

bool  setActive (bool active, bool update = true)

setActive

Set/reset this channel's data source/consumer

Parameters:
activeTrue to set active, false to set inactive (mute)
updateTrue to enqueue an update message

Returns: True on success

bool  setMuted (bool on, bool update = true)

setMuted

Set/reset this channel's muted flag. Set media if 'on' is false and the channel is active

Parameters:
onTrue to reset outgoing media, false to set outgoing media
updateTrue to enqueue an update message

Returns: True on success

void  setTransfer (const String& target = String::empty())

setTransfer

Set/reset the transferred peer's id. Enqueue clientchan.update if changed. Open media when reset if the channel is active and answered

Parameters:
targetThe transferred peer's id. Leave it blank to reset

void  setConference (const String& target = String::empty())

setConference

Set/reset the conference data. Enqueue clientchan.update if changed. Open media when reset if the channel is active and answered

Parameters:
targetThe confeernce room's name. Leave it blank to reset

inline const String&  peerOutFormat ()

peerOutFormat

[const]

Get the peer consumer's data format

Returns: The peer consumer's data format

inline const String&  peerInFormat ()

peerInFormat

[const]

Get the peer source's data format

Returns: The peer source's data format

inline bool  active ()

active

[const]

Check if this channel is the active one

Returns: True if this channel is the active one

inline bool  muted ()

muted

[const]

Check if this channel is muted

Returns: True if this channel is muted

inline bool  isNoticed ()

isNoticed

[const]

Check if this channel was noticed

Returns: True if this channel was noticed

void  noticed ()

noticed

Notice this channel. Enqueue a clientchan.update message

inline int  line ()

line

[const]

Get this channel's line

Returns: This channel's line

void  line (int newLine)

line

Set this channel's line

Parameters:
newLineThis channel's line

void  update (int notif, bool chan = true, bool updatePeer = true, const char* engineMsg = 0, bool minimal = false, bool data = false)

update

Update channel. Enqueue a clientchan.update message with the given operation. Enqueue other channel status messages if required

Parameters:
notifThe value of the notify parameter
chanSet the channel as message's user data
updatePeerTrue to update peer's data formats
engineMsgOptional message to enqueue in the engine
minimalSet to true to fill in only a minimum of engine message's parameters
dataSet the channel as engine message's user data

inline void  getReconnPeer (String& buf)

getReconnPeer

Retrieve peer used to reconnect. This method is thread safe

Parameters:
bufDestination buffer

inline bool  hasReconnPeer ()

hasReconnPeer

Check if the peer used to reconnect is alive

Returns: True if the peer used to reconnect is alive

CallEndpoint*  getReconnPeer (bool ref = true)

getReconnPeer

Get peer used to reconnect

Parameters:
refTrue to return a referenced pointer

Returns: CallEndpoint pointer or 0 if not found

void  dropReconnPeer (const char* reason = 0)

dropReconnPeer

Drop peer used to reconnect

int  lookup (const char* notif, int def = Unknown)

lookup

[static]

Lookup for a notification id

Parameters:
notifThe notification's name
defDefault value to return if not found

Returns: The result

const char*  lookup (int notif, const char* def = 0)

lookup

[static]

Lookup for a notification name

Parameters:
notifThe notification's id
defDefault value to return if not found

Returns: The result

int  lookupSlaveType (const char* notif, int def = SlaveNone)

lookupSlaveType

[static]

Lookup for a slave type

Parameters:
notifThe slave type name
defDefault value to return if not found

Returns: The result

static const TokenDict s_notification[]

s_notification[]

static const TokenDict s_slaveTypes[]

s_slaveTypes[]

void  destroyed ()

destroyed

[protected virtual]

Channel notifications dictionary

Reimplemented from CallEndpoint.

void  connected (const char* reason)

connected

[protected virtual]

Reimplemented from Channel.

void  disconnected (bool final, const char* reason)

disconnected

[protected virtual]

Reimplemented from Channel.

inline bool  peerHasSource (Message& msg)

peerHasSource

[protected]

void  checkSilence ()

checkSilence

[protected]

int m_slave

m_slave

[protected]

String m_master

m_master

[protected]

String m_party

m_party

[protected]

String m_partyName

m_partyName

[protected]

String m_peerOutFormat

m_peerOutFormat

[protected]

String m_peerInFormat

m_peerInFormat

[protected]

String m_reason

m_reason

[protected]

String m_peerId

m_peerId

[protected]

bool m_noticed

m_noticed

[protected]

int m_line

m_line

[protected]

bool m_active

m_active

[protected]

bool m_silence

m_silence

[protected]

bool m_conference

m_conference

[protected]

bool m_muted

m_muted

[protected]

String m_transferId

m_transferId

[protected]

RefObject* m_clientData

m_clientData

[protected]

bool m_utility

m_utility

[protected]

String m_soundId

m_soundId

[protected]

ObjList m_slaves

m_slaves

[protected]

NamedList m_clientParams

m_clientParams

[protected]


Generated by: paulc on bussard on Fri Dec 21 16:28:34 2012, using kdoc 2.0a54.