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 CHROMEOS_DBUS_FAKE_BLUETOOTH_GATT_SERVICE_CLIENT_H_ | 5 #ifndef CHROMEOS_DBUS_FAKE_BLUETOOTH_GATT_SERVICE_CLIENT_H_ |
6 #define CHROMEOS_DBUS_FAKE_BLUETOOTH_GATT_SERVICE_CLIENT_H_ | 6 #define CHROMEOS_DBUS_FAKE_BLUETOOTH_GATT_SERVICE_CLIENT_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
13 #include "base/observer_list.h" | 13 #include "base/observer_list.h" |
14 #include "chromeos/chromeos_export.h" | |
15 #include "chromeos/dbus/bluetooth_gatt_service_client.h" | |
16 #include "dbus/object_path.h" | 14 #include "dbus/object_path.h" |
17 #include "dbus/property.h" | 15 #include "dbus/property.h" |
| 16 #include "device/bluetooth/bluetooth_export.h" |
| 17 #include "device/bluetooth/dbus/bluetooth_gatt_service_client.h" |
18 | 18 |
19 namespace chromeos { | 19 namespace bluez { |
20 | 20 |
21 // FakeBluetoothGattServiceClient simulates the behavior of the Bluetooth Daemon | 21 // FakeBluetoothGattServiceClient simulates the behavior of the Bluetooth Daemon |
22 // GATT service objects and is used in test cases in place of a mock and on the | 22 // GATT service objects and is used in test cases in place of a mock and on the |
23 // Linux desktop. | 23 // Linux desktop. |
24 class CHROMEOS_EXPORT FakeBluetoothGattServiceClient | 24 class DEVICE_BLUETOOTH_EXPORT FakeBluetoothGattServiceClient |
25 : public BluetoothGattServiceClient { | 25 : public BluetoothGattServiceClient { |
26 public: | 26 public: |
27 struct Properties : public BluetoothGattServiceClient::Properties { | 27 struct Properties : public BluetoothGattServiceClient::Properties { |
28 explicit Properties(const PropertyChangedCallback& callback); | 28 explicit Properties(const PropertyChangedCallback& callback); |
29 ~Properties() override; | 29 ~Properties() override; |
30 | 30 |
31 // dbus::PropertySet override | 31 // dbus::PropertySet override |
32 void Get(dbus::PropertyBase* property, | 32 void Get(dbus::PropertyBase* property, |
33 dbus::PropertySet::GetCallback callback) override; | 33 dbus::PropertySet::GetCallback callback) override; |
34 void GetAll() override; | 34 void GetAll() override; |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 | 94 |
95 // Weak pointer factory for generating 'this' pointers that might live longer | 95 // Weak pointer factory for generating 'this' pointers that might live longer |
96 // than we do. | 96 // than we do. |
97 // Note: This should remain the last member so it'll be destroyed and | 97 // Note: This should remain the last member so it'll be destroyed and |
98 // invalidate its weak pointers before any other members are destroyed. | 98 // invalidate its weak pointers before any other members are destroyed. |
99 base::WeakPtrFactory<FakeBluetoothGattServiceClient> weak_ptr_factory_; | 99 base::WeakPtrFactory<FakeBluetoothGattServiceClient> weak_ptr_factory_; |
100 | 100 |
101 DISALLOW_COPY_AND_ASSIGN(FakeBluetoothGattServiceClient); | 101 DISALLOW_COPY_AND_ASSIGN(FakeBluetoothGattServiceClient); |
102 }; | 102 }; |
103 | 103 |
104 } // namespace chromeos | 104 } // namespace bluez |
105 | 105 |
106 #endif // CHROMEOS_DBUS_FAKE_BLUETOOTH_GATT_SERVICE_CLIENT_H_ | 106 #endif // CHROMEOS_DBUS_FAKE_BLUETOOTH_GATT_SERVICE_CLIENT_H_ |
OLD | NEW |