From: Hyuk Lee Date: Mon, 8 Aug 2016 07:46:19 +0000 (+0900) Subject: Add the Deprecation log msg X-Git-Tag: submit/tizen/20160818.005730^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5ec51d797985d00bff7009ce8b1c5ea369cdbee1;p=platform%2Fcore%2Fapi%2Fbluetooth.git Add the Deprecation log msg Change-Id: Id7f9aeb4f74d77a21131e5834cfe0fe7133b9180 Signed-off-by: Hyuk Lee --- diff --git a/include/mobile/bluetooth.h b/include/mobile/bluetooth.h index 19145af..538be67 100644 --- a/include/mobile/bluetooth.h +++ b/include/mobile/bluetooth.h @@ -22,9 +22,14 @@ #include #include #include +#include #include +#ifndef TIZEN_DEPRECATED_API +#define TIZEN_DEPRECATED_API __attribute__((__visibility__("default"), deprecated)) +#endif + #ifdef __cplusplus extern "C" { @@ -696,7 +701,7 @@ int bt_adapter_remove_remote_oob_data(const char *remote_address); * @see bt_adapter_le_set_device_discovery_state_changed_cb() * @see bt_adapter_le_unset_device_discovery_state_changed_cb() */ -int bt_adapter_le_start_device_discovery(void); +int bt_adapter_le_start_device_discovery(void) TIZEN_DEPRECATED_API; /** * @deprecated Deprecated since 2.3.1 @@ -724,7 +729,7 @@ int bt_adapter_le_start_device_discovery(void); * @see bt_adapter_le_unset_device_discovery_state_changed_cb() * @see bt_adapter_le_device_discovery_state_changed_cb() */ -int bt_adapter_le_stop_device_discovery(void); +int bt_adapter_le_stop_device_discovery(void) TIZEN_DEPRECATED_API; /** * @deprecated Deprecated since 2.3.1 @@ -751,7 +756,7 @@ int bt_adapter_le_stop_device_discovery(void); * @see bt_adapter_le_start_device_discovery() * @see bt_adapter_le_stop_device_discovery() */ -int bt_adapter_le_is_discovering(bool *is_discovering); +int bt_adapter_le_is_discovering(bool *is_discovering) TIZEN_DEPRECATED_API; /** * @deprecated Deprecated since 2.3.1 @@ -775,7 +780,7 @@ int bt_adapter_le_is_discovering(bool *is_discovering); * @see bt_adapter_le_device_discovery_state_changed_cb() * @see bt_adapter_le_unset_device_discovery_state_changed_cb() */ -int bt_adapter_le_set_device_discovery_state_changed_cb(bt_adapter_le_device_discovery_state_changed_cb callback, void *user_data); +int bt_adapter_le_set_device_discovery_state_changed_cb(bt_adapter_le_device_discovery_state_changed_cb callback, void *user_data) TIZEN_DEPRECATED_API; /** * @deprecated Deprecated since 2.3.1 @@ -793,7 +798,7 @@ int bt_adapter_le_set_device_discovery_state_changed_cb(bt_adapter_le_device_dis * @see bt_initialize() * @see bt_adapter_le_set_device_discovery_state_changed_cb() */ -int bt_adapter_le_unset_device_discovery_state_changed_cb(void); +int bt_adapter_le_unset_device_discovery_state_changed_cb(void) TIZEN_DEPRECATED_API; /** * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE @@ -1113,7 +1118,7 @@ int bt_adapter_le_destroy_advertiser(bt_advertiser_h advertiser); */ int bt_adapter_le_add_advertising_data(bt_advertiser_h advertiser, bt_adapter_le_packet_type_e pkt_type, bt_adapter_le_packet_data_type_e data_type, - void *data, unsigned int data_size); + void *data, unsigned int data_size) TIZEN_DEPRECATED_API; /** * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE @@ -1333,7 +1338,7 @@ int bt_adapter_le_set_advertising_tx_power_level(bt_advertiser_h advertiser, * @see bt_adapter_le_clear_advertising_data() */ int bt_adapter_le_remove_advertising_data(bt_advertiser_h advertiser, - bt_adapter_le_packet_type_e pkt_type, bt_adapter_le_packet_data_type_e data_type); + bt_adapter_le_packet_type_e pkt_type, bt_adapter_le_packet_data_type_e data_type) TIZEN_DEPRECATED_API; /** * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE @@ -1390,7 +1395,7 @@ int bt_adapter_le_clear_advertising_data(bt_advertiser_h advertiser, bt_adapter_ * @see bt_adapter_le_advertising_state_changed_cb() */ int bt_adapter_le_start_advertising(bt_advertiser_h advertiser, bt_adapter_le_advertising_params_s *adv_params, - bt_adapter_le_advertising_state_changed_cb cb, void *user_data); + bt_adapter_le_advertising_state_changed_cb cb, void *user_data) TIZEN_DEPRECATED_API; /** * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE @@ -3634,7 +3639,7 @@ int bt_hdp_unset_data_received_cb(void); * @post @a callback will be called if there are primary services. * @see bt_gatt_primary_service_cb() */ -int bt_gatt_foreach_primary_services(const char *remote_address, bt_gatt_primary_service_cb callback, void *user_data); +int bt_gatt_foreach_primary_services(const char *remote_address, bt_gatt_primary_service_cb callback, void *user_data) TIZEN_DEPRECATED_API; /** * @deprecated Deprecated since 2.3.1. This function call is not required because characteristic discovery is happened automatically. @@ -3658,7 +3663,7 @@ int bt_gatt_foreach_primary_services(const char *remote_address, bt_gatt_primary * @post @a callback will be called. * @see bt_gatt_characteristics_discovered_cb() */ -int bt_gatt_discover_characteristics(bt_gatt_attribute_h service, bt_gatt_characteristics_discovered_cb callback, void *user_data); +int bt_gatt_discover_characteristics(bt_gatt_attribute_h service, bt_gatt_characteristics_discovered_cb callback, void *user_data) TIZEN_DEPRECATED_API; /** * @deprecated Deprecated since 2.3.1. Use bt_gatt_get_uuid instead. @@ -3681,7 +3686,7 @@ int bt_gatt_discover_characteristics(bt_gatt_attribute_h service, bt_gatt_charac * * @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. */ -int bt_gatt_get_service_uuid(bt_gatt_attribute_h service, char **uuid); +int bt_gatt_get_service_uuid(bt_gatt_attribute_h service, char **uuid) TIZEN_DEPRECATED_API; /** * @deprecated Deprecated since 2.3.1. Use bt_gatt_service_foreach_included_services or bt_gatt_service_get_included_service instead. @@ -3706,7 +3711,7 @@ int bt_gatt_get_service_uuid(bt_gatt_attribute_h service, char **uuid); * @post @a callback will be called if there are included services. * @see bt_gatt_included_service_cb() */ -int bt_gatt_foreach_included_services(bt_gatt_attribute_h service, bt_gatt_included_service_cb callback, void *user_data); +int bt_gatt_foreach_included_services(bt_gatt_attribute_h service, bt_gatt_included_service_cb callback, void *user_data) TIZEN_DEPRECATED_API; /** * @deprecated Deprecated since 2.3.1. Use bt_gatt_client_set_characteristic_value_changed_cb instead. @@ -3724,7 +3729,7 @@ int bt_gatt_foreach_included_services(bt_gatt_attribute_h service, bt_gatt_inclu * @pre The Bluetooth service must be initialized with bt_initialize(). * @see bt_gatt_unset_characteristic_changed_cb() */ -int bt_gatt_set_characteristic_changed_cb(bt_gatt_characteristic_changed_cb callback, void *user_data); +int bt_gatt_set_characteristic_changed_cb(bt_gatt_characteristic_changed_cb callback, void *user_data) TIZEN_DEPRECATED_API; /** * @deprecated Deprecated since 2.3.1. Use bt_gatt_client_unset_characteristic_value_changed_cb instead. @@ -3739,7 +3744,7 @@ int bt_gatt_set_characteristic_changed_cb(bt_gatt_characteristic_changed_cb call * @pre The Bluetooth service must be initialized with bt_initialize(). * @see bt_gatt_set_characteristic_changed_cb() */ -int bt_gatt_unset_characteristic_changed_cb(void); +int bt_gatt_unset_characteristic_changed_cb(void) TIZEN_DEPRECATED_API; /** * @deprecated Deprecated since 2.3.1. Use bt_gatt_client_set_characteristic_value_changed_cb instead. @@ -3759,7 +3764,7 @@ int bt_gatt_unset_characteristic_changed_cb(void); * @pre The Bluetooth service must be initialized with bt_initialize(). * @see bt_gatt_unset_characteristic_changed_cb() */ -int bt_gatt_watch_characteristic_changes(bt_gatt_attribute_h service); +int bt_gatt_watch_characteristic_changes(bt_gatt_attribute_h service) TIZEN_DEPRECATED_API; /** * @deprecated Deprecated since 2.3.1. Use bt_gatt_client_unset_characteristic_value_changed_cb instead. @@ -3779,7 +3784,7 @@ int bt_gatt_watch_characteristic_changes(bt_gatt_attribute_h service); * @pre The Bluetooth service must be initialized with bt_initialize(). * @see bt_gatt_set_characteristic_changed_cb() */ -int bt_gatt_unwatch_characteristic_changes(bt_gatt_attribute_h service); +int bt_gatt_unwatch_characteristic_changes(bt_gatt_attribute_h service) TIZEN_DEPRECATED_API; /** * @deprecated Deprecated since 2.3.1. Use bt_gatt_get_value or bt_gatt_get_uuid after bt_gatt_client_read_value instead. @@ -3805,7 +3810,7 @@ int bt_gatt_unwatch_characteristic_changes(bt_gatt_attribute_h service); * @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. * @see bt_gatt_set_characteristic_value() */ -int bt_gatt_get_characteristic_declaration(bt_gatt_attribute_h characteristic, char **uuid, unsigned char **value, int *value_length); +int bt_gatt_get_characteristic_declaration(bt_gatt_attribute_h characteristic, char **uuid, unsigned char **value, int *value_length) TIZEN_DEPRECATED_API; /** * @deprecated Deprecated since 2.3.1. Use bt_gatt_set_value and bt_gatt_client_write_value instead. @@ -3828,7 +3833,7 @@ int bt_gatt_get_characteristic_declaration(bt_gatt_attribute_h characteristic, c * @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. * @see bt_gatt_get_characteristic_declaration() */ -int bt_gatt_set_characteristic_value(bt_gatt_attribute_h characteristic, const unsigned char *value, int value_length); +int bt_gatt_set_characteristic_value(bt_gatt_attribute_h characteristic, const unsigned char *value, int value_length) TIZEN_DEPRECATED_API; /** * @deprecated Deprecated since 2.3.1. Use bt_gatt_set_value and bt_gatt_client_write_value instead. @@ -3853,7 +3858,7 @@ int bt_gatt_set_characteristic_value(bt_gatt_attribute_h characteristic, const u * @see bt_gatt_get_characteristic_declaration() */ int bt_gatt_set_characteristic_value_request(bt_gatt_attribute_h characteristic, const unsigned char *value, - int value_length, bt_gatt_characteristic_write_cb callback); + int value_length, bt_gatt_characteristic_write_cb callback) TIZEN_DEPRECATED_API; /** * @deprecated Deprecated since 2.3.1. GATT handle clone is not allowed. Instead, all handles for client role must be got from GATT client handle. @@ -3871,7 +3876,7 @@ int bt_gatt_set_characteristic_value_request(bt_gatt_attribute_h characteristic, * * @see bt_gatt_destroy_attribute_handle() */ -int bt_gatt_clone_attribute_handle(bt_gatt_attribute_h *clone, bt_gatt_attribute_h origin); +int bt_gatt_clone_attribute_handle(bt_gatt_attribute_h *clone, bt_gatt_attribute_h origin) TIZEN_DEPRECATED_API; /** * @deprecated Deprecated since 2.3.1. GATT handle clone and destroy are not allowed. @@ -3886,7 +3891,7 @@ int bt_gatt_clone_attribute_handle(bt_gatt_attribute_h *clone, bt_gatt_attribute * * @see bt_gatt_clone_attribute_handle() */ -int bt_gatt_destroy_attribute_handle(bt_gatt_attribute_h handle); +int bt_gatt_destroy_attribute_handle(bt_gatt_attribute_h handle) TIZEN_DEPRECATED_API; /** * @deprecated Deprecated since 2.3.1. Use gatt_client_read_value instead. @@ -3909,7 +3914,7 @@ int bt_gatt_destroy_attribute_handle(bt_gatt_attribute_h handle); * @see bt_gatt_get_characteristic_declaration() */ int bt_gatt_read_characteristic_value(bt_gatt_attribute_h char_handle, - bt_gatt_characteristic_read_cb callback); + bt_gatt_characteristic_read_cb callback) TIZEN_DEPRECATED_API; /** * @deprecated Deprecated since 2.3.1. This function call is not required because descriptor discovery is happened automatically. @@ -3935,7 +3940,7 @@ int bt_gatt_read_characteristic_value(bt_gatt_attribute_h char_handle, */ int bt_gatt_discover_characteristic_descriptor(bt_gatt_attribute_h characteristic_handle, bt_gatt_characteristic_descriptor_discovered_cb callback, - void *user_data); + void *user_data) TIZEN_DEPRECATED_API; /** * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE diff --git a/include/tv/bluetooth.h b/include/tv/bluetooth.h index b73ac44..e727c23 100644 --- a/include/tv/bluetooth.h +++ b/include/tv/bluetooth.h @@ -22,9 +22,14 @@ #include #include #include +#include #include +#ifndef TIZEN_DEPRECATED_API +#define TIZEN_DEPRECATED_API __attribute__((__visibility__("default"), deprecated)) +#endif + #ifdef __cplusplus extern "C" { @@ -696,7 +701,7 @@ int bt_adapter_remove_remote_oob_data(const char *remote_address); * @see bt_adapter_le_set_device_discovery_state_changed_cb() * @see bt_adapter_le_unset_device_discovery_state_changed_cb() */ -int bt_adapter_le_start_device_discovery(void); +int bt_adapter_le_start_device_discovery(void) TIZEN_DEPRECATED_API; /** * @deprecated Deprecated since 2.3.1 @@ -724,7 +729,7 @@ int bt_adapter_le_start_device_discovery(void); * @see bt_adapter_le_unset_device_discovery_state_changed_cb() * @see bt_adapter_le_device_discovery_state_changed_cb() */ -int bt_adapter_le_stop_device_discovery(void); +int bt_adapter_le_stop_device_discovery(void) TIZEN_DEPRECATED_API; /** * @deprecated Deprecated since 2.3.1 @@ -751,7 +756,7 @@ int bt_adapter_le_stop_device_discovery(void); * @see bt_adapter_le_start_device_discovery() * @see bt_adapter_le_stop_device_discovery() */ -int bt_adapter_le_is_discovering(bool *is_discovering); +int bt_adapter_le_is_discovering(bool *is_discovering) TIZEN_DEPRECATED_API; /** * @deprecated Deprecated since 2.3.1 @@ -775,7 +780,7 @@ int bt_adapter_le_is_discovering(bool *is_discovering); * @see bt_adapter_le_device_discovery_state_changed_cb() * @see bt_adapter_le_unset_device_discovery_state_changed_cb() */ -int bt_adapter_le_set_device_discovery_state_changed_cb(bt_adapter_le_device_discovery_state_changed_cb callback, void *user_data); +int bt_adapter_le_set_device_discovery_state_changed_cb(bt_adapter_le_device_discovery_state_changed_cb callback, void *user_data) TIZEN_DEPRECATED_API; /** * @deprecated Deprecated since 2.3.1 @@ -793,7 +798,7 @@ int bt_adapter_le_set_device_discovery_state_changed_cb(bt_adapter_le_device_dis * @see bt_initialize() * @see bt_adapter_le_set_device_discovery_state_changed_cb() */ -int bt_adapter_le_unset_device_discovery_state_changed_cb(void); +int bt_adapter_le_unset_device_discovery_state_changed_cb(void) TIZEN_DEPRECATED_API; /** * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE @@ -1113,7 +1118,7 @@ int bt_adapter_le_destroy_advertiser(bt_advertiser_h advertiser); */ int bt_adapter_le_add_advertising_data(bt_advertiser_h advertiser, bt_adapter_le_packet_type_e pkt_type, bt_adapter_le_packet_data_type_e data_type, - void *data, unsigned int data_size); + void *data, unsigned int data_size) TIZEN_DEPRECATED_API; /** * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE @@ -1333,7 +1338,7 @@ int bt_adapter_le_set_advertising_tx_power_level(bt_advertiser_h advertiser, * @see bt_adapter_le_clear_advertising_data() */ int bt_adapter_le_remove_advertising_data(bt_advertiser_h advertiser, - bt_adapter_le_packet_type_e pkt_type, bt_adapter_le_packet_data_type_e data_type); + bt_adapter_le_packet_type_e pkt_type, bt_adapter_le_packet_data_type_e data_type) TIZEN_DEPRECATED_API; /** * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE @@ -1390,7 +1395,7 @@ int bt_adapter_le_clear_advertising_data(bt_advertiser_h advertiser, bt_adapter_ * @see bt_adapter_le_advertising_state_changed_cb() */ int bt_adapter_le_start_advertising(bt_advertiser_h advertiser, bt_adapter_le_advertising_params_s *adv_params, - bt_adapter_le_advertising_state_changed_cb cb, void *user_data); + bt_adapter_le_advertising_state_changed_cb cb, void *user_data) TIZEN_DEPRECATED_API; /** * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE @@ -3636,7 +3641,7 @@ int bt_hdp_unset_data_received_cb(void); * @post @a callback will be called if there are primary services. * @see bt_gatt_primary_service_cb() */ -int bt_gatt_foreach_primary_services(const char *remote_address, bt_gatt_primary_service_cb callback, void *user_data); +int bt_gatt_foreach_primary_services(const char *remote_address, bt_gatt_primary_service_cb callback, void *user_data) TIZEN_DEPRECATED_API; /** * @deprecated Deprecated since 2.3.1. This function call is not required because characteristic discovery is happened automatically. @@ -3660,7 +3665,7 @@ int bt_gatt_foreach_primary_services(const char *remote_address, bt_gatt_primary * @post @a callback will be called. * @see bt_gatt_characteristics_discovered_cb() */ -int bt_gatt_discover_characteristics(bt_gatt_attribute_h service, bt_gatt_characteristics_discovered_cb callback, void *user_data); +int bt_gatt_discover_characteristics(bt_gatt_attribute_h service, bt_gatt_characteristics_discovered_cb callback, void *user_data) TIZEN_DEPRECATED_API; /** * @deprecated Deprecated since 2.3.1. Use bt_gatt_get_uuid instead. @@ -3683,7 +3688,7 @@ int bt_gatt_discover_characteristics(bt_gatt_attribute_h service, bt_gatt_charac * * @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. */ -int bt_gatt_get_service_uuid(bt_gatt_attribute_h service, char **uuid); +int bt_gatt_get_service_uuid(bt_gatt_attribute_h service, char **uuid) TIZEN_DEPRECATED_API; /** * @deprecated Deprecated since 2.3.1. Use bt_gatt_service_foreach_included_services or bt_gatt_service_get_included_service instead. @@ -3708,7 +3713,7 @@ int bt_gatt_get_service_uuid(bt_gatt_attribute_h service, char **uuid); * @post @a callback will be called if there are included services. * @see bt_gatt_included_service_cb() */ -int bt_gatt_foreach_included_services(bt_gatt_attribute_h service, bt_gatt_included_service_cb callback, void *user_data); +int bt_gatt_foreach_included_services(bt_gatt_attribute_h service, bt_gatt_included_service_cb callback, void *user_data) TIZEN_DEPRECATED_API; /** * @deprecated Deprecated since 2.3.1. Use bt_gatt_client_set_characteristic_value_changed_cb instead. @@ -3726,7 +3731,7 @@ int bt_gatt_foreach_included_services(bt_gatt_attribute_h service, bt_gatt_inclu * @pre The Bluetooth service must be initialized with bt_initialize(). * @see bt_gatt_unset_characteristic_changed_cb() */ -int bt_gatt_set_characteristic_changed_cb(bt_gatt_characteristic_changed_cb callback, void *user_data); +int bt_gatt_set_characteristic_changed_cb(bt_gatt_characteristic_changed_cb callback, void *user_data) TIZEN_DEPRECATED_API; /** * @deprecated Deprecated since 2.3.1. Use bt_gatt_client_unset_characteristic_value_changed_cb instead. @@ -3741,7 +3746,7 @@ int bt_gatt_set_characteristic_changed_cb(bt_gatt_characteristic_changed_cb call * @pre The Bluetooth service must be initialized with bt_initialize(). * @see bt_gatt_set_characteristic_changed_cb() */ -int bt_gatt_unset_characteristic_changed_cb(void); +int bt_gatt_unset_characteristic_changed_cb(void) TIZEN_DEPRECATED_API; /** * @deprecated Deprecated since 2.3.1. Use bt_gatt_client_set_characteristic_value_changed_cb instead. @@ -3761,7 +3766,7 @@ int bt_gatt_unset_characteristic_changed_cb(void); * @pre The Bluetooth service must be initialized with bt_initialize(). * @see bt_gatt_unset_characteristic_changed_cb() */ -int bt_gatt_watch_characteristic_changes(bt_gatt_attribute_h service); +int bt_gatt_watch_characteristic_changes(bt_gatt_attribute_h service) TIZEN_DEPRECATED_API; /** * @deprecated Deprecated since 2.3.1. Use bt_gatt_client_unset_characteristic_value_changed_cb instead. @@ -3781,7 +3786,7 @@ int bt_gatt_watch_characteristic_changes(bt_gatt_attribute_h service); * @pre The Bluetooth service must be initialized with bt_initialize(). * @see bt_gatt_set_characteristic_changed_cb() */ -int bt_gatt_unwatch_characteristic_changes(bt_gatt_attribute_h service); +int bt_gatt_unwatch_characteristic_changes(bt_gatt_attribute_h service) TIZEN_DEPRECATED_API; /** * @deprecated Deprecated since 2.3.1. Use bt_gatt_get_value or bt_gatt_get_uuid after bt_gatt_client_read_value instead. @@ -3807,7 +3812,7 @@ int bt_gatt_unwatch_characteristic_changes(bt_gatt_attribute_h service); * @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. * @see bt_gatt_set_characteristic_value() */ -int bt_gatt_get_characteristic_declaration(bt_gatt_attribute_h characteristic, char **uuid, unsigned char **value, int *value_length); +int bt_gatt_get_characteristic_declaration(bt_gatt_attribute_h characteristic, char **uuid, unsigned char **value, int *value_length) TIZEN_DEPRECATED_API; /** * @deprecated Deprecated since 2.3.1. Use bt_gatt_set_value and bt_gatt_client_write_value instead. @@ -3830,7 +3835,7 @@ int bt_gatt_get_characteristic_declaration(bt_gatt_attribute_h characteristic, c * @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. * @see bt_gatt_get_characteristic_declaration() */ -int bt_gatt_set_characteristic_value(bt_gatt_attribute_h characteristic, const unsigned char *value, int value_length); +int bt_gatt_set_characteristic_value(bt_gatt_attribute_h characteristic, const unsigned char *value, int value_length) TIZEN_DEPRECATED_API; /** * @deprecated Deprecated since 2.3.1. Use bt_gatt_set_value and bt_gatt_client_write_value instead. @@ -3855,7 +3860,7 @@ int bt_gatt_set_characteristic_value(bt_gatt_attribute_h characteristic, const u * @see bt_gatt_get_characteristic_declaration() */ int bt_gatt_set_characteristic_value_request(bt_gatt_attribute_h characteristic, const unsigned char *value, - int value_length, bt_gatt_characteristic_write_cb callback); + int value_length, bt_gatt_characteristic_write_cb callback) TIZEN_DEPRECATED_API; /** * @deprecated Deprecated since 2.3.1. GATT handle clone is not allowed. Instead, all handles for client role must be got from GATT client handle. @@ -3874,7 +3879,7 @@ int bt_gatt_set_characteristic_value_request(bt_gatt_attribute_h characteristic, * @see bt_gatt_destroy_attribute_handle() */ int bt_gatt_clone_attribute_handle(bt_gatt_attribute_h *clone, - bt_gatt_attribute_h origin); + bt_gatt_attribute_h origin) TIZEN_DEPRECATED_API; /** * @deprecated Deprecated since 2.3.1. GATT handle clone and destroy are not allowed. @@ -3889,7 +3894,7 @@ int bt_gatt_clone_attribute_handle(bt_gatt_attribute_h *clone, * * @see bt_gatt_clone_attribute_handle() */ -int bt_gatt_destroy_attribute_handle(bt_gatt_attribute_h handle); +int bt_gatt_destroy_attribute_handle(bt_gatt_attribute_h handle) TIZEN_DEPRECATED_API; /** * @deprecated Deprecated since 2.3.1. Use gatt_client_read_value instead. @@ -3912,7 +3917,7 @@ int bt_gatt_destroy_attribute_handle(bt_gatt_attribute_h handle); * @see bt_gatt_get_characteristic_declaration() */ int bt_gatt_read_characteristic_value(bt_gatt_attribute_h char_handle, - bt_gatt_characteristic_read_cb callback); + bt_gatt_characteristic_read_cb callback) TIZEN_DEPRECATED_API; /** * @deprecated Deprecated since 2.3.1. This function call is not required because descriptor discovery is happened automatically. @@ -3938,7 +3943,7 @@ int bt_gatt_read_characteristic_value(bt_gatt_attribute_h char_handle, */ int bt_gatt_discover_characteristic_descriptor(bt_gatt_attribute_h characteristic_handle, bt_gatt_characteristic_descriptor_discovered_cb callback, - void *user_data); + void *user_data) TIZEN_DEPRECATED_API; /** * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE diff --git a/include/wearable/bluetooth.h b/include/wearable/bluetooth.h index 4340369..c280766 100644 --- a/include/wearable/bluetooth.h +++ b/include/wearable/bluetooth.h @@ -22,9 +22,14 @@ #include #include #include +#include #include +#ifndef TIZEN_DEPRECATED_API +#define TIZEN_DEPRECATED_API __attribute__((__visibility__("default"), deprecated)) +#endif + #ifdef __cplusplus extern "C" { diff --git a/src/bluetooth-adapter.c b/src/bluetooth-adapter.c index 4f09730..e467359 100644 --- a/src/bluetooth-adapter.c +++ b/src/bluetooth-adapter.c @@ -821,6 +821,8 @@ int bt_adapter_set_device_discovery_state_changed_cb(bt_adapter_device_discovery int bt_adapter_le_set_device_discovery_state_changed_cb(bt_adapter_le_device_discovery_state_changed_cb callback, void *user_data) { + BT_INFO("DEPRECATION WARNING: bt_adapter_le_set_device_discovery_state_changed_cb() is deprecated and will be removed from next release."); + BT_CHECK_LE_SUPPORT(); BT_CHECK_INIT_STATUS(); BT_CHECK_INPUT_PARAMETER(callback); @@ -903,6 +905,8 @@ int bt_adapter_unset_device_discovery_state_changed_cb(void) #ifndef TIZEN_WEARABLE int bt_adapter_le_unset_device_discovery_state_changed_cb(void) { + BT_INFO("DEPRECATION WARNING: bt_adapter_le_unset_device_discovery_state_changed_cb() is deprecated and will be removed from next release."); + BT_CHECK_LE_SUPPORT(); BT_CHECK_INIT_STATUS(); _bt_unset_cb(BT_EVENT_LE_DEVICE_DISCOVERY_STATE_CHANGED); @@ -964,6 +968,7 @@ int bt_adapter_is_discovering(bool *is_discovering) int bt_adapter_le_start_device_discovery(void) { int error_code = BT_ERROR_NONE; + BT_INFO("DEPRECATION WARNING: bt_adapter_le_start_device_discovery() is deprecated and will be removed from next release. Use bt_adapter_le_start_scan() instead."); BT_CHECK_LE_SUPPORT(); BT_CHECK_INIT_STATUS(); @@ -978,6 +983,7 @@ int bt_adapter_le_start_device_discovery(void) int bt_adapter_le_stop_device_discovery(void) { int error_code = BT_ERROR_NONE; + BT_INFO("DEPRECATION WARNING: bt_adapter_le_stop_device_discovery() is deprecated and will be removed from next release. Use bt_adapter_le_stop_scan() instead."); BT_CHECK_LE_SUPPORT(); BT_CHECK_INIT_STATUS(); @@ -992,6 +998,7 @@ int bt_adapter_le_stop_device_discovery(void) int bt_adapter_le_is_discovering(bool *is_discovering) { int ret = 0; + BT_INFO("DEPRECATION WARNING: bt_adapter_le_is_discovering() is deprecated and will be removed from next release."); BT_CHECK_LE_SUPPORT(); BT_CHECK_INIT_STATUS(); @@ -1190,6 +1197,8 @@ int bt_adapter_le_remove_white_list(const char *address, bt_device_address_type_ int bt_adapter_le_clear_white_list(void) { int error_code = BT_ERROR_NONE; + BT_INFO("DEPRECATION WARNING: bt_adapter_le_clear_white_list() is deprecated and will be removed from next release."); + BT_CHECK_LE_SUPPORT(); BT_CHECK_INIT_STATUS(); @@ -1343,6 +1352,8 @@ int bt_adapter_le_add_advertising_data(bt_advertiser_h advertiser, bt_adapter_le_packet_data_type_e data_type, void *data, unsigned int data_size) { + BT_INFO("DEPRECATION WARNING: bt_adapter_le_add_advertising_data() is deprecated and will be removed from next release."); + bt_advertiser_s *__adv = (bt_advertiser_s *)advertiser; char **p; unsigned int *len; @@ -1414,6 +1425,8 @@ int bt_adapter_le_remove_advertising_data(bt_advertiser_h advertiser, bt_adapter_le_packet_type_e pkt_type, bt_adapter_le_packet_data_type_e data_type) { + BT_INFO("DEPRECATION WARNING: bt_adapter_le_remove_advertising_data() is deprecated and will be removed from next release."); + int ret = BT_ERROR_NONE; bt_advertiser_s *__adv = (bt_advertiser_s *)advertiser; char **p; @@ -2006,6 +2019,8 @@ int bt_adapter_le_start_advertising(bt_advertiser_h advertiser, bt_adapter_le_advertising_state_changed_cb cb, void *user_data) { + BT_INFO("DEPRECATION WARNING: bt_adapter_le_start_advertising() is deprecated and will be removed from next release. Use bt_adapter_le_start_advertising_new() instead"); + int ret = BT_ERROR_NONE; int error_code; bt_advertiser_s *__adv = (bt_advertiser_s *)advertiser; diff --git a/src/bluetooth-gatt.c b/src/bluetooth-gatt.c index cd3e30d..6114158 100644 --- a/src/bluetooth-gatt.c +++ b/src/bluetooth-gatt.c @@ -146,6 +146,8 @@ int bt_gatt_foreach_primary_services(const char *remote_address, bt_gatt_primary_service_cb callback, void *user_data) { + BT_INFO("DEPRECATION WARNING: bt_gatt_foreach_primary_services() is deprecated and will be removed from next release."); + int i; int ret; bool foreach_call = true; @@ -198,6 +200,7 @@ int bt_gatt_discover_characteristics(bt_gatt_attribute_h service, void *user_data) { int ret; + BT_INFO("DEPRECATION WARNING: bt_gatt_discover_characteristics() is deprecated and will be removed from next release."); BT_CHECK_GATT_SUPPORT(); BT_CHECK_INIT_STATUS(); @@ -221,6 +224,7 @@ int bt_gatt_get_service_uuid(bt_gatt_attribute_h service, char **uuid) int i; int ret; bt_gatt_service_property_t property; + BT_INFO("DEPRECATION WARNING: bt_gatt_get_service_uuid() is deprecated and will be removed from next release."); BT_CHECK_GATT_SUPPORT(); BT_CHECK_INIT_STATUS(); @@ -259,6 +263,8 @@ int bt_gatt_foreach_included_services(bt_gatt_attribute_h service, bt_gatt_included_service_cb callback, void *user_data) { + BT_INFO("DEPRECATION WARNING: bt_gatt_foreach_included_services() is deprecated and will be removed from next release."); + int i; int ret; bool foreach_call = true; @@ -309,6 +315,8 @@ int bt_gatt_foreach_included_services(bt_gatt_attribute_h service, int bt_gatt_set_characteristic_changed_cb(bt_gatt_characteristic_changed_cb callback, void *user_data) { + BT_INFO("DEPRECATION WARNING: bt_gatt_set_characteristic_changed_cb() is deprecated and will be removed from next release."); + BT_CHECK_GATT_SUPPORT(); BT_CHECK_INIT_STATUS(); BT_CHECK_INPUT_PARAMETER(callback); @@ -321,6 +329,8 @@ int bt_gatt_set_characteristic_changed_cb(bt_gatt_characteristic_changed_cb call int bt_gatt_unset_characteristic_changed_cb() { + BT_INFO("DEPRECATION WARNING: bt_gatt_unset_characteristic_changed_cb() is deprecated and will be removed from next release."); + BT_CHECK_GATT_SUPPORT(); BT_CHECK_INIT_STATUS(); @@ -332,6 +342,7 @@ int bt_gatt_unset_characteristic_changed_cb() int bt_gatt_watch_characteristic_changes(bt_gatt_attribute_h service) { int ret; + BT_INFO("DEPRECATION WARNING: bt_gatt_watch_characteristic_changes() is deprecated and will be removed from next release."); BT_CHECK_GATT_SUPPORT(); BT_CHECK_INIT_STATUS(); @@ -349,6 +360,7 @@ int bt_gatt_watch_characteristic_changes(bt_gatt_attribute_h service) int bt_gatt_unwatch_characteristic_changes(bt_gatt_attribute_h service) { int ret; + BT_INFO("DEPRECATION WARNING: bt_gatt_unwatch_characteristic_changes() is deprecated and will be removed from next release."); BT_CHECK_GATT_SUPPORT(); BT_CHECK_INIT_STATUS(); @@ -369,6 +381,7 @@ int bt_gatt_get_characteristic_declaration(bt_gatt_attribute_h characteristic, { int ret; bt_gatt_char_property_t property; + BT_INFO("DEPRECATION WARNING: bt_gatt_get_characteristic_declaration() is deprecated and will be removed from next release."); BT_CHECK_GATT_SUPPORT(); BT_CHECK_INIT_STATUS(); @@ -405,6 +418,7 @@ int bt_gatt_set_characteristic_value(bt_gatt_attribute_h characteristic, int value_length) { int ret; + BT_INFO("DEPRECATION WARNING: bt_gatt_set_characteristic_value() is deprecated and will be removed from next release."); BT_CHECK_GATT_SUPPORT(); BT_CHECK_INIT_STATUS(); @@ -428,6 +442,7 @@ int bt_gatt_set_characteristic_value_request(bt_gatt_attribute_h characteristic, bt_gatt_characteristic_write_cb callback) { int ret; + BT_INFO("DEPRECATION WARNING: bt_gatt_set_characteristic_value_request() is deprecated and will be removed from next release."); BT_CHECK_GATT_SUPPORT(); BT_CHECK_INIT_STATUS(); @@ -455,6 +470,7 @@ int bt_gatt_clone_attribute_handle(bt_gatt_attribute_h *clone, bt_gatt_attribute_h origin) { int error = BT_ERROR_NONE; + BT_INFO("DEPRECATION WARNING: bt_gatt_clone_attribute_handle() is deprecated and will be removed from next release."); BT_CHECK_GATT_SUPPORT(); BT_CHECK_INIT_STATUS(); @@ -468,6 +484,7 @@ int bt_gatt_clone_attribute_handle(bt_gatt_attribute_h *clone, int bt_gatt_destroy_attribute_handle(bt_gatt_attribute_h handle) { int error = BT_ERROR_NONE; + BT_INFO("DEPRECATION WARNING: bt_gatt_destroy_attribute_handle() is deprecated and will be removed from next release."); BT_CHECK_GATT_SUPPORT(); BT_CHECK_INIT_STATUS(); @@ -482,6 +499,7 @@ int bt_gatt_read_characteristic_value(bt_gatt_attribute_h characteristic, bt_gatt_characteristic_read_cb callback) { int ret; + BT_INFO("DEPRECATION WARNING: bt_gatt_read_characteristic_value() is deprecated and will be removed from next release."); BT_CHECK_GATT_SUPPORT(); BT_CHECK_INIT_STATUS(); @@ -505,6 +523,7 @@ int bt_gatt_discover_characteristic_descriptor(bt_gatt_attribute_h characteristi void *user_data) { int ret; + BT_INFO("DEPRECATION WARNING: bt_gatt_discover_characteristic_descriptor() is deprecated and will be removed from next release."); BT_CHECK_GATT_SUPPORT(); BT_CHECK_INIT_STATUS();