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 CHANGELOG_INTERNAL_H_
19 #define CHANGELOG_INTERNAL_H_
22 * @file changelog_internal.h
23 * @brief Support to process changed service item, effect to F/W item, change log table.
26 /** @addtogroup data_adapter
31 * @brief Handling added item to service storage, update sync-agent-framework item & change log table
32 * @remarks This function is called when the new item is added to the service storage. data connector plugin developer use this function.
33 * @param[in] service_account_id service account id
34 * @param[in] index possible mapping one service account with multiple sync-agent-framework account, so need index of sync-agent-framework account.
35 * @param[in] service_item_id added service item id
36 * @param[in] parent_service_item_id parent service id of the added service item id (only Calendar exdate item)
37 * @param[in] item_type service type - service data connector plugin's id described in sync-agent-framework config file
38 * @param[in] service_folder_id service folder id
39 * @param[in] folder_type folder type defined in data connector plugin
40 * @return 1 on success, otherwise a negative error value.
41 * @see sync_agent_changelog_add_item()
43 int da_handle_add_item(int service_account_id, int index, char *service_item_id, char *parent_service_item_id, int item_type, char *service_folder_id, int folder_type);
46 * @brief Handling deleted item from service storage, update sync-agent-framework item & change log table
47 * @remarks This function is called when the item is deleted from the service storage. data connector plugin developer use this function.
48 * @param[in] service_account_id service account id
49 * @param[in] index possible mapping one service account with multiple sync-agent-framework account, so need index of sync-agent-framework account
50 * @param[in] service_item_id added service item id
51 * @param[in] item_type service type - service data connector plugin's id described in sync-agent-framework config file
52 * @return 1 on success, otherwise a negative error value.
53 * @see sync_agent_changelog_delete_item()
55 int da_handle_del_item(int service_account_id, int index, char *service_item_id, int item_type);
58 * @brief Handling updated item from service storage, update sync-agent-framework item & change log table
59 * @remarks This function is called when the item is updated from the service storage. data connector plugin developer use this function.
60 * @param[in] service_account_id service account id
61 * @param[in] index possible mapping one service account with multiple sync-agent-framework account, so need index of sync-agent-framework account
62 * @param[in] service_item_id added service item id
63 * @param[in] parent_service_item_id parent service id of the added service item id (only Calendar exdate item)
64 * @param[in] item_type service type - service data connector pluIn's ID described in F/W config file
65 * @return 1 on success, otherwise a negative error value.
66 * @see sync_agent_changelog_update_item()
68 int da_handle_update_item(int service_account_id, int index, char *service_item_id, char *parent_service_item_id, int item_type);
71 * @brief Handling delete child item from service storage, update sync-agent-framework item & change log table
72 * @remarks This function is called when the item is deleted from the service storage. data connector plugin developer use this function.
73 * @param[in] parent_id parent service id
74 * @return 1 on success, otherwise a negative error value.
75 * @see sync_agent_changelog_delete_item()
77 int da_handle_del_child_item(char *parent_service_id, char *child_service_id);
83 #endif /* CHANGELOG_INTERNAL_H_ */