+void BluetoothLEAdapter::IsScanning(picojson::object& out) {
+ ScopeLogger();
+
+ bool is_scanning;
+ int ret = bt_adapter_le_is_discovering(&is_scanning);
+
+ if (BT_ERROR_NONE != ret) {
+ LogAndReportError(
+ PlatformResult(ErrorCode::UNKNOWN_ERR, "Failed to check for scanning in progress"), &out,
+ ("Failed to check for scanning in progress: %d (%s)", ret, get_error_message(ret)));
+ } else {
+ scanning_ = is_scanning;
+ ReportSuccess(picojson::value(is_scanning), out);
+ }
+}
+