| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_SERVICE_SERVICE_PROVIDER_H_ | 5 #ifndef DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_GATT_SERVICE_SERVICE_PROVIDER_H_ |
| 6 #define DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_GATT_SERVICE_SERVICE_PROVIDER_H_ | 6 #define DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_GATT_SERVICE_SERVICE_PROVIDER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 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/dbus/bluetooth_gatt_service_service_provider.h" | 14 #include "device/bluetooth/dbus/bluetooth_gatt_service_service_provider.h" |
| 15 | 15 |
| 16 namespace bluez { | 16 namespace bluez { |
| 17 | 17 |
| 18 // FakeBluetoothGattServiceServiceProvider simulates behavior of a local GATT | 18 // FakeBluetoothGattServiceServiceProvider simulates behavior of a local GATT |
| 19 // service object and is used both in test cases in place of a mock and on the | 19 // service object and is used both in test cases in place of a mock and on the |
| 20 // Linux desktop. | 20 // Linux desktop. |
| 21 class DEVICE_BLUETOOTH_EXPORT FakeBluetoothGattServiceServiceProvider | 21 class DEVICE_BLUETOOTH_EXPORT FakeBluetoothGattServiceServiceProvider |
| 22 : public BluetoothGattServiceServiceProvider { | 22 : public BluetoothGattServiceServiceProvider { |
| 23 public: | 23 public: |
| 24 FakeBluetoothGattServiceServiceProvider( | 24 FakeBluetoothGattServiceServiceProvider( |
| 25 const dbus::ObjectPath& object_path, | 25 const dbus::ObjectPath& object_path, |
| 26 const std::string& uuid, | 26 const std::string& uuid, |
| 27 const std::vector<dbus::ObjectPath>& includes); | 27 const std::vector<dbus::ObjectPath>& includes); |
| 28 ~FakeBluetoothGattServiceServiceProvider() override; | 28 ~FakeBluetoothGattServiceServiceProvider() override; |
| 29 | 29 |
| 30 const dbus::ObjectPath& object_path() const { return object_path_; } | 30 const dbus::ObjectPath& object_path() const override; |
| 31 const std::string& uuid() const { return uuid_; } | 31 const std::string& uuid() const { return uuid_; } |
| 32 | 32 |
| 33 private: | 33 private: |
| 34 // D-Bus object path of the fake GATT service. | 34 // D-Bus object path of the fake GATT service. |
| 35 dbus::ObjectPath object_path_; | 35 dbus::ObjectPath object_path_; |
| 36 | 36 |
| 37 // 128-bit GATT service UUID. | 37 // 128-bit GATT service UUID. |
| 38 std::string uuid_; | 38 std::string uuid_; |
| 39 | 39 |
| 40 // List of included GATT services. | 40 // List of included GATT services. |
| 41 std::vector<dbus::ObjectPath> includes_; | 41 std::vector<dbus::ObjectPath> includes_; |
| 42 | 42 |
| 43 DISALLOW_COPY_AND_ASSIGN(FakeBluetoothGattServiceServiceProvider); | 43 DISALLOW_COPY_AND_ASSIGN(FakeBluetoothGattServiceServiceProvider); |
| 44 }; | 44 }; |
| 45 | 45 |
| 46 } // namespace bluez | 46 } // namespace bluez |
| 47 | 47 |
| 48 #endif // DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_GATT_SERVICE_SERVICE_PROVIDER_H_ | 48 #endif // DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_GATT_SERVICE_SERVICE_PROVIDER_H_ |
| OLD | NEW |