| 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_CHARACTERISTIC_SERVICE_PROVIDE
R_H_ | 5 #ifndef DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_GATT_CHARACTERISTIC_SERVICE_PROVIDE
R_H_ |
| 6 #define DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_GATT_CHARACTERISTIC_SERVICE_PROVIDE
R_H_ | 6 #define DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_GATT_CHARACTERISTIC_SERVICE_PROVIDE
R_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 const dbus::ObjectPath& service_path); | 33 const dbus::ObjectPath& service_path); |
| 34 ~FakeBluetoothGattCharacteristicServiceProvider() override; | 34 ~FakeBluetoothGattCharacteristicServiceProvider() override; |
| 35 | 35 |
| 36 // BluetoothGattCharacteristicServiceProvider override. | 36 // BluetoothGattCharacteristicServiceProvider override. |
| 37 void SendValueChanged(const std::vector<uint8_t>& value) override; | 37 void SendValueChanged(const std::vector<uint8_t>& value) override; |
| 38 | 38 |
| 39 // Methods to simulate value get/set requests issued from a remote device. The | 39 // Methods to simulate value get/set requests issued from a remote device. The |
| 40 // methods do nothing, if the associated service was not registered with the | 40 // methods do nothing, if the associated service was not registered with the |
| 41 // GATT manager. | 41 // GATT manager. |
| 42 void GetValue( | 42 void GetValue( |
| 43 const dbus::ObjectPath& device_path, |
| 43 const device::BluetoothLocalGattService::Delegate::ValueCallback& | 44 const device::BluetoothLocalGattService::Delegate::ValueCallback& |
| 44 callback, | 45 callback, |
| 45 const device::BluetoothLocalGattService::Delegate::ErrorCallback& | 46 const device::BluetoothLocalGattService::Delegate::ErrorCallback& |
| 46 error_callback); | 47 error_callback); |
| 47 void SetValue( | 48 void SetValue( |
| 49 const dbus::ObjectPath& device_path, |
| 48 const std::vector<uint8_t>& value, | 50 const std::vector<uint8_t>& value, |
| 49 const base::Closure& callback, | 51 const base::Closure& callback, |
| 50 const device::BluetoothLocalGattService::Delegate::ErrorCallback& | 52 const device::BluetoothLocalGattService::Delegate::ErrorCallback& |
| 51 error_callback); | 53 error_callback); |
| 52 | 54 |
| 53 // Method to simulate starting and stopping notifications. | 55 // Method to simulate starting and stopping notifications. |
| 54 bool NotificationsChange(bool start); | 56 bool NotificationsChange(bool start); |
| 55 | 57 |
| 56 const dbus::ObjectPath& object_path() const override; | 58 const dbus::ObjectPath& object_path() const override; |
| 57 const std::string& uuid() const { return uuid_; } | 59 const std::string& uuid() const { return uuid_; } |
| (...skipping 18 matching lines...) Expand all Loading... |
| 76 | 78 |
| 77 // The delegate that method calls are passed on to. | 79 // The delegate that method calls are passed on to. |
| 78 std::unique_ptr<BluetoothGattAttributeValueDelegate> delegate_; | 80 std::unique_ptr<BluetoothGattAttributeValueDelegate> delegate_; |
| 79 | 81 |
| 80 DISALLOW_COPY_AND_ASSIGN(FakeBluetoothGattCharacteristicServiceProvider); | 82 DISALLOW_COPY_AND_ASSIGN(FakeBluetoothGattCharacteristicServiceProvider); |
| 81 }; | 83 }; |
| 82 | 84 |
| 83 } // namespace bluez | 85 } // namespace bluez |
| 84 | 86 |
| 85 #endif // DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_GATT_CHARACTERISTIC_SERVICE_PROV
IDER_H_ | 87 #endif // DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_GATT_CHARACTERISTIC_SERVICE_PROV
IDER_H_ |
| OLD | NEW |