Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2457)

Unified Diff: device/bluetooth/bluetooth_local_gatt_service_bluez.cc

Issue 1898643002: Refactor device::BluetoothGattXXX classes to split into remote/local. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « device/bluetooth/bluetooth_local_gatt_service_bluez.h ('k') | device/bluetooth/bluetooth_pairing_bluez.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/bluetooth_local_gatt_service_bluez.cc
diff --git a/device/bluetooth/bluetooth_local_gatt_service_bluez.cc b/device/bluetooth/bluetooth_local_gatt_service_bluez.cc
deleted file mode 100644
index 7a206021123a86ceea2ea6519774fea8cf8d8c41..0000000000000000000000000000000000000000
--- a/device/bluetooth/bluetooth_local_gatt_service_bluez.cc
+++ /dev/null
@@ -1,90 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/bind.h"
-#include "base/callback.h"
-#include "base/logging.h"
-#include "device/bluetooth/bluetooth_adapter_bluez.h"
-#include "device/bluetooth/bluetooth_gatt_characteristic.h"
-#include "device/bluetooth/bluetooth_local_gatt_service_bluez.h"
-#include "device/bluetooth/dbus/bluetooth_gatt_manager_client.h"
-#include "device/bluetooth/dbus/bluez_dbus_manager.h"
-
-namespace bluez {
-
-BluetoothLocalGattServiceBlueZ::BluetoothLocalGattServiceBlueZ(
- BluetoothAdapterBlueZ* adapter,
- const dbus::ObjectPath& object_path)
- : BluetoothGattServiceBlueZ(adapter, object_path), weak_ptr_factory_(this) {
- VLOG(1) << "Creating local GATT service with identifier: "
- << object_path.value();
-}
-
-BluetoothLocalGattServiceBlueZ::~BluetoothLocalGattServiceBlueZ() {}
-
-device::BluetoothUUID BluetoothLocalGattServiceBlueZ::GetUUID() const {
- NOTIMPLEMENTED();
- return device::BluetoothUUID();
-}
-
-bool BluetoothLocalGattServiceBlueZ::IsLocal() const {
- return true;
-}
-
-bool BluetoothLocalGattServiceBlueZ::IsPrimary() const {
- NOTIMPLEMENTED();
- return false;
-}
-
-device::BluetoothDevice* BluetoothLocalGattServiceBlueZ::GetDevice() const {
- return nullptr;
-}
-
-bool BluetoothLocalGattServiceBlueZ::AddCharacteristic(
- device::BluetoothGattCharacteristic* characteristic) {
- NOTIMPLEMENTED();
- return false;
-}
-
-bool BluetoothLocalGattServiceBlueZ::AddIncludedService(
- device::BluetoothGattService* service) {
- NOTIMPLEMENTED();
- return false;
-}
-
-void BluetoothLocalGattServiceBlueZ::Register(
- const base::Closure& callback,
- const ErrorCallback& error_callback) {
- DCHECK(bluez::BluezDBusManager::Get());
- bluez::BluezDBusManager::Get()
- ->GetBluetoothGattManagerClient()
- ->RegisterService(
- object_path(), BluetoothGattManagerClient::Options(), callback,
- base::Bind(&BluetoothLocalGattServiceBlueZ::OnRegistrationError,
- weak_ptr_factory_.GetWeakPtr(), error_callback));
-}
-
-void BluetoothLocalGattServiceBlueZ::Unregister(
- const base::Closure& callback,
- const ErrorCallback& error_callback) {
- DCHECK(bluez::BluezDBusManager::Get());
- bluez::BluezDBusManager::Get()
- ->GetBluetoothGattManagerClient()
- ->UnregisterService(
- object_path(), callback,
- base::Bind(&BluetoothLocalGattServiceBlueZ::OnRegistrationError,
- weak_ptr_factory_.GetWeakPtr(), error_callback));
-}
-
-void BluetoothLocalGattServiceBlueZ::OnRegistrationError(
- const ErrorCallback& error_callback,
- const std::string& error_name,
- const std::string& error_message) {
- VLOG(1) << "[Un]Register Service failed: " << error_name
- << ", message: " << error_message;
- error_callback.Run(
- BluetoothGattServiceBlueZ::DBusErrorToServiceError(error_name));
-}
-
-} // namespace bluez
« no previous file with comments | « device/bluetooth/bluetooth_local_gatt_service_bluez.h ('k') | device/bluetooth/bluetooth_pairing_bluez.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698