fc01c5c5a46bb234765398d5f64c59e0966cda7b
[apps/home/call.git] / call-engine / core / include / vc-core-callmanager.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 __VC_CORE_CALL_MANAGER_H_
19 #define __VC_CORE_CALL_MANAGER_H_
20
21 #include "vc-core-util.h"
22 #include "vc-core-engine-types.h"
23
24 #ifdef CALLDETAILS_DUMP
25 #define CALL_VC_DUMP_CALLDETAILS(call_manager) _vc_core_cm_test_dump(call_manager)
26 #else
27 #define CALL_VC_DUMP_CALLDETAILS(call_manager)
28 #endif
29
30 /*
31 * This enumeration defines the Call Group
32 */
33 typedef enum __call_vc_group_t {
34         CALL_VC_CALL_GROUP_0,
35         CALL_VC_CALL_GROUP_1,
36         CALL_VC_CALL_GROUP_MAX
37 } call_vc_group_t;
38
39 /**
40 * This enumeration has types of sat call control
41 */
42 typedef enum {
43         CALL_VC_SAT_CC_NONE,                                    /**< No SAT call control */
44         CALL_VC_SAT_CC_ALLOWED,                         /**< SAT call control Allowed */
45         CALL_VC_SAT_CC_NOT_ALLOWED,                     /**< SAT call control Not Allowed */
46         CALL_VC_SAT_CC_ALLOWED_WITH_MODIFIED    /**< SAT call control allowed with modification */
47 } call_vc_callcontrol_type_t;
48
49 /**
50  * This structure is used to handle the call group information
51  */
52 typedef struct {
53         int num;                                                                                        /**< The number of members in the group */
54         int callobject_index[VC_MAX_CALL_GROUP_MEMBER];         /**< Index to the call object for each member */
55         call_vc_groupstate_t state;                                                     /**< State of the group */
56 } call_vc_groupinfo_t;
57
58 /**
59  * This structure is used to handle SAT setup information
60  */
61 typedef struct {
62         TelSatSetupCallIndCallData_t satengine_setupcall_data;  /**< Sat call setup proactive command*/
63         TelSatCallCtrlIndData_t satengine_callctrl_data;        /**< Sat call control confirm data*/
64         TelSatSendDtmfIndDtmfData_t satengine_dtmf_data;        /**< Sat send dtmf data*/
65         int satengine_event_type;                                                               /**< Event type of Sat engine */
66         gboolean redial;                                                                                                /**< Redial yes? or No? */
67         TelCallCause_t tapi_cause;                                                              /**< Tapi Success / Error Cause */
68         call_vc_handle call_handle;                                                             /**< Tapi call handle */
69         gboolean bduration;                                                                                             /**< Duration */
70         unsigned long remaining_duration;                                                       /**< Remaining duration */
71         /*guchar        sat_rgb_data[64*64];*/
72         guchar *psat_rgb_data;
73 } call_vc_satsetup_info_t;
74
75 /**
76  * This structure is used to handle call setup information
77  */
78 typedef struct {
79         int mocall_index;                                                                                               /**< Index for originated call */
80         gboolean no_service_state;                                                                                              /**< No service? */
81         call_vc_callcontrol_type_t call_control_type;                                                   /**< SAT call control type */
82         char modified_number[VC_PHONE_NUMBER_LENGTH_MAX];                                     /**< Phone number */
83         voicecall_call_orig_type_t call_type;                                                                           /**< Type of the voice call */
84
85         call_vc_satsetup_info_t satcall_setup_info;                                                     /**<applies when call_type is VC_CALL_ORIG_TYPE_SAT */
86 } call_vc_setupcall_info_t;
87
88 /**
89  *  This structure holds the status of call members
90  */
91 typedef struct {
92         call_vc_call_objectinfo_t callobject_info[VC_MAX_CALL_MEMBER];           /**< CallObject having details of Single Call */
93         call_vc_groupinfo_t callgroup_info[CALL_VC_CALL_GROUP_MAX];                      /**< Maintains the Call Group Details */
94         call_vc_setupcall_info_t setupcall_info;                                                                 /**< MO Call Details */
95         int mtcall_index;                                                                                                /**< Index for the MT Call Object */
96 } call_vc_manager_t;
97
98 /**
99  * This function initializes the call manager
100  *
101  * @return              void
102  * @param[out]  pMng            Pointer to the call manager structure
103  */
104 void _vc_core_call_manager_init(call_vc_manager_t *pMng);
105
106 /**
107  * This function adds the given call object info to a free slot.
108  *
109  * @return              This function returns the call object index on success and -1 on failure
110  * @param[in]           pMng            Pointer to the call manager structure
111  * @param[in]           pcall_object    Pointer to the call object info structure that need to be added
112  * @see                 _vc_core_cm_set_call_object, _vc_core_cm_remove_call_object
113  */
114 int _vc_core_cm_add_call_object(call_vc_manager_t *pMng, call_vc_call_objectinfo_t *pcall_object);
115
116 /**
117  * This function sets the given call object info to the given slot
118  *
119  * @return              This function returns the call object index on success and -1 on failure
120  * @param[in]           pMng            Pointer to the call manager structure
121  * @param[in]           pcall_object    Pointer to the call object info structure that need to be modified
122  * @see                 _vc_core_cm_add_call_object, _vc_core_cm_remove_call_object, _vc_core_cm_get_call_object
123  */
124 int _vc_core_cm_set_call_object(call_vc_manager_t *pMng, call_vc_call_objectinfo_t *pcall_object);
125
126 /**
127  * This function removes the specified call object info of a given call handle
128  *
129  * @return              This function returns TRUE on success and FALSE on failure
130  * @param[in]           pMng            Pointer to the call manager structure
131  * @param[in]           call_handle     Handle of the call object to be removed
132  * @see                 _vc_core_cm_add_call_object, _vc_core_cm_set_call_object
133  */
134 gboolean _vc_core_cm_remove_call_object(call_vc_manager_t *pMng, call_vc_handle call_handle);
135
136 /**
137  * This function retrieves the given call object info
138  *
139  * @return              This function returns TRUE on success and FALSE on failure
140  * @param[in]           pMng            Pointer to the call manager structure
141  * @param[in]           call_handle     Call handle of the object info to be retrieved
142  * @param[out]  pcall_object    Pointer to the call object info structure that should be retrieved
143  * @see                 _vc_core_cm_add_call_object, _vc_core_cm_remove_call_object, _vc_core_cm_set_call_object
144  */
145 gboolean _vc_core_cm_get_call_object(call_vc_manager_t *pMng, call_vc_handle call_handle, call_vc_call_objectinfo_t *pcall_object);
146
147 /**
148  * This function retrieves the given call object info for the given index
149  *
150  * @return              This function returns TRUE on success and FALSE on failure
151  * @param[in]           pMng            Pointer to the call manager structure
152  * @param[in]           index           index of the object info to be retrieved
153  * @param[out]  pcall_object    Pointer to the call object info structure that should be retrieved
154  * @see                 _vc_core_cm_add_call_object, _vc_core_cm_remove_call_object, _vc_core_cm_set_call_object
155  */
156 gboolean _vc_core_cm_get_call_object_byindex(call_vc_manager_t *pMng, int index, call_vc_call_objectinfo_t *pcall_object);
157
158 /**
159  * This function retrieves the call state of a given call handle
160  *
161  * @return              This function returns the call state
162  * @param[in]           pMng            Pointer to the call manager structure
163  * @param[in]           call_handle     Call handle for which the state has to be retrieved
164  */
165 voicecall_call_state_t _vc_core_cm_get_call_state(call_vc_manager_t *pMng, call_vc_handle call_handle);
166
167 /**
168  * This function returns the number of calls in a given call state
169  *
170  * @return              This function returns the number of calls in the given state
171  * @param[in]           pMng            Pointer to the call manager structure
172  * @param[in]           state           The call state the number of which has to be retrieved
173  */
174 int _vc_core_cm_get_call_state_num(call_vc_manager_t *pMng, voicecall_call_state_t state);
175
176 /**
177  * This function clears the information of a given call state
178  *
179  * @return              void
180  * @param[in]   pcall_object    Pointer to the call object which has to be cleared
181  */
182 void _vc_core_cm_clear_call_object(call_vc_call_objectinfo_t *pcall_object);
183
184 /**
185 * This function clears the information of the callobject available in the given index
186 *
187 * @return               TRUE, if the object cleared, otherwise FALSE
188 * @param[in]    pMng            Pointer to the call manager structure
189 * @param[in]    index           Index of the call object to be cleared
190 */
191 gboolean _vc_core_cm_clear_call_object_byindex(call_vc_manager_t *pMng, int index);
192
193 /**
194  * This function clears the call object information of the ended and finished calls
195  *
196  * @return              This function returns TRUE on success and FALSE on failure
197  * @param[in]           pMng            Pointer to the call manager structure
198  */
199 gboolean _vc_core_cm_clear_endcall_member(call_vc_manager_t *pMng);
200
201 /**
202  * This function adds a call member to a group
203  *
204  * @return              This function returns TRUE on success and FALSE on failure
205  * @param[in]           pMng            Pointer to the call manager structure
206  * @param[in]           callobject_index        The object index of the call object to be added
207  * @see                 __vc_core_cm_remove_call_member_fromgroup
208  */
209 gboolean _vc_core_cm_add_call_member_togroup(call_vc_manager_t *pMng, int callobject_index);
210
211 /**
212  * This function retreives the group state for the given group index
213  *
214  * @return              This function returns the group state
215  * @param[in]           pMng            Pointer to the call manager structure
216  * @param[in]           nGroup          group index
217  */
218 call_vc_groupstate_t _vc_core_cm_get_group_state(call_vc_manager_t *pMng, int nGroup);
219
220 /**
221  * This function sets the state of a given group
222  *
223  * @return              void
224  * @param[in]           pMng            Pointer to the call manager structure
225  * @param[in]           nGroup          The call group for which the state needs to be changed
226  * @param[in]           state           The state to be set
227  * @see                 _vc_core_cm_swap_group_state, _vc_core_cm_get_call_pos_ingroup
228  */
229 void _vc_core_cm_set_group_state(call_vc_manager_t *pMng, int nGroup, call_vc_groupstate_t state);
230
231 /**
232  * This function retrieves the index of the group given the call handle
233  *
234  * @return              Returns group index on success and -1 on failure
235  * @param[in]           pMng            Pointer to the call manager structure
236  * @param[in]           call_handle     The for which the group index has to be retrieved
237  * @see                 _vc_core_cm_set_group_state, _vc_core_cm_get_call_pos_ingroup
238  */
239 int _vc_core_cm_get_group_index(call_vc_manager_t *pMng, call_vc_handle call_handle);
240
241 /**
242  * This function retrieves the index/position of the call info in the object info table for a given call handle
243  *
244  * @return              Returns index on success and -1 on failure
245  * @param[in]           pMng            Pointer to the call manager structure
246  * @param[in]           nGroup          Group ID
247  * @param[in]           call_handle     The call handle for which the call index has to be retrieved
248  * @see                 _vc_core_cm_get_group_index
249  */
250 int _vc_core_cm_get_call_pos_ingroup(call_vc_manager_t *pMng, int nGroup, call_vc_handle call_handle);
251
252 /**
253  * This function swaps the state of the groups
254  *
255  * @return              Returns TRUE on success and FALSE on failure
256  * @param[in]           pMng            Pointer to the call manager structure
257  * @see                 _vc_core_cm_set_group_state
258  */
259 gboolean _vc_core_cm_swap_group_state(call_vc_manager_t *pMng);
260
261 /**
262  * This function joins the groups
263  *
264  * @return              Returns TRUE on success and FALSE on failure
265  * @param[in]           pMng            Pointer to the call manager structure
266  * @see                 _vc_core_cm_split_group
267  */
268 gboolean _vc_core_cm_join_group(call_vc_manager_t *pMng);
269
270 /**
271  * This function splits the group given a call handle
272  *
273  * @return              Returns TRUE on success and FALSE on failure
274  * @param[in]           pMng            Pointer to the call manager structure
275  * @param[in]           call_handle     Call handle
276  * @see                 _vc_core_cm_join_group
277  */
278 gboolean _vc_core_cm_split_group(call_vc_manager_t *pMng, call_vc_handle call_handle);
279
280 /**
281  * This function retrieves the total number of members in all the groups
282  *
283  * @return              Returns the total number of members
284  * @param[in]           pMng            Pointer to the call manager structure
285  */
286 int _vc_core_cm_get_total_members_ingroup(call_vc_manager_t *pMng);
287
288 /**
289  * This function retrieves the total number of groups
290  *
291  * @return              Returns the total number of groups
292  * @param[in]           pMng            Pointer to the call manager structure
293  */
294 int _vc_core_cm_get_group_count(call_vc_manager_t *pMng);
295
296 /**
297  * This function clears the outgoing call information
298  *
299  * @return              Returns TRUE on success and FALSE on failure
300  * @param[in]           pMng            Pointer to the call manager structure
301  * @see                 _vc_core_cm_set_outgoing_call
302  */
303 gboolean _vc_core_cm_clear_outgoing_call(call_vc_manager_t *pMng);
304
305 /**
306  * This function sets the out going call index
307  *
308  * @return              Returns TRUE on success and FALSE on failure
309  * @param[in]           pMng            Pointer to the call manager structure
310  * @param[in]           callIndex               Call index that needs to be set
311  * @see                 _vc_core_cm_clear_outgoing_call
312  */
313 gboolean _vc_core_cm_set_outgoing_call(call_vc_manager_t *pMng, int callIndex);
314
315 /**
316  * This function retrieves the outgoing call handle
317  *
318  * @return              Returns out going call handle on success and TAPI_INVALID_CALLHANDLE on failure
319  * @param[in]           pMng            Pointer to the call manager structure
320  */
321 call_vc_handle _vc_core_cm_get_outgoing_call_handle(call_vc_manager_t *pMng);
322
323 /**
324  * This function retrieves the outgoing call information
325  *
326  * @return              Returns TRUE on success and FALSE on failure
327  * @param[in]           pMng            Pointer to the call manager structure
328  * @param[out]  pcall_object    Pointer to the call object info structure
329  * @see                 _vc_core_cm_set_outgoing_call_info
330  */
331 gboolean _vc_core_cm_get_outgoing_call_info(call_vc_manager_t *pMng, call_vc_call_objectinfo_t *pcall_object);
332
333 /**
334  * This function sets the given outgoing call information
335  *
336  * @return              Returns TRUE on success and FALSE on failure
337  * @param[in]           pMng            Pointer to the call manager structure
338  * @param[in]           pcall_object    Pointer to the call object info structure
339  * @see                 _vc_core_cm_get_outgoing_call_info
340  */
341 gboolean _vc_core_cm_set_outgoing_call_info(call_vc_manager_t *pMng, call_vc_call_objectinfo_t *pcall_object);
342
343 /**
344  * This function sets the incoming call index
345  *
346  * @return              Returns TRUE on success and FALSE on failure
347  * @param[in]           pMng            Pointer to the call manager structure
348  * @param[in]           callIndex               Call index of the incoming call
349  */
350 gboolean _vc_core_cm_set_incoming_call(call_vc_manager_t *pMng, int callIndex);
351
352 /**
353  * This function retrieves the call handle of the incoming call
354  *
355  * @return              Returns the call handle if success, TAPI_INVALID_CALLHANDLE on failure
356  * @param[in]           pMng            Pointer to the call manager structure
357  * @see                 _vc_core_cm_get_incoming_call_info
358  */
359 call_vc_handle _vc_core_cm_get_incoming_call_handle(call_vc_manager_t *pMng);
360
361 /**
362  * This function retrieves the call information of the incoming call
363  *
364  * @return              Returns TRUE on success and FALSE on failure
365  * @param[in]           pMng            Pointer to the call manager structure
366  * @param[out]  pcall_object    Pointer to the call object info structure
367  * @see                 _vc_core_cm_get_incoming_call_info, call_vc_cm_set_incomingcall_info
368  */
369 gboolean _vc_core_cm_get_incoming_call_info(call_vc_manager_t *pMng, call_vc_call_objectinfo_t *pcall_object);
370
371 /**
372  * This function checks if incoming call exists
373  *
374  * @return              Returns TRUE if call exist FALSE otherwise
375  * @param[in]           pMng            Pointer to the call manager structure
376  * @see                 call_vc_cm_outgoing_call_exist, _vc_core_cm_isexists_connected_call
377  */
378 gboolean _vc_core_cm_isexists_incoming_call(call_vc_manager_t *pMng);
379
380 /**
381  * This function checks if active/ held exists
382  *
383  * @return              Returns TRUE if success else FALSE
384  * @param[in]           pMng            Pointer to the call manager structure
385  * @param[out]  active_calls    TRUE if active call exists, FALSE if held call exists
386  * @param[out]  held_calls      TRUE if held call exists, FALSE if held call exists
387  * @see                 call_vc_cm_outgoing_call_exist, _vc_core_cm_isexists_connected_call
388  */
389 gboolean _vc_core_cm_isexists_call_ingroup(call_vc_manager_t *pMng, int *active_calls, int *held_calls);
390
391 /**
392  * This function changes the call state of the call object corresponds to the given call handle
393  *
394  * @return              Returns TRUE if success else FALSE
395  * @param[in]           pMng            Pointer to the call manager structure
396  * @param[out]  call_handle     Call Handle of the Callobject to be modified
397  * @param[out]  callState               New call state to be set
398  */
399 gboolean _vc_core_cm_change_call_object_state(call_vc_manager_t *pMng, call_vc_handle call_handle, voicecall_call_state_t callState);
400
401 /**
402  * This function returns the status of currently being ended call
403  *
404  * @return              Returns TRUE if any calls are being ended, FALSE otherwise
405  * @param[in]           pMng            Pointer to the call manager structure
406  */
407 gboolean _vc_core_cm_get_ending_call_info(call_vc_manager_t *pMng);
408
409 /**
410  * This function retrieves the number of members in a group
411  *
412  * @return              Returns number of members in the group
413  * @param[in]           pMng            Pointer to the call manager structure
414  * @param[in]           nGroup          Group index
415  */
416 int _vc_core_cm_get_member_count_ingroup(call_vc_manager_t *pMng, int nGroup);
417
418 /**
419  * This function retrieves the number of connected members in a group
420  *
421  * @return              Returns number of connected members in the group
422  * @param[in]           pMng            Pointer to the call manager structure
423  * @param[in]           nGroup          Group index
424  */
425 int _vc_core_cm_get_connected_member_count_ingroup(call_vc_manager_t *pMng, int nGroup);
426
427 /**
428  * This function retrieves the call object info of a given group and object position
429  *
430  * @return              Returns TRUE on success and FALSE on failure
431  * @param[in]           pMng            Pointer to the call manager structure
432  * @param[in]           nGroup          Group index
433  * @param[in]           nPos                    Call object index
434  * @param[out]  pcall_object    Pointer to the call object info structure
435  */
436 gboolean _vc_core_cm_get_call_info_ingroup_byposition(call_vc_manager_t *pMng, int nGroup, int nPos, call_vc_call_objectinfo_t *pcall_object);
437
438 /**
439  * This function retrieves the call state of a given group and object position
440  *
441  * @return              Returns call state of the object
442  * @param[in]           pMng            Pointer to the call manager structure
443  * @param[in]           nGroup          Group index
444  * @param[in]           nPos                    Call object index
445  */
446 voicecall_call_state_t _vc_core_cm_get_call_state_ingroup_byposition(call_vc_manager_t *pMng, int nGroup, int nPos);
447
448 /**
449  * This function retrieves the call handle of a given group and object position
450  *
451  * @return              Returns call handle of the object
452  * @param[in]           pMng            Pointer to the call manager structure
453  * @param[in]           nGroup          Group index
454  * @param[in]           nPos                    Call object index
455  */
456 call_vc_handle _vc_core_cm_get_call_handle_ingroup_byposition(call_vc_manager_t *pMng, int nGroup, int nPos);
457
458 /**
459  * This function retrieves the call handle of a given call ID
460  *
461  * @return              Returns call handle of the object
462  * @param[in]           pMng            Pointer to the call manager structure
463  * @param[in]           callID          Call ID for a given call object
464  */
465 call_vc_handle _vc_core_cm_get_call_handle_ingroup_bycallId(call_vc_manager_t *pMng, int callID);
466
467 /**
468  * This function checks if connected call exists
469  *
470  * @return              Returns TRUE if call exist FALSE otherwise
471  * @param[in]           pMng            Pointer to the call manager structure
472  * @see                 call_vc_cm_outgoing_call_exist, _vc_core_cm_isexists_incoming_call
473  */
474 gboolean _vc_core_cm_isexists_connected_call(call_vc_manager_t *pMng);
475
476 /**
477  * This function retrieves the group state for a given call ID of an
478  *
479  * @return              This function returns the group state
480  * @param[in]           pMng            Pointer to the call manager structure
481  * @param[in]           callID          The call ID of the object
482  */
483 call_vc_groupstate_t _vc_core_cm_get_group_state_callid(call_vc_manager_t *pMng, int callID);
484
485 /**
486  * This function retrieves the call handle of the first active call
487  *
488  * @return              Returns the call handle on sucess, -1 on failure
489  * @param[in]           pMng            Pointer to the call manager structure
490  * @param[in]           pCall           Pointer to the call handle where the retrieved call handle need to be stored
491  * @see                 _vc_core_cm_get_next_active_call_handle
492  */
493 int _vc_core_cm_get_first_active_call_handle(call_vc_manager_t *pMng, call_vc_handle *pCall);
494
495 /**
496  * This function retrieves the call handle of the first held call
497  *
498  * @return              Returns the call handle on sucess, -1 on failure
499  * @param[in]           pMng            Pointer to the call manager structure
500  * @param[in]           pCall           Pointer to the call handle where the retrieved call handle need to be stored
501  * @see                 _vc_core_cm_get_next_held_call_handle
502  */
503 int _vc_core_cm_get_first_held_call_handle(call_vc_manager_t *pMng, call_vc_handle *pCall);
504
505 /**
506  * This function retrieves the next active call handle
507  *
508  * @return              Returns the call handle on sucess, -1 on failure
509  * @param[in]           pMng            Pointer to the call manager structure
510  * @param[in]           pCall           Pointer to the call handle where the retrieved call handle need to be stored
511  * @param[in]           nPos                    Current position of the call object index
512  * @see                 _vc_core_cm_get_first_active_call_handle
513  */
514 int _vc_core_cm_get_next_active_call_handle(call_vc_manager_t *pMng, call_vc_handle *pCall, int nPos);
515
516 /**
517  * This function retrieves the next held call handle
518  *
519  * @return              Returns the call handle on sucess, -1 on failure
520  * @param[in]           pMng            Pointer to the call manager structure
521  * @param[in]           pCall           Pointer to the call handle where the retrieved call handle need to be stored
522  * @param[in]           nPos                    Current position of the call object index
523  * @see                 _vc_core_cm_get_first_held_call_handle
524  */
525 int _vc_core_cm_get_next_held_call_handle(call_vc_manager_t *pMng, call_vc_handle *pCall, int nPos);
526
527 /**
528  * This function checks if active call exists
529  *
530  * @return              Returns TRUE if call exist FALSE otherwise
531  * @param[in]           pMng            Pointer to the call manager structure
532  * @see                 _vc_core_cm_isexists_held_call
533  */
534 gboolean _vc_core_cm_isexists_active_call(call_vc_manager_t *pMng);
535
536 /**
537  * This function checks if held call exists
538  *
539  * @return              Returns TRUE if call exist FALSE otherwise
540  * @param[in]           pMng            Pointer to the call manager structure
541  * @see                 _vc_core_cm_isexists_active_call
542  */
543 gboolean _vc_core_cm_isexists_held_call(call_vc_manager_t *pMng);
544
545 /**
546  * This function retrieves the number of active calls
547  *
548  * @return              Returns number of active calls
549  * @param[in]           pMng            Pointer to the call manager structure
550  * @see                 _vc_core_cm_get_held_call_count
551  */
552 int _vc_core_cm_get_active_call_count(call_vc_manager_t *pMng);
553
554 /**
555  * This function retrieves the number of held calls
556  *
557  * @return              Returns number of held calls
558  * @param[in]           pMng            Pointer to the call manager structure
559  * @see                 _vc_core_cm_get_held_call_count
560  */
561 int _vc_core_cm_get_held_call_count(call_vc_manager_t *pMng);
562
563 /**
564  * This function retrieves the group index of active calls
565  *
566  * @return              Returns the group index
567  * @param[in]           pMng            Pointer to the call manager structure
568  * @see                 _vc_core_cm_get_held_group_index
569  */
570 int _vc_core_cm_get_active_group_index(call_vc_manager_t *pMng);
571
572 /**
573  * This function retrieves the group index of held calls
574  *
575  * @return              Returns the group index
576  * @param[in]           pMng            Pointer to the call manager structure
577  * @see                 _vc_core_cm_get_active_group_index
578  */
579 int _vc_core_cm_get_held_group_index(call_vc_manager_t *pMng);
580
581 /**
582  * This function changes the state of the given onject info
583  *
584  * @return              void
585  * @param[in]           info                    Pointer to the call object into structure for which the state has to be changed
586  * @param[in]           callState               State that needs to be set
587  */
588 void inline _vc_core_cm_change_call_state(call_vc_call_objectinfo_t *info, voicecall_call_state_t callState);
589
590 /**
591  * This function dumps the complete information in the call manager
592  *
593  * @return              void
594  * @param[in]           info            Pointer to the call manager structure
595  */
596 void _vc_core_cm_test_dump(call_vc_manager_t *info);
597
598 /*========================================================================================*/
599 /**
600  * This function retrieves the number of call members in various states of a call
601  *
602  * @return              Number of call members available
603  * @param[in]           pMng            Pointer to the call manager structure
604  */
605 int _vc_core_cm_get_call_member_count(call_vc_manager_t *pMng);
606
607 #ifdef UNUSED_APIS
608 unsigned long call_vc_cm_search_oldcall(call_vc_manager_t *pMng, gboolean activegroup);
609 unsigned long call_vc_cm_search_next_oldcall(call_vc_manager_t *pMng, gboolean activegroup, call_vc_handle call_handle);
610 unsigned long call_vc_cm_gp_get_calltm_connected(call_vc_manager_t *pMng, int nGroup, int nPos);
611 gboolean call_vc_cm_search_activecall(call_vc_manager_t *pMng, call_vc_handle call_handle);
612 gboolean call_vc_cm_search_activecall_ctinfo(call_vc_manager_t *pMng, call_vc_handle call_handle);
613 gboolean call_vc_cm_search_holdcall(call_vc_manager_t *pMng, call_vc_handle call_handle);
614 gboolean call_vc_cm_search_holdcall_ctinfo(call_vc_manager_t *pMng, call_vc_handle call_handle);
615 #endif
616
617 /**
618 * This function retrieves an available call ID
619 *
620 * @return               Call ID on success, -1 on failure
621 * @param[in]            pMng            Pointer to the call manager structure
622 */
623 int _vc_core_cm_get_new_callId(call_vc_manager_t *pMng);
624 #endif                          /* __VC_CORE_CALL_MANAGER_H_ */