| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_GATT_APPLICATION_SERVICE_PROVIDER_H
_ | 5 #ifndef DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_GATT_APPLICATION_SERVICE_PROVIDER_H
_ |
| 6 #define DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_GATT_APPLICATION_SERVICE_PROVIDER_H
_ | 6 #define DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_GATT_APPLICATION_SERVICE_PROVIDER_H
_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "dbus/object_path.h" | 12 #include "dbus/object_path.h" |
| 13 #include "device/bluetooth/bluetooth_export.h" | 13 #include "device/bluetooth/bluetooth_export.h" |
| 14 #include "device/bluetooth/bluez/bluetooth_local_gatt_service_bluez.h" | 14 #include "device/bluetooth/bluez/bluetooth_local_gatt_service_bluez.h" |
| 15 #include "device/bluetooth/dbus/bluetooth_gatt_application_service_provider.h" | 15 #include "device/bluetooth/dbus/bluetooth_gatt_application_service_provider.h" |
| 16 #include "device/bluetooth/dbus/bluetooth_gatt_characteristic_service_provider.h
" | 16 #include "device/bluetooth/dbus/bluetooth_gatt_characteristic_service_provider.h
" |
| 17 #include "device/bluetooth/dbus/bluetooth_gatt_descriptor_service_provider.h" | 17 #include "device/bluetooth/dbus/bluetooth_gatt_descriptor_service_provider.h" |
| 18 #include "device/bluetooth/dbus/bluetooth_gatt_service_service_provider.h" | 18 #include "device/bluetooth/dbus/bluetooth_gatt_service_service_provider.h" |
| 19 | 19 |
| 20 namespace bluez { | 20 namespace bluez { |
| 21 | 21 |
| 22 class BluetoothLocalGattCharacteristicBlueZ; | |
| 23 class BluetoothLocalGattDescriptorBlueZ; | |
| 24 class BluetoothLocalGattServiceBlueZ; | 22 class BluetoothLocalGattServiceBlueZ; |
| 25 | 23 |
| 26 // FakeBluetoothGattApplicationServiceProvider simulates behavior of a local | 24 // FakeBluetoothGattApplicationServiceProvider simulates behavior of a local |
| 27 // GATT service object and is used both in test cases in place of a mock and on | 25 // GATT service object and is used both in test cases in place of a mock and on |
| 28 // the Linux desktop. | 26 // the Linux desktop. |
| 29 class DEVICE_BLUETOOTH_EXPORT FakeBluetoothGattApplicationServiceProvider | 27 class DEVICE_BLUETOOTH_EXPORT FakeBluetoothGattApplicationServiceProvider |
| 30 : public BluetoothGattApplicationServiceProvider { | 28 : public BluetoothGattApplicationServiceProvider { |
| 31 public: | 29 public: |
| 32 FakeBluetoothGattApplicationServiceProvider( | 30 FakeBluetoothGattApplicationServiceProvider( |
| 33 const dbus::ObjectPath& object_path, | 31 const dbus::ObjectPath& object_path, |
| 34 const std::map<dbus::ObjectPath, BluetoothLocalGattServiceBlueZ*>& | 32 const std::map<dbus::ObjectPath, BluetoothLocalGattServiceBlueZ*>& |
| 35 services); | 33 services); |
| 36 ~FakeBluetoothGattApplicationServiceProvider() override; | 34 ~FakeBluetoothGattApplicationServiceProvider() override; |
| 37 | 35 |
| 38 const dbus::ObjectPath& object_path() const { return object_path_; } | 36 const dbus::ObjectPath& object_path() const { return object_path_; } |
| 39 | 37 |
| 40 private: | 38 private: |
| 41 // D-Bus object path of the fake GATT service. | 39 // D-Bus object path of the fake GATT service. |
| 42 dbus::ObjectPath object_path_; | 40 dbus::ObjectPath object_path_; |
| 43 | 41 |
| 44 DISALLOW_COPY_AND_ASSIGN(FakeBluetoothGattApplicationServiceProvider); | 42 DISALLOW_COPY_AND_ASSIGN(FakeBluetoothGattApplicationServiceProvider); |
| 45 }; | 43 }; |
| 46 | 44 |
| 47 } // namespace bluez | 45 } // namespace bluez |
| 48 | 46 |
| 49 #endif // DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_GATT_APPLICATION_SERVICE_PROVIDE
R_H_ | 47 #endif // DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_GATT_APPLICATION_SERVICE_PROVIDE
R_H_ |
| OLD | NEW |