| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_BLUETOOTH_GATT_CHARACTERISTIC_SERVICE_PROVIDER_IMP
L_H_ | 5 #ifndef DEVICE_BLUETOOTH_DBUS_BLUETOOTH_GATT_CHARACTERISTIC_SERVICE_PROVIDER_IMP
L_H_ |
| 6 #define DEVICE_BLUETOOTH_DBUS_BLUETOOTH_GATT_CHARACTERISTIC_SERVICE_PROVIDER_IMP
L_H_ | 6 #define DEVICE_BLUETOOTH_DBUS_BLUETOOTH_GATT_CHARACTERISTIC_SERVICE_PROVIDER_IMP
L_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 dbus::Bus* bus, | 32 dbus::Bus* bus, |
| 33 const dbus::ObjectPath& object_path, | 33 const dbus::ObjectPath& object_path, |
| 34 std::unique_ptr<BluetoothGattAttributeValueDelegate> delegate, | 34 std::unique_ptr<BluetoothGattAttributeValueDelegate> delegate, |
| 35 const std::string& uuid, | 35 const std::string& uuid, |
| 36 const std::vector<std::string>& flags, | 36 const std::vector<std::string>& flags, |
| 37 const dbus::ObjectPath& service_path); | 37 const dbus::ObjectPath& service_path); |
| 38 | 38 |
| 39 ~BluetoothGattCharacteristicServiceProviderImpl() override; | 39 ~BluetoothGattCharacteristicServiceProviderImpl() override; |
| 40 | 40 |
| 41 // BluetoothGattCharacteristicServiceProvider override. | 41 // BluetoothGattCharacteristicServiceProvider override. |
| 42 void SendValueChanged(const dbus::ObjectPath& device_path, | 42 void SendValueChanged(const std::vector<uint8_t>& value) override; |
| 43 const std::vector<uint8_t>& value, | |
| 44 bool indicate) override; | |
| 45 | 43 |
| 46 private: | 44 private: |
| 47 // Returns true if the current thread is on the origin thread. | 45 // Returns true if the current thread is on the origin thread. |
| 48 bool OnOriginThread(); | 46 bool OnOriginThread(); |
| 49 | 47 |
| 50 // Called by dbus:: when the Bluetooth daemon fetches a single property of | 48 // Called by dbus:: when the Bluetooth daemon fetches a single property of |
| 51 // the characteristic. | 49 // the characteristic. |
| 52 void Get(dbus::MethodCall* method_call, | 50 void Get(dbus::MethodCall* method_call, |
| 53 dbus::ExportedObject::ResponseSender response_sender); | 51 dbus::ExportedObject::ResponseSender response_sender); |
| 54 | 52 |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 // invalidate its weak pointers before any other members are destroyed. | 148 // invalidate its weak pointers before any other members are destroyed. |
| 151 base::WeakPtrFactory<BluetoothGattCharacteristicServiceProviderImpl> | 149 base::WeakPtrFactory<BluetoothGattCharacteristicServiceProviderImpl> |
| 152 weak_ptr_factory_; | 150 weak_ptr_factory_; |
| 153 | 151 |
| 154 DISALLOW_COPY_AND_ASSIGN(BluetoothGattCharacteristicServiceProviderImpl); | 152 DISALLOW_COPY_AND_ASSIGN(BluetoothGattCharacteristicServiceProviderImpl); |
| 155 }; | 153 }; |
| 156 | 154 |
| 157 } // namespace bluez | 155 } // namespace bluez |
| 158 | 156 |
| 159 #endif // DEVICE_BLUETOOTH_DBUS_BLUETOOTH_GATT_CHARACTERISTIC_SERVICE_PROVIDER_
IMPL_H_ | 157 #endif // DEVICE_BLUETOOTH_DBUS_BLUETOOTH_GATT_CHARACTERISTIC_SERVICE_PROVIDER_
IMPL_H_ |
| OLD | NEW |