| 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_BLUEZ_BLUETOOTH_REMOTE_GATT_SERVICE_BLUEZ_H_ | 5 #ifndef DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_REMOTE_GATT_SERVICE_BLUEZ_H_ |
| 6 #define DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_REMOTE_GATT_SERVICE_BLUEZ_H_ | 6 #define DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_REMOTE_GATT_SERVICE_BLUEZ_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 class BluetoothRemoteGattDescriptorBlueZ; | 35 class BluetoothRemoteGattDescriptorBlueZ; |
| 36 | 36 |
| 37 // The BluetoothRemoteGattServiceBlueZ class implements BluetootGattService | 37 // The BluetoothRemoteGattServiceBlueZ class implements BluetootGattService |
| 38 // for remote GATT services for platforms that use BlueZ. | 38 // for remote GATT services for platforms that use BlueZ. |
| 39 class BluetoothRemoteGattServiceBlueZ | 39 class BluetoothRemoteGattServiceBlueZ |
| 40 : public BluetoothGattServiceBlueZ, | 40 : public BluetoothGattServiceBlueZ, |
| 41 public BluetoothGattServiceClient::Observer, | 41 public BluetoothGattServiceClient::Observer, |
| 42 public BluetoothGattCharacteristicClient::Observer, | 42 public BluetoothGattCharacteristicClient::Observer, |
| 43 public device::BluetoothRemoteGattService { | 43 public device::BluetoothRemoteGattService { |
| 44 public: | 44 public: |
| 45 ~BluetoothRemoteGattServiceBlueZ() override; |
| 46 |
| 45 // device::BluetoothRemoteGattService overrides. | 47 // device::BluetoothRemoteGattService overrides. |
| 46 device::BluetoothUUID GetUUID() const override; | 48 device::BluetoothUUID GetUUID() const override; |
| 47 device::BluetoothDevice* GetDevice() const override; | 49 device::BluetoothDevice* GetDevice() const override; |
| 48 bool IsPrimary() const override; | 50 bool IsPrimary() const override; |
| 49 std::vector<device::BluetoothRemoteGattCharacteristic*> GetCharacteristics() | 51 std::vector<device::BluetoothRemoteGattCharacteristic*> GetCharacteristics() |
| 50 const override; | 52 const override; |
| 51 std::vector<device::BluetoothRemoteGattService*> GetIncludedServices() | 53 std::vector<device::BluetoothRemoteGattService*> GetIncludedServices() |
| 52 const override; | 54 const override; |
| 53 device::BluetoothRemoteGattCharacteristic* GetCharacteristic( | 55 device::BluetoothRemoteGattCharacteristic* GetCharacteristic( |
| 54 const std::string& identifier) const override; | 56 const std::string& identifier) const override; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 76 BluetoothRemoteGattCharacteristicBlueZ* characteristic, | 78 BluetoothRemoteGattCharacteristicBlueZ* characteristic, |
| 77 BluetoothRemoteGattDescriptorBlueZ* descriptor, | 79 BluetoothRemoteGattDescriptorBlueZ* descriptor, |
| 78 const std::vector<uint8_t>& value); | 80 const std::vector<uint8_t>& value); |
| 79 | 81 |
| 80 private: | 82 private: |
| 81 friend class BluetoothDeviceBlueZ; | 83 friend class BluetoothDeviceBlueZ; |
| 82 | 84 |
| 83 BluetoothRemoteGattServiceBlueZ(BluetoothAdapterBlueZ* adapter, | 85 BluetoothRemoteGattServiceBlueZ(BluetoothAdapterBlueZ* adapter, |
| 84 BluetoothDeviceBlueZ* device, | 86 BluetoothDeviceBlueZ* device, |
| 85 const dbus::ObjectPath& object_path); | 87 const dbus::ObjectPath& object_path); |
| 86 ~BluetoothRemoteGattServiceBlueZ() override; | |
| 87 | 88 |
| 88 // bluez::BluetoothGattServiceClient::Observer override. | 89 // bluez::BluetoothGattServiceClient::Observer override. |
| 89 void GattServicePropertyChanged(const dbus::ObjectPath& object_path, | 90 void GattServicePropertyChanged(const dbus::ObjectPath& object_path, |
| 90 const std::string& property_name) override; | 91 const std::string& property_name) override; |
| 91 | 92 |
| 92 // bluez::BluetoothGattCharacteristicClient::Observer override. | 93 // bluez::BluetoothGattCharacteristicClient::Observer override. |
| 93 void GattCharacteristicAdded(const dbus::ObjectPath& object_path) override; | 94 void GattCharacteristicAdded(const dbus::ObjectPath& object_path) override; |
| 94 void GattCharacteristicRemoved(const dbus::ObjectPath& object_path) override; | 95 void GattCharacteristicRemoved(const dbus::ObjectPath& object_path) override; |
| 95 void GattCharacteristicPropertyChanged( | 96 void GattCharacteristicPropertyChanged( |
| 96 const dbus::ObjectPath& object_path, | 97 const dbus::ObjectPath& object_path, |
| (...skipping 17 matching lines...) Expand all Loading... |
| 114 // Note: This should remain the last member so it'll be destroyed and | 115 // Note: This should remain the last member so it'll be destroyed and |
| 115 // invalidate its weak pointers before any other members are destroyed. | 116 // invalidate its weak pointers before any other members are destroyed. |
| 116 base::WeakPtrFactory<BluetoothRemoteGattServiceBlueZ> weak_ptr_factory_; | 117 base::WeakPtrFactory<BluetoothRemoteGattServiceBlueZ> weak_ptr_factory_; |
| 117 | 118 |
| 118 DISALLOW_COPY_AND_ASSIGN(BluetoothRemoteGattServiceBlueZ); | 119 DISALLOW_COPY_AND_ASSIGN(BluetoothRemoteGattServiceBlueZ); |
| 119 }; | 120 }; |
| 120 | 121 |
| 121 } // namespace bluez | 122 } // namespace bluez |
| 122 | 123 |
| 123 #endif // DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_REMOTE_GATT_SERVICE_BLUEZ_H_ | 124 #endif // DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_REMOTE_GATT_SERVICE_BLUEZ_H_ |
| OLD | NEW |