3 * Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 * Licensed under the Apache License, Version 2.0 (the License);
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
18 #ifndef INTERFACE_SERVICE_ITEM_H_
19 #define INTERFACE_SERVICE_ITEM_H_
25 #endif /* __cplusplus */
28 * @file interface_service_item.h
29 * @brief Support to use service storage
32 /** @addtogroup data_adapter
37 * @brief Structure of framework service item instance
40 char *item_id; /** service item id */
41 int content_type; /** content type of service item */
42 int account_id; /** service account id */
43 char *folder_id; /** service folder id to which service item mapped to */
44 char *parent_id; /** parent service id to which service item mapped to */
45 char *access_name; /** name of accessor */
46 const void *data; /** void pointer type of service data */
47 } sync_agent_da_service_item_s;
50 * @brief Structure of framework service folder instance
53 char *folder_id; /** service folder id */
54 char *folder_name; /** name of service folder */
55 int folder_type; /** type of service folder */
56 } sync_agent_da_service_folder_s;
59 * @brief Structure of query used to delete framework service item
62 int content_type; /**< type of content to delete */
63 int account_id; /**< id of the account desired to delete */
64 } sync_agent_da_delete_service_item_query_s;
67 * @brief Open service database
71 sync_agent_da_return_e ret = SYNC_AGENT_DA_ERRORS;
73 ret = sync_agent_open_service(FW_CONTACT);
74 if (ret != SYNC_AGENT_DA_SUCCESS) {
79 * @param[in] content_type service type - service data connector plug-in's ID described in F/W config file
80 * @return operation result
81 * @retval SYNC_AGENT_DA_SUCCESS success
82 * @retval error_value fail
84 sync_agent_da_return_e sync_agent_open_service(int content_type);
87 * @brief Close service database
91 sync_agent_da_return_e ret = SYNC_AGENT_DA_ERRORS;
93 ret = sync_agent_close_service(FW_CONTACT);
94 if (ret != SYNC_AGENT_DA_SUCCESS) {
99 * @param[in] content_type service type - service data connector plug-in's ID described in F/W config file
100 * @return operation result
101 * @retval SYNC_AGENT_DA_SUCCESS success
102 * @retval error_value fail
104 sync_agent_da_return_e sync_agent_close_service(int content_type);
107 * @brief Start transaction for service database
111 sync_agent_da_return_e ret = SYNC_AGENT_DA_ERRORS;
113 ret = sync_agent_begin_service(FW_CONTACT);
114 if (ret != SYNC_AGENT_DA_SUCCESS) {
119 * @param[in] content_type service type - service data connector plug-in's ID described in F/W config file
120 * @return operation result
121 * @retval SYNC_AGENT_DA_SUCCESS success
122 * @retval error_value fail
124 sync_agent_da_return_e sync_agent_begin_service(int content_type);
127 * @brief End transaction for service database
131 sync_agent_da_return_e ret = SYNC_AGENT_DA_ERRORS;
133 ret = sync_agent_end_service(FW_CONTACT, false); //transaction rollback by 'false'
134 if (ret != SYNC_AGENT_DA_SUCCESS) {
139 * @param[in] content_type service type - service data connector plug-in's ID described in F/W config file
140 * @param[in] is_success 1 : commit, 0 : rollback
141 * @return operation result
142 * @retval SYNC_AGENT_DA_SUCCESS success
143 * @retval error_value fail
145 sync_agent_da_return_e sync_agent_end_service(int content_type, int is_success);
148 * @brief Create initialized framework service item instance
152 sync_agent_da_return_e ret = SYNC_AGENT_DA_ERRORS;
153 sync_agent_da_service_item_s *service_item = NULL;
155 ret = sync_agent_create_service_item(&service_item);
156 if (ret != SYNC_AGENT_DA_SUCCESS) {
161 * @param[out] service_item sync_agent_da_service_item_s type of framework service item instance newly initialied
162 * @return operation result
163 * @retval SYNC_AGENT_DA_SUCCESS success
164 * @retval error_value fail
166 sync_agent_da_return_e sync_agent_create_service_item(sync_agent_da_service_item_s ** service_item);
169 * @brief Create initialized framework service folder instance
173 sync_agent_da_return_e ret = SYNC_AGENT_DA_ERRORS;
174 sync_agent_da_service_folder_s *service_folder = NULL;
176 ret = sync_agent_create_service_folder(&service_folder);
177 if (ret != SYNC_AGENT_DA_SUCCESS) {
182 * @param[out] service_folder sync_agent_da_service_folder_s type of framework service folder instance newly initialied
183 * @return operation result
184 * @retval SYNC_AGENT_DA_SUCCESS success
185 * @retval error_value fail
187 sync_agent_da_return_e sync_agent_create_service_folder(sync_agent_da_service_folder_s ** service_folder);
190 * @brief Free framework service item instance provided
194 sync_agent_da_return_e ret = SYNC_AGENT_DA_ERRORS;
195 sync_agent_da_service_item_s *service_item = NULL;
197 ret = sync_agent_create_service_item(&service_item);
198 if (ret != SYNC_AGENT_DA_SUCCESS) {
204 ret = sync_agent_free_service_item(service_item);
205 if (ret != SYNC_AGENT_DA_SUCCESS) {
210 * @param[in] service_item sync_agent_da_service_item_s type of framework service item instance to free
211 * @return operation result
212 * @retval SYNC_AGENT_DA_SUCCESS success
213 * @retval error_value fail
215 sync_agent_da_return_e sync_agent_free_service_item(sync_agent_da_service_item_s * service_item);
218 * @brief Free framework service folder instance provided
222 sync_agent_da_return_e ret = SYNC_AGENT_DA_ERRORS;
223 sync_agent_da_service_folder_s *service_folder = NULL;
225 ret = sync_agent_create_service_folder(&service_folder);
226 if (ret != SYNC_AGENT_DA_SUCCESS) {
232 ret = sync_agent_free_service_folder(&service_folder);
233 if (ret != SYNC_AGENT_DA_SUCCESS) {
238 * @param[in] service_folder sync_agent_da_service_folder_s type of framework service folder instance to free
239 * @return operation result
240 * @retval SYNC_AGENT_DA_SUCCESS success
241 * @retval error_value fail
243 sync_agent_da_return_e sync_agent_free_service_folder(sync_agent_da_service_folder_s * service_folder);
246 * @brief Add framework service item instance into frameowrk db
250 sync_agent_da_return_e ret = SYNC_AGENT_DA_ERRORS;
251 sync_agent_da_service_item_s *service_item = NULL;
252 char *item_id = NULL;
254 ret = sync_agent_create_service_item(&service_item);
255 if (ret != SYNC_AGENT_DA_SUCCESS) {
261 ret = sync_agent_add_service_item(service_item, &item_id, true);
262 if (ret != SYNC_AGENT_DA_SUCCESS) {
267 * @param[in] service_item sync_agent_da_service_item_s type of framework service item instance to add into framework db
268 * @param[out] item_id id of framework service item instance added new
269 * @param[in] update_changelog option specifying whether use of changelog for sync history
270 * @return operation result
271 * @retval SYNC_AGENT_DA_SUCCESS success
272 * @retval error_value fail
274 sync_agent_da_return_e sync_agent_add_service_item(sync_agent_da_service_item_s * service_item, char **item_id, bool update_changelog);
278 * @brief Add framework service item instance into frameowrk db
282 sync_agent_da_return_e ret = SYNC_AGENT_DA_ERRORS;
283 sync_agent_da_service_item_s *service_item = NULL;
284 char *item_id = NULL;
286 ret = sync_agent_create_service_item(&service_item);
287 if (ret != SYNC_AGENT_DA_SUCCESS) {
293 ret = sync_agent_add_service_bulk_item(service_item, &item_id, true);
294 if (ret != SYNC_AGENT_DA_SUCCESS) {
299 * @param[in] service_item sync_agent_da_service_item_s type of framework service item instance to add into framework db
300 * @param[out] item_id id of framework service item instance added new
301 * @param[in] update_changelog option specifying whether use of changelog for sync history
302 * @return operation result
303 * @retval SYNC_AGENT_DA_SUCCESS success
304 * @retval error_value fail
306 sync_agent_da_return_e sync_agent_add_service_bulk_item(sync_agent_da_service_item_s *service_item, char **item_id, bool update_changelog);
309 * @brief Update framework service item on framework db
313 sync_agent_da_return_e ret = SYNC_AGENT_DA_ERRORS;
314 sync_agent_da_service_item_s *service_item = NULL;
316 ret = sync_agent_get_service_item(item_id, &service_item);
317 if (ret != SYNC_AGENT_DA_SUCCESS) {
323 ret = sync_agent_update_service_item(service_item, item_id, true);
324 if (ret != SYNC_AGENT_DA_SUCCESS) {
329 * @param[in] service_item sync_agent_da_service_item_s type of framework service item instance to update into framework db
330 * @param[in] item_id id of framework service item instance desired to update
331 * @param[in] update_changelog option specifying whether use of changelog for sync history
332 * @return operation result
333 * @retval SYNC_AGENT_DA_SUCCESS success
334 * @retval error_value fail
336 sync_agent_da_return_e sync_agent_update_service_item(sync_agent_da_service_item_s * service_item, char *item_id, bool update_changelog);
339 * @brief Update framework service item on framework db
343 sync_agent_da_return_e ret = SYNC_AGENT_DA_ERRORS;
344 sync_agent_da_service_item_s *service_item = NULL;
346 ret = sync_agent_get_service_item(item_id, &service_item);
347 if (ret != SYNC_AGENT_DA_SUCCESS) {
353 ret = sync_agent_update_service_bulk_item(service_item, &item_id, true);
354 if (ret != SYNC_AGENT_DA_SUCCESS) {
359 * @param[in] service_item sync_agent_da_service_item_s type of framework service item instance to update into framework db
360 * @param[in] item_id id of framework service item instance desired to update
361 * @param[in] update_changelog option specifying whether use of changelog for sync history
362 * @return operation result
363 * @retval SYNC_AGENT_DA_SUCCESS success
364 * @retval error_value fail
366 sync_agent_da_return_e sync_agent_update_service_bulk_item(sync_agent_da_service_item_s *service_item, char **item_id, bool update_changelog);
369 * @brief Update calendar exdate:updated item on framework db
373 sync_agent_da_return_e ret = SYNC_AGENT_DA_ERRORS;
374 sync_agent_da_service_item_s *service_item = NULL;
376 ret = sync_agent_get_service_item(item_id, &service_item);
377 if (ret != SYNC_AGENT_DA_SUCCESS) {
383 ret = sync_agent_add_updated_exdate_item(service_item, &item_id, true);
384 if (ret != SYNC_AGENT_DA_SUCCESS) {
389 * @param[in] service_item sync_agent_da_service_item_s type of framework service item instance to update into framework db
390 * @param[in] parent_id id of framework parent service item instance desired to update
391 * @param[in] child_id id of framework child service item instance desired to update
392 * @param[in] update_changelog option specifying whether use of changelog for sync history
393 * @return operation result
394 * @retval SYNC_AGENT_DA_SUCCESS success
395 * @retval error_value fail
397 sync_agent_da_return_e sync_agent_add_updated_exdate_item(sync_agent_da_service_item_s * service_item, char *parent_id, char *child_id, bool update_changelog);
399 * @brief Update calendar exdate:updated parent item
403 sync_agent_construct_exdate_parent_item(service_item);
406 * @param[in] service_item parent servic item id
409 void sync_agent_construct_exdate_parent_item(int content_type, char *parent_service_id);
413 * @brief Delete framework service item instance from frameowrk db
417 sync_agent_da_return_e ret = SYNC_AGENT_DA_ERRORS;
419 ret = sync_agent_delete_service_item(item_id, true);
420 if (ret != SYNC_AGENT_DA_SUCCESS) {
425 * @param[in] item_id id of framework service item instance desired to delete
426 * @param[in] update_changelog option specifying whether use of changelog for sync history
427 * @return operation result
428 * @retval SYNC_AGENT_DA_SUCCESS success
429 * @retval error_value fail
431 sync_agent_da_return_e sync_agent_delete_service_item(char *item_id, bool update_changelog);
434 * @brief Delete framework service item instance from frameowrk db
438 sync_agent_da_return_e ret = SYNC_AGENT_DA_ERRORS;
441 ret = sync_agent_delete_service_bulk_item(item_id, count, true);
442 if (ret != SYNC_AGENT_DA_SUCCESS) {
447 * @param[in] item_id id of framework service item instance desired to delete
448 * @param[in] count count of id
449 * @param[in] update_changelog option specifying whether use of changelog for sync history
450 * @return operation result
451 * @retval SYNC_AGENT_DA_SUCCESS success
452 * @retval error_value fail
454 sync_agent_da_return_e sync_agent_delete_service_bulk_item(char **item_id, int count, bool update_changelog);
458 * @brief Delete framework service item instance from frameowrk db using query option
462 sync_agent_da_return_e ret = SYNC_AGENT_DA_ERRORS;
463 sync_agent_da_delete_service_item_query_s query;
465 query.content_type = FW_CONTACT;
466 query.account_id = account_id;
468 ret = sync_agent_query_delete_service_items(&query);
469 if (ret != SYNC_AGENT_DA_SUCCESS) {
474 * @param[in] query sync_agent_da_delete_service_item_query_s type of query for delete operation
475 * @return operation result
476 * @retval SYNC_AGENT_DA_SUCCESS success
477 * @retval error_value fail
479 sync_agent_da_return_e sync_agent_query_delete_service_items(sync_agent_da_delete_service_item_query_s * query);
482 * @brief Fetch framework service item from framework db
486 sync_agent_da_return_e ret = SYNC_AGENT_DA_ERRORS;
487 sync_agent_da_service_item_s *service_item = NULL;
489 ret = sync_agent_get_service_item(item_id, &service_item);
490 if (ret != SYNC_AGENT_DA_SUCCESS) {
495 * @param[in] item_id id of framework service item instance desired to get
496 * @param[out] service_item framework service item instance fetched
497 * @return operation result
498 * @retval SYNC_AGENT_DA_SUCCESS success
499 * @retval error_value fail
501 sync_agent_da_return_e sync_agent_get_service_item(char *item_id, sync_agent_da_service_item_s ** service_item);
504 * @brief Fetch framework service folder from framework db
508 sync_agent_da_return_e ret = SYNC_AGENT_DA_ERRORS;
509 sync_agent_da_service_folder_s *service_folder = NULL;
511 ret = sync_agent_get_service_folder(folder_id, &service_folder);
512 if (ret != SYNC_AGENT_DA_SUCCESS) {
517 * @param[in] folder_id id of framework service folder instance desired to get
518 * @param[out] service_folder framework service folder instance fetched
519 * @return operation result
520 * @retval SYNC_AGENT_DA_SUCCESS success
521 * @retval error_value fail
523 sync_agent_da_return_e sync_agent_get_service_folder(char *folder_id, sync_agent_da_service_folder_s ** service_folder);
526 * @brief Execute predefined operation through plug-in
530 sync_agent_da_return_e ret = SYNC_AGENT_DA_ERRORS;
531 char *msg = get_msg_body();
534 ret = sync_agent_execute_service(FW_SMS, account_id, "send_msg", msg, &result);
535 if (ret != SYNC_AGENT_DA_SUCCESS) {
540 * @param[in] content_type service type - service data connector plug-in's ID described in F/W config file
541 * @param[in] account_id F/W account id
542 * @param[in] execute_key execute key
543 * @param[in] execute_values execute values
544 * @param[out] result extension result info
545 * @return operation result
546 * @retval SYNC_AGENT_DA_SUCCESS success
547 * @retval error_value fail
549 sync_agent_da_return_e sync_agent_execute_service(int content_type, int account_id, const char *execute_key, void *execute_values, void **result);
552 * @brief Get item used count
558 count = sync_agent_get_used_service_item_count(FW_CONTACT);
566 * @param[in] content_type service type - service data connector plug-in's ID described in F/W config file
567 * @return operation result
568 * @retval current item count success
569 * @retval error value fail
571 int sync_agent_get_used_service_item_count(int content_type);
574 * @brief Get calendar exdate item count
579 count = sync_agent_get_deleted_exdate_item_count(FW_CALENDAR);
587 * @param[in] content_type service type - service data connector plug-in's ID described in F/W config file
588 * @return operation result
589 * @retval current item count success
590 * @retval error value fail
592 int sync_agent_get_deleted_exdate_item_count(int content_type);
595 * @brief Get calendar exdate item count
599 sync_agent_is_exist_exdate_item(FW_CALENDAR, fw_parent_id, child_vcalendar)
602 * @param[in] content_type service type - service data connector plug-in's ID described in F/W config file
603 * @return operation result
604 * @retval current item count success
605 * @retval error value fail
607 sync_agent_da_return_e sync_agent_is_exist_exdate_item(int content_type, const char *fw_parent_id, const char *child_vcalendar);
610 * @brief Get item used count for folder
616 count = sync_agent_get_used_service_item_count_for_folder(FW_CONTACT, account_id, folder_id);
624 * @param[in] content_type service type - service data connector plug-in's ID described in F/W config file
625 * @param[in] account_id F/W account id
626 * @param[in] folder_id F/W folder id
627 * @return operation result
628 * @retval current item count success
629 * @retval error value fail
631 int sync_agent_get_used_service_item_count_for_folder(int content_type, int account_id, char *folder_id);
634 * @brief Write data store items to file
638 sync_agent_da_return_e ret = SYNC_AGENT_DA_ERRORS;
640 ret = sync_agent_backup_service_items_to_file(FW_CONTACT, account_id, "/tmp/contact_backup");
641 if (ret != SYNC_AGENT_DA_SUCCESS) {
646 * @param[in] content_type service type - service data connector plug-in's ID described in F/W config file
647 * @param[in] account_id F/W account id
648 * @param[out] file_path written file path
649 * @return operation result
650 * @retval SYNC_AGENT_DA_SUCCESS success
651 * @retval error value fail
653 sync_agent_da_return_e sync_agent_backup_service_items_to_file(int content_type, int account_id, char **file_path);
656 * @brief Add file-written item to data store
660 sync_agent_da_return_e ret = SYNC_AGENT_DA_ERRORS;
662 ret = sync_agent_restore_service_items_from_file(FW_CONTACT, account_id, "/tmp/contact_backup");
663 if (ret != SYNC_AGENT_DA_SUCCESS) {
668 * @param[in] content_type service type - service data connector plug-in's ID described in F/W config file
669 * @param[in] account_id F/W account id
670 * @param[in] file_path file path
671 * @return operation result
672 * @retval SYNC_AGENT_DA_SUCCESS success
673 * @retval error_value fail
675 sync_agent_da_return_e sync_agent_restore_service_items_from_file(int content_type, int account_id, const char *file_path);
678 * @brief Get service item id from framework service item id
682 char *item_id = NULL;
684 item_id = sync_agent_get_service_item_id(framework_item_id);
685 if (item_id != NULL) {
690 * @param[in] item_id item id
691 * @return operation result
692 * @retval service_item_id success
695 char *sync_agent_get_service_item_id(char *item_id);
698 * @brief Get service folder id from framework service folder id
702 char *folder_id = NULL;
704 folder_id = sync_agent_get_service_folder_id(framework_folder_id);
705 if (folder_id != NULL) {
710 * @param[in] folder_id folder id
711 * @return operation result
712 * @retval service_folder_id success
715 char *sync_agent_get_service_folder_id(char *folder_id);
718 * @brief Get max name length of sim contact
724 length = sync_agent_get_sim_contact_info_max_name_length(FW_CONTACT_SIM);
732 * @param[in] content_type service type - service data connector plug-in's ID described in F/W config file
733 * @return operation result
734 * @retval current item count success
735 * @retval error value fail
737 int sync_agent_get_sim_contact_info_max_name_length(int content_type);
740 * @brief Get max number length of sim contact
746 length = sync_agent_get_sim_contact_info_max_number_length(FW_CONTACT_SIM);
754 * @param[in] content_type service type - service data connector plug-in's ID described in F/W config file
755 * @return operation result
756 * @retval current item count success
757 * @retval error value fail
759 int sync_agent_get_sim_contact_info_max_number_length(int content_type);
762 * @brief Get max email length of sim contact
768 length = sync_agent_get_sim_contact_info_max_email_length(FW_CONTACT_SIM);
776 * @param[in] content_type service type - service data connector plug-in's ID described in F/W config file
777 * @return operation result
778 * @retval current item count success
779 * @retval error value fail
781 int sync_agent_get_sim_contact_info_max_email_length(int content_type);
784 * @brief Get empty count of sim contact
790 count = sync_agent_get_sim_contact_empty_count(FW_CONTACT_SIM);
798 * @param[in] content_type service type - service data connector plug-in's ID described in F/W config file
799 * @return operation result
800 * @retval current item count success
801 * @retval error value fail
803 int sync_agent_get_sim_contact_empty_count(int content_type);
806 * @brief Get empty number count of sim contact
812 count = sync_agent_get_sim_contact_number_empty_count(FW_CONTACT_SIM);
820 * @param[in] content_type service type - service data connector plug-in's ID described in F/W config file
821 * @return operation result
822 * @retval current item count success
823 * @retval error value fail
825 int sync_agent_get_sim_contact_empty_number_count(int content_type);
828 * @brief Get empty email count of sim contact
834 count = sync_agent_get_sim_contact_email_empty_count(FW_CONTACT_SIM);
842 * @param[in] content_type service type - service data connector plug-in's ID described in F/W config file
843 * @return operation result
844 * @retval current item count success
845 * @retval error value fail
847 int sync_agent_get_sim_contact_empty_email_count(int content_type);
850 * @brief Get addressbook ID of sim contact
854 int addressbook_id = 0;
856 addressbook_id = sync_agent_get_sim_contact_adressbook_id(FW_CONTACT_SIM);
857 if (addressbook_id == 0) {
864 * @param[in] content_type service type - service data connector plug-in's ID described in F/W config file
865 * @return operation result
866 * @retval current item count success
867 * @retval error value fail
869 int sync_agent_get_sim_contact_addressbook_id(int content_type);
872 * @brief Get item ID of sim contact
876 GList *item_id = NULL;
879 sync_agent_da_return_e ret = SYNC_AGENT_DA_ERRORS;
880 int sim_addressbook_id = 0;
882 ret = sync_agent_get_sim_contact_item_id(FW_CONTACT_SIM, sim_addressbook_id, &item_id);
883 if (ret == SYNC_AGENT_DA_ERRORS) {
890 * @param[in] content_type service type - service data connector plug-in's ID described in F/W config file
891 * @param[in] addressbook_id addressbook id of sim contact
892 * @param[out] item_id item id list of sim contacts
893 * @return operation result
894 * @retval current item count success
895 * @retval error value fail
897 sync_agent_da_return_e sync_agent_get_sim_contact_item_id(int content_type, int sim_addressbook_id, GList **item_id);
900 * @brief Get item ID of sim contact
904 sync_agent_da_return_e ret = SYNC_AGENT_DA_ERRORS;
908 ret = sync_agent_get_sim_contact_item(FW_CONTACT_SIM, item_id, &data);
909 if (ret == SYNC_AGENT_DA_ERRORS) {
916 * @param[in] content_type service type - service data connector plug-in's ID described in F/W config file
917 * @param[in] item_id item id of sim contact
918 * @param[out] content_type data of sim contact
919 * @return operation result
920 * @retval current item count success
921 * @retval error value fail
923 sync_agent_da_return_e sync_agent_get_sim_contact_item(int content_type, int item_id, char **data);
926 * @brief Add sim contact
930 sync_agent_da_return_e ret = SYNC_AGENT_DA_ERRORS;
932 int sim_addressbook_id;
935 ret = sync_agent_delete_sim_contact_item(FW_CONTACT_SIM, sim_addressbook_id, &item_id, data);
936 if (ret == SYNC_AGENT_DA_ERRORS) {
943 * @param[in] content_type service type - service data connector plug-in's ID described in F/W config file
944 * @param[in] addressbook_id addressbook id of sim contact
945 * @param[out] item_id item id of sim contact
946 * @param[in] content_type data of sim contact
947 * @return operation result
948 * @retval current item count success
949 * @retval error value fail
951 sync_agent_da_return_e sync_agent_add_sim_contact_item(int content_type, int sim_addressbook_id, int **item_id, char *data);
954 * @brief Delete sim contact
958 sync_agent_da_return_e ret = SYNC_AGENT_DA_ERRORS;
962 ret = sync_agent_delete_sim_contact_item(FW_CONTACT_SIM, item_id, data);
963 if (ret == SYNC_AGENT_DA_ERRORS) {
970 * @param[in] content_type service type - service data connector plug-in's ID described in F/W config file
971 * @param[in] item_id item id of sim contact
972 * @param[in] content_type data of sim contact
973 * @return operation result
974 * @retval current item count success
975 * @retval error value fail
977 sync_agent_da_return_e sync_agent_write_sim_contact_item(int content_type, int item_id, char *data);
981 * @brief Delete sim contact
985 sync_agent_da_return_e ret = SYNC_AGENT_DA_ERRORS;
988 ret = sync_agent_delete_sim_contact_item(FW_CONTACT_SIM, item_id);
989 if (ret == SYNC_AGENT_DA_ERRORS) {
996 * @param[in] content_type service type - service data connector plug-in's ID described in F/W config file
997 * @param[in] item_id item id of sim contact
998 * @return operation result
999 * @retval current item count success
1000 * @retval error value fail
1002 sync_agent_da_return_e sync_agent_delete_sim_contact_item(int content_type, int item_id);
1011 #endif /* INTERFACE_SERVICE_ITEM_H_ */