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 #ifndef _VCUI_DOCUMENT_H_
\r
19 #define _VCUI_DOCUMENT_H_
\r
21 typedef struct _call_data_t call_data_t;
\r
24 * This function initializes the data structure pointers maintained in the document file
\r
27 * @param[in] nothing
\r
29 void _vcui_doc_data_init();
\r
32 * This function allocates memory for the call data structure - call_data_t
\r
34 * @return pointer to the memory allocated for call-data structure, or NULL if memory allocation fails
\r
35 * @param[in] nothing
\r
37 call_data_t *_vcui_doc_allocate_call_data_memory(void);
\r
40 * This function retrieves the value of the call handle
\r
42 * @return value of the call handle
\r
43 * @param[in] pcall_data pointer to the call-data structure
\r
45 int _vcui_doc_get_call_handle(call_data_t *pcall_data);
\r
48 * This function assigns the value of call handle for a given pointer of the call-data structure
\r
51 * @param[in] pcall_data pointer to the call-data structure
\r
52 * @param[in] call_handle new value of the call handle
\r
54 void _vcui_doc_set_call_handle(call_data_t *pcall_data, int call_handle);
\r
57 * This function retrieves the value of the call number
\r
59 * @return pointer to the call number string
\r
60 * @param[in] pcall_data pointer to the call-data structure
\r
62 char *_vcui_doc_get_call_number(call_data_t *pcall_data);
\r
65 * This function assigns the value of call number for a given pointer of the call-data structure
\r
68 * @param[in] pcall_data pointer to the call-data structure
\r
69 * @param[in] pnumber pointer to the call number string
\r
71 void _vcui_doc_set_call_number(call_data_t *pcall_data, char *pnumber);
\r
74 * This function retrieves the value of the call name (available from contact DB)
\r
76 * @return pointer to the call name string
\r
77 * @param[in] pcall_data pointer to the call-data structure
\r
79 char *_vcui_doc_get_call_display_name(call_data_t *pcall_data);
\r
82 * This function assigns the value of contact name for a given pointer of the call-data structure
\r
85 * @param[in] pcall_data pointer to the call-data structure
\r
86 * @param[in] pname pointer to the call number string
\r
88 void _vcui_doc_set_call_display_name(call_data_t *pcall_data, char *pname);
\r
91 * This function retrieves the caller-ID file path (caller-ID for split screen)
\r
93 * @return pointer to the caller-ID file path string
\r
94 * @param[in] pcall_data pointer to the call-data structure
\r
96 char *_vcui_doc_get_caller_id_file_path(call_data_t *pcall_data);
\r
99 * This function assigns the value of caller-ID file-path for a given pointer of the call-data structure
\r
102 * @param[in] pcall_data pointer to the call-data structure
\r
103 * @param[in] pfile_path pointer to the caller-ID file-path string
\r
105 void _vcui_doc_set_caller_id_file_path(call_data_t *pcall_data, char *pfile_path);
\r
108 * This function retrieves the caller-ID full file path (caller-ID for full screen)
\r
110 * @return pointer to the caller-ID full file path string
\r
111 * @param[in] pcall_data pointer to the call-data structure
\r
113 char *_vcui_doc_get_caller_id_full_file_path(call_data_t *pcall_data);
\r
116 * This function assigns the value of caller-ID full file-path 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] pfull_file_path pointer to the caller-ID full file-path string
\r
122 void _vcui_doc_set_caller_id_full_file_path(call_data_t *pcall_data, char *pfull_file_path);
\r
125 * This function retrieves the value of the call start time
\r
127 * @return value of the call start time
\r
128 * @param[in] pcall_data pointer to the call-data structure
\r
130 int _vcui_doc_get_call_start_time(call_data_t *pcall_data);
\r
133 * This function assigns the value of call start time for a given pointer of the call-data structure
\r
136 * @param[in] pcall_data pointer to the call-data structure
\r
138 void _vcui_doc_set_call_start_time(call_data_t *pcall_data);
\r
141 * This function retrieves the value of the contact index
\r
143 * @return value of the contact index
\r
144 * @param[in] pcall_data pointer to the call-data structure
\r
146 int _vcui_doc_get_contact_index(call_data_t *pcall_data);
\r
149 * This function assigns the value of contact index for a given pointer of the call-data structure
\r
152 * @param[in] pcall_data pointer to the call-data structure
\r
153 * @param[in] contact_index value of the contact index
\r
155 void _vcui_doc_set_contact_index(call_data_t *pcall_data, int contact_index);
\r
158 * This function retrieves the value of the contact phone type
\r
160 * @return value of the contact phone type
\r
161 * @param[in] pcall_data pointer to the call-data structure
\r
163 int _vcui_doc_get_contact_phone_type(call_data_t *pcall_data);
\r
166 * This function assigns the value of contact phone type for a given pointer of the call-data structure
\r
169 * @param[in] pcall_data pointer to the call-data structure
\r
170 * @param[in] phone_type value of the contact phone type
\r
172 void _vcui_doc_set_contact_phone_type(call_data_t *pcall_data, int phone_type);
\r
175 * This function retrieves the value of the remaining days for the contact birthday
\r
177 * @return value of the contact remaining days in birthday
\r
178 * @param[in] pcall_data pointer to the call-data structure
\r
180 int _vcui_doc_get_birthday_remaining_days(call_data_t *pcall_data);
\r
183 * This function assigns the value of birthday remaining days for a given pointer of the call-data structure
\r
186 * @param[in] pcall_data pointer to the call-data structure
\r
187 * @param[in] bday_rem_days value of the birthday remaining days
\r
189 void _vcui_doc_set_birthday_remaining_days(call_data_t *pcall_data, int bday_rem_days);
\r
192 * This function retrieves the value of the auto reject status
\r
194 * @return value of the auto reject status
\r
195 * @param[in] pcall_data pointer to the call-data structure
\r
197 int _vcui_doc_get_auto_reject_status(call_data_t *pcall_data);
\r
200 * This function assigns the value of auto reject status for a given pointer of the call-data structure
\r
203 * @param[in] pcall_data pointer to the call-data structure
\r
204 * @param[in] bauto_rejected value of the auto reject status
\r
206 void _vcui_doc_set_auto_reject_status(call_data_t *pcall_data, gboolean bauto_rejected);
\r
209 * This function retrieves if a call is MO or MT type
\r
211 * @return value of the call type - MO or MT
\r
212 * @param[in] pcall_data pointer to the call-data structure
\r
214 int _vcui_doc_get_call_type(call_data_t *pcall_data);
\r
217 * This function assigns the value of call type for a given pointer of the call-data structure
\r
220 * @param[in] pcall_data pointer to the call-data structure
\r
221 * @param[in] call_type type of call, MO or MT
\r
223 void _vcui_doc_set_call_type(call_data_t *pcall_data, int call_type);
\r
226 * This function retrieves the call status of a particular call data structure (HOLD/UNHOLD)
\r
228 * @return value of the call status, HOLD/UNHOLD
\r
229 * @param[in] pcall_data pointer to the call-data structure
\r
231 int _vcui_doc_get_call_status(call_data_t *pcall_data);
\r
234 * This function assigns the value of call status for a given pointer of the call-data structure
\r
237 * @param[in] pcall_data pointer to the call-data structure
\r
238 * @param[in] call_status status of call, active/held
\r
240 void _vcui_doc_set_call_status(call_data_t *pcall_data, int call_status);
\r
243 * This function retrieves the pointer to the most recent MO(outgoing) call data
\r
245 * @return pointer to the call data structure
\r
246 * @param[in] nothing
\r
248 call_data_t *_vcui_doc_get_recent_mo_call_data();
\r
251 * This function assigns the pointer of the most recent MO(outgoing) call data
\r
252 * to the pointer stored in the vcui-document file (recent_mo)
\r
255 * @param[in] in pointer to the call-data structure to be copied/assigned
\r
257 void _vcui_doc_set_recent_mo_call_data(call_data_t *in);
\r
260 * This function retrieves the pointer to the most recent MT(incoming) call data
\r
262 * @return pointer to the call data structure
\r
263 * @param[in] nothing
\r
265 call_data_t *_vcui_doc_get_recent_mt_call_data();
\r
268 * This function assigns the pointer of the most recent MT(incoming) call data
\r
269 * to the pointer stored in the vcui-document file (recent_mt)
\r
272 * @param[in] in pointer to the call-data structure to be copied/assigned
\r
274 void _vcui_doc_set_recent_mt_call_data(call_data_t *in);
\r
277 * This function retrieves the pointer to the most recent call data, either MT(incoming)/MO(outgoing)
\r
279 * @return pointer to the call data structure
\r
280 * @param[in] nothing
\r
282 call_data_t *_vcui_doc_get_recent_call_data();
\r
285 * This function assigns the pointer of the most recent MT(incoming)/MO(outgoing) call data
\r
286 * to the pointer stored in the vcui-document file (recent_call)
\r
289 * @param[in] in pointer to the call-data structure to be copied/assigned
\r
291 void _vcui_doc_set_all_recent(call_data_t *in);
\r
294 * This function adds the call data structure to the list of call data maintained in the
\r
295 * vcui-document file (caller_list link list)
\r
298 * @param[in] in pointer to the call-data structure to be added
\r
300 void _vcui_doc_add_call_data(call_data_t *in);
\r
303 * This function updates the call data structure contained in the list of call data maintained in the
\r
304 * vcui-document file (caller_list link list) with the new call-data structure
\r
307 * @param[in] in pointer to the call-data structure to be updated
\r
309 void _vcui_doc_update_call_data(call_data_t *in);
\r
312 * This function checks if the call data pointer data is valid and present in the 'caller_list' list
\r
314 * @return TRUE if the call-data is present and FALSE if there is no such call-data in the list
\r
315 * @param[in] in pointer to the call-data structure
\r
317 Eina_Bool _vcui_doc_is_valid_call_data(call_data_t *in);
\r
320 * This function removes the call data structure from the list of call data maintained in the
\r
321 * vcui-document file (caller_list link list) and frees the call data structure
\r
324 * @param[in] in pointer to the call-data structure to be added
\r
326 void _vcui_doc_remove_call_data(call_data_t *in);
\r
329 * This function removes the call data structure from the list of call data maintained in the
\r
330 * vcui-document file (caller_list link list)
\r
332 * @return a pointer to the call data structure which is passed
\r
333 * @param[in] in pointer to the call-data structure to be added
\r
335 call_data_t *_vcui_doc_remove_call_data_from_list(call_data_t *in);
\r
338 * This function removes all the call data from list and frees the memory
\r
343 void _vcui_doc_remove_all_call_data();
\r
346 * This function retrieves the earliest call data based on the call status
\r
348 * @return pointer to the call data structure
\r
349 * @param[in] call_status value of the call status (hold/unhold)
\r
351 call_data_t *_vcui_doc_get_call_data_by_call_status(int call_status);
\r
354 * This function retrieves the most recent MO call data
\r
356 * @return pointer to the call data structure
\r
357 * @param[in] nothing
\r
359 call_data_t *_vcui_doc_get_call_data_mo_type();
\r
362 * This function retrieves the first call data in the list
\r
364 * @return pointer to the call data structure
\r
365 * @param[in] nothing
\r
367 call_data_t *_vcui_doc_get_first_call_data_from_list();
\r
370 * This function retrieves the first call data in the list which is of UNHOLD status
\r
372 * @return pointer to the call data structure
\r
373 * @param[in] nothing
\r
375 call_data_t *_vcui_doc_get_first_call_data_by_unhold_status();
\r
378 * This function retrieves the call data based on the given call handle
\r
380 * @return pointer to the call data structure
\r
381 * @param[in] handle value of the call handle
\r
383 call_data_t *_vcui_doc_get_call_data_by_handle(int handle);
\r
386 * This function retrieves the count of call data which are in HOLD status
\r
388 * @return count of held call data
\r
389 * @param[in] nothing
\r
391 int _vcui_doc_get_hold_call_data_count();
\r
394 * This function retrieves the count of call data which are in UNHOLD status
\r
396 * @return count of active call data
\r
397 * @param[in] nothing
\r
399 int _vcui_doc_get_unhold_call_data_count();
\r
402 * This function retrieves the count of call data which are in NO status (neither hold/unhold)
\r
404 * @return count of 'no status' call data
\r
405 * @param[in] nothing
\r
407 int _vcui_doc_get_no_status_call_data_count();
\r
410 * This function retrieves the count of all call data in the list
\r
412 * @return count of all call data
\r
413 * @param[in] nothing
\r
415 int _vcui_doc_get_all_call_data_count();
\r
418 * This function retrieves the call status of a group (greater than 1 member group)
\r
420 * @return value of the call status (HOLD/UNHOLD)
\r
421 * @param[in] nothing
\r
423 int _vcui_doc_get_group_call_status();
\r
426 * This function retrieves the pointer to the list containing the call data with HOLD status
\r
428 * @return pointer to the HOLD call data list
\r
429 * @param[in] nothing
\r
431 Eina_List *_vcui_doc_get_caller_list_with_hold_status();
\r
434 * This function retrieves the pointer to the list containing the call data with UNHOLD status
\r
436 * @return pointer to the UNHOLD call data list
\r
437 * @param[in] nothing
\r
439 Eina_List *_vcui_doc_get_caller_list_with_unhold_status();
\r
442 * This function prints all the call data structure members
\r
445 * @param[in] msg_pos type of message
\r
447 void _vcui_doc_print_all_call_data(char *msg_pos);
\r
450 * This function assigns UNHOLD call status to all the call data in the list
\r
453 * @param[in] nothing
\r
455 void _vcui_doc_set_all_call_data_to_unhold_status();
\r
458 * This function assigns HOLD call status to all the call data in the list
\r
461 * @param[in] nothing
\r
463 void _vcui_doc_set_all_call_data_to_hold_status();
\r
466 * This function swaps the HOLD and UNHOLD calls in the call list
\r
469 * @param[in] nothing
\r
471 void _vcui_doc_swap_all_call_data_status();
\r