| 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_DESCRIPTOR_CLIENT_H_ | 5 #ifndef CHROMEOS_DBUS_FAKE_BLUETOOTH_GATT_DESCRIPTOR_CLIENT_H_ |
| 6 #define CHROMEOS_DBUS_FAKE_BLUETOOTH_GATT_DESCRIPTOR_CLIENT_H_ | 6 #define CHROMEOS_DBUS_FAKE_BLUETOOTH_GATT_DESCRIPTOR_CLIENT_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 // place of a mock and on the Linux desktop. | 21 // place of a mock and on the Linux desktop. |
| 22 class CHROMEOS_EXPORT FakeBluetoothGattDescriptorClient | 22 class CHROMEOS_EXPORT FakeBluetoothGattDescriptorClient |
| 23 : public BluetoothGattDescriptorClient { | 23 : public BluetoothGattDescriptorClient { |
| 24 public: | 24 public: |
| 25 struct Properties : public BluetoothGattDescriptorClient::Properties { | 25 struct Properties : public BluetoothGattDescriptorClient::Properties { |
| 26 explicit Properties(const PropertyChangedCallback& callback); | 26 explicit Properties(const PropertyChangedCallback& callback); |
| 27 virtual ~Properties(); | 27 virtual ~Properties(); |
| 28 | 28 |
| 29 // dbus::PropertySet override | 29 // dbus::PropertySet override |
| 30 virtual void Get(dbus::PropertyBase* property, | 30 virtual void Get(dbus::PropertyBase* property, |
| 31 dbus::PropertySet::GetCallback callback) OVERRIDE; | 31 dbus::PropertySet::GetCallback callback) override; |
| 32 virtual void GetAll() OVERRIDE; | 32 virtual void GetAll() override; |
| 33 virtual void Set(dbus::PropertyBase* property, | 33 virtual void Set(dbus::PropertyBase* property, |
| 34 dbus::PropertySet::SetCallback callback) OVERRIDE; | 34 dbus::PropertySet::SetCallback callback) override; |
| 35 }; | 35 }; |
| 36 | 36 |
| 37 FakeBluetoothGattDescriptorClient(); | 37 FakeBluetoothGattDescriptorClient(); |
| 38 virtual ~FakeBluetoothGattDescriptorClient(); | 38 virtual ~FakeBluetoothGattDescriptorClient(); |
| 39 | 39 |
| 40 // DBusClient override. | 40 // DBusClient override. |
| 41 virtual void Init(dbus::Bus* bus) OVERRIDE; | 41 virtual void Init(dbus::Bus* bus) override; |
| 42 | 42 |
| 43 // BluetoothGattDescriptorClient overrides. | 43 // BluetoothGattDescriptorClient overrides. |
| 44 virtual void AddObserver(Observer* observer) OVERRIDE; | 44 virtual void AddObserver(Observer* observer) override; |
| 45 virtual void RemoveObserver(Observer* observer) OVERRIDE; | 45 virtual void RemoveObserver(Observer* observer) override; |
| 46 virtual std::vector<dbus::ObjectPath> GetDescriptors() OVERRIDE; | 46 virtual std::vector<dbus::ObjectPath> GetDescriptors() override; |
| 47 virtual Properties* GetProperties(const dbus::ObjectPath& object_path) | 47 virtual Properties* GetProperties(const dbus::ObjectPath& object_path) |
| 48 OVERRIDE; | 48 override; |
| 49 virtual void ReadValue(const dbus::ObjectPath& object_path, | 49 virtual void ReadValue(const dbus::ObjectPath& object_path, |
| 50 const ValueCallback& callback, | 50 const ValueCallback& callback, |
| 51 const ErrorCallback& error_callback) OVERRIDE; | 51 const ErrorCallback& error_callback) override; |
| 52 virtual void WriteValue(const dbus::ObjectPath& object_path, | 52 virtual void WriteValue(const dbus::ObjectPath& object_path, |
| 53 const std::vector<uint8>& value, | 53 const std::vector<uint8>& value, |
| 54 const base::Closure& callback, | 54 const base::Closure& callback, |
| 55 const ErrorCallback& error_callback) OVERRIDE; | 55 const ErrorCallback& error_callback) override; |
| 56 | 56 |
| 57 // Makes the descriptor with the UUID |uuid| visible under the characteristic | 57 // Makes the descriptor with the UUID |uuid| visible under the characteristic |
| 58 // with object path |characteristic_path|. Descriptor object paths are | 58 // with object path |characteristic_path|. Descriptor object paths are |
| 59 // hierarchical to their characteristics. |uuid| must belong to a descriptor | 59 // hierarchical to their characteristics. |uuid| must belong to a descriptor |
| 60 // for which there is a constant defined below, otherwise this method has no | 60 // for which there is a constant defined below, otherwise this method has no |
| 61 // effect. Returns the object path of the created descriptor. In the no-op | 61 // effect. Returns the object path of the created descriptor. In the no-op |
| 62 // case, returns an invalid path. | 62 // case, returns an invalid path. |
| 63 dbus::ObjectPath ExposeDescriptor(const dbus::ObjectPath& characteristic_path, | 63 dbus::ObjectPath ExposeDescriptor(const dbus::ObjectPath& characteristic_path, |
| 64 const std::string& uuid); | 64 const std::string& uuid); |
| 65 void HideDescriptor(const dbus::ObjectPath& descriptor_path); | 65 void HideDescriptor(const dbus::ObjectPath& descriptor_path); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 // invalidate its weak pointers before any other members are destroyed. | 97 // invalidate its weak pointers before any other members are destroyed. |
| 98 base::WeakPtrFactory<FakeBluetoothGattDescriptorClient> | 98 base::WeakPtrFactory<FakeBluetoothGattDescriptorClient> |
| 99 weak_ptr_factory_; | 99 weak_ptr_factory_; |
| 100 | 100 |
| 101 DISALLOW_COPY_AND_ASSIGN(FakeBluetoothGattDescriptorClient); | 101 DISALLOW_COPY_AND_ASSIGN(FakeBluetoothGattDescriptorClient); |
| 102 }; | 102 }; |
| 103 | 103 |
| 104 } // namespace chromeos | 104 } // namespace chromeos |
| 105 | 105 |
| 106 #endif // CHROMEOS_DBUS_FAKE_BLUETOOTH_GATT_DESCRIPTOR_CLIENT_H_ | 106 #endif // CHROMEOS_DBUS_FAKE_BLUETOOTH_GATT_DESCRIPTOR_CLIENT_H_ |
| OLD | NEW |