42028fdadd2e5524d6b8eb67053bb0016dd21b57
[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         char dtmf_number[VC_PHONE_NUMBER_LENGTH_MAX];
75 } voicecall_dtmf_info_t;
76
77 /**
78  * This structure defines voicecall core info
79  */ 
80 typedef struct _call_vc_core_state_t {
81         voicecall_setup_info_t call_setup_info;         /**< Info of MO Call */
82         voicecall_engine_t *pcall_engine;               /**<  Handle to Voicecall Engine */
83         voicecall_snd_mgr_t *papp_snd;                  /**< Handle to Sound Manager */
84         voicecall_dtmf_info_t dtmf_info;                                /**<  DTMF Info*/
85                 
86         unsigned int core_status;                                       /**< call core status */
87         gboolean bt_connected;                                  /**< TRUE - Bluetooth connected, FALSE - otherwise */
88         gboolean bdtmf_queue;                                           /**< TRUE -dtmf queue enabled, FALSE - dtmf quue disabled */
89         int auto_redial_count;                        /** Auto Redial count **/
90         unsigned int auto_answer_timer;                         /**< Timer Handle for Auto Answering */
91         unsigned int callstatus_timer;                          /**< Timer Handle for callstatus set. */
92         int selected_call_id_in_ss;                                             /**<Call Id used for SS operations while on Call */
93         int mo_end_cause_type;                                          /**<MO call end cause type */
94         int mo_end_call_handle;                                         /**<MO call end call handle */
95         int mtcall_silent_reject_handle;
96         guint mo_redial_timer;
97         guint minute_minder_timer;
98 } call_vc_core_state_t;
99 \r/** 
100  * This struct provides a structure for call incoming info data.
101  */ 
102 typedef struct _call_vc_core_incoming_info_t {
103         int call_handle;
104         int call_type;
105         int cli_presentation_indicator;
106         char call_num[VC_PHONE_NUMBER_LENGTH_MAX];
107         int calling_name_mode;
108         char calling_name[VC_PHONE_NAME_LENGTH_MAX];
109         char redirected_number[VC_PHONE_NUMBER_LENGTH_MAX];
110         char redirected_sub_address[VC_PHONE_SUBADDRESS_LENGTH_MAX];
111         int cli_cause;
112         int bfwded;
113         int active_line;
114 } call_vc_core_incoming_info_t;
115         
116 /**
117  * This function puts the currently active call on hold
118  *
119  * @return              Returns TRUE on success or FALSE on failure
120  * @param[in]           pcall_engine            Handle to voicecall engine
121  */ 
122 inline gboolean voicecall_core_hold_call(voicecall_engine_t *pcall_engine);
123
124 /**
125  * This function retreives the currently held call
126  *
127  * @return              Returns TRUE on success or FALSE on failure
128  * @param[in]           pcall_engine            Handle to voicecall engine
129  */ 
130 inline gboolean voicecall_core_retrieve_call(voicecall_engine_t *pcall_engine);
131
132 /**
133  * This function swaps the currently available active and held calls
134  *
135  * @return              Returns TRUE on success or FALSE on failure
136  * @param[in]           pcall_engine            Handle to voicecall engine
137  */ 
138 inline gboolean voicecall_core_swap_calls(voicecall_engine_t *pcall_engine);
139
140 /**
141  * This function clears the MO Call Details
142  *
143  * @return              Returns TRUE on success or FALSE on failure
144  * @param[in]           pcall_engine            Handle to voicecall engine
145  */ 
146 inline gboolean voicecall_core_clear_mo_call(voicecall_engine_t *pcall_engine);
147
148 /**
149  * This function clears the Connected Call Details
150  *
151  * @return              Returns TRUE on success or FALSE on failure
152  * @param[in]           pcall_engine            Handle to voicecall engine
153  * @param[in]           call_handle             Handle of the Connected Call to be cleared
154  */ 
155 inline gboolean voicecall_core_clear_connected_call(voicecall_engine_t *pcall_engine, int call_handle);
156
157 /**
158  * This function changes the voicecall engine's state
159  *
160  * @return              Returns TRUE on success or FALSE on failure
161  * @param[in]           pcall_engine            Handle to voicecall engine
162  * @param[in]           eng_state               Engine State to be changed
163  */ 
164 inline gboolean voicecall_core_change_engine_state(voicecall_engine_t *pcall_engine, int eng_state);
165
166 /**
167  * This function ends an Outgoing Call
168  *
169  * @return              Returns TRUE on success or FALSE on failure
170  * @param[in]           pcall_engine            Handle to voicecall engine
171  */ 
172 inline gboolean voicecall_core_end_mo_call(voicecall_engine_t *pcall_engine);
173
174 /**
175  * This function retreives the Voicecall Engine's State
176  *
177  * @return              Returns TRUE on success or FALSE on failure
178  * @param[in]           pcall_engine            Handle to voicecall engine
179  * @param[out]  io_state                        Voicecall Engine InOut State
180  */ 
181 inline gboolean voicecall_core_get_engine_state(voicecall_engine_t *pcall_engine, int *eng_state);
182
183 /**
184  * This function checks whether any call exists
185  *
186  * @return              Returns TRUE on success or FALSE on failure
187  * @param[in]           pcall_engine            Handle to voicecall engine
188  * @param[out]  active_calls            TRUE - If active call exists or FALSE If active call doesn't exists
189  * @param[out]  held_calls              TRUE - If held call exists or FALSE If held call doesn't exists
190  */ 
191 inline gboolean voicecall_core_is_call_exists(voicecall_engine_t *pcall_engine, gboolean * active_calls, gboolean * held_calls);
192
193 /**
194  * This function checks whether incoming call exists or not
195  *
196  * @return              Returns TRUE if incoming call exists or FALSE on failure
197  * @param[in]           pcall_engine            Handle to voicecall engine
198  */ 
199 inline gboolean voicecall_core_is_incoming_call_exists(voicecall_engine_t *pcall_engine);
200
201 /**
202  * This function checks whether outgoing call exists or not
203  *
204  * @return              Returns TRUE if outgoing call exists or FALSE on failure
205  * @param[in]           pcall_engine            Handle to voicecall engine
206  */ 
207 inline gboolean voicecall_core_is_outgoing_call_exists(voicecall_engine_t *pcall_engine);
208
209 /**
210  * This function checks whether any connexcted call exists or not
211  *
212  * @return              Returns TRUE if connected call exists or FALSE on failure
213  * @param[in]           pcall_engine            Handle to voicecall engine
214  */ 
215 inline gboolean voicecall_core_is_connected_call_exist(voicecall_engine_t *pcall_engine);
216
217 /**
218  * This function checks whether any connexcted call exists or not in the given group
219  *
220  * @return              Returns TRUE if connected call exists or FALSE on failure
221  * @param[in]           pcall_engine            Handle to voicecall engine
222  * @param[in]           group_index             Group Index to be searhced
223  */ 
224 inline gboolean voicecall_core_is_connected_call_exist_in_group(voicecall_engine_t *pcall_engine, int group_index);
225
226 /**
227  * This function checks whether any call exists
228  *
229  * @return              Returns TRUE if connected call exists or FALSE on failure
230  * @param[in]           pcall_engine            Handle to voicecall engine
231  */ 
232 inline gboolean voicecall_core_is_any_call_exists(voicecall_engine_t *pcall_engine);
233
234 /**
235  * This function retreives the totally number of availavle calls including connected, MO and MT Calls
236  *
237  * @return              Returns TRUE if success or FALSE on failure
238  * @param[in]           pcall_engine            Handle to voicecall engine
239  * @param[out]  ptotal_call_member      number of avialble calls
240  */ 
241 inline gboolean voicecall_core_get_total_call_member(voicecall_engine_t *pcall_engine, int *ptotal_call_member);
242
243 /**
244  * This function checks whether voicecall engine's call agent is idle or not
245  *
246  * @return              Returns TRUE if call agent is idle or FALSE on failure
247  * @param[in]           pcall_engine            Handle to voicecall engine
248  */ 
249 inline gboolean voicecall_core_is_callagent_idle(voicecall_engine_t *pcall_engine);
250
251 /**
252 * This function checks the current call status and engine status
253 *
254 * @return               TRUE, if connected calls available and engine is in idle, FALSE otherwise
255 * @param[in]            pcall_engine            Handle to voicecall engine
256 */ 
257 inline gboolean voicecall_core_is_incall_request_possible(voicecall_engine_t *pcall_engine);
258
259 /**
260  * This function changes the modem call audio path
261  *
262  * @return              TRUE sucess, FALSE otherwise
263  * @param[in]           pcall_engine            Handle to voicecall engine
264  * @param[in]           audio_path              audio path to be changed
265  */ 
266 inline gboolean voicecall_core_change_audio_path(voicecall_engine_t *pcall_engine, voicecall_audio_path_t audio_path);
267
268 /**
269  * This function sets the voice call audio volume for the given audio path type
270  *
271  * @return              returns TRUE in success , FALSE otherwise
272  * @param[in]           pcall_engine            Handle to voicecall engine
273  * @param[in]           tapi_snd_path           audio path for the volume to be set
274  * @param[in]           vol_level                       volume level
275  */ 
276 inline gboolean voicecall_core_set_audio_volume(voicecall_engine_t *pcall_engine, voicecall_audio_path_t tapi_snd_path, int vol_level);
277
278 /**
279  * This function retreives the voice call audio volume for the given audio path type
280  *
281  * @return              returns TRUE in success , FALSE otherwise
282  * @param[in]           pcall_engine                    Handle to voicecall engine
283  * @param[in]           audio_path_type         audio path for the volume to be retreived
284  */ 
285 inline gboolean voicecall_core_get_audio_volume(voicecall_engine_t *pcall_engine, voicecall_audio_path_t audio_path_type);
286
287 /**
288  * This function set the voice call audio mute status
289  *
290  * @return              returns TRUE in success , FALSE otherwise
291  * @param[in]           pcall_engine                    Handle to voicecall engine
292  * @param[in]           bvoice_mute                     mute status
293  */ 
294 inline gboolean voicecall_core_set_audio_mute_status(voicecall_engine_t *pcall_engine, gboolean bvoice_mute);
295
296 /**
297  * This function retreives the first active call among the available active calls
298  *
299  * @return              Returns TRUE if success or FALSE on failure
300  * @param[in]           pcall_engine                    Handle to voicecall engine
301  * @param[out]  pcall_handle            call handle of the active call
302  */ 
303 inline gboolean voicecall_core_get_zuhause(voicecall_engine_t *pcall_engine, gboolean * bzuhause);
304
305 /**
306  * This function retreives the Voicecall Engine's State
307  *
308  * @return              Returns TRUE on success or FALSE on failure
309  * @param[in]   pcall_engine    Handle to voicecall engine
310  * @param[in]   call_handle     Call handle of the call for which the call object is retrieved
311  * @param[out]  pcall_object    Pointer to the retrived call object info
312  */ 
313 inline gboolean voicecall_core_get_call_object(voicecall_engine_t *pcall_engine, int call_handle, call_vc_call_objectinfo_t * pcall_object);
314
315 /**
316  * This function sends response to sat engine
317  *
318  * @return              Returns TRUE If transfer call can be made or FALSE if not
319  * @param[in]   pcall_engine    Handle to voicecall engine
320  * @param[in]           sat_rqst_resp_type sat rqst/resp type to be set by the client
321  * @param[in]           sat_response_type sat response type to be sent to sat
322  */ 
323 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);
324
325 /**
326  * This function retreives the number of active call members
327  *
328  * @return              Returns TRUE if success or FALSE on failure
329  * @param[in]           pcall_core              Handle to voicecall core
330  * @param[out]  pactive_member_num      number of active call members available
331  */ 
332 inline gboolean voicecall_core_get_active_call_member(call_vc_core_state_t *pcall_core, int *pactive_member_num);
333
334 /**
335  * This function checks whether possible to make conference call
336  *
337  * @return              Returns TRUE If Conference call can be made or FALSE if not
338  * @param[in]           papp_document   Handle to Application Document
339  */ 
340 inline gboolean voicecall_core_is_conf_call_possible(call_vc_core_state_t *pcall_core);
341
342 /**
343  * This function checks whether possible to transfer call
344  *
345  * @return              Returns TRUE If transfer call can be made or FALSE if not
346  * @param[in]           pcall_core              Handle to voicecall core
347  */ 
348 inline gboolean voicecall_core_is_transfer_call_possible(call_vc_core_state_t *pcall_core);
349
350 /**
351  * This function checks whether the given code is a valid Supplementary Services Code
352  *
353  * @return              Returns TRUE on success or FALSE on failure
354  * @param[in]           pcall_core              Handle to voicecall core
355  * @param[in]           pszInput                        Number to be verified
356  */ 
357 inline gboolean voicecall_core_is_valid_sscode(call_vc_core_state_t *pcall_core, const char *pszInput);
358
359 #ifdef _CPHS_DEFINED_
360 /**
361  * This function gets the cphs status from the engine
362  *
363  * @return              TRUE if queried status is enabled, FALSE otherwise
364  * @param[in]           pcall_core              Handle to voicecall core
365  * @param[in]           csp_service             csp service to be queried
366  */ 
367 inline gboolean voicecall_core_get_cphs_csp_status(call_vc_core_state_t *pcall_core, voicecall_cphs_csp_service csp_service);
368 #endif
369
370 /**
371  * This function informs the Voicecall Engine that current SS operation has been completed
372  *
373  * @return              Returns TRUE if all the calls are ended or FALSE on failure
374  * @param[in]           pcall_core              Handle to voicecall cor
375  */ 
376 inline gboolean voicecall_core_set_check_ss_on_end(call_vc_core_state_t *pcall_core);
377
378 /**
379  * This function informs the Voicecall Engine that current SS operation has been completed
380  *
381  * @return              Returns TRUE if all the calls are ended or FALSE on failure
382  * @param[in]           pcall_core              Handle to voicecall core
383  */ 
384 inline void voicecall_core_extract_phone_number(const char *source_tel_number, char *phone_number, const int buf_size);
385
386 /************************
387 *  inline function END
388 **************************/ 
389 void voicecall_core_set_status(call_vc_core_state_t *pcall_core, call_vc_core_flags_t core_flags, gboolean bstatus);
390 gboolean voicecall_core_get_status(call_vc_core_state_t *pcall_core, call_vc_core_flags_t core_flags);
391
392 /**
393  * This function starts the supplementary services while on call
394  *
395  * @return              Returns TRUE If transfer call can be made or FALSE if not
396  * @param[in]           pcall_core              Handle to voicecall core
397  * @param[in]           incall_ss_state         state of the In Call Supplementary Service
398  */ 
399 gboolean voicecall_core_start_incall_ss(call_vc_core_state_t *pcall_core, call_vc_core_incall_ss_state_t incall_ss_state);
400
401 #ifdef VC_ENG_FDN_SUPPORT 
402 gboolean voicecall_core_check_fdn_status(call_vc_core_state_t *pcall_core);
403 #endif
404 gboolean voicecall_core_set_to_default(call_vc_core_state_t *pcall_core);
405
406 /**
407  * This function initialize voicecall core
408  *
409  * @return              Returns TRUE on success or FALSE on failure
410  * @param[in]           pcall_core              Handle to voicecall core
411  */
412 int voicecall_core_init(call_vc_core_state_t *pcall_core);
413
414 /**
415  * This function prepares a voice call with the given data
416  *
417  * @return              Returns TRUE on success or FALSE on failure
418  * @param[in]           pcall_core              Handle to voicecall core
419  * @param[in]           bemergency              emergency call or not from dialer
420  * @param[in]           
421  */ 
422 gboolean voicecall_core_setup_call(call_vc_core_state_t *pcall_core, gboolean bemergency);
423
424 /**
425  * This function makes the actual voicecall prepared by the #voicecall_core_setup_call
426  *
427  * @return              Returns TRUE on success or FALSE on failure
428  * @param[in]           pcall_core              Handle to voicecall core
429  */ 
430 gboolean voicecall_core_make_call(call_vc_core_state_t *pcall_core);
431 gboolean voicecall_core_process_sat_setup_call(vcall_engine_sat_setup_call_info_t *sat_setup_call_info);
432
433 /**
434  * This function processed incoming call
435  *
436  * @return              Returns TRUE on success or FALSE on failure
437  * @param[in]           pcall_core              Handle to voicecall core
438  * @param[in]           
439 */ 
440 gboolean voicecall_core_process_incoming_call(call_vc_core_incoming_info_t *incoming_call_info);
441
442 /**
443  * This function answers an incoming call
444  *
445  * @return              Returns TRUE on success or FALSE on failure
446  * @param[in]           pcall_core              Handle to voicecall core
447  * @param[in]           
448 */ 
449 gboolean voicecall_core_answer_call(call_vc_core_state_t *pcall_core, gboolean auto_accept);
450
451 /**
452  * This function answers an incoming call  according to the given type
453  *
454  * @return              Returns TRUE -if answer is sucess, FALSE - otherwise
455  * @param[in]           pcall_core              Handle to voicecall core
456  */ 
457 gboolean voicecall_core_answer_call_bytype(call_vc_core_state_t *pcall_core, voicecall_answer_type_t answer_type);
458
459 /**
460 * This function rejects an incoming call
461 *
462 * @return               Returns TRUE on success or FALSE on failure
463 * @param[in]            pcall_core              Handle to voicecall core
464 * @param[in]            bUDUB                   TRUE - set UDUB, FALSE - reject call
465 */ 
466 gboolean voicecall_core_reject_mt(call_vc_core_state_t *pcall_core, gboolean bUDUB);
467
468 /**
469  * This function ends the call by state
470  *
471  * @return              Returns TRUE on success or FALSE on failure
472  * @param[in]           pcall_core              Handle to voicecall core
473  */ 
474 gboolean voicecall_core_end_call(call_vc_core_state_t *pcall_core);
475
476 /**
477  * This function ends the call corresponding to the given call handle
478  *
479  * @return              Returns TRUE on success or FALSE on failure
480  * @param[in]           pcall_core              Handle to voicecall core
481  * @param[in]           call_handle             handle of the call to be ended
482  */ 
483 gboolean voicecall_core_end_call_by_handle(call_vc_core_state_t *pcall_core, int call_handle);
484
485 /**
486  * This function ends all available calls
487  *
488  * @return              Returns TRUE on success or FALSE on failure
489  * @param[in]           pcall_core              Handle to voicecall core
490  */ 
491 gboolean voicecall_core_end_all_calls(call_vc_core_state_t *pcall_core);
492
493 /**
494  * This function ends all available active calls
495  *
496  * @return              Returns TRUE on success or FALSE on failure
497  * @param[in]           pcall_core              Handle to voicecall core
498  */ 
499 gboolean voicecall_core_end_all_active_calls(call_vc_core_state_t *pcall_core);
500
501 /**
502  * This function ends all available held calls
503  *
504  * @return              Returns TRUE on success or FALSE on failure
505  * @param[in]           pcall_core              Handle to voicecall core
506  */ 
507 gboolean voicecall_core_end_all_held_calls(call_vc_core_state_t *pcall_core);
508
509 /**
510  * This function cancel outgoing call
511  *
512  * @return              Returns TRUE -if answer is sucess, FALSE - otherwise
513  * @param[in]           pcall_core              Handle to voicecall core                
514  */ 
515 gboolean voicecall_core_cancel_call(call_vc_core_state_t *pcall_core);
516
517 /**
518  * This function process hold/retrive/swap conntected call
519  *
520  * @return              Returns TRUE -if answer is sucess, FALSE - otherwise
521  * @param[in]           pcall_core              Handle to voicecall core                
522  */ 
523 gboolean voicecall_core_process_hold_call(call_vc_core_state_t *pcall_core);
524
525 /**
526  * This function sets up a conference call
527  *
528  * @return              Returns TRUE on success or FALSE on failure
529  * @param[in]           pcall_core              Handle to voicecall core                
530  */ 
531 gboolean voicecall_core_setup_conference(call_vc_core_state_t *pcall_core);
532
533 /**
534  * This function splits the call corressponding to the given call handle and makes a private call
535  *
536  * @return              Returns TRUE on success or FALSE on failure
537  * @param[in]           pcall_core              Handle to voicecall core                
538  * @param[in]           call_handle             Call to be splitted from the conference call
539  */ 
540 gboolean voicecall_core_make_private_call(call_vc_core_state_t *pcall_core, int call_handle);
541
542 /**
543  * This function transfers the call from active call to the held call
544  *
545  * @return              Returns TRUE on success or FALSE on failure
546  * @param[in]           pcall_core              Handle to voicecall core                
547  */ 
548 gboolean voicecall_core_transfer_calls(call_vc_core_state_t *pcall_core);
549
550 /**
551  * This function sends a dtmf string
552  *
553  * @return              Returns TRUE on success or FALSE on failure
554  * @param[in]           pcall_core              Handle to voicecall core                
555  * @param[in]           dtmf_string             dtmf string to be sent
556  */ 
557 gboolean voicecall_core_send_dtmf(call_vc_core_state_t *pcall_core, char *dtmf_string);
558
559 /**
560 * This function stops sound alert
561 *
562 * @return               Returns TRUE on success or FALSE on failure
563 * @param[in]            pcall_core              Handle to voicecall core
564 */ 
565 gboolean voicecall_core_stop_alert(call_vc_core_state_t *pcall_core);
566
567 /**
568 * This function proce bt headset msg.
569 *
570 * @return               Returns TRUE on success or FALSE on failure
571 * @param[in]            pcall_core              Handle to voicecall core
572 * @param[in]            bheadset                        TRUE or FALSE
573 */ 
574 inline gboolean voicecall_core_prepare_redial(call_vc_core_state_t *pcall_core, int call_handle);
575 gboolean voicecall_core_start_redial(call_vc_core_state_t *pcall_core, int manual_redial);
576 gboolean voicecall_core_stop_redial(call_vc_core_state_t *pcall_core);
577
578 /**
579  * This function parses the in call supplementary services string and returns the in call ss to be used
580  *
581  * @return              Returns in call ss state #vcui_app_incall_ss_state_t
582  * @param[in]           pcall_core              Handle to voicecall core
583  * @param[in]           number                  number to be parsed
584  */ 
585 call_vc_core_incall_ss_state_t voicecall_core_parse_incall_ss_string(call_vc_core_state_t *pcall_core, char *number);
586
587 /**
588  * This function starts the supplementary services while on call
589  *
590  * @return              Returns TRUE If transfer call can be made or FALSE if not
591  * @param[in]           pcall_core              Handle to voicecall core
592  * @param[in]           incall_ss_state         state of the In Call Supplementary Service
593  */ 
594 gboolean voicecall_core_start_incall_ss(call_vc_core_state_t *pcall_core, call_vc_core_incall_ss_state_t incall_ss_state);
595
596 /**
597  * This function processed the supplementary services while on call
598  *
599  * @return              Returns TRUE If transfer call can be made or FALSE if not
600  * @param[in]           pcall_core              Handle to voicecall core
601  * @param[in]           pdialled_number         dial number
602 */ 
603 void voicecall_core_process_incall_ss(call_vc_core_state_t *pcall_core, char *pdialled_number);
604
605 #ifdef  PDIAL_SEND_DTMF
606 /**
607  *** This function sends the dtmf number
608  ***
609  *** @return              Returns TRUE on success
610  *** @param[in]           puser_data    pointer to user data
611  **/ 
612 gboolean voicecall_core_send_phone_number_dtmf(gpointer puser_data);
613 #endif
614
615 /**
616  *** This function change sound path
617  ***
618  *** @return              Returns TRUE on success
619  *** @param[in]           sound_path
620  **/ 
621 gboolean voicecall_core_change_sound_path(call_vc_core_state_t *pcall_core, voicecall_snd_audio_type_t sound_path);
622 gboolean voicecall_core_get_sound_path(call_vc_core_state_t *pcall_core, int *sound_path);
623
624 #ifdef __cplusplus
625
626 #endif  /* __cplusplus */
627
628 #endif  /* _VOICE_CALL_CORE_H_ */