Fix compatibility for x64 arch.
[platform/core/system/sync-agent.git] / include / plugin / platform_monitor_interface.h
1 /*
2  * sync-agent
3  * Copyright (c) 2012 Samsung Electronics Co., Ltd.
4  *
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
8  *
9  *     http://www.apache.org/licenses/LICENSE-2.0
10  *
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.
16  */
17
18 #ifndef PLATFORM_MONITOR_INTERFACE_H_
19 #define PLATFORM_MONITOR_INTERFACE_H_
20
21 #include "platform_monitor_resource.h"
22 #include "platform-monitor/common.h"
23
24 #ifdef __cplusplus
25 extern "C" {
26 #endif                          /* __cplusplus */
27
28 /**
29  * @file platform_monitor_interface.h
30  * @brief Defines plug-in interfaces about service platform notification
31  */
32
33 /** @addtogroup plugin_platformmonitor PlatformMonitor Domain
34  * @ingroup plugin
35  *      @{
36  */
37
38 /**
39  * API to connect to the service and register client for receiving service notification
40  *
41  * @param[in] data data formatted by sync_agent_pm_register_data_s
42  *
43  * @par Since:
44  *
45  *
46  * @see sync_agent_init(const char *)
47  *
48  */
49         void sync_agent_plugin_init_service_noti(void *data);
50
51 /**
52  * API to disconnect service and unregister client to the service
53  *
54  * @return SYNC_AGENT_PM_SUCCESS on success, SYNC_AGENT_PM_FAIL on error
55  *
56  * @par Since:
57  *
58  *
59  * @see sync_agent_unregister_service_noti(int)
60  *
61  */
62         sync_agent_pm_return_e sync_agent_plugin_unregister_service_noti(void);
63
64 /**
65  * API to add user data to the service
66  *
67  * @param[in] add_data data to add to the service
68  * @param[in] added_data_id as returned by sync_agent_plugin_add_service_data() - id of the newly data added to the service
69  *
70  * @return SYNC_AGENT_PM_SUCCESS on success, SYNC_AGENT_PM_FAIL on error
71  *
72  * @par Since:
73  *
74  *
75  * @see sync_agent_add_service_data(int, void *, int *)
76  *
77  */
78         sync_agent_pm_return_e sync_agent_plugin_add_service_data(void *add_data, int *added_data_id);
79
80 /**
81  * API to remove user data to the service
82  *
83  * @param[in] remove_data_id service id of data expected to be deleted
84  *
85  * @return SYNC_AGENT_PM_SUCCESS on success, SYNC_AGENT_PM_FAIL on error
86  *
87  * @par Since:
88  *
89  *
90  * @see sync_agent_remove_service_data(int, int)
91  *
92  */
93         sync_agent_pm_return_e sync_agent_plugin_remove_service_data(int remove_data_id);
94
95 /**
96  * API to get service data
97  *
98  * @param[in] get_data_id service id of data that user want to get
99  * @param[in] service_data as returned by sync_agent_plugin_get_service_data() - service data that user want to get
100  *
101  * @return SYNC_AGENT_PM_SUCCESS on success, SYNC_AGENT_PM_FAIL on error
102  *
103  * @par Since:
104  *
105  *
106  * @see sync_agent_get_service_data(int, int, void **)
107  *
108  */
109         sync_agent_pm_return_e sync_agent_plugin_get_service_data(int get_data_id, void **service_data);
110
111 /**
112  * API to set user callback function pointer to the pre-registered service callback function
113  *
114  * @param[in] callback_counts the number of callback functions
115  * @param[in] list variable number of callback functions (type : 'sync_agent_specific_type_cb')
116  *
117  * @par Since:
118  *
119  *
120  * @see sync_agnet_register_user_callback(int, const char *, int, ...)
121  *
122  */
123         void sync_agent_plugin_set_user_callback(int callback_counts, va_list list);
124
125 /**
126  *      @}
127  */
128
129 #ifdef __cplusplus
130 }
131 #endif                          /* __cplusplus */
132 #endif                          /* PLATFORM_MONITOR_INTERFACE_H_ */