[Internal: merge sync-agent]
[platform/core/system/sync-agent.git] / src / fw-plugins / common-public / memo / src / plugin_interface.c
index 13643b4..8fa7056 100755 (executable)
@@ -56,6 +56,8 @@ static sync_agent_update_item_cb_plugin callback_update_item;
 
 static sync_agent_get_account_id_list_cb_plugin callback_get_accountidlist;
 
+static sync_agent_del_child_item_cb_plugin callback_delete_child_item;
+
 static void _free_item_node(sync_agent_plugin_item_node_s * node);
 
 static void _set_is_noti_from_me(int set_flag);
@@ -739,6 +741,13 @@ EXPORT_API void sync_agent_plugin_set_callback_get_account_id_list(sync_agent_ge
        _EXTERN_FUNC_EXIT;
 }
 
+EXPORT_API void sync_agent_plugin_set_callback_delete_child_item(sync_agent_del_child_item_cb_plugin callback)
+{
+       _EXTERN_FUNC_ENTER;
+       callback_delete_child_item = callback;
+       _EXTERN_FUNC_EXIT;
+}
+
 /********************************** static function *******************************************/
 
 static void _free_item_node(sync_agent_plugin_item_node_s * node)
@@ -797,7 +806,11 @@ void _process_memo_change(void *data)
        }
 
        pthread_t thread_process_change_id;
-       pthread_create(&thread_process_change_id, 0, __rutine_memo_change, 0);
+       int status_thread_create = 0;
+       status_thread_create = pthread_create(&thread_process_change_id, 0, __rutine_memo_change, 0);
+       if(status_thread_create != 0) {
+               _DEBUG_WARNING("pthread_create [%d]", status_thread_create );
+       }
 
        _INNER_FUNC_EXIT;
 }
@@ -840,7 +853,7 @@ static void *__rutine_memo_change(void *data)
                                {
                                        /* memo service is not supported folder */
                                        _DEBUG_VERBOSE("[da_memo_plugIn]  MEMO_OPERATION_ADD\n");
-                                       result = callback_add_item(accountList[i], i, str_item_id, FW_MEMO, "0", 0);
+                                       result = callback_add_item(accountList[i], i, str_item_id, NULL, FW_MEMO, "0", 0);
                                        if (!result) {
                                                _DEBUG_ERROR("[da_memo_plugIn] Failed to call callback_add_item() \n");
                                                goto DACI_FINISH;
@@ -850,7 +863,7 @@ static void *__rutine_memo_change(void *data)
                        case MEMO_OPERATION_UPDATE:
                                {
                                        _DEBUG_VERBOSE("[da_memo_plugIn] MEMO_OPERATION_UPDATE\n");
-                                       result = callback_update_item(accountList[i], i, str_item_id, FW_MEMO);
+                                       result = callback_update_item(accountList[i], i, str_item_id, NULL, FW_MEMO);
                                        if (!result) {
                                                _DEBUG_ERROR("[da_memo_plugIn] Failed to call callback_update_item() \n");
                                                goto DACI_FINISH;