BluetoothHealthProfileHandler and BluetoothHealthChannel will be deprecated since tizen 5.5
[Verification] TCT Pass rate: 100%
ACR: TWDAPI-196
Change-Id: I965e910a8d5fb71a5c98bdb62a3a757eb98777e0
Signed-off-by: Arkadiusz Pietraszek <a.pietraszek@partner.samsung.com>
BluetoothHealthApplication.prototype.unregister = function() {
privUtils_.log('Entered BluetoothHealthApplication.unregister()');
+ privUtils_.printDeprecationWarningFor('BluetoothHealthApplication');
var args = AV.validateMethod(arguments, [
{
name : 'successCallback',
};
var BluetoothProfileHandler = function(data) {
+ var profileType = data.profileType;
+ function profileTypeGetter() {
+ privUtils_.printDeprecationWarningFor('profileType');
+ return profileType;
+ }
if (data) {
Object.defineProperties(this, {
- profileType : {value: data.profileType, writable: false, enumerable: true}
+ profileType : {enumerable: true, set : function() {}, get : profileTypeGetter }
});
}
};
BluetoothHealthProfileHandler.prototype.registerSinkApplication = function() {
privUtils_.log('Entered BluetoothHealthProfileHandler.registerSinkApplication()');
+ privUtils_.printDeprecationWarningFor('BluetoothHealthProfileHandler');
var args = AV.validateMethod(arguments, [
{
BluetoothHealthProfileHandler.prototype.connectToSource = function() {
privUtils_.log('Entered BluetoothHealthProfileHandler.connectToSource()');
+ privUtils_.printDeprecationWarningFor('BluetoothHealthProfileHandler');
var args = AV.validateMethod(arguments, [
{
BluetoothHealthChannel.prototype.close = function() {
privUtils_.log('Entered BluetoothHealthChannel.close()');
+ privUtils_.printDeprecationWarningFor('BluetoothHealthChannel');
if (this.isConnected) {
var callArgs = {
BluetoothHealthChannel.prototype.sendData = function() {
privUtils_.log('Entered BluetoothHealthChannel.sendData()');
+ privUtils_.printDeprecationWarningFor('BluetoothHealthChannel');
+
var args = AV.validateMethod(arguments, [
{
name : 'data',
var BluetoothHealthChannel_setListener = function() {
privUtils_.log('Entered BluetoothHealthChannel.setListener()');
+ privUtils_.printDeprecationWarningFor('BluetoothHealthChannel');
privUtils_.checkPrivilegeAccess4Ver("2.4", Privilege.BLUETOOTH, Privilege.BLUETOOTH_HEALTH);
var args = AV.validateMethod(arguments, [
{
var BluetoothHealthChannel_unsetListener = function() {
privUtils_.log('Entered BluetoothHealthChannel.unsetListener ()');
+ privUtils_.printDeprecationWarningFor('BluetoothHealthChannel');
if (T.isEmptyObject(_healthListeners)) {
privUtils_.checkPrivilegeAccess4Ver("2.4", Privilege.BLUETOOTH, Privilege.BLUETOOTH_HEALTH);
}
};
BluetoothHealthChannel.prototype.unsetListener = function() {
+ privUtils_.printDeprecationWarningFor('BluetoothHealthChannel');
BluetoothHealthChannel_unsetListener.apply(this, arguments);
};
BluetoothAdapter.prototype.setPowered = function() {
privUtils_.log('Entered BluetoothAdapter.setPowered()');
- privUtils_.warn('DEPRECATION WARNING: setPowered() is deprecated and will be removed from next release. '
- + 'Let the user turn on/off Bluetooth through the Settings application instead.');
+ privUtils_.printDeprecationWarningFor('setPowered()');
+ privUtils_.warn('Let the user turn on/off Bluetooth through the Settings application instead.');
var args = AV.validateMethod(arguments, [
{
};
-// This method is deprecated since Tizen 2.3 and will be removed in Tizen 3.0.
+// This method is deprecated since Tizen 2.3.
BluetoothAdapter.prototype.setVisible = function() {
privUtils_.log('Entered BluetoothAdapter.setVisible()');
- privUtils_.warn('DEPRECATION WARNING: setVisible() is deprecated and will be removed from next release. '
- + 'Let the user change the Bluetooth visibility through the Settings application instead.');
+ privUtils_.printDeprecationWarningFor('setVisible()');
+ privUtils_.warn('Let the user change the Bluetooth visibility through the Settings application instead.');
var args = AV.validateMethod(arguments, [
{
BluetoothAdapter.prototype.getBluetoothProfileHandler = function() {
privUtils_.log('Entered BluetoothAdapter.getBluetoothProfileHandler()');
-
+ privUtils_.printDeprecationWarningFor('getBluetoothProfileHandler');
var args = AV.validateMethod(arguments, [
{
name : 'profileType',
BluetoothHealthApplication::BluetoothHealthApplication(BluetoothHealthProfileHandler& handler)
: handler_(handler) {
ScopeLogger();
+ tools::PrintDeprecationWarningFor("BluetoothHealthApplication");
}
void BluetoothHealthApplication::Unregister(const picojson::value& data, picojson::object& out) {
ScopeLogger();
+ tools::PrintDeprecationWarningFor("BluetoothHealthApplication");
CHECK_BACKWARD_COMPABILITY_PRIVILEGE_ACCESS(Privilege::kBluetooth, Privilege::kBluetoothHealth,
&out);
void BluetoothHealthApplication::ToJson(short data_type, const std::string& name, const char* id,
picojson::object* out) {
ScopeLogger();
+ tools::PrintDeprecationWarningFor("BluetoothHealthApplication");
out->insert(std::make_pair(kDataType, picojson::value(static_cast<double>(data_type))));
out->insert(std::make_pair(kName, picojson::value(name)));
out->insert(std::make_pair(kId, picojson::value(id)));
/**
* Signature: @code void unregister(successCallback, errorCallback); @endcode
+ * Deprecated since tizen version 5.5
* JSON: @code data: {method: 'BluetoothHealthApplication_unregister', args: {}} @endcode
* Invocation: @code native.call(request, result_callback); @endcode
* Return:
*/
void Unregister(const picojson::value& data, picojson::object& out);
+ /**
+ * Signature: @code static void ToJson(short, const std::string&, const char*, picojson::object*); @endcode
+ * Deprecated since tizen version 5.5
+ */
static void ToJson(short data_type, const std::string& name, const char* id,
picojson::object* out);
void BluetoothHealthChannel::Close(const picojson::value& data, picojson::object& out) {
ScopeLogger();
+ PrintDeprecationWarningFor("BluetoothHealthChannel");
CHECK_BACKWARD_COMPABILITY_PRIVILEGE_ACCESS(Privilege::kBluetooth, Privilege::kBluetoothHealth,
&out);
void BluetoothHealthChannel::SendData(const picojson::value& data, picojson::object& out) {
ScopeLogger();
+ PrintDeprecationWarningFor("BluetoothHealthChannel");
CHECK_BACKWARD_COMPABILITY_PRIVILEGE_ACCESS(Privilege::kBluetooth, Privilege::kBluetoothHealth,
&out);
void BluetoothHealthChannel::ToJson(unsigned int channel, bt_hdp_channel_type_e type,
picojson::object* out) {
ScopeLogger();
+ PrintDeprecationWarningFor("BluetoothHealthChannel");
const char* type_str = "UNKNOWN";
switch (type) {
bt_device_info_s* device_info, const char* app_id,
picojson::object* out) {
ScopeLogger();
+ PrintDeprecationWarningFor("BluetoothHealthChannel");
ToJson(channel, type, out);
auto& device = out->insert(std::make_pair(kPeer, picojson::value(picojson::object())))
.first->second.get<picojson::object>();
public:
/**
* Signature: @code void close(); @endcode
+ * Deprecated since tizen version 5.5
* JSON: @code data: {method: 'BluetoothHealthChannel_close', args: {}} @endcode
* Invocation: @code native.callSync(request); @endcode
* Return:
/**
* Signature: @code unsigned long sendData(data[]); @endcode
+ * Deprecated since tizen version 5.5
* JSON: @code data: {method: 'BluetoothHealthChannel_sendData', args: {data: data}} @endcode
* Invocation: @code native.callSync(request); @endcode
* Return:
*/
void SendData(const picojson::value& data, picojson::object& out);
+ /**
+ * Signature: @code void ToJson(unsigned int, bt_hdp_channel_type_e, picojson::object*); @endcode
+ * Deprecated since tizen version 5.5
+ */
static void ToJson(unsigned int channel, bt_hdp_channel_type_e type, picojson::object* out);
+ /**
+ * Signature: @code void ToJson(unsigned int, bt_hdp_channel_type_e, bt_device_info_s*,
+ * const char*, picojson::object*); @endcode
+ * Deprecated since tizen version 5.5
+ */
static void ToJson(unsigned int channel, bt_hdp_channel_type_e type,
bt_device_info_s* device_info, const char* app_id, picojson::object* out);
};
: instance_(instance) {
// initialize listeners
ScopeLogger();
+ PrintDeprecationWarningFor("BluetoothHealthProfileHandler");
if (BT_ERROR_NONE != bt_hdp_set_connection_state_changed_cb(OnConnected, OnDisconnected, this)) {
LoggerE("bt_hdp_set_connection_state_changed_cb() failed");
}
BluetoothHealthProfileHandler::~BluetoothHealthProfileHandler() {
ScopeLogger();
+ PrintDeprecationWarningFor("BluetoothHealthProfileHandler");
bt_hdp_unset_connection_state_changed_cb();
bt_hdp_unset_data_received_cb();
const char* app_id, bt_hdp_channel_type_e type,
unsigned int channel, void* user_data) {
ScopeLogger();
+ PrintDeprecationWarningFor("BluetoothHealthProfileHandler");
BluetoothHealthProfileHandler* object = static_cast<BluetoothHealthProfileHandler*>(user_data);
void BluetoothHealthProfileHandler::OnDisconnected(int result, const char* /* remote_address */,
unsigned int channel, void* user_data) {
ScopeLogger();
+ PrintDeprecationWarningFor("BluetoothHealthProfileHandler");
BluetoothHealthProfileHandler* object = static_cast<BluetoothHealthProfileHandler*>(user_data);
void BluetoothHealthProfileHandler::OnDataReceived(unsigned int channel, const char* data,
unsigned int size, void* user_data) {
ScopeLogger();
+ PrintDeprecationWarningFor("BluetoothHealthProfileHandler");
BluetoothHealthProfileHandler* object = static_cast<BluetoothHealthProfileHandler*>(user_data);
void BluetoothHealthProfileHandler::RegisterSinkApp(const picojson::value& data,
picojson::object& out) {
ScopeLogger();
+ PrintDeprecationWarningFor("BluetoothHealthProfileHandler");
CHECK_BACKWARD_COMPABILITY_PRIVILEGE_ACCESS(Privilege::kBluetooth, Privilege::kBluetoothHealth,
&out);
void BluetoothHealthProfileHandler::ConnectToSource(const picojson::value& data,
picojson::object& out) {
ScopeLogger();
+ PrintDeprecationWarningFor("BluetoothHealthProfileHandler");
CHECK_BACKWARD_COMPABILITY_PRIVILEGE_ACCESS(Privilege::kBluetooth, Privilege::kBluetoothHealth,
&out);
void BluetoothHealthProfileHandler::UnregisterSinkAppAsync(const std::string& app_id,
int callback_handle) {
ScopeLogger();
+ PrintDeprecationWarningFor("BluetoothHealthProfileHandler");
auto unregister_app = [app_id, this](const std::shared_ptr<picojson::value>& response) -> void {
ScopeLogger("Entered into asynchronous function, uregister_app");
public:
/**
* Signature: @code void registerSinkApp(dataType, name, successCallback, errorCallback); @endcode
+ * Deprecated since tizen version 5.5
* JSON: @code data: {method: 'BluetoothHealthProfileHandler_registerSinkApp',
* args: {dataType: dataType, name: name}} @endcode
* Invocation: @code native.call(request, result_callback); @endcode
void RegisterSinkApp(const picojson::value& data, picojson::object& out);
/**
- * Signature: @code void connectToSource(peer, application, successCallback, errorCallback);
- * @endcode
+ * Signature: @code void connectToSource(peer, application, successCallback, errorCallback); @endcode
+ * Deprecated since tizen version 5.5
* JSON: @code data: {method: 'BluetoothHealthProfileHandler_connectToSource',
* args: {peer: peer, application: application}} @endcode
* Invocation: @code native.call(request, result_callback); @endcode
*/
void ConnectToSource(const picojson::value& data, picojson::object& out);
+ /**
+ * Signature: @code explicit BluetoothHealthProfileHandler(BluetoothInstance&); @endcode
+ * Deprecated since tizen version 5.5
+ */
explicit BluetoothHealthProfileHandler(BluetoothInstance& instance);
+
+ /**
+ * Signature: @code ~BluetoothHealthProfileHandler(); @endcode
+ * Deprecated since tizen version 5.5
+ */
~BluetoothHealthProfileHandler();
+ /**
+ * Signature: @code void UnregisterSinkAppAsync(const std::string&, int); @endcode
+ * Deprecated since tizen version 5.5
+ */
void UnregisterSinkAppAsync(const std::string& app_id, int callback_handle);
private:
BluetoothHealthProfileHandler(const BluetoothHealthProfileHandler&) = delete;
BluetoothHealthProfileHandler& operator=(const BluetoothHealthProfileHandler&) = delete;
+ /**
+ * Signature: @code static void OnConnected(int, const char*, const char*, bt_hdp_channel_type_e, unsigned int, void*); @endcode
+ * Deprecated since tizen version 5.5
+ */
static void OnConnected(int result, const char* remote_address, const char* app_id,
bt_hdp_channel_type_e type, unsigned int channel, void* user_data);
+ /**
+ * Signature: @code static void OnDisconnected(int, const char*, unsigned int, void*); @endcode
+ * Deprecated since tizen version 5.5
+ */
static void OnDisconnected(int result, const char* remote_address, unsigned int channel,
void* user_data);
+ /**
+ * Signature: @code static void OnDataReceived(unsigned int, const char*, unsigned int, void*); @endcode
+ * Deprecated since tizen version 5.5
+ */
static void OnDataReceived(unsigned int channel, const char* data, unsigned int size,
void* user_data);