2 * Copyright 2012 Samsung Electronics Co., Ltd
\r
4 * Licensed under the Flora License, Version 1.0 (the "License");
\r
5 * you may not use this file except in compliance with the License.
\r
6 * You may obtain a copy of the License at
\r
8 * http://www.tizenopensource.org/license
\r
10 * Unless required by applicable law or agreed to in writing, software
\r
11 * distributed under the License is distributed on an "AS IS" BASIS,
\r
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
13 * See the License for the specific language governing permissions and
\r
14 * limitations under the License.
\r
18 #include "vcui-application.h"
\r
19 #include "vcui-document.h"
\r
21 struct _call_data_t {
\r
22 unsigned char call_handle;
\r
24 int contact_phone_type;
\r
25 int bday_remaining_days;
\r
28 char call_num[VC_PHONE_NUMBER_LENGTH_MAX];
\r
29 char call_display[VC_DISPLAY_NAME_LENGTH_MAX];
\r
30 char call_file_path[VC_IMAGE_PATH_LENGTH_MAX];
\r
31 char call_full_file_path[VC_IMAGE_PATH_LENGTH_MAX];
\r
33 gboolean brejected; /* auto reject */
\r
35 /* The below 2 fields are required on UI side as well, even though we can get these values from engine data structure
\r
36 * When call is ended, engine will clear the call object info and hence we cannot get these status at this moment
\r
37 * So we have to maintain a copy in UI side as well */
\r
38 int call_type; /* whether MO or MT call*/
\r
39 int caller_status; /* HOLD/UNHOLD */
\r
42 static call_data_t *recent_mo;
\r
43 static call_data_t *recent_mt;
\r
44 static call_data_t *recent_call;
\r
45 static Eina_List *caller_list;
\r
48 * This function initializes the data structure pointers maintained in the document file
\r
51 * @param[in] nothing
\r
53 void _vcui_doc_data_init()
\r
62 * This function allocates memory for the call data structure - call_data_t
\r
64 * @return pointer to the memory allocated for call-data structure, or NULL if memory allocation fails
\r
65 * @param[in] nothing
\r
67 call_data_t *_vcui_doc_allocate_call_data_memory(void)
\r
69 call_data_t *pcall_data = NULL;
\r
71 pcall_data = (call_data_t *)calloc(1, sizeof(call_data_t));
\r
72 if (pcall_data == NULL) {
\r
73 CALL_UI_DEBUG("memory allocation failed...");
\r
79 * This function retrieves the value of the call handle
\r
81 * @return value of the call handle
\r
82 * @param[in] pcall_data pointer to the call-data structure
\r
84 int _vcui_doc_get_call_handle(call_data_t *pcall_data)
\r
86 VCUI_RETURN_INVALID_IF_FAIL(pcall_data);
\r
87 return pcall_data->call_handle;
\r
91 * This function assigns the value of call handle for a given pointer of the call-data structure
\r
94 * @param[in] pcall_data pointer to the call-data structure
\r
95 * @param[in] call_handle new value of the call handle
\r
97 void _vcui_doc_set_call_handle(call_data_t *pcall_data, int call_handle)
\r
99 VCUI_RETURN_IF_FAIL(pcall_data);
\r
100 pcall_data->call_handle = call_handle;
\r
104 * This function retrieves the value of the call number
\r
106 * @return pointer to the call number string
\r
107 * @param[in] pcall_data pointer to the call-data structure
\r
109 char *_vcui_doc_get_call_number(call_data_t *pcall_data)
\r
111 VCUI_RETURN_NULL_IF_FAIL(pcall_data);
\r
112 return (char *) pcall_data->call_num;
\r
116 * This function assigns the value of call number for a given pointer of the call-data structure
\r
119 * @param[in] pcall_data pointer to the call-data structure
\r
120 * @param[in] pnumber pointer to the call number string
\r
122 void _vcui_doc_set_call_number(call_data_t *pcall_data, char *pnumber)
\r
124 VCUI_RETURN_IF_FAIL(pcall_data);
\r
125 memset(pcall_data->call_num, 0, sizeof(pcall_data->call_num));
\r
126 vcall_engine_util_strcpy(pcall_data->call_num, VC_PHONE_NUMBER_LENGTH_MAX, pnumber);
\r
130 * This function retrieves the value of the call name (available from contact DB)
\r
132 * @return pointer to the call name string
\r
133 * @param[in] pcall_data pointer to the call-data structure
\r
135 char *_vcui_doc_get_call_display_name(call_data_t *pcall_data)
\r
137 VCUI_RETURN_NULL_IF_FAIL(pcall_data);
\r
138 return (char *) pcall_data->call_display;
\r
142 * This function assigns the value of contact name for a given pointer of the call-data structure
\r
145 * @param[in] pcall_data pointer to the call-data structure
\r
146 * @param[in] pname pointer to the call number string
\r
148 void _vcui_doc_set_call_display_name(call_data_t *pcall_data, char *pname)
\r
150 VCUI_RETURN_IF_FAIL(pcall_data);
\r
151 memset(pcall_data->call_display, 0, sizeof(pcall_data->call_display));
\r
152 vcall_engine_util_strcpy(pcall_data->call_display, VC_DISPLAY_NAME_LENGTH_MAX, pname);
\r
156 * This function retrieves the caller-ID file path (caller-ID for split screen)
\r
158 * @return pointer to the caller-ID file path string
\r
159 * @param[in] pcall_data pointer to the call-data structure
\r
161 char *_vcui_doc_get_caller_id_file_path(call_data_t *pcall_data)
\r
163 VCUI_RETURN_NULL_IF_FAIL(pcall_data);
\r
164 return (char *) pcall_data->call_file_path;
\r
168 * This function assigns the value of caller-ID file-path for a given pointer of the call-data structure
\r
171 * @param[in] pcall_data pointer to the call-data structure
\r
172 * @param[in] pfile_path pointer to the caller-ID file-path string
\r
174 void _vcui_doc_set_caller_id_file_path(call_data_t *pcall_data, char *pfile_path)
\r
176 VCUI_RETURN_IF_FAIL(pcall_data);
\r
177 memset(pcall_data->call_file_path, 0, sizeof(pcall_data->call_file_path));
\r
178 vcall_engine_util_strcpy(pcall_data->call_file_path, VC_IMAGE_PATH_LENGTH_MAX, pfile_path);
\r
182 * This function retrieves the caller-ID full file path (caller-ID for full screen)
\r
184 * @return pointer to the caller-ID full file path string
\r
185 * @param[in] pcall_data pointer to the call-data structure
\r
187 char *_vcui_doc_get_caller_id_full_file_path(call_data_t *pcall_data)
\r
189 VCUI_RETURN_NULL_IF_FAIL(pcall_data);
\r
190 return (char *) pcall_data->call_full_file_path;
\r
194 * This function assigns the value of caller-ID full file-path for a given pointer of the call-data structure
\r
197 * @param[in] pcall_data pointer to the call-data structure
\r
198 * @param[in] pfull_file_path pointer to the caller-ID full file-path string
\r
200 void _vcui_doc_set_caller_id_full_file_path(call_data_t *pcall_data, char *pfull_file_path)
\r
202 VCUI_RETURN_IF_FAIL(pcall_data);
\r
203 memset(pcall_data->call_full_file_path, 0, sizeof(pcall_data->call_full_file_path));
\r
204 vcall_engine_util_strcpy(pcall_data->call_full_file_path, VC_IMAGE_PATH_LENGTH_MAX, pfull_file_path);
\r
208 * This function retrieves the value of the call start time
\r
210 * @return value of the call start time
\r
211 * @param[in] pcall_data pointer to the call-data structure
\r
213 int _vcui_doc_get_call_start_time(call_data_t *pcall_data)
\r
215 VCUI_RETURN_INVALID_IF_FAIL(pcall_data);
\r
216 return pcall_data->start_time;
\r
220 * This function assigns the value of call start time for a given pointer of the call-data structure
\r
223 * @param[in] pcall_data pointer to the call-data structure
\r
225 void _vcui_doc_set_call_start_time(call_data_t *pcall_data)
\r
227 VCUI_RETURN_IF_FAIL(pcall_data);
\r
228 time(&(pcall_data->start_time));
\r
232 * This function retrieves the value of the contact index
\r
234 * @return value of the contact index
\r
235 * @param[in] pcall_data pointer to the call-data structure
\r
237 int _vcui_doc_get_contact_index(call_data_t *pcall_data)
\r
239 VCUI_RETURN_INVALID_IF_FAIL(pcall_data);
\r
240 return pcall_data->contact_id;
\r
244 * This function assigns the value of contact index for a given pointer of the call-data structure
\r
247 * @param[in] pcall_data pointer to the call-data structure
\r
248 * @param[in] contact_index value of the contact index
\r
250 void _vcui_doc_set_contact_index(call_data_t *pcall_data, int contact_index)
\r
252 VCUI_RETURN_IF_FAIL(pcall_data);
\r
253 pcall_data->contact_id = contact_index;
\r
257 * This function retrieves the value of the contact phone type
\r
259 * @return value of the contact phone type
\r
260 * @param[in] pcall_data pointer to the call-data structure
\r
262 int _vcui_doc_get_contact_phone_type(call_data_t *pcall_data)
\r
264 VCUI_RETURN_INVALID_IF_FAIL(pcall_data);
\r
265 return pcall_data->contact_phone_type;
\r
269 * This function assigns the value of contact phone type for a given pointer of the call-data structure
\r
272 * @param[in] pcall_data pointer to the call-data structure
\r
273 * @param[in] phone_type value of the contact phone type
\r
275 void _vcui_doc_set_contact_phone_type(call_data_t *pcall_data, int phone_type)
\r
277 VCUI_RETURN_IF_FAIL(pcall_data);
\r
278 pcall_data->contact_phone_type = phone_type;
\r
282 * This function retrieves the value of the remaining days for the contact birthday
\r
284 * @return value of the contact remaining days in birthday
\r
285 * @param[in] pcall_data pointer to the call-data structure
\r
287 int _vcui_doc_get_birthday_remaining_days(call_data_t *pcall_data)
\r
289 VCUI_RETURN_INVALID_IF_FAIL(pcall_data);
\r
290 return pcall_data->bday_remaining_days;
\r
294 * This function assigns the value of birthday remaining days for a given pointer of the call-data structure
\r
297 * @param[in] pcall_data pointer to the call-data structure
\r
298 * @param[in] bday_rem_days value of the birthday remaining days
\r
300 void _vcui_doc_set_birthday_remaining_days(call_data_t *pcall_data, int bday_rem_days)
\r
302 VCUI_RETURN_IF_FAIL(pcall_data);
\r
303 pcall_data->bday_remaining_days = bday_rem_days;
\r
307 * This function retrieves the value of the auto reject status
\r
309 * @return value of the auto reject status
\r
310 * @param[in] pcall_data pointer to the call-data structure
\r
312 int _vcui_doc_get_auto_reject_status(call_data_t *pcall_data)
\r
314 VCUI_RETURN_INVALID_IF_FAIL(pcall_data);
\r
315 return pcall_data->brejected;
\r
319 * This function assigns the value of auto reject status for a given pointer of the call-data structure
\r
322 * @param[in] pcall_data pointer to the call-data structure
\r
323 * @param[in] bauto_rejected value of the auto reject status
\r
325 void _vcui_doc_set_auto_reject_status(call_data_t *pcall_data, gboolean bauto_rejected)
\r
327 VCUI_RETURN_IF_FAIL(pcall_data);
\r
328 pcall_data->brejected = bauto_rejected;
\r
332 * This function retrieves if a call is MO or MT type
\r
334 * @return value of the call type - MO or MT
\r
335 * @param[in] pcall_data pointer to the call-data structure
\r
337 int _vcui_doc_get_call_type(call_data_t *pcall_data)
\r
339 VCUI_RETURN_INVALID_IF_FAIL(pcall_data);
\r
340 return pcall_data->call_type;
\r
344 * This function assigns the value of call type for a given pointer of the call-data structure
\r
347 * @param[in] pcall_data pointer to the call-data structure
\r
348 * @param[in] call_type type of call, MO or MT
\r
350 void _vcui_doc_set_call_type(call_data_t *pcall_data, int call_type)
\r
352 VCUI_RETURN_IF_FAIL(pcall_data);
\r
353 pcall_data->call_type = call_type;
\r
357 * This function retrieves the call status of a particular call data structure (HOLD/UNHOLD)
\r
359 * @return value of the call status, HOLD/UNHOLD
\r
360 * @param[in] pcall_data pointer to the call-data structure
\r
362 int _vcui_doc_get_call_status(call_data_t *pcall_data)
\r
364 VCUI_RETURN_INVALID_IF_FAIL(pcall_data);
\r
365 return pcall_data->caller_status;
\r
369 * This function assigns the value of call status for a given pointer of the call-data structure
\r
372 * @param[in] pcall_data pointer to the call-data structure
\r
373 * @param[in] call_status status of call, active/held
\r
375 void _vcui_doc_set_call_status(call_data_t *pcall_data, int call_status)
\r
377 VCUI_RETURN_IF_FAIL(pcall_data);
\r
378 pcall_data->caller_status = call_status;
\r
382 * This function retrieves the pointer to the most recent MO(outgoing) call data
\r
384 * @return pointer to the call data structure
\r
385 * @param[in] nothing
\r
387 call_data_t *_vcui_doc_get_recent_mo_call_data()
\r
393 * This function assigns the pointer of the most recent MO(outgoing) call data
\r
394 * to the pointer stored in the vcui-document file (recent_mo)
\r
397 * @param[in] in pointer to the call-data structure to be copied/assigned
\r
399 void _vcui_doc_set_recent_mo_call_data(call_data_t *in)
\r
401 CALL_UI_DEBUG("..");
\r
403 CALL_UI_DEBUG("set recent_mo to null");
\r
405 if (recent_mo != NULL && recent_mo->call_handle == NO_HANDLE) {
\r
406 CALL_UI_DEBUG("Set_recent 1");
\r
410 _vcui_doc_set_all_recent(in);
\r
415 * This function retrieves the pointer to the most recent MT(incoming) call data
\r
417 * @return pointer to the call data structure
\r
418 * @param[in] nothing
\r
420 call_data_t *_vcui_doc_get_recent_mt_call_data()
\r
426 * This function assigns the pointer of the most recent MT(incoming) call data
\r
427 * to the pointer stored in the vcui-document file (recent_mt)
\r
430 * @param[in] in pointer to the call-data structure to be copied/assigned
\r
432 void _vcui_doc_set_recent_mt_call_data(call_data_t *in)
\r
434 CALL_UI_DEBUG("..");
\r
436 CALL_UI_DEBUG("set recent_mt to null");
\r
438 _vcui_doc_set_all_recent(in);
\r
443 * This function retrieves the pointer to the most recent call data, either MT(incoming)/MO(outgoing)
\r
445 * @return pointer to the call data structure
\r
446 * @param[in] nothing
\r
448 call_data_t *_vcui_doc_get_recent_call_data()
\r
450 CALL_UI_DEBUG("..");
\r
451 if (recent_call == NULL) {
\r
452 CALL_UI_DEBUG("recent is NULL");
\r
453 if (recent_mo != NULL) {
\r
454 recent_call = recent_mo;
\r
455 CALL_UI_DEBUG("recent is mo");
\r
456 } else if (recent_mt != NULL) {
\r
457 recent_call = recent_mt;
\r
458 CALL_UI_DEBUG("recent is mt");
\r
461 return recent_call;
\r
465 * This function assigns the pointer of the most recent MT(incoming)/MO(outgoing) call data
\r
466 * to the pointer stored in the vcui-document file (recent_call)
\r
469 * @param[in] in pointer to the call-data structure to be copied/assigned
\r
471 void _vcui_doc_set_all_recent(call_data_t *in)
\r
473 CALL_UI_DEBUG("..");
\r
475 CALL_UI_DEBUG("set recent_call to null");
\r
481 * This function adds the call data structure to the list of call data maintained in the
\r
482 * vcui-document file (caller_list link list)
\r
485 * @param[in] in pointer to the call-data structure to be copied/assigned
\r
487 void _vcui_doc_add_call_data(call_data_t *in)
\r
491 Eina_List *l = NULL;
\r
492 call_data_t *cd = NULL;
\r
493 EINA_LIST_FOREACH(caller_list, l, cd) {
\r
499 caller_list = eina_list_append(caller_list, (void *)in);
\r
503 * This function updates the call data structure contained in the list of call data maintained in the
\r
504 * vcui-document file (caller_list link list) with the new call-data structure
\r
507 * @param[in] in pointer to the call-data structure to be updated
\r
509 void _vcui_doc_update_call_data(call_data_t *in)
\r
513 Eina_List *l = NULL;
\r
514 call_data_t *cd = NULL;
\r
515 EINA_LIST_FOREACH(caller_list, l, cd) {
\r
524 * This function checks if the call data pointer data is valid and present in the 'caller_list' list
\r
526 * @return TRUE if the call-data is present and FALSE if there is no such call-data in the list
\r
527 * @param[in] in pointer to the call-data structure
\r
529 Eina_Bool _vcui_doc_is_valid_call_data(call_data_t *in)
\r
533 Eina_List *l = NULL;
\r
534 call_data_t *cd = NULL;
\r
535 EINA_LIST_FOREACH(caller_list, l, cd) {
\r
545 * This function removes the call data structure from the list of call data maintained in the
\r
546 * vcui-document file (caller_list link list) and frees the call data structure
\r
549 * @param[in] in pointer to the call-data structure to be added
\r
551 void _vcui_doc_remove_call_data(call_data_t *in)
\r
554 CALL_UI_DEBUG("Call data is Null");
\r
557 Eina_List *l = NULL;
\r
558 call_data_t *cd = NULL;
\r
559 EINA_LIST_FOREACH(caller_list, l, cd) {
\r
561 if (in == _vcui_doc_get_recent_mo_call_data())
\r
562 _vcui_doc_set_recent_mo_call_data(NULL);
\r
563 if (in == _vcui_doc_get_recent_mt_call_data())
\r
564 _vcui_doc_set_recent_mt_call_data(NULL);
\r
566 caller_list = eina_list_remove(caller_list, in);
\r
569 CALL_UI_DEBUG("Call data removed");
\r
575 if (_vcui_doc_get_all_call_data_count() == 0) {
\r
576 eina_list_free(caller_list);
\r
577 caller_list = NULL;
\r
583 * This function removes the call data structure from the list of call data maintained in the
\r
584 * vcui-document file (caller_list link list)
\r
586 * @return a pointer to the call data structure which is passed
\r
587 * @param[in] in pointer to the call-data structure to be added
\r
589 call_data_t *_vcui_doc_remove_call_data_from_list(call_data_t *in)
\r
592 CALL_UI_DEBUG("Call data is Null");
\r
595 Eina_List *l = NULL;
\r
596 call_data_t *cd = NULL;
\r
597 EINA_LIST_FOREACH(caller_list, l, cd) {
\r
599 caller_list = eina_list_remove(caller_list, in);
\r
607 * This function removes all the call data from list and frees the memory
\r
612 void _vcui_doc_remove_all_call_data()
\r
614 Eina_List *l = NULL;
\r
615 call_data_t *cd = NULL;
\r
616 EINA_LIST_FOREACH(caller_list, l, cd) {
\r
622 eina_list_free(caller_list);
\r
623 caller_list = NULL;
\r
627 * This function retrieves the earliest call data based on the call status
\r
629 * @return pointer to the call data structure
\r
630 * @param[in] call_status value of the call status (hold/unhold)
\r
632 call_data_t *_vcui_doc_get_call_data_by_call_status(int call_status)
\r
635 Eina_List *l = NULL;
\r
636 call_data_t *fast_cd = NULL;
\r
637 call_data_t *cd = NULL;
\r
639 EINA_LIST_FOREACH(caller_list, l, cd) {
\r
641 if (cd->caller_status == call_status) {
\r
647 if (fast_cd->start_time > cd->start_time) {
\r
659 * This function retrieves the most recent MO call data
\r
661 * @return pointer to the call data structure
\r
662 * @param[in] nothing
\r
664 call_data_t *_vcui_doc_get_call_data_mo_type()
\r
667 Eina_List *l = NULL;
\r
668 call_data_t *last_cd = NULL;
\r
669 call_data_t *cd = NULL;
\r
671 EINA_LIST_FOREACH(caller_list, l, cd) {
\r
673 if (cd->call_type == CALL_OUTGOING) {
\r
679 if (last_cd->start_time < cd->start_time) {
\r
691 * This function retrieves the first call data in the list
\r
693 * @return pointer to the call data structure
\r
694 * @param[in] nothing
\r
696 call_data_t *_vcui_doc_get_first_call_data_from_list()
\r
698 Eina_List *l = NULL;
\r
699 call_data_t *cd = NULL;
\r
700 EINA_LIST_FOREACH(caller_list, l, cd) {
\r
709 * This function retrieves the first call data in the list which is of UNHOLD status
\r
711 * @return pointer to the call data structure
\r
712 * @param[in] nothing
\r
714 call_data_t *_vcui_doc_get_first_call_data_by_unhold_status()
\r
716 Eina_List *l = NULL;
\r
717 call_data_t *cd = NULL;
\r
718 EINA_LIST_FOREACH(caller_list, l, cd) {
\r
720 if (cd->caller_status == CALL_UNHOLD) {
\r
729 * This function retrieves the call data based on the given call handle
\r
731 * @return pointer to the call data structure
\r
732 * @param[in] handle value of the call handle
\r
734 call_data_t *_vcui_doc_get_call_data_by_handle(int handle)
\r
736 Eina_List *l = NULL;
\r
737 call_data_t *cd = NULL;
\r
738 EINA_LIST_FOREACH(caller_list, l, cd) {
\r
740 if (cd->call_handle == handle) {
\r
749 * This function retrieves the count of call data which are in HOLD status
\r
751 * @return count of held call data
\r
752 * @param[in] nothing
\r
754 int _vcui_doc_get_hold_call_data_count()
\r
757 Eina_List *l = NULL;
\r
758 call_data_t *cd = NULL;
\r
759 EINA_LIST_FOREACH(caller_list, l, cd) {
\r
761 if (cd->caller_status == CALL_HOLD) {
\r
766 CALL_UI_DEBUG("(%d)", i);
\r
771 * This function retrieves the count of call data which are in UNHOLD status
\r
773 * @return count of active call data
\r
774 * @param[in] nothing
\r
776 int _vcui_doc_get_unhold_call_data_count()
\r
779 Eina_List *l = NULL;
\r
780 call_data_t *cd = NULL;
\r
781 EINA_LIST_FOREACH(caller_list, l, cd) {
\r
783 if (cd->caller_status == CALL_UNHOLD) {
\r
788 CALL_UI_DEBUG("(%d)", i);
\r
793 * This function retrieves the count of call data which are in NO status (neither hold/unhold)
\r
795 * @return count of 'no status' call data
\r
796 * @param[in] nothing
\r
798 int _vcui_doc_get_no_status_call_data_count()
\r
801 Eina_List *l = NULL;
\r
802 call_data_t *cd = NULL;
\r
803 EINA_LIST_FOREACH(caller_list, l, cd) {
\r
805 if (cd->caller_status == NO_STATUS) {
\r
814 * This function retrieves the count of all call data in the list
\r
816 * @return count of all call data
\r
817 * @param[in] nothing
\r
819 int _vcui_doc_get_all_call_data_count()
\r
821 int i = eina_list_count(caller_list);
\r
826 * This function retrieves the call status of a group (greater than 1 member group)
\r
828 * @return value of the call status (HOLD/UNHOLD)
\r
829 * @param[in] nothing
\r
831 int _vcui_doc_get_group_call_status()
\r
833 if (_vcui_doc_get_all_call_data_count() > 1) {
\r
834 if (_vcui_doc_get_hold_call_data_count() > 1) {
\r
837 return CALL_UNHOLD;
\r
840 return CALL_UNHOLD;
\r
845 * This function retrieves the pointer to the list containing the call data with HOLD status
\r
847 * @return pointer to the HOLD call data list
\r
848 * @param[in] nothing
\r
850 Eina_List *_vcui_doc_get_caller_list_with_hold_status()
\r
852 if (_vcui_doc_get_all_call_data_count() == 0)
\r
854 Eina_List *hold_list = NULL;
\r
855 Eina_List *l = NULL;
\r
856 call_data_t *cd = NULL;
\r
858 EINA_LIST_FOREACH(caller_list, l, cd) {
\r
860 if (cd->caller_status == CALL_HOLD) {
\r
861 hold_list = eina_list_append(hold_list, cd);
\r
869 * This function retrieves the pointer to the list containing the call data with UNHOLD status
\r
871 * @return pointer to the UNHOLD call data list
\r
872 * @param[in] nothing
\r
874 Eina_List *_vcui_doc_get_caller_list_with_unhold_status()
\r
876 if (_vcui_doc_get_all_call_data_count() == 0)
\r
878 Eina_List *unhold_list = NULL;
\r
879 Eina_List *l = NULL;
\r
880 call_data_t *cd = NULL;
\r
882 EINA_LIST_FOREACH(caller_list, l, cd) {
\r
884 CALL_UI_DEBUG("_vcui_doc_get_caller_list_with_unhold_status");
\r
885 if (cd->caller_status == CALL_UNHOLD) {
\r
886 CALL_UI_DEBUG("find it");
\r
887 unhold_list = eina_list_append(unhold_list, cd);
\r
891 return unhold_list;
\r
895 * This function prints all the call data structure members
\r
898 * @param[in] msg_pos type of message
\r
900 void _vcui_doc_print_all_call_data(char *msg_pos)
\r
902 CALL_UI_DEBUG(" --------%s------------", msg_pos);
\r
903 Eina_List *l = NULL;
\r
904 call_data_t *cd = NULL;
\r
905 EINA_LIST_FOREACH(caller_list, l, cd) {
\r
907 CALL_UI_DEBUG(" call_handle %d", cd->call_handle);
\r
908 CALL_UI_DEBUG(" call_num %s", cd->call_num);
\r
909 CALL_UI_DEBUG(" call_display %s", cd->call_display);
\r
910 CALL_UI_DEBUG(" call_file_path %s", cd->call_file_path);
\r
911 CALL_UI_DEBUG(" call_full_file_path %s", cd->call_full_file_path);
\r
912 CALL_UI_DEBUG(" call_time %d", (int)(cd->start_time));
\r
915 CALL_UI_DEBUG(" --------------------------");
\r
919 * This function assigns UNHOLD call status to all the call data in the list
\r
922 * @param[in] nothing
\r
924 void _vcui_doc_set_all_call_data_to_unhold_status()
\r
926 Eina_List *l = NULL;
\r
927 call_data_t *cd = NULL;
\r
928 EINA_LIST_FOREACH(caller_list, l, cd) {
\r
930 if (cd->caller_status == CALL_HOLD) {
\r
931 cd->caller_status = CALL_UNHOLD;
\r
938 * This function assigns HOLD call status to all the call data in the list
\r
941 * @param[in] nothing
\r
943 void _vcui_doc_set_all_call_data_to_hold_status()
\r
945 Eina_List *l = NULL;
\r
946 call_data_t *cd = NULL;
\r
947 EINA_LIST_FOREACH(caller_list, l, cd) {
\r
949 if (cd->caller_status == CALL_UNHOLD) {
\r
950 cd->caller_status = CALL_HOLD;
\r
957 * This function swaps the HOLD and UNHOLD calls in the call list
\r
960 * @param[in] nothing
\r
962 void _vcui_doc_swap_all_call_data_status()
\r
964 Eina_List *l = NULL;
\r
965 call_data_t *cd = NULL;
\r
966 EINA_LIST_FOREACH(caller_list, l, cd) {
\r
968 if (cd->caller_status == CALL_HOLD) {
\r
969 cd->caller_status = CALL_UNHOLD;
\r
970 } else if (cd->caller_status == CALL_UNHOLD) {
\r
971 cd->caller_status = CALL_HOLD;
\r