~ubuntu-branches/ubuntu/natty/sflphone/natty

« back to all changes in this revision

Viewing changes to sflphone-client-gnome/src/dbus/dbus.h

  • Committer: Bazaar Package Importer
  • Author(s): Francois Marier
  • Date: 2010-12-24 16:33:55 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20101224163355-tkvvikqxbrbav6up
Tags: 0.9.11-1
* New upstream release
* Add new build dependencies on libwebkit-dev and libyaml-dev

* Bump Standards-Version up to 3.9.1
* Bump debhelper compatibility to 8
* Patch another typo in the upstream code (lintian notice)

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
 *  grants you additional permission to convey the resulting work.
28
28
 *  Corresponding Source for a non-source form of such a combination
29
29
 *  shall include the source code for the parts of OpenSSL used as well
 
30
 *  shall include the source code for the parts of OpenSSL used as well
30
31
 *  as that of the covered work.
31
32
 */
32
33
 
60
61
 * CallManager - Hold a call
61
62
 * @param c The call to hold
62
63
 */
63
 
void dbus_hold (const callable_obj_t * c );
 
64
void dbus_hold (const callable_obj_t * c);
64
65
 
65
66
/**
66
67
 * CallManager - Unhold a call
67
68
 * @param c The call to unhold
68
69
 */
69
 
void dbus_unhold (const callable_obj_t * c );
 
70
void dbus_unhold (const callable_obj_t * c);
70
71
 
71
72
/**
72
73
 * CallManager - Hang up a call
73
74
 * @param c The call to hang up
74
75
 */
75
 
void dbus_hang_up (const callable_obj_t * c );
 
76
void dbus_hang_up (const callable_obj_t * c);
76
77
 
77
78
/**
78
79
 * CallManager - Transfer a call
110
111
 * @param accountID The unique of the account
111
112
 * @return GHashTable* The details of the account
112
113
 */
113
 
GHashTable * dbus_account_details(gchar * accountID);
 
114
GHashTable * dbus_account_details (gchar * accountID);
114
115
 
115
116
/**
116
117
 * ConfigurationManager - Set the details of a specific account
117
118
 * @param a The account to update
118
119
 */
119
 
void dbus_set_account_details(account_t *a);
 
120
void dbus_set_account_details (account_t *a);
120
121
 
121
122
/**
122
 
 * ConfigurationManager - Set the additional credential information 
 
123
 * ConfigurationManager - Set the additional credential information
123
124
 * of a specific account, for a specific credential index.
124
125
 * This function will add the new section on the server side
125
126
 * if it cannot be found.
126
127
 * @param a The account to update
127
128
 * @param index The index for the credential to update
128
129
 */
129
 
void dbus_set_credential(account_t *a, int index);
 
130
void dbus_set_credential (account_t *a, int index);
130
131
 
131
132
/**
132
 
 * ConfigurationManager - Set the additional credential information 
 
133
 * ConfigurationManager - Set the additional credential information
133
134
 * of a specific account, for a specific credential index.
134
135
 * This function will add the new section on the server side
135
136
 * if it cannot be found.
136
137
 * @param a The account to update
137
138
 * @return int The number of credentials specified
138
139
 */
139
 
int dbus_get_number_of_credential(gchar * accountID);
 
140
int dbus_get_number_of_credential (gchar * accountID);
140
141
 
141
142
/**
142
143
 * ConfigurationManager - Delete all credentials defined for
143
144
 * a given account.
144
145
 * @param a The account id
145
146
 */
146
 
void dbus_delete_all_credential(account_t *a);
147
 
 
148
 
/**
149
 
 * ConfigurationManager - Set the number of credential that
150
 
 * is being used.
151
 
 * @param a The account id
152
 
 */
153
 
void dbus_set_number_of_credential(account_t *a, int number);
154
 
 
155
 
/**
156
 
 * ConfigurationManager - Set the additional credential information 
 
147
void dbus_delete_all_credential (account_t *a);
 
148
 
 
149
/**
 
150
 * ConfigurationManager - Set the additional credential information
157
151
 * of a specific account, for a specific credential index.
158
152
 * This function will add the new section on the server side
159
153
 * if it cannot be found.
161
155
 * @param index The credential index
162
156
 * @return GHashTable* The credential at index "index" for the given account
163
157
 */
164
 
GHashTable* dbus_get_credential(gchar * accountID, int index);
165
 
 
166
 
/**
167
 
 * ConfigurationManager - Get the details for the ip2ip profile 
168
 
 */
169
 
GHashTable * dbus_get_ip2_ip_details(void);
170
 
 
171
 
/**
172
 
 * ConfigurationManager - Set the details for the ip2ip profile 
173
 
 */
174
 
void dbus_set_ip2ip_details(GHashTable * properties);
 
158
GHashTable* dbus_get_credential (gchar * accountID, int index);
 
159
 
 
160
/**
 
161
 * ConfigurationManager - Get the details for the ip2ip profile
 
162
 */
 
163
GHashTable * dbus_get_ip2_ip_details (void);
 
164
 
 
165
/**
 
166
 * ConfigurationManager - Set the details for the ip2ip profile
 
167
 */
 
168
void dbus_set_ip2ip_details (GHashTable * properties);
175
169
 
176
170
/**
177
171
 * ConfigurationManager - Send registration request
180
174
 *               0 for unregistration request
181
175
 *               1 for registration request
182
176
 */
183
 
void dbus_send_register( gchar* accountID , const guint enable );
 
177
void dbus_send_register (gchar* accountID , const guint enable);
184
178
 
185
179
/**
186
180
 * ConfigurationManager - Add an account to the list
187
181
 * @param a The account to add
188
182
 */
189
 
gchar* dbus_add_account(account_t *a);
 
183
gchar* dbus_add_account (account_t *a);
190
184
 
191
185
/**
192
186
 * ConfigurationManager - Remove an account from the list
193
187
 * @param accountID The account to remove
194
188
 */
195
 
void dbus_remove_account(gchar * accountID);
 
189
void dbus_remove_account (gchar * accountID);
196
190
 
197
191
/**
198
192
 * ConfigurationManager - Set volume for speaker/mic
199
193
 * @param device The speaker or the mic
200
194
 * @param value The new value
201
195
 */
202
 
void dbus_set_volume(const gchar * device, gdouble value);
 
196
void dbus_set_volume (const gchar * device, gdouble value);
203
197
 
204
198
/**
205
199
 * ConfigurationManager - Get the volume of a device
206
200
 * @param device The speaker or the mic
207
201
 */
208
 
gdouble dbus_get_volume(const gchar * device);
 
202
gdouble dbus_get_volume (const gchar * device);
209
203
 
210
204
/**
211
205
 * ConfigurationManager - Play DTMF
212
206
 * @param key The DTMF to send
213
207
 */
214
 
void dbus_play_dtmf(const gchar * key);
 
208
void dbus_play_dtmf (const gchar * key);
215
209
 
216
210
/**
217
211
 * ConfigurationManager - Get the codecs list
224
218
 * @param payload The payload of the codec
225
219
 * @return gchar** The codec details
226
220
 */
227
 
gchar** dbus_codec_details(int payload);
 
221
gchar** dbus_codec_details (int payload);
228
222
 
229
223
/**
230
224
 * ConfigurationManager - Get the default codec list
249
243
 * CallManager - return the codec name
250
244
 * @param callable_obj_t* current call
251
245
 */
252
 
gchar* dbus_get_current_codec_name(const callable_obj_t * c);
253
 
 
254
 
/**
255
 
 * ConfigurationManager - Get the list of available input audio plugins
256
 
 * @return gchar** The list of plugins
257
 
 */
258
 
gchar** dbus_get_input_audio_plugin_list();
 
246
gchar* dbus_get_current_codec_name (const callable_obj_t * c);
259
247
 
260
248
/**
261
249
 * ConfigurationManager - Get the list of available output audio plugins
262
250
 * @return gchar** The list of plugins
263
251
 */
264
 
gchar** dbus_get_output_audio_plugin_list();
265
 
 
266
 
/**
267
 
 * ConfigurationManager - Select an input audio plugin
268
 
 * @param audioPlugin The string description of the plugin
269
 
 */
270
 
void dbus_set_input_audio_plugin(gchar* audioPlugin);
 
252
gchar** dbus_get_audio_plugin_list();
 
253
 
 
254
 
 
255
/**
 
256
 * ConfigurationManager - Select an input audio plugin
 
257
 * @param audioPlugin The string description of the plugin
 
258
 */
 
259
void dbus_set_audio_plugin (gchar* audioPlugin);
 
260
 
 
261
/**
 
262
 * ConfigurationManager - Select an input audio plugin
 
263
 * @param audioPlugin The string description of the plugin
 
264
 */
 
265
void dbus_set_input_audio_plugin (gchar* audioPlugin);
271
266
 
272
267
/**
273
268
 * ConfigurationManager - Select an output audio plugin
274
269
 * @param audioPlugin The string description of the plugin
275
270
 */
276
 
void dbus_set_output_audio_plugin(gchar* audioPlugin);
 
271
void dbus_set_output_audio_plugin (gchar* audioPlugin);
277
272
 
278
273
/**
279
274
 * ConfigurationManager - Get the list of available output audio devices
285
280
 * ConfigurationManager - Select an output audio device
286
281
 * @param index The index of the soundcard
287
282
 */
288
 
void dbus_set_audio_output_device(const int index);
 
283
void dbus_set_audio_output_device (const int index);
289
284
 
290
285
/**
291
286
 * ConfigurationManager - Get the list of available input audio devices
297
292
 * ConfigurationManager - Select an input audio device
298
293
 * @param index The index of the soundcard
299
294
 */
300
 
void dbus_set_audio_input_device(const int index);
 
295
void dbus_set_audio_input_device (const int index);
301
296
 
302
297
/**
303
298
 * ConfigurationManager - Get the current audio devices
310
305
 * @param name The string description of the audio device
311
306
 * @return int The index of the device
312
307
 */
313
 
int dbus_get_audio_device_index(const gchar* name);
 
308
int dbus_get_audio_device_index (const gchar* name);
314
309
 
315
310
/**
316
311
 * ConfigurationManager - Get the current output audio plugin
322
317
gchar* dbus_get_current_audio_output_plugin();
323
318
 
324
319
/**
325
 
 * ConfigurationManager - Query to server to 
 
320
 * ConfigurationManager - Get the current noise suppressor state
 
321
 * @return gchar* The state (enabled/disabled)
 
322
 */
 
323
gchar *dbus_get_noise_suppress_state (void);
 
324
 
 
325
/**
 
326
 * ConfigurationManager - Set the current noise suppressor state
 
327
 * @param gchar* The state (enabled/disabled)
 
328
 */
 
329
void dbus_set_noise_suppress_state (gchar *state);
 
330
 
 
331
 
 
332
/**
 
333
 * ConfigurationManager - Query to server to
326
334
 * know if MD5 credential hashing is enabled.
327
335
 * @return True if enabled, false otherwise
328
336
 *
333
341
 * ConfigurationManager - Set whether or not
334
342
 * the server should store credential as
335
343
 * a md5 hash.
336
 
 * @param enabled 
 
344
 * @param enabled
337
345
 */
338
 
void dbus_set_md5_credential_hashing(gboolean enabled);
 
346
void dbus_set_md5_credential_hashing (gboolean enabled);
339
347
 
340
348
/**
341
349
 * ConfigurationManager - Tells the GUI if IAX2 support is enabled
342
350
 * @return int 1 if IAX2 is enabled
343
351
 *             0 otherwise
344
352
 */
345
 
int dbus_is_iax2_enabled( void );
 
353
int dbus_is_iax2_enabled (void);
346
354
 
347
355
/**
348
356
 * ConfigurationManager - Query the server about the ringtone option.
350
358
 * @return int  1 if enabled
351
359
 *              0 otherwise
352
360
 */
353
 
int dbus_is_ringtone_enabled( void );
 
361
int dbus_is_ringtone_enabled (const gchar *accountID);
354
362
 
355
363
/**
356
364
 * ConfigurationManager - Set the ringtone option
357
365
 * Inverse current value
358
366
 */
359
 
void dbus_ringtone_enabled( void );
 
367
void dbus_ringtone_enabled (const gchar *accountID);
360
368
 
361
369
/**
362
370
 * ConfigurationManager - Get the ringtone
363
371
 * @return gchar* The file name selected as a ringtone
364
372
 */
365
 
gchar* dbus_get_ringtone_choice( void );
 
373
gchar* dbus_get_ringtone_choice (const gchar *accountID);
366
374
 
367
375
/**
368
376
 * ConfigurationManager - Set a ringtone
369
377
 * @param tone The file name of the ringtone
370
378
 */
371
 
void dbus_set_ringtone_choice( const gchar* tone );
372
 
 
373
 
/**
374
 
 * ConfigurationManager - Set the dialpad visible or not
375
 
 */
376
 
void dbus_set_dialpad (gboolean display);
377
 
 
378
 
/**
379
 
 * ConfigurationManager - Tells if the user wants to display the dialpad or not
380
 
 * @return int 1 if dialpad has to be displayed
381
 
 *             0 otherwise
382
 
 */
383
 
int dbus_get_dialpad( void );
384
 
 
385
 
/**
386
 
 * ConfigurationManager - Set the searchbar visible or not
387
 
 */
388
 
void dbus_set_searchbar(  );
389
 
 
390
 
/**
391
 
 * ConfigurationManager - Tells if the user wants to display the search bar or not
392
 
 * @return int 1 if the search bar has to be displayed
393
 
 *             0 otherwise
394
 
 */
395
 
int dbus_get_searchbar( void );
396
 
 
397
 
/**
398
 
 * ConfigurationManager - Set the volume controls visible or not
399
 
 */
400
 
void dbus_set_volume_controls (gboolean display);
401
 
 
402
 
/**
403
 
 * ConfigurationManager - Tells if the user wants to display the volume controls or not
404
 
 * @return int 1 if the controls have to be displayed
405
 
 *             0 otherwise
406
 
 */
407
 
int dbus_get_volume_controls( void );
408
 
 
409
 
/**
410
 
 * ConfigurationManager - Configure the start-up option
411
 
 * At startup, SFLphone can be displayed or start hidden in the system tray
412
 
 */
413
 
void dbus_start_hidden( void );
 
379
void dbus_set_ringtone_choice (const gchar *accountID, const gchar* tone);
414
380
 
415
381
/**
416
382
 * ConfigurationManager - Gives the maximum number of days the user wants to have in the history
417
383
 * @return double The maximum number of days
418
384
 */
419
 
guint dbus_get_history_limit( void );
 
385
guint dbus_get_history_limit (void);
420
386
 
421
387
/**
422
388
 * ConfigurationManager - Gives the maximum number of days the user wants to have in the history
423
389
 */
424
390
void dbus_set_history_limit (const guint days);
425
391
 
426
 
void dbus_set_history_enabled (void);
427
 
 
428
 
gchar* dbus_get_history_enabled (void);
429
 
 
430
 
/**
431
 
 * ConfigurationManager - Configure the start-up option
432
 
 * @return int  1 if SFLphone should start in the system tray
433
 
 *              0 otherwise
434
 
 */
435
 
int dbus_is_start_hidden( void );
436
 
 
437
 
/**
438
 
 * ConfigurationManager - Configure the popup behaviour
439
 
 * When SFLphone is in the system tray, you can configure when it popups
440
 
 * Never or only on incoming calls
441
 
 */
442
 
void dbus_switch_popup_mode( void );
443
 
 
444
 
/**
445
 
 * ConfigurationManager - Configure the popup behaviour
446
 
 * @return int  1 if it should popup on incoming calls
447
 
 *              0 if it should never popups
448
 
 */
449
 
int dbus_popup_mode( void );
450
 
 
451
392
/**
452
393
 * ConfigurationManager - Returns the selected audio manager
453
394
 * @return int  0       ALSA
454
395
 *              1       PULSEAUDIO
455
396
 */
456
 
int dbus_get_audio_manager( void );
 
397
int dbus_get_audio_manager (void);
457
398
 
458
399
/**
459
400
 * ConfigurationManager - Set the audio manager
460
401
 * @param api   0       ALSA
461
402
 *              1       PULSEAUDIO
462
403
 */
463
 
void dbus_set_audio_manager( int api );
464
 
 
465
 
/**
466
 
 * ConfigurationManager - Configure the notification level
467
 
 * @return int  0 disable
468
 
 *              1 enable
469
 
 */
470
 
guint dbus_get_notify( void );
471
 
 
472
 
/**
473
 
 * ConfigurationManager - Configure the notification level
474
 
 */
475
 
void dbus_set_notify( void );
 
404
void dbus_set_audio_manager (int api);
476
405
 
477
406
/**
478
407
 * ConfigurationManager - Start a tone when a new call is open and no numbers have been dialed
481
410
 * @param type  TONE_WITH_MESSAGE
482
411
 *              TONE_WITHOUT_MESSAGE
483
412
 */
484
 
void dbus_start_tone(const int start , const guint type);
 
413
void dbus_start_tone (const int start , const guint type);
485
414
 
486
415
/**
487
416
 * Instance - Send registration request to dbus service.
489
418
 * @param pid The pid of the processus client
490
419
 * @param name The string description of the client. Here : GTK+ Client
491
420
 */
492
 
void dbus_register( int pid, gchar * name);
 
421
void dbus_register (int pid, gchar * name);
493
422
 
494
423
/**
495
424
 * Instance - Send unregistration request to dbus services
496
425
 * @param pid The pid of the processus
497
426
 */
498
 
void dbus_unregister(int pid);
499
 
 
500
 
void dbus_set_sip_address(const gchar* address);
501
 
 
502
 
gint dbus_get_sip_address(void);
503
 
 
504
 
void dbus_add_participant(const gchar* callID, const gchar* confID);
505
 
 
 
427
void dbus_unregister (int pid);
 
428
 
 
429
void dbus_set_sip_address (const gchar* address);
 
430
 
 
431
gint dbus_get_sip_address (void);
 
432
 
 
433
 
 
434
/**
 
435
 * Add a participant (callID) to this conference (confID)
 
436
 */
 
437
void dbus_add_participant (const gchar* callID, const gchar* confID);
 
438
 
 
439
/**
 
440
 * Return a list of participant for this conference (confID)
 
441
 */
 
442
gchar** dbus_get_participant_list (const gchar *confID);
 
443
 
 
444
/**
 
445
 * Toggle recording for this instance, may be call or conference
 
446
 */
506
447
void dbus_set_record (const gchar * id);
507
448
 
 
449
/**
 
450
 * Set the path where the recorded audio files will be stored
 
451
 */
508
452
void dbus_set_record_path (const gchar *path);
 
453
 
 
454
/**
 
455
 * Get the path where the recorded audio files are stored
 
456
 */
509
457
gchar* dbus_get_record_path (void);
510
458
 
511
459
/**
527
475
/**
528
476
 * Resolve the local address given an interface name
529
477
 */
530
 
gchar * dbus_get_address_from_interface_name(gchar* interface);
 
478
gchar * dbus_get_address_from_interface_name (gchar* interface);
531
479
 
532
480
/**
533
481
 * Query the daemon to return a list of network interface (described as there IP address)
534
482
 */
535
 
gchar** dbus_get_all_ip_interface(void);
 
483
gchar** dbus_get_all_ip_interface (void);
536
484
 
537
485
/**
538
486
 * Query the daemon to return a list of network interface (described as there name)
539
487
 */
540
 
gchar** dbus_get_all_ip_interface_by_name(void);
 
488
gchar** dbus_get_all_ip_interface_by_name (void);
541
489
 
542
490
/**
543
491
 * Encapsulate all the url hook-related configuration
552
500
void dbus_set_hook_settings (GHashTable *);
553
501
 
554
502
 
555
 
gboolean dbus_get_is_recording(const callable_obj_t *);
 
503
gboolean dbus_get_is_recording (const callable_obj_t *);
556
504
 
557
505
GHashTable* dbus_get_call_details (const gchar* callID);
558
506
 
571
519
void sflphone_display_transfer_status (const gchar* message);
572
520
 
573
521
/**
574
 
 * CallManager - Confirm Short Authentication String 
 
522
 * CallManager - Confirm Short Authentication String
575
523
 * for a given callId
576
524
 * @param c The call to confirm SAS
577
525
 */
578
526
void dbus_confirm_sas (const callable_obj_t * c);
579
527
 
580
528
/**
581
 
 * CallManager - Reset Short Authentication String 
 
529
 * CallManager - Reset Short Authentication String
582
530
 * for a given callId
583
531
 * @param c The call to reset SAS
584
532
 */
585
533
void dbus_reset_sas (const callable_obj_t * c);
586
534
 
587
535
/**
588
 
 * CallManager - Request Go Clear in the ZRTP Protocol 
 
536
 * CallManager - Request Go Clear in the ZRTP Protocol
589
537
 * for a given callId
590
538
 * @param c The call that we want to go clear
591
539
 */
600
548
 
601
549
/**
602
550
 * CallManager - Get the list of supported TLS methods from
603
 
 * the server in textual form.  
 
551
 * the server in textual form.
604
552
 * @return an array of string representing supported methods
605
553
 */
606
554
gchar** dbus_get_supported_tls_method();
607
555
 
608
 
gchar** dbus_get_participant_list (const char * confID);
609
 
 
610
 
guint dbus_get_window_width (void);
611
 
guint dbus_get_window_height (void);
612
 
void dbus_set_window_height (const guint height);
613
 
void dbus_set_window_width (const guint width);
614
 
guint dbus_get_window_position_x (void);
615
 
guint dbus_get_window_position_y (void);
616
 
void dbus_set_window_position_x (const guint posx);
617
 
void dbus_set_window_position_y (const guint posy);
618
 
 
619
 
GHashTable* dbus_get_shortcuts(void);
620
 
void dbus_set_shortcuts(GHashTable * shortcuts);
621
 
 
622
 
void dbus_enable_status_icon (const gchar*);
623
 
gchar* dbus_is_status_icon_enabled (void);
 
556
GHashTable* dbus_get_shortcuts (void);
 
557
 
 
558
void dbus_set_shortcuts (GHashTable * shortcuts);
 
559
 
 
560
void dbus_set_audio_ringtone_device (const int index);
 
561
 
 
562
void
 
563
dbus_hang_up_conference (const conference_obj_t * c);
 
564
 
 
565
void
 
566
dbus_hold_conference (const conference_obj_t * c);
 
567
 
 
568
void
 
569
dbus_unhold_conference (const conference_obj_t * c);
 
570
 
 
571
void
 
572
dbus_detach_participant (const gchar* callID);
 
573
 
 
574
void
 
575
dbus_join_participant (const gchar* sel_callID, const gchar* drag_callID);
 
576
 
 
577
void
 
578
dbus_join_conference (const gchar* sel_confID, const gchar* drag_confID);
 
579
 
 
580
void
 
581
dbus_add_main_participant (const gchar* confID);
 
582
 
 
583
/* Instant messaging */
 
584
void dbus_send_text_message (const gchar* callID, const gchar *message);
624
585
 
625
586
#endif