summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSlava Barinov <v.barinov@samsung.com>2016-04-13 11:11:15 +0300
committerSlava Barinov <v.barinov@samsung.com>2016-04-13 11:11:15 +0300
commit9399e6ceefb979c7aa6b20b6bcdd4042a87197d8 (patch)
tree9ba628b6759fec436d737f52283d7d0f2a3f92d7
parenta126c2fd22327abed23ce60d2e4176b6ebc6a7da (diff)
downloadsync-manager-sandbox/vbarinov/vis.tar.gz
sync-manager-sandbox/vbarinov/vis.tar.bz2
sync-manager-sandbox/vbarinov/vis.zip
-rw-r--r--CMakeLists.txt2
-rw-r--r--include/mobile/sync_manager.h14
-rw-r--r--include/sync_adapter.h9
-rw-r--r--include/wearable/sync_manager.h14
4 files changed, 27 insertions, 12 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2eb064d..c5fae70 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -16,6 +16,8 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
PROJECT("sync-manager")
ADD_DEFINITIONS("-flto")
+ADD_DEFINITIONS("-fvisibility=hidden")
+ADD_DEFINITIONS("-DEXPORT_API=__attribute__((visibility(\"default\")))")
IF(NOT DEFINED PACKAGE_NAME)
SET(PACKAGE_NAME "sync-manager")
ENDIF(NOT DEFINED PACKAGE_NAME)
diff --git a/include/mobile/sync_manager.h b/include/mobile/sync_manager.h
index e05ad63..b058fa5 100644
--- a/include/mobile/sync_manager.h
+++ b/include/mobile/sync_manager.h
@@ -95,6 +95,10 @@ extern "C"
#define SYNC_SUPPORTS_CAPABILITY_MUSIC "http://tizen.org/sync/capability/music"
+#ifndef EXPORT_API
+#define EXPORT_API
+#endif // EXPORT_API
+
/**
* @brief Enumerations for sync options of sync job request APIs.
* @since_tizen 2.4
@@ -169,7 +173,7 @@ typedef bool (*sync_manager_sync_job_cb)(account_h account, const char *sync_job
* @see sync_manager_remove_sync_job()
* @see sync_option_e
*/
-int sync_manager_on_demand_sync_job(account_h account, const char *sync_job_name, sync_option_e sync_option, bundle *sync_job_user_data, int *sync_job_id);
+EXPORT_API int sync_manager_on_demand_sync_job(account_h account, const char *sync_job_name, sync_option_e sync_option, bundle *sync_job_user_data, int *sync_job_id);
/**
@@ -204,7 +208,7 @@ int sync_manager_on_demand_sync_job(account_h account, const char *sync_job_name
* @see sync_option_e
* @see sync_period_e
*/
-int sync_manager_add_periodic_sync_job(account_h account, const char *sync_job_name, sync_period_e sync_period, sync_option_e sync_option, bundle *sync_job_user_data, int *sync_job_id);
+EXPORT_API int sync_manager_add_periodic_sync_job(account_h account, const char *sync_job_name, sync_period_e sync_period, sync_option_e sync_option, bundle *sync_job_user_data, int *sync_job_id);
/**
@@ -239,7 +243,7 @@ int sync_manager_add_periodic_sync_job(account_h account, const char *sync_job_n
* @see sync_manager_remove_sync_job()
* @see sync_option_e
*/
-int sync_manager_add_data_change_sync_job(account_h account, const char *sync_capability, sync_option_e sync_option, bundle *sync_job_user_data, int *sync_job_id);
+EXPORT_API int sync_manager_add_data_change_sync_job(account_h account, const char *sync_capability, sync_option_e sync_option, bundle *sync_job_user_data, int *sync_job_id);
/**
@@ -266,7 +270,7 @@ int sync_manager_add_data_change_sync_job(account_h account, const char *sync_ca
* @see sync_manager_add_periodic_sync_job()
* @see sync_manager_add_data_change_sync_job()
*/
-int sync_manager_remove_sync_job(int sync_job_id);
+EXPORT_API int sync_manager_remove_sync_job(int sync_job_id);
/**
@@ -293,7 +297,7 @@ int sync_manager_remove_sync_job(int sync_job_id);
* @see sync_manager_add_periodic_sync_job()
* @see sync_manager_add_data_change_sync_job()
*/
-int sync_manager_foreach_sync_job(sync_manager_sync_job_cb sync_job_cb, void *user_data);
+EXPORT_API int sync_manager_foreach_sync_job(sync_manager_sync_job_cb sync_job_cb, void *user_data);
/* End of Sync Manager APIs */
diff --git a/include/sync_adapter.h b/include/sync_adapter.h
index 37348b1..2266137 100644
--- a/include/sync_adapter.h
+++ b/include/sync_adapter.h
@@ -63,6 +63,11 @@ extern "C" {
* @see sync_manager_add_periodic_sync_job()
* @see sync_manager_add_data_change_sync_job()
*/
+
+ #ifndef EXPORT_API
+ #define EXPORT_API
+ #endif // EXPORT_API
+
typedef bool (*sync_adapter_start_sync_cb)(account_h account, const char *sync_job_name, const char *sync_capability, bundle *sync_job_user_data);
@@ -109,7 +114,7 @@ typedef void (*sync_adapter_cancel_sync_cb)(account_h account, const char *sync_
* @see sync_adapter_cancel_sync_cb()
* @see sync_adapter_unset_callbacks()
*/
-int sync_adapter_set_callbacks(sync_adapter_start_sync_cb on_start_cb, sync_adapter_cancel_sync_cb on_cancel_cb);
+EXPORT_API int sync_adapter_set_callbacks(sync_adapter_start_sync_cb on_start_cb, sync_adapter_cancel_sync_cb on_cancel_cb);
/**
@@ -129,7 +134,7 @@ int sync_adapter_set_callbacks(sync_adapter_start_sync_cb on_start_cb, sync_adap
* @see sync_adapter_cancel_sync_cb()
* @see sync_adapter_set_callbacks()
*/
-int sync_adapter_unset_callbacks(void);
+EXPORT_API int sync_adapter_unset_callbacks(void);
/* End of Sync Adapter APIs */
diff --git a/include/wearable/sync_manager.h b/include/wearable/sync_manager.h
index 277e731..d504c46 100644
--- a/include/wearable/sync_manager.h
+++ b/include/wearable/sync_manager.h
@@ -77,6 +77,10 @@ extern "C"
#define SYNC_SUPPORTS_CAPABILITY_MUSIC "http://tizen.org/sync/capability/music"
+#ifndef EXPORT_API
+#define EXPORT_API
+#endif // EXPORT_API
+
/**
* @brief Enumerations for sync options of sync job request APIs.
* @since_tizen 3.0
@@ -151,7 +155,7 @@ typedef bool (*sync_manager_sync_job_cb)(account_h account, const char *sync_job
* @see sync_manager_remove_sync_job()
* @see sync_option_e
*/
-int sync_manager_on_demand_sync_job(account_h account, const char *sync_job_name, sync_option_e sync_option, bundle *sync_job_user_data, int *sync_job_id);
+EXPORT_API int sync_manager_on_demand_sync_job(account_h account, const char *sync_job_name, sync_option_e sync_option, bundle *sync_job_user_data, int *sync_job_id);
/**
@@ -186,7 +190,7 @@ int sync_manager_on_demand_sync_job(account_h account, const char *sync_job_name
* @see sync_option_e
* @see sync_period_e
*/
-int sync_manager_add_periodic_sync_job(account_h account, const char *sync_job_name, sync_period_e sync_period, sync_option_e sync_option, bundle *sync_job_user_data, int *sync_job_id);
+EXPORT_API int sync_manager_add_periodic_sync_job(account_h account, const char *sync_job_name, sync_period_e sync_period, sync_option_e sync_option, bundle *sync_job_user_data, int *sync_job_id);
/**
@@ -216,7 +220,7 @@ int sync_manager_add_periodic_sync_job(account_h account, const char *sync_job_n
* @see sync_manager_remove_sync_job()
* @see sync_option_e
*/
-int sync_manager_add_data_change_sync_job(account_h account, const char *sync_capability, sync_option_e sync_option, bundle *sync_job_user_data, int *sync_job_id);
+EXPORT_API int sync_manager_add_data_change_sync_job(account_h account, const char *sync_capability, sync_option_e sync_option, bundle *sync_job_user_data, int *sync_job_id);
/**
@@ -243,7 +247,7 @@ int sync_manager_add_data_change_sync_job(account_h account, const char *sync_ca
* @see sync_manager_add_periodic_sync_job()
* @see sync_manager_add_data_change_sync_job()
*/
-int sync_manager_remove_sync_job(int sync_job_id);
+EXPORT_API int sync_manager_remove_sync_job(int sync_job_id);
/**
@@ -270,7 +274,7 @@ int sync_manager_remove_sync_job(int sync_job_id);
* @see sync_manager_add_periodic_sync_job()
* @see sync_manager_add_data_change_sync_job()
*/
-int sync_manager_foreach_sync_job(sync_manager_sync_job_cb sync_job_cb, void *user_data);
+EXPORT_API int sync_manager_foreach_sync_job(sync_manager_sync_job_cb sync_job_cb, void *user_data);
/* End of Sync Manager APIs */