From: Piotr Kosko/Native/Web API (PLT) /SRPOL/Engineer/Samsung Electronics
Date: Fri, 18 Sep 2020 12:55:00 +0000 (+0200)
Subject: Merge branch 'tizen_5.0' into tizen_5.5
X-Git-Tag: submit/tizen/20200923.101308~1^2~1
X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a688d43c26a1b0470e535b9d161ae80c5cb9e59b;p=platform%2Fcore%2Fapi%2Fwebapi-plugins.git
Merge branch 'tizen_5.0' into tizen_5.5
Change-Id: Id032af991b0670d09d5ff35aa4c142669cd26959
---
a688d43c26a1b0470e535b9d161ae80c5cb9e59b
diff --cc packaging/webapi-plugins.spec
index 86ee75e0,18d0e828..bfd06ab4
--- a/packaging/webapi-plugins.spec
+++ b/packaging/webapi-plugins.spec
@@@ -6,11 -6,9 +6,11 @@@
%define crosswalk_extensions tizen-extensions-crosswalk
%define crosswalk_extensions_path %{_libdir}/%{crosswalk_extensions}
+%define tizen_ut_build 0
+
Name: webapi-plugins
- Version: 2.65
-Version: 2.50
++Version: 2.66
Release: 0
License: Apache-2.0 and BSD-3-Clause and MIT
Group: Development/Libraries
diff --cc src/bluetooth/bluetooth_gatt_service.cc
index d7c0222c,0be2aa42..2574c55b
--- a/src/bluetooth/bluetooth_gatt_service.cc
+++ b/src/bluetooth/bluetooth_gatt_service.cc
@@@ -513,24 -514,29 +514,25 @@@ void BluetoothGATTService::RemoveValueC
ScopeLogger();
const auto& address = args.get("address").get();
if (!IsStillConnected(address)) {
- LogAndReportError(PlatformResult(ErrorCode::INVALID_STATE_ERR, "Device is not connected"), &out,
- ("Device with address %s is no longer connected", address.c_str()));
- return;
- }
-
- bt_gatt_h handle = (bt_gatt_h) static_cast(args.get(kHandle).get());
+ LoggerW("Device with address %s is no longer connected", address.c_str());
+ } else {
+ bt_gatt_h handle = (bt_gatt_h) static_cast(args.get(kHandle).get());
- int ret = bt_gatt_client_unset_characteristic_value_changed_cb(handle);
+ int ret = bt_gatt_client_unset_characteristic_value_changed_cb(handle);
- if (BT_ERROR_NONE != ret) {
- LogAndReportError(
- util::GetBluetoothError(ret, "Failed to unregister listener"), &out,
- ("bt_gatt_client_unset_characteristic_value_changed_cb() failed with: %d (%s)", ret,
- get_error_message(ret)));
- } else {
- gatt_characteristic_.erase(
- std::remove(gatt_characteristic_.begin(), gatt_characteristic_.end(), handle),
- gatt_characteristic_.end());
- ReportSuccess(out);
+ if (BT_ERROR_NONE != ret) {
+ LoggerW("bt_gatt_client_unset_characteristic_value_changed_cb() failed with: %d (%s)", ret,
+ get_error_message(ret));
+ } else {
+ gatt_characteristic_.erase(
+ std::remove(gatt_characteristic_.begin(), gatt_characteristic_.end(), handle),
+ gatt_characteristic_.end());
+ }
}
+ ReportSuccess(out);
}
+ /// copied from 6.0
common::PlatformResult BluetoothGATTService::GetServiceAllUuids(const std::string& address,
picojson::array* array) {
ScopeLogger();
diff --cc src/common/tools.cc
index d23347c4,9901c665..6e79ee6e
--- a/src/common/tools.cc
+++ b/src/common/tools.cc
@@@ -579,16 -579,11 +579,22 @@@ PlatformResult CheckFileAvailability(co
return CheckFileStatus(path);
}
+void PrintDeprecationWarningFor(const char* className, const char* replacement) {
+ if (nullptr == replacement) {
+ LoggerW("DEPRECATION WARNING: %s is deprecated and using it is not recommended.", className);
+ } else {
+ LoggerW(
+ "DEPRECATION WARNING: %s is deprecated and using it is not recommended. Try using %s "
+ "instead",
+ className, replacement);
+ }
+}
+
+ std::string ConvertToLowerCase(const std::string& input_string) {
+ std::string output_string = input_string;
+ std::transform(output_string.begin(), output_string.end(), output_string.begin(), ::tolower);
+ return output_string;
+ }
+
} // namespace tools
} // namespace common
diff --cc src/common/tools.h
index 73acde6b,d958cf97..bcb81065
--- a/src/common/tools.h
+++ b/src/common/tools.h
@@@ -117,7 -117,7 +117,8 @@@ PlatformResult CheckFileStatus(const st
PlatformResult CheckFileAvailability(const std::string& path);
+void PrintDeprecationWarningFor(const char* className, const char* replacement = nullptr);
+ std::string ConvertToLowerCase(const std::string& input_string);
} // namespace tools
} // namespace common