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_CHARACTERISTIC_CLIENT_H_ | 5 #ifndef CHROMEOS_DBUS_FAKE_BLUETOOTH_GATT_CHARACTERISTIC_CLIENT_H_ |
6 #define CHROMEOS_DBUS_FAKE_BLUETOOTH_GATT_CHARACTERISTIC_CLIENT_H_ | 6 #define CHROMEOS_DBUS_FAKE_BLUETOOTH_GATT_CHARACTERISTIC_CLIENT_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 13 matching lines...) Expand all Loading... |
24 // place of a mock and on the Linux desktop. | 24 // place of a mock and on the Linux desktop. |
25 class CHROMEOS_EXPORT FakeBluetoothGattCharacteristicClient | 25 class CHROMEOS_EXPORT FakeBluetoothGattCharacteristicClient |
26 : public BluetoothGattCharacteristicClient { | 26 : public BluetoothGattCharacteristicClient { |
27 public: | 27 public: |
28 struct Properties : public BluetoothGattCharacteristicClient::Properties { | 28 struct Properties : public BluetoothGattCharacteristicClient::Properties { |
29 explicit Properties(const PropertyChangedCallback& callback); | 29 explicit Properties(const PropertyChangedCallback& callback); |
30 virtual ~Properties(); | 30 virtual ~Properties(); |
31 | 31 |
32 // dbus::PropertySet override | 32 // dbus::PropertySet override |
33 virtual void Get(dbus::PropertyBase* property, | 33 virtual void Get(dbus::PropertyBase* property, |
34 dbus::PropertySet::GetCallback callback) OVERRIDE; | 34 dbus::PropertySet::GetCallback callback) override; |
35 virtual void GetAll() OVERRIDE; | 35 virtual void GetAll() override; |
36 virtual void Set(dbus::PropertyBase* property, | 36 virtual void Set(dbus::PropertyBase* property, |
37 dbus::PropertySet::SetCallback callback) OVERRIDE; | 37 dbus::PropertySet::SetCallback callback) override; |
38 }; | 38 }; |
39 | 39 |
40 FakeBluetoothGattCharacteristicClient(); | 40 FakeBluetoothGattCharacteristicClient(); |
41 virtual ~FakeBluetoothGattCharacteristicClient(); | 41 virtual ~FakeBluetoothGattCharacteristicClient(); |
42 | 42 |
43 // DBusClient override. | 43 // DBusClient override. |
44 virtual void Init(dbus::Bus* bus) OVERRIDE; | 44 virtual void Init(dbus::Bus* bus) override; |
45 | 45 |
46 // BluetoothGattCharacteristicClient overrides. | 46 // BluetoothGattCharacteristicClient overrides. |
47 virtual void AddObserver(Observer* observer) OVERRIDE; | 47 virtual void AddObserver(Observer* observer) override; |
48 virtual void RemoveObserver(Observer* observer) OVERRIDE; | 48 virtual void RemoveObserver(Observer* observer) override; |
49 virtual std::vector<dbus::ObjectPath> GetCharacteristics() OVERRIDE; | 49 virtual std::vector<dbus::ObjectPath> GetCharacteristics() override; |
50 virtual Properties* GetProperties(const dbus::ObjectPath& object_path) | 50 virtual Properties* GetProperties(const dbus::ObjectPath& object_path) |
51 OVERRIDE; | 51 override; |
52 virtual void ReadValue(const dbus::ObjectPath& object_path, | 52 virtual void ReadValue(const dbus::ObjectPath& object_path, |
53 const ValueCallback& callback, | 53 const ValueCallback& callback, |
54 const ErrorCallback& error_callback) OVERRIDE; | 54 const ErrorCallback& error_callback) override; |
55 virtual void WriteValue(const dbus::ObjectPath& object_path, | 55 virtual void WriteValue(const dbus::ObjectPath& object_path, |
56 const std::vector<uint8>& value, | 56 const std::vector<uint8>& value, |
57 const base::Closure& callback, | 57 const base::Closure& callback, |
58 const ErrorCallback& error_callback) OVERRIDE; | 58 const ErrorCallback& error_callback) override; |
59 virtual void StartNotify(const dbus::ObjectPath& object_path, | 59 virtual void StartNotify(const dbus::ObjectPath& object_path, |
60 const base::Closure& callback, | 60 const base::Closure& callback, |
61 const ErrorCallback& error_callback) OVERRIDE; | 61 const ErrorCallback& error_callback) override; |
62 virtual void StopNotify(const dbus::ObjectPath& object_path, | 62 virtual void StopNotify(const dbus::ObjectPath& object_path, |
63 const base::Closure& callback, | 63 const base::Closure& callback, |
64 const ErrorCallback& error_callback) OVERRIDE; | 64 const ErrorCallback& error_callback) override; |
65 | 65 |
66 // Makes the group of characteristics belonging to a particular GATT based | 66 // Makes the group of characteristics belonging to a particular GATT based |
67 // profile available under the GATT service with object path |service_path|. | 67 // profile available under the GATT service with object path |service_path|. |
68 // Characteristic paths are hierarchical to service paths. | 68 // Characteristic paths are hierarchical to service paths. |
69 void ExposeHeartRateCharacteristics(const dbus::ObjectPath& service_path); | 69 void ExposeHeartRateCharacteristics(const dbus::ObjectPath& service_path); |
70 void HideHeartRateCharacteristics(); | 70 void HideHeartRateCharacteristics(); |
71 | 71 |
72 // Returns whether or not the heart rate characteristics are visible and | 72 // Returns whether or not the heart rate characteristics are visible and |
73 // performs the appropriate assertions. | 73 // performs the appropriate assertions. |
74 bool IsHeartRateVisible() const; | 74 bool IsHeartRateVisible() const; |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 // invalidate its weak pointers before any other members are destroyed. | 181 // invalidate its weak pointers before any other members are destroyed. |
182 base::WeakPtrFactory<FakeBluetoothGattCharacteristicClient> | 182 base::WeakPtrFactory<FakeBluetoothGattCharacteristicClient> |
183 weak_ptr_factory_; | 183 weak_ptr_factory_; |
184 | 184 |
185 DISALLOW_COPY_AND_ASSIGN(FakeBluetoothGattCharacteristicClient); | 185 DISALLOW_COPY_AND_ASSIGN(FakeBluetoothGattCharacteristicClient); |
186 }; | 186 }; |
187 | 187 |
188 } // namespace chromeos | 188 } // namespace chromeos |
189 | 189 |
190 #endif // CHROMEOS_DBUS_FAKE_BLUETOOTH_GATT_CHARACTERISTIC_CLIENT_H_ | 190 #endif // CHROMEOS_DBUS_FAKE_BLUETOOTH_GATT_CHARACTERISTIC_CLIENT_H_ |
OLD | NEW |