| 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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 | 122 |
| 123 // Schedules a heart rate measurement value change, if the heart rate | 123 // Schedules a heart rate measurement value change, if the heart rate |
| 124 // characteristics are visible. | 124 // characteristics are visible. |
| 125 void ScheduleHeartRateMeasurementValueChange(); | 125 void ScheduleHeartRateMeasurementValueChange(); |
| 126 | 126 |
| 127 // Returns a random Heart Rate Measurement value. All the fields of the value | 127 // Returns a random Heart Rate Measurement value. All the fields of the value |
| 128 // are populated according to the the fake behavior. The measurement value | 128 // are populated according to the the fake behavior. The measurement value |
| 129 // is a random value within a reasonable range. | 129 // is a random value within a reasonable range. |
| 130 std::vector<uint8> GetHeartRateMeasurementValue(); | 130 std::vector<uint8> GetHeartRateMeasurementValue(); |
| 131 | 131 |
| 132 // Callback that executes a delayed ReadValue action by updating the |
| 133 // appropriate "Value" property and invoking the ValueCallback. |
| 134 void DelayedReadValueCallback(const dbus::ObjectPath& object_path, |
| 135 const ValueCallback& callback, |
| 136 const std::vector<uint8_t>& value); |
| 137 |
| 132 // If true, characteristics of the Heart Rate Service are visible. Use | 138 // If true, characteristics of the Heart Rate Service are visible. Use |
| 133 // IsHeartRateVisible() to check the value. | 139 // IsHeartRateVisible() to check the value. |
| 134 bool heart_rate_visible_; | 140 bool heart_rate_visible_; |
| 135 | 141 |
| 136 // If true, the client is authorized to read and write. | 142 // If true, the client is authorized to read and write. |
| 137 bool authorized_; | 143 bool authorized_; |
| 138 | 144 |
| 139 // If true, the client is authenticated. | 145 // If true, the client is authenticated. |
| 140 bool authenticated_; | 146 bool authenticated_; |
| 141 | 147 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 // invalidate its weak pointers before any other members are destroyed. | 187 // invalidate its weak pointers before any other members are destroyed. |
| 182 base::WeakPtrFactory<FakeBluetoothGattCharacteristicClient> | 188 base::WeakPtrFactory<FakeBluetoothGattCharacteristicClient> |
| 183 weak_ptr_factory_; | 189 weak_ptr_factory_; |
| 184 | 190 |
| 185 DISALLOW_COPY_AND_ASSIGN(FakeBluetoothGattCharacteristicClient); | 191 DISALLOW_COPY_AND_ASSIGN(FakeBluetoothGattCharacteristicClient); |
| 186 }; | 192 }; |
| 187 | 193 |
| 188 } // namespace chromeos | 194 } // namespace chromeos |
| 189 | 195 |
| 190 #endif // CHROMEOS_DBUS_FAKE_BLUETOOTH_GATT_CHARACTERISTIC_CLIENT_H_ | 196 #endif // CHROMEOS_DBUS_FAKE_BLUETOOTH_GATT_CHARACTERISTIC_CLIENT_H_ |
| OLD | NEW |