|
Yate
|
Channel used by client programs. More...
#include <yatecbase.h>
Public Types | |
| enum | Notification { Startup , Destroyed , Active , OnHold , Mute , Noticed , AddrChanged , Routed , Accepted , Rejected , Progressing , Ringing , Answered , Transfer , Conference , AudioSet , Unknown } |
| enum | SlaveType { SlaveNone = 0 , SlaveTransfer , SlaveConference } |
Static Public Member Functions | |
| static int | lookup (const char *notif, int def=Unknown) |
| static const char * | lookup (int notif, const char *def=0) |
| static int | lookupSlaveType (const char *notif, int def=SlaveNone) |
Static Public Member Functions inherited from Channel | |
| static Mutex & | paramMutex () |
| static unsigned int | allocId () |
Static Public Member Functions inherited from CallEndpoint | |
| static Mutex & | commonMutex () |
| static const String & | audioType () |
Static Public Member Functions inherited from RefObject | |
| static bool | alive (const RefObject *obj) |
| static bool | efficientIncDec () |
Static Public Member Functions inherited from GenObject | |
| static void * | getObject (const String &name, const GenObject *obj) |
| static bool | getObjCounting () |
| static void | setObjCounting (bool enable) |
| static NamedCounter * | getObjCounter (const String &name, bool create=true) |
| static ObjList & | getObjCounters () |
Static Public Attributes | |
| static const TokenDict | s_notification [] |
| static const TokenDict | s_slaveTypes [] |
Protected Attributes | |
| int | m_slave |
| String | m_master |
| String | m_party |
| String | m_partyName |
| String | m_peerOutFormat |
| String | m_peerInFormat |
| String | m_reason |
| String | m_peerId |
| bool | m_noticed |
| int | m_line |
| bool | m_active |
| bool | m_silence |
| bool | m_conference |
| bool | m_muted |
| String | m_transferId |
| RefObject * | m_clientData |
| bool | m_utility |
| String | m_soundId |
| ObjList | m_slaves |
| NamedList | m_clientParams |
Protected Attributes inherited from Channel | |
| String | m_status |
| String | m_address |
| String | m_targetid |
| String | m_billid |
| bool | m_answered |
Protected Attributes inherited from CallEndpoint | |
| ObjList | m_data |
| Mutex * | m_mutex |
Friends | |
| class | ClientDriver |
Channel notifications
| ClientChannel | ( | const Message & | msg, |
| const String & | peerid | ||
| ) |
Incoming (from engine) constructor
| msg | The call.execute message |
| peerid | The peer's id |
| ClientChannel | ( | const String & | target, |
| const NamedList & | params, | ||
| int | st = SlaveNone, |
||
| const String & | masterChan = String::empty() |
||
| ) |
Outgoing (to engine) constructor
| target | The target to call |
| params | Call parameters |
| st | Optional slave |
| masterChan | Master channel id if slave, ignored otherwise |
|
explicit |
Constructor for utility channels used to play notifications
| soundId | The id of the sound to play |
|
inline |
Check if this channel is the active one
Add a slave id. This method is thread safe
| sid | Slave id to add |
References ObjList::append(), and ObjList::find().
Notification on success of incoming call
| msg | Notification call.execute message just after being dispatched |
Reimplemented from Channel.
Answer an incoming call. Set media channels. Enqueue a clientchan.update message
| setActive | True to activate the channel |
Notification on failure of incoming call
| error | Standard error keyword |
| reason | Textual failure reason |
| msg | Pointer to message causing the rejection, if any |
Reimplemented from Channel.
Notification on progress of routing incoming call
| msg | Notification call.route message just after being dispatched |
Reimplemented from Channel.
Retrieve channel client parameters
|
inline |
Check if this channel is in conference
Connect notification method.
| reason | Text that describes connect reason. |
Reimplemented from Channel.
Destruct notification, performs cleanups
Reimplemented from CallEndpoint.
Disconnect notification method.
| final | True if this disconnect was called from the destructor. |
| reason | Text that describes disconnect reason. |
Reimplemented from Channel.
| CallEndpoint * getReconnPeer | ( | bool | ref = true | ) |
Get peer used to reconnect
| ref | True to return a referenced pointer |
Retrieve peer used to reconnect. This method is thread safe
| buf | Destination buffer |
Referenced by ClientChannel::hasReconnPeer().
|
inline |
Check if the peer used to reconnect is alive
References ClientChannel::getReconnPeer().
|
inline |
Check if this channel was noticed
|
inline |
Get this channel's line
Lookup for a notification id
| notif | The notification's name |
| def | Default value to return if not found |
References ClientChannel::s_notification.
Lookup for a notification name
| notif | The notification's id |
| def | Default value to return if not found |
References ClientChannel::s_notification.
Lookup for a slave type
| notif | The slave type name |
| def | Default value to return if not found |
References ClientChannel::s_slaveTypes.
Get the master channel id if any
Notification on remote answered. Note that the answered flag will be set
| msg | Notification message |
Reimplemented from Channel.
Notification on current call drop request
| msg | Notification message |
| reason | Pointer to drop reason text or NULL if none provided |
Reimplemented from Channel.
Notification on remote call making some progress, not enabled by default
| msg | Notification message |
Reimplemented from Channel.
Notification on remote ringing
| msg | Notification message |
Reimplemented from Channel.
|
inline |
Check if this channel is muted
| void noticed | ( | ) |
Notice this channel. Enqueue a clientchan.update message
Get the remote party of this channel
Get the remote party name of this channel
Get the peer source's data format
Get the peer consumer's data format
Remove a slave id. This method is thread safe
| sid | Slave id to remove |
References ObjList::remove().
Set/reset this channel's data source/consumer
| active | True to set active, false to set inactive (mute) |
| update | True to enqueue an update message |
Set/reset the client data. If a new client data is set its reference counter is increased
| obj | The new client data |
| void setConference | ( | const String & | target = String::empty() | ) |
Set/reset the conference data. Enqueue clientchan.update if changed. Open media when reset if the channel is active and answered
| target | The confeernce room's name. Leave it blank to reset |
Attach/detach media channels
| open | True to open, false to close |
| replace | True to replace media if already open. Ignored if open is false |
Set/reset this channel's muted flag. Set media if 'on' is false and the channel is active
| on | True to reset outgoing media, false to set outgoing media |
| update | True to enqueue an update message |
| void setTransfer | ( | const String & | target = String::empty() | ) |
Set/reset the transferred peer's id. Enqueue clientchan.update if changed. Open media when reset if the channel is active and answered
| target | The transferred peer's id. Leave it blank to reset |
|
inline |
Get the slave type of this channel
|
inline |
Retrieve channel slaves. This method is not thread safe
Retrieve channel slaves number. This method is thread safe
References ObjList::count().
Init and start router for an outgoing (to engine), not utility, channel
| target | The target to call |
| params | Call parameters |
Get the transferred peer's id
| void update | ( | int | notif, |
| bool | chan = true, |
||
| bool | updatePeer = true, |
||
| const char * | engineMsg = 0, |
||
| bool | minimal = false, |
||
| bool | data = false |
||
| ) |
Update channel. Enqueue a clientchan.update message with the given operation. Enqueue other channel status messages if required
| notif | The value of the notify parameter |
| chan | Set the channel as message's user data |
| updatePeer | True to update peer's data formats |
| engineMsg | Optional message to enqueue in the engine |
| minimal | Set to true to fill in only a minimum of engine message's parameters |
| data | Set the channel as engine message's user data |
Channel notifications dictionary
Referenced by ClientChannel::lookup(), and ClientChannel::lookup().
Channel notifications dictionary
Referenced by ClientChannel::lookupSlaveType().