Make TIZEN 2.0
[apps/home/call.git] / call-engine / include / voice-call-core.h
1 /*
2  * Copyright 2012  Samsung Electronics Co., Ltd
3  *
4  * Licensed under the Flora License, Version 1.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.tizenopensource.org/license
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17
18 #ifndef _VOICE_CALL_CORE_H_
19 #define _VOICE_CALL_CORE_H_
20
21 #ifdef __cplusplus
22 extern "C" {
23
24 #endif
25
26 #include "vc-core-util.h"
27 #include "vc-core-engine-types.h"
28 #include "voice-call-sound.h"
29 #include "voice-call-engine.h"
30
31 typedef enum _call_vc_core_flags_t {
32         CALL_VC_CORE_FLAG_NONE = 0x00000000, /**< NONE state */
33         CALL_VC_CORE_FLAG_SOS_CALL_ONLY = 0x00000001, /**< SET - Emergency Calls Only, UNSET - All Calls Allowed */
34         CALL_VC_CORE_FLAG_MSG_SVC_INIT = 0x00000002, /**< SET - Messenger service intialization done, UNSET - otherwise */
35         CALL_VC_CORE_FLAG_FDN_SVC_ENABLED = 0x00000004, /**< SET - FDN enabled, UNSET - otherwise */
36         CALL_VC_CORE_FLAG_VOL_CHNGD_BYBT = 0x00000008, /**< SET - volume change request from BT, UNSET - otherwise */
37         CALL_VC_CORE_FLAG_BT_EVENT_WAITING = 0x00000010, /**< SET - Waiting for Switch Headset/Phone Event fom Bluetooth, UNSET - otherwise */
38         CALL_VC_CORE_FLAG_IT_WAS_LOCKED = 0x00000020, /**< SET - It was locked when voice call app luanched, UNSET - otherwise */
39         CALL_VC_CORE_FLAG_UNLOC_BY_SLIDER = 0x00000040, /**< SET - Voice call unlock by slider, UNSET - otherwise */
40         CALL_VC_CORE_FLAG_EXPT_APPLET_QUIT = 0x00000080, /**< SET - Thread safe applet quit required, UNSET - otherwise */
41         CALL_VC_CORE_FLAG_LANG_CHGD_UPDATE = 0x00000100, /**< SET - UI needs to be updated for language change, UNSET - otherwise */
42         CALL_VC_CORE_FLAG_WAIT_SWITCH_FROM_BT = 0x00000200, /**< SET - Don't change path in path_change API, UNSET - change path according to current status */
43         CALL_VC_CORE_FLAG_SETUPCALL_FAIL = 0x00000400, /**< SET - Setup call fail.(ex. Emergency call only). UNSET - Normal mo call.*/
44         CALL_VC_CORE_FLAG_ACCEPT_BY_BT = 0x00000800, /**< SET - MT call accpeted by BT Headset, UNSET - MT call accept by Phone/ Call ended.*/
45         CALL_VC_CORE_FLAG_QC_SIM_INSERTED = 0x00001000, /**< SET - Inserted SIM is QC Test SIM, UNSET - Inserted SIM is Normal SIM.*/
46         CALL_VC_CORE_FLAG_MOCALL_END_BY_USER = 0x00002000, /**< SET - MO Call Ended by user, UNSET - MO Call not ended by user.*/
47 } call_vc_core_flags_t;
48
49 /**
50  * This enum defines the In Call Supplementary Services State
51  */
52 typedef enum _call_vc_core_incall_ss_state_t {
53         CALL_VC_CORE_SS_NONE, /**< Idle State*/
54         CALL_VC_CORE_SS_0, /**< Releases all held calls or Set UDUB for a waiting call*/
55         CALL_VC_CORE_SS_1, /**< Releases all active calls and accepts the other(held or waiting) calls*/
56         CALL_VC_CORE_SS_1X, /**< Releases a specific active call X*/
57         CALL_VC_CORE_SS_2, /**< Places all active calls (if  any exist) on hold and accepts the other(held or waiting)call*/
58         CALL_VC_CORE_SS_2X, /**< Places all active calls on hold except call X with which communication shall be supported*/
59         CALL_VC_CORE_SS_3, /**< Adds a held call to the conversation*/
60         CALL_VC_CORE_SS_4, /**< ECT */
61         CALL_VC_CORE_SS_USSD /**< USSD */
62 } call_vc_core_incall_ss_state_t;
63
64 /**
65 * This structure defines the details of the DTMF related data handled in document
66 */
67 typedef struct _voicecall_dtmf_info_t {
68         gboolean bdtmf_queue;           /**< TRUE -dtmf queue enabled, FALSE - dtmf quue disabled */
69         int dtmf_index;                         /**< index of the current dtmf digit sent */
70         int dtmf_max_length;            /**< maximum length of the dtmf number being sent */
71         int dtmf_pause_timer;           /**< Timer handle of the DTMF Pause Timer */
72         gboolean bsat_dtmf;                     /**< SAT DTMF Type Engine Flag*/
73         gboolean bsat_hidden;           /**< SAT DTMF Hidden Engine Flag*/
74         gboolean bdtmf_wait;            /**< Wait enabled while sending dtmf string*/
75         char dtmf_number[VC_PHONE_NUMBER_LENGTH_MAX];
76 } voicecall_dtmf_info_t;
77
78 /**
79  * This structure defines voicecall core info
80  */
81 typedef struct _call_vc_core_state_t {
82         voicecall_setup_info_t call_setup_info;         /**< Info of MO Call */
83         voicecall_engine_t *pcall_engine;               /**<  Handle to Voicecall Engine */
84         voicecall_snd_mgr_t *papp_snd;                  /**< Handle to Sound Manager */
85         voicecall_dtmf_info_t dtmf_info;                                /**<  DTMF Info*/
86
87         unsigned int core_status;                                       /**< call core status */
88         gboolean bt_connected;                                  /**< TRUE - Bluetooth connected, FALSE - otherwise */
89         gboolean bdtmf_queue;                                           /**< TRUE -dtmf queue enabled, FALSE - dtmf quue disabled */
90         int auto_redial_count;                        /** Auto Redial count **/
91         unsigned int auto_answer_timer;                         /**< Timer Handle for Auto Answering */
92         unsigned int callstatus_timer;                          /**< Timer Handle for callstatus set. */
93         int selected_call_id_in_ss;                                             /**<Call Id used for SS operations while on Call */
94         int mo_end_cause_type;                                          /**<MO call end cause type */
95         int mo_end_call_handle;                                         /**<MO call end call handle */
96         int mtcall_silent_reject_handle;
97         guint mo_redial_timer;
98         guint minute_minder_timer;
99 } call_vc_core_state_t;
100 \r/**
101  * This struct provides a structure for call incoming info data.
102  */
103 typedef struct _call_vc_core_incoming_info_t {
104         int call_handle;
105         int call_type;
106         int cli_presentation_indicator;
107         char call_num[VC_PHONE_NUMBER_LENGTH_MAX];
108         int calling_name_mode;
109         char calling_name[VC_PHONE_NAME_LENGTH_MAX];
110         char redirected_number[VC_PHONE_NUMBER_LENGTH_MAX];
111         char redirected_sub_address[VC_PHONE_SUBADDRESS_LENGTH_MAX];
112         int cli_cause;
113         int bfwded;
114         int active_line;
115 } call_vc_core_incoming_info_t;
116
117 /**
118  * This function puts the currently active call on hold
119  *
120  * @return              Returns TRUE on success or FALSE on failure
121  * @param[in]           pcall_engine            Handle to voicecall engine
122  */
123 inline gboolean voicecall_core_hold_call(voicecall_engine_t *pcall_engine);
124
125 /**
126  * This function retreives the currently held call
127  *
128  * @return              Returns TRUE on success or FALSE on failure
129  * @param[in]           pcall_engine            Handle to voicecall engine
130  */
131 inline gboolean voicecall_core_retrieve_call(voicecall_engine_t *pcall_engine);
132
133 /**
134  * This function swaps the currently available active and held calls
135  *
136  * @return              Returns TRUE on success or FALSE on failure
137  * @param[in]           pcall_engine            Handle to voicecall engine
138  */
139 inline gboolean voicecall_core_swap_calls(voicecall_engine_t *pcall_engine);
140
141 /**
142  * This function clears the MO Call Details
143  *
144  * @return              Returns TRUE on success or FALSE on failure
145  * @param[in]           pcall_engine            Handle to voicecall engine
146  */
147 inline gboolean voicecall_core_clear_mo_call(voicecall_engine_t *pcall_engine);
148
149 /**
150  * This function clears the Connected Call Details
151  *
152  * @return              Returns TRUE on success or FALSE on failure
153  * @param[in]           pcall_engine            Handle to voicecall engine
154  * @param[in]           call_handle             Handle of the Connected Call to be cleared
155  */
156 inline gboolean voicecall_core_clear_connected_call(voicecall_engine_t *pcall_engine, int call_handle);
157
158 /**
159  * This function changes the voicecall engine's state
160  *
161  * @return              Returns TRUE on success or FALSE on failure
162  * @param[in]           pcall_engine            Handle to voicecall engine
163  * @param[in]           eng_state               Engine State to be changed
164  */
165 inline gboolean voicecall_core_change_engine_state(voicecall_engine_t *pcall_engine, int eng_state);
166
167 /**
168  * This function ends an Outgoing Call
169  *
170  * @return              Returns TRUE on success or FALSE on failure
171  * @param[in]           pcall_engine            Handle to voicecall engine
172  */
173 inline gboolean voicecall_core_end_mo_call(voicecall_engine_t *pcall_engine);
174
175 /**
176  * This function retreives the Voicecall Engine's State
177  *
178  * @return              Returns TRUE on success or FALSE on failure
179  * @param[in]           pcall_engine            Handle to voicecall engine
180  * @param[out]  io_state                        Voicecall Engine InOut State
181  */
182 inline gboolean voicecall_core_get_engine_state(voicecall_engine_t *pcall_engine, int *eng_state);
183
184 /**
185  * This function checks whether any call exists
186  *
187  * @return              Returns TRUE on success or FALSE on failure
188  * @param[in]           pcall_engine            Handle to voicecall engine
189  * @param[out]  active_calls            TRUE - If active call exists or FALSE If active call doesn't exists
190  * @param[out]  held_calls              TRUE - If held call exists or FALSE If held call doesn't exists
191  */
192 inline gboolean voicecall_core_is_call_exists(voicecall_engine_t *pcall_engine, gboolean *active_calls, gboolean *held_calls);
193
194 /**
195  * This function checks whether incoming call exists or not
196  *
197  * @return              Returns TRUE if incoming call exists or FALSE on failure
198  * @param[in]           pcall_engine            Handle to voicecall engine
199  */
200 inline gboolean voicecall_core_is_incoming_call_exists(voicecall_engine_t *pcall_engine);
201
202 /**
203  * This function checks whether outgoing call exists or not
204  *
205  * @return              Returns TRUE if outgoing call exists or FALSE on failure
206  * @param[in]           pcall_engine            Handle to voicecall engine
207  */
208 inline gboolean voicecall_core_is_outgoing_call_exists(voicecall_engine_t *pcall_engine);
209
210 /**
211  * This function checks whether any connexcted call exists or not
212  *
213  * @return              Returns TRUE if connected call exists or FALSE on failure
214  * @param[in]           pcall_engine            Handle to voicecall engine
215  */
216 inline gboolean voicecall_core_is_connected_call_exist(voicecall_engine_t *pcall_engine);
217
218 /**
219  * This function checks whether any connexcted call exists or not in the given group
220  *
221  * @return              Returns TRUE if connected call exists or FALSE on failure
222  * @param[in]           pcall_engine            Handle to voicecall engine
223  * @param[in]           group_index             Group Index to be searhced
224  */
225 inline gboolean voicecall_core_is_connected_call_exist_in_group(voicecall_engine_t *pcall_engine, int group_index);
226
227 /**
228  * This function checks whether any call exists
229  *
230  * @return              Returns TRUE if connected call exists or FALSE on failure
231  * @param[in]           pcall_engine            Handle to voicecall engine
232  */
233 inline gboolean voicecall_core_is_any_call_exists(voicecall_engine_t *pcall_engine);
234
235 /**
236  * This function retreives the totally number of availavle calls including connected, MO and MT Calls
237  *
238  * @return              Returns TRUE if success or FALSE on failure
239  * @param[in]           pcall_engine            Handle to voicecall engine
240  * @param[out]  ptotal_call_member      number of avialble calls
241  */
242 inline gboolean voicecall_core_get_total_call_member(voicecall_engine_t *pcall_engine, int *ptotal_call_member);
243
244 /**
245  * This function checks whether voicecall engine's call agent is idle or not
246  *
247  * @return              Returns TRUE if call agent is idle or FALSE on failure
248  * @param[in]           pcall_engine            Handle to voicecall engine
249  */
250 inline gboolean voicecall_core_is_callagent_idle(voicecall_engine_t *pcall_engine);
251
252 /**
253 * This function checks the current call status and engine status
254 *
255 * @return               TRUE, if connected calls available and engine is in idle, FALSE otherwise
256 * @param[in]            pcall_engine            Handle to voicecall engine
257 */
258 inline gboolean voicecall_core_is_incall_request_possible(voicecall_engine_t *pcall_engine);
259
260 /**
261  * This function changes the modem call audio path
262  *
263  * @return              TRUE sucess, FALSE otherwise
264  * @param[in]           pcall_engine            Handle to voicecall engine
265  * @param[in]           audio_path              audio path to be changed
266  * @param[in]           bextra_volume   extra volume status
267  */
268 inline gboolean voicecall_core_change_audio_path(voicecall_engine_t *pcall_engine, voicecall_audio_path_t audio_path, gboolean bextra_volume);
269
270 /**
271  * This function sets the voice call audio volume for the given audio path type
272  *
273  * @return              returns TRUE in success , FALSE otherwise
274  * @param[in]           pcall_engine            Handle to voicecall engine
275  * @param[in]           tapi_snd_path           audio path for the volume to be set
276  * @param[in]           vol_level                       volume level
277  */
278 inline gboolean voicecall_core_set_audio_volume(voicecall_engine_t *pcall_engine, voicecall_audio_path_t tapi_snd_path, int vol_level);
279
280 /**
281  * This function retreives the voice call audio volume for the given audio path type
282  *
283  * @return              returns TRUE in success , FALSE otherwise
284  * @param[in]           pcall_engine                    Handle to voicecall engine
285  * @param[in]           audio_path_type         audio path for the volume to be retreived
286  */
287 inline gboolean voicecall_core_get_audio_volume(voicecall_engine_t *pcall_engine, voicecall_audio_path_t audio_path_type);
288
289 /**
290  * This function set the voice call audio mute status
291  *
292  * @return              returns TRUE in success , FALSE otherwise
293  * @param[in]           pcall_engine                    Handle to voicecall engine
294  * @param[in]           bvoice_mute                     mute status
295  */
296 inline gboolean voicecall_core_set_audio_mute_status(voicecall_engine_t *pcall_engine, gboolean bvoice_mute);
297
298 /**
299  * This function retreives the first active call among the available active calls
300  *
301  * @return              Returns TRUE if success or FALSE on failure
302  * @param[in]           pcall_engine                    Handle to voicecall engine
303  * @param[out]  pcall_handle            call handle of the active call
304  */
305 inline gboolean voicecall_core_get_zuhause(voicecall_engine_t *pcall_engine, gboolean * bzuhause);
306
307 /**
308  * This function retreives the Voicecall Engine's State
309  *
310  * @return              Returns TRUE on success or FALSE on failure
311  * @param[in]   pcall_engine    Handle to voicecall engine
312  * @param[in]   call_handle     Call handle of the call for which the call object is retrieved
313  * @param[out]  pcall_object    Pointer to the retrived call object info
314  */
315 inline gboolean voicecall_core_get_call_object(voicecall_engine_t *pcall_engine, int call_handle, call_vc_call_objectinfo_t * pcall_object);
316
317 /**
318  * This function sends response to sat engine
319  *
320  * @return              Returns TRUE If transfer call can be made or FALSE if not
321  * @param[in]   pcall_engine    Handle to voicecall engine
322  * @param[in]           sat_rqst_resp_type sat rqst/resp type to be set by the client
323  * @param[in]           sat_response_type sat response type to be sent to sat
324  */
325 inline gboolean voicecall_core_send_sat_response(voicecall_engine_t *pcall_engine, voicecall_engine_sat_rqst_resp_type sat_rqst_resp_type, call_vc_sat_reponse_type_t sat_response_type);
326
327 /**
328  * This function retreives the number of active call members
329  *
330  * @return              Returns TRUE if success or FALSE on failure
331  * @param[in]           pcall_core              Handle to voicecall core
332  * @param[out]  pactive_member_num      number of active call members available
333  */
334 inline gboolean voicecall_core_get_active_call_member(call_vc_core_state_t *pcall_core, int *pactive_member_num);
335
336 /**
337  * This function checks whether possible to make conference call
338  *
339  * @return              Returns TRUE If Conference call can be made or FALSE if not
340  * @param[in]           papp_document   Handle to Application Document
341  */
342 inline gboolean voicecall_core_is_conf_call_possible(call_vc_core_state_t *pcall_core);
343
344 /**
345  * This function checks whether possible to transfer call
346  *
347  * @return              Returns TRUE If transfer call can be made or FALSE if not
348  * @param[in]           pcall_core              Handle to voicecall core
349  */
350 inline gboolean voicecall_core_is_transfer_call_possible(call_vc_core_state_t *pcall_core);
351
352 /**
353  * This function checks whether the given code is a valid Supplementary Services Code
354  *
355  * @return              Returns TRUE on success or FALSE on failure
356  * @param[in]           pcall_core              Handle to voicecall core
357  * @param[in]           pszInput                        Number to be verified
358  */
359 inline gboolean voicecall_core_is_valid_sscode(call_vc_core_state_t *pcall_core, const char *pszInput);
360
361 #ifdef _CPHS_DEFINED_
362 /**
363  * This function gets the cphs status from the engine
364  *
365  * @return              TRUE if queried status is enabled, FALSE otherwise
366  * @param[in]           pcall_core              Handle to voicecall core
367  * @param[in]           csp_service             csp service to be queried
368  */
369 inline gboolean voicecall_core_get_cphs_csp_status(call_vc_core_state_t *pcall_core, voicecall_cphs_csp_service csp_service);
370 #endif
371
372 /**
373  * This function informs the Voicecall Engine that current SS operation has been completed
374  *
375  * @return              Returns TRUE if all the calls are ended or FALSE on failure
376  * @param[in]           pcall_core              Handle to voicecall cor
377  */
378 inline gboolean voicecall_core_set_check_ss_on_end(call_vc_core_state_t *pcall_core);
379
380 /**
381  * This function informs the Voicecall Engine that current SS operation has been completed
382  *
383  * @return              Returns TRUE if all the calls are ended or FALSE on failure
384  * @param[in]           pcall_core              Handle to voicecall core
385  */
386 inline void voicecall_core_extract_phone_number(const char *source_tel_number, char *phone_number, const int buf_size);
387
388 /************************
389 *  inline function END
390 **************************/
391 void voicecall_core_set_status(call_vc_core_state_t *pcall_core, call_vc_core_flags_t core_flags, gboolean bstatus);
392 gboolean voicecall_core_get_status(call_vc_core_state_t *pcall_core, call_vc_core_flags_t core_flags);
393
394 /**
395  * This function starts the supplementary services while on call
396  *
397  * @return              Returns TRUE If transfer call can be made or FALSE if not
398  * @param[in]           pcall_core              Handle to voicecall core
399  * @param[in]           incall_ss_state         state of the In Call Supplementary Service
400  */
401 gboolean voicecall_core_start_incall_ss(call_vc_core_state_t *pcall_core, call_vc_core_incall_ss_state_t incall_ss_state);
402
403 gboolean voicecall_core_set_to_default(call_vc_core_state_t *pcall_core);
404
405 /**
406  * This function initialize voicecall core
407  *
408  * @return              Returns TRUE on success or FALSE on failure
409  * @param[in]           pcall_core              Handle to voicecall core
410  */
411 int voicecall_core_init(call_vc_core_state_t *pcall_core);
412
413 /**
414  * This function prepares a voice call with the given data
415  *
416  * @return              Returns TRUE on success or FALSE on failure
417  * @param[in]           pcall_core              Handle to voicecall core
418  * @param[in]           bemergency              emergency call or not from dialer
419  * @param[in]
420  */
421 gboolean voicecall_core_setup_call(call_vc_core_state_t *pcall_core, gboolean bemergency);
422
423 /**
424  * This function makes the actual voicecall prepared by the #voicecall_core_setup_call
425  *
426  * @return              Returns TRUE on success or FALSE on failure
427  * @param[in]           pcall_core              Handle to voicecall core
428  */
429 gboolean voicecall_core_make_call(call_vc_core_state_t *pcall_core);
430 gboolean voicecall_core_process_sat_setup_call(vcall_engine_sat_setup_call_info_t *sat_setup_call_info);
431
432 /**
433  * This function processed incoming call
434  *
435  * @return              Returns TRUE on success or FALSE on failure
436  * @param[in]           pcall_core              Handle to voicecall core
437  * @param[in]
438 */
439 gboolean voicecall_core_process_incoming_call(call_vc_core_incoming_info_t *incoming_call_info);
440
441 /**
442  * This function answers an incoming call
443  *
444  * @return              Returns TRUE on success or FALSE on failure
445  * @param[in]           pcall_core              Handle to voicecall core
446  * @param[in]
447 */
448 gboolean voicecall_core_answer_call(call_vc_core_state_t *pcall_core, gboolean auto_accept);
449
450 /**
451  * This function answers an incoming call  according to the given type
452  *
453  * @return              Returns TRUE -if answer is sucess, FALSE - otherwise
454  * @param[in]           pcall_core              Handle to voicecall core
455  */
456 gboolean voicecall_core_answer_call_bytype(call_vc_core_state_t *pcall_core, voicecall_answer_type_t answer_type);
457
458 /**
459 * This function rejects an incoming call
460 *
461 * @return               Returns TRUE on success or FALSE on failure
462 * @param[in]            pcall_core              Handle to voicecall core
463 * @param[in]            bUDUB                   TRUE - set UDUB, FALSE - reject call
464 */
465 gboolean voicecall_core_reject_mt(call_vc_core_state_t *pcall_core, gboolean bUDUB);
466
467 /**
468  * This function ends the call by state
469  *
470  * @return              Returns TRUE on success or FALSE on failure
471  * @param[in]           pcall_core              Handle to voicecall core
472  */
473 gboolean voicecall_core_end_call(call_vc_core_state_t *pcall_core);
474
475 /**
476  * This function ends the call corresponding to the given call handle
477  *
478  * @return              Returns TRUE on success or FALSE on failure
479  * @param[in]           pcall_core              Handle to voicecall core
480  * @param[in]           call_handle             handle of the call to be ended
481  */
482 gboolean voicecall_core_end_call_by_handle(call_vc_core_state_t *pcall_core, int call_handle);
483
484 /**
485  * This function ends all available calls
486  *
487  * @return              Returns TRUE on success or FALSE on failure
488  * @param[in]           pcall_core              Handle to voicecall core
489  */
490 gboolean voicecall_core_end_all_calls(call_vc_core_state_t *pcall_core);
491
492 /**
493  * This function ends all available active calls
494  *
495  * @return              Returns TRUE on success or FALSE on failure
496  * @param[in]           pcall_core              Handle to voicecall core
497  */
498 gboolean voicecall_core_end_all_active_calls(call_vc_core_state_t *pcall_core);
499
500 /**
501  * This function ends all available held calls
502  *
503  * @return              Returns TRUE on success or FALSE on failure
504  * @param[in]           pcall_core              Handle to voicecall core
505  */
506 gboolean voicecall_core_end_all_held_calls(call_vc_core_state_t *pcall_core);
507
508 /**
509  * This function cancel outgoing call
510  *
511  * @return              Returns TRUE -if answer is sucess, FALSE - otherwise
512  * @param[in]           pcall_core              Handle to voicecall core
513  */
514 gboolean voicecall_core_cancel_call(call_vc_core_state_t *pcall_core);
515
516 /**
517  * This function process hold/retrive/swap conntected call
518  *
519  * @return              Returns TRUE -if answer is sucess, FALSE - otherwise
520  * @param[in]           pcall_core              Handle to voicecall core
521  */
522 gboolean voicecall_core_process_hold_call(call_vc_core_state_t *pcall_core);
523
524 /**
525  * This function sets up a conference call
526  *
527  * @return              Returns TRUE on success or FALSE on failure
528  * @param[in]           pcall_core              Handle to voicecall core
529  */
530 gboolean voicecall_core_setup_conference(call_vc_core_state_t *pcall_core);
531
532 /**
533  * This function splits the call corressponding to the given call handle and makes a private call
534  *
535  * @return              Returns TRUE on success or FALSE on failure
536  * @param[in]           pcall_core              Handle to voicecall core
537  * @param[in]           call_handle             Call to be splitted from the conference call
538  */
539 gboolean voicecall_core_make_private_call(call_vc_core_state_t *pcall_core, int call_handle);
540
541 /**
542  * This function transfers the call from active call to the held call
543  *
544  * @return              Returns TRUE on success or FALSE on failure
545  * @param[in]           pcall_core              Handle to voicecall core
546  */
547 gboolean voicecall_core_transfer_calls(call_vc_core_state_t *pcall_core);
548
549 /**
550  * This function sends a dtmf string
551  *
552  * @return              Returns TRUE on success or FALSE on failure
553  * @param[in]           pcall_core              Handle to voicecall core
554  * @param[in]           dtmf_string             dtmf string to be sent
555  */
556 gboolean voicecall_core_send_dtmf(call_vc_core_state_t *pcall_core, char *dtmf_string);
557
558 /**
559 * This function stops sound alert in case of reject with msg
560 *
561 * @return               Returns TRUE on success or FALSE on failure
562 * @param[in]            pcall_core              Handle to voicecall core
563 */
564 gboolean voicecall_core_stop_alert(call_vc_core_state_t *pcall_core);
565
566 /**
567 * This function proce bt headset msg.
568 *
569 * @return               Returns TRUE on success or FALSE on failure
570 * @param[in]            pcall_core              Handle to voicecall core
571 * @param[in]            bheadset                        TRUE or FALSE
572 */
573 inline gboolean voicecall_core_prepare_redial(call_vc_core_state_t *pcall_core, int call_handle);
574 gboolean voicecall_core_start_redial(call_vc_core_state_t *pcall_core, int manual_redial);
575 gboolean voicecall_core_stop_redial(call_vc_core_state_t *pcall_core);
576
577 /**
578  * This function parses the in call supplementary services string and returns the in call ss to be used
579  *
580  * @return              Returns in call ss state #vcui_app_incall_ss_state_t
581  * @param[in]           pcall_core              Handle to voicecall core
582  * @param[in]           number                  number to be parsed
583  */
584 call_vc_core_incall_ss_state_t voicecall_core_parse_incall_ss_string(call_vc_core_state_t *pcall_core, char *number);
585
586 /**
587  * This function starts the supplementary services while on call
588  *
589  * @return              Returns TRUE If transfer call can be made or FALSE if not
590  * @param[in]           pcall_core              Handle to voicecall core
591  * @param[in]           incall_ss_state         state of the In Call Supplementary Service
592  */
593 gboolean voicecall_core_start_incall_ss(call_vc_core_state_t *pcall_core, call_vc_core_incall_ss_state_t incall_ss_state);
594
595 /**
596  * This function processed the supplementary services while on call
597  *
598  * @return              Returns TRUE If transfer call can be made or FALSE if not
599  * @param[in]           pcall_core              Handle to voicecall core
600  * @param[in]           pdialled_number         dial number
601 */
602 void voicecall_core_process_incall_ss(call_vc_core_state_t *pcall_core, char *pdialled_number);
603
604 /**
605  *** This function sends the dtmf number
606  ***
607  *** @return              Returns TRUE on success
608  *** @param[in]           puser_data    pointer to user data
609  **/
610 gboolean voicecall_core_send_phone_number_dtmf(gpointer puser_data);
611
612 /**
613  *** This function change sound path
614  ***
615  *** @return              Returns TRUE on success
616  *** @param[in]           sound_path
617  **/
618 gboolean voicecall_core_change_sound_path(call_vc_core_state_t *pcall_core, voicecall_snd_audio_type_t sound_path);
619 gboolean voicecall_core_get_sound_path(call_vc_core_state_t *pcall_core, int *sound_path);
620
621 /**
622  * This function processed the supplementary services while on call
623  *
624  * @return              Returns TRUE If transfer call can be made or FALSE if not
625  * @param[in]           pcall_core              Handle to voicecall core
626  */
627 void voicecall_core_process_dtmf_send_status(call_vc_core_state_t *pcall_core, gboolean bsuccess);
628
629 #ifdef __cplusplus
630 }
631 #endif  /* __cplusplus */
632
633 #endif  /* _VOICE_CALL_CORE_H_ */