Fix compatibility for x64 arch.
[platform/core/system/sync-agent.git] / include / plugin / mo_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 MO_INTERFACE_H_
19 #define MO_INTERFACE_H_
20
21 #include "device/information.h"
22 #include "device/error.h"
23
24 #ifdef __cplusplus
25 extern "C" {
26 #endif                          /* __cplusplus */
27
28 /**
29  * @file mo_interface.h
30  * @brief Defines plug-in interfaces about mo
31  */
32
33 /** @addtogroup plugin_mo MO Domain
34  * @ingroup plugin
35  *      @{
36  */
37
38 /**
39  * API to get server id list
40  *
41  * @param[in] server_id_list_cnt count of server id list
42  *
43  * @return server_id_list on success, NULL on error
44  *
45  * @par Since:
46  *
47  *
48  * @see sync_agent_construct_mo_table(sync_agent_dm_mo_type_e, const char *, int, int)
49  *
50  */
51         char **sync_agent_plugin_get_server_id_list(int *server_id_list_cnt);
52
53 /**
54  * API to get mo value that user want to know
55  *
56  * @param[in] mo_full_path mo full path
57  * @param[in] mo_name mo name corresponding to the value that user want to know
58  * @param[in] mo_value as returned by sync_agent_plugin_get_mo_value() - mo value
59  *
60  * @return 0 on success, -1 on error
61  *
62  * @par Since:
63  *
64  *
65  * @see sync_agent_construct_mo_table(sync_agent_dm_mo_type_e, const char *, int, int), sync_agent_uptodate_mo_table(sync_agent_dm_mo_type_e, int, char *)
66  *
67  */
68         int sync_agent_plugin_get_mo_value(const char *mo_full_path, const char *mo_name, char **mo_value);
69
70 /**
71  * API to set function pointer for getting device information
72  *
73  * @param[in] func callback function for getting device information
74  *
75  * @par Since:
76  *
77  *
78  * @see __process_device_manage(xmlNode *)
79  *
80  */
81         void sync_agent_plugin_set_function_get_devinfo(sync_agent_get_devinfo_cb func);
82
83 /**
84  * API to execute device function
85  *
86  * @param[in] mo_path mo path
87  * @param[in] err_num as returned by sync_agent_plugin_execute_ext() - error number
88  * @param[in] check_operation setting value for sync / async operation
89  *
90  * @return 1 on success, 0 on error
91  *
92  * @par Since:
93  *
94  *
95  * @see sync_agent_execute_mo_ext(const char *, int *, int)
96  *
97  */
98         int sync_agent_plugin_execute_ext(const char *mo_path, int *err_num, int check_operation);
99
100 /**
101  * API to initialize mo related service
102  *
103  * @return 1 on success, -1 on error
104  *
105  * @par Since:
106  *
107  *
108  * @see sync_agent_initialize_mo(int)
109  *
110  */
111         int sync_agent_plugin_initialize();
112
113 /**
114  *      @}
115  */
116
117 #ifdef __cplusplus
118 }
119 #endif                          /* __cplusplus */
120 #endif                          /* MO_INTERFACE_H_ */