|
Yate
|
The client's default logic. More...
#include <yatecbase.h>
Static Public Member Functions | |
| static String & | buildAccountId (String &accId, const String &proto, const String &user, const String &host) |
Static Public Member Functions inherited from ClientLogic | |
| static const String & | cdrRemoteParty (const NamedList ¶ms, bool outgoing) |
| static const String & | cdrRemoteParty (const NamedList ¶ms) |
| static void | initStaticData () |
| static bool | saveContact (Configuration &cfg, ClientContact *c, bool save=true) |
| static bool | clearContact (Configuration &cfg, ClientContact *c, bool save=true) |
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 () |
Protected Attributes | |
| String | m_selectedChannel |
| String | m_transferInitiated |
Protected Attributes inherited from ClientLogic | |
| ObjList | m_durationUpdate |
| Mutex | m_durationMutex |
Additional Inherited Members | |
Static Public Attributes inherited from ClientLogic | |
| static ObjList | s_accOptions |
| static const char * | s_provParams [] |
| static ObjList | s_protocols |
| static Mutex | s_protocolsMutex |
The client's default logic.
This class implements the default client behaviour.
|
explicit |
Constructor
| name | The name of this logic |
| prio | The priority of this logic |
| ~DefaultLogic | ( | ) |
Destructor
Called when the user wants to save account data
| params | Initial parameters |
| wnd | Optional window containing the widget that triggered the action |
Reimplemented from ClientLogic.
Called when the user wants to save account data
| params | Initial parameters |
| wnd | Optional window containing the widget that triggered the action |
Reimplemented from ClientLogic.
Handle actions from user interface
| wnd | The window in which the user did something |
| name | The action's name |
| params | Optional action parameters |
Reimplemented from ClientLogic.
|
inlinestatic |
Build an account id from protocol, username, host
| accId | Destination string |
| proto | Account protocol |
| user | Account username |
| host | Account host |
Called when the user wants to call an existing contact
| params | Optional parameters |
| wnd | Optional window containing the widget that triggered the action |
Reimplemented from ClientLogic.
Call execute handler called by the client. The default logic ask the client to build an incoming channel
| msg | The call.execute message |
| dest | The destination (target) |
Reimplemented from ClientLogic.
Make an outgoing call to a target picked from the call log
| billid | The bill id of the call |
| wnd | Optional window starting the action |
Reimplemented from ClientLogic.
Clear the specified log and the entries from the history file and save the history file
| table | Tebale to clear |
| direction | The call direction to clear (incoming,outgoing). Note that the direction is the value saved from call.cdr messages. If empty, all log entries will be cleared |
Reimplemented from ClientLogic.
Create a contact from a call log entry
| billid | The bill id of the call |
Reimplemented from ClientLogic.
Remove a call log item
| billid | The bill id of the call |
Reimplemented from ClientLogic.
Update the call log history
| params | Call log data |
| save | True to save data to history file |
| update | True to update the interface |
Reimplemented from ClientLogic.
|
virtual |
Called when the user trigger a call start action The default logic fill the parameter list and ask the client to create an outgoing channel
| params | List of call parameters |
| wnd | Optional window containing the widget that triggered the action |
| cmd | Optional command (widget name) |
Reimplemented from ClientLogic.
Called by the client after loaded the callto history file
Reimplemented from ClientLogic.
Notification on selection changes in channels list. Enable call actions for currently selected channel
| old | The old selection |
Clear a list/table. Handle specific lists like CDR, accounts, contacts
| action | The list. May contain an optional confirmation text to display. Format: 'list_name[:confirmation_text]' |
| wnd | Window owning the list/table |
Close incoming call notification for a given id
| id | The notification id to close |
Default message processor called for id's not defined in client. Descendants may override it to process custom messages installed by them and relayed through the client
| msg | Received message |
| id | Message id |
| stopLogic | Set to true on exit to tell the client to stop asking other logics |
Reimplemented from ClientLogic.
Called when the user wants to delete an existing account
| account | The account's name. Set to empty to delete the current selection |
| wnd | Optional window containing the widget that triggered the action |
Reimplemented from ClientLogic.
Called when the user wants to delete an existing contact
| contact | The contact's id. Set to empty to delete the current selection |
| wnd | Optional window containing the widget that triggered the action |
Reimplemented from ClientLogic.
|
protectedvirtual |
Handle list/table checked items deletion. Handle specific lists like CDR, accounts, contacts
| list | The list |
| wnd | Window owning the list/table |
| confirm | Request confirmation for known list |
|
protectedvirtual |
Delete a list/table item. Handle specific lists like CDR, accounts, contacts, mucs
| list | The list |
| item | Item to delete |
| wnd | Window owning the list/table |
| confirm | Request confirmation for known list |
|
protectedvirtual |
Handle list/table selection or checked items deletion. Handle specific lists like CDR, accounts, contacts
| action | Action to handle. May contain an optional confirmation text to display. Format: 'list_name[:confirmation_text]' |
| wnd | Window owning the list/table |
| checked | Set it to true to handle checked items deletion |
Called when a digit is pressed. The default logic will send the digit(s) as DTMFs on the active channel
| params | List of parameters. It should contain a 'digits' parameter |
| wnd | Optional window containing the widget that triggered the action |
Called when the user wants to add a new account or edit an existing one
| newAcc | True to add a new account, false to edit an exisiting one |
| params | Initial parameters |
| wnd | Optional window containing the widget that triggered the action |
Reimplemented from ClientLogic.
Called when the user wants to add a new contact or edit an existing one
| newCont | True to add a new contact, false to edit an existing one |
| params | Optional initial parameters |
| wnd | Optional window containing the widget that triggered the action |
Reimplemented from ClientLogic.
Engine start notification. Connect startup accounts
| msg | The engine.start message |
Reimplemented from ClientLogic.
Called by the client before exiting. The default logic save client settings
Reimplemented from ClientLogic.
Fill call start parameter list from UI
| p | The list of parameters to fill |
| wnd | Optional window owning the widget triggering the action |
|
protectedvirtual |
Fill contact edit/delete active parameters
| list | Destination list |
| active | True to activate, false to deactivate |
| item | Optional selected item to check in contacts list if active |
| del | True to fill delete active parameter |
|
protectedvirtual |
Fill log contact active parameter
| list | Destination list |
| active | True to activate, false to deactivate |
| item | Optional selected item to check in calls log list if active |
Process call.cdr message
| msg | Received message |
| stopLogic | Set to true on exit to tell the client to stop asking other logics |
Reimplemented from ClientLogic.
Process clientchan.update message
| msg | Received message |
| stopLogic | Set to true on exit to tell the client to stop asking other logics |
Reimplemented from ClientLogic.
Process contact.info message
| msg | Received message |
| stopLogic | Set to true on exit to tell the client to stop asking other logics |
Reimplemented from ClientLogic.
Handle file.info messages.
| msg | The message |
| stopLogic | Stop notifying other logics if set to true on return |
|
protectedvirtual |
Handle file transfer actions
| name | Action name |
| wnd | Window notifying the event |
| params | Optional action parameters |
Handle file transfer notifications. This method is called from logic message handler
| msg | Notification message |
| stopLogic | Stop notifying other logics if set to true on return |
Process resource.notify message
| msg | Received message |
| stopLogic | Set to true on exit to tell the client to stop asking other logics |
Reimplemented from ClientLogic.
Process resource.subscribe message
| msg | Received message |
| stopLogic | Set to true on exit to tell the client to stop asking other logics |
Reimplemented from ClientLogic.
Handle text changed notification
| params | Notification parameters |
| wnd | Window notifying the event |
Process ui.action message
| msg | Received message |
| stopLogic | Set to true on exit to tell the client to stop asking other logics |
Reimplemented from ClientLogic.
Handle user.data messages.
| msg | The message |
| stopLogic | Stop notifying other logics if set to true on return |
Process user.login message
| msg | Received message |
| stopLogic | Set to true on exit to tell the client to stop asking other logics |
Reimplemented from ClientLogic.
Process user.notify message
| msg | Received message |
| stopLogic | Set to true on exit to tell the client to stop asking other logics |
Reimplemented from ClientLogic.
Process user.roster message
| msg | Received message |
| stopLogic | Set to true on exit to tell the client to stop asking other logics |
Reimplemented from ClientLogic.
Process help related actions
| action | The action's name |
| wnd | The window owning the control |
Reimplemented from ClientLogic.
Method called by the client when idle. This method is called in the UI's thread
| time | The current time |
Reimplemented from ClientLogic.
Process an IM message
| msg | The im.execute of chan.text message |
Reimplemented from ClientLogic.
Called by the client after loaded and intialized the windows and loaded configuration files. The default logic update client settings
Reimplemented from ClientLogic.
Called by the client after loaded and intialized the windows
Reimplemented from ClientLogic.
Join a MUC room. Create/show chat. Update its status
| room | The room |
| force | True to disconnect if connecting or online and re-connect |
Called by the client after loaded the windows
Reimplemented from ClientLogic.
Login/logout an account
| account | The account's parameters. The name of the list must be the account's name |
| login | True to login the account, false to logout |
Reimplemented from ClientLogic.
|
protectedvirtual |
Show a generic notification
| text | Notification text |
| account | Optional concerned account |
| contact | Optional concerned contact |
| title | Notification title |
|
protectedvirtual |
Show/hide no audio notification
| show | Show or hide notification |
| micOk | False if microphone open failed |
| speakerOk | False if speaker open failed |
| chan | Optional failed channel |
Handle 'select' with multiple items actions from user interface
| wnd | The window in which the user did something |
| name | The object's name |
| items | List of selected items |
Reimplemented from ClientLogic.
|
virtual |
Handle 'select' actions from user interface
| wnd | The window in which the user did something |
| name | The object's name |
| item | Item identifying the selection |
| text | Selection's text |
Reimplemented from ClientLogic.
|
virtual |
Set a client's parameter. Save the settings file and/or update interface
| param | Parameter's name |
| value | The value of the parameter |
| save | True to save the configuration file |
| update | True to update the interface |
Reimplemented from ClientLogic.
|
virtual |
Show incoming call notification for a given channel
| chan | The channel |
Handle actions from checkable widgets
| wnd | The window in which the user did something |
| name | The object's name |
| active | Object's state |
Reimplemented from ClientLogic.
Add/set an account
| account | The account's parameters. The name of the list must be the account's name |
| login | True to login the account |
| save | True to save the accounts file. If true and file save fails the method will fail |
Reimplemented from ClientLogic.
|
protectedvirtual |
(Un)Load account's saved chat rooms or a specific room in contact list
| load | True to load, false to unload |
| acc | The account owning the chat rooms |
| room | The room to update, ignored if acc is not 0 |
Add/set a contact
| contact | The contact's parameters. The name of the list must be the contacts's id (name). If it starts with 'client/' this is a contact updated from server: it can't be changed |
| save | True to save data to contacts file |
| update | True to update the interface |
Reimplemented from ClientLogic.
Add/set account providers data
| provider | The provider's parameters. The name of the list must be the provider's id (name) |
| save | True to save data to providers file |
| update | True to update the interface |
Reimplemented from ClientLogic.
Update from UI or from a given value the selected item in channels list. The selected channel may not be the active one
| item | Optional new value for current selection. Set to 0 to upadte from UI |
Check presence of all necessary data to make a call
| params | List of call parameters |
| wnd | Optional window containing the widget that triggered the action |
Reimplemented from ClientLogic.