| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_ADAPTER_BLUEZ_H_ | 5 #ifndef DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_ADAPTER_BLUEZ_H_ |
| 6 #define DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_ADAPTER_BLUEZ_H_ | 6 #define DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_ADAPTER_BLUEZ_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 void UnregisterGattService( | 170 void UnregisterGattService( |
| 171 BluetoothLocalGattServiceBlueZ* service, | 171 BluetoothLocalGattServiceBlueZ* service, |
| 172 const base::Closure& callback, | 172 const base::Closure& callback, |
| 173 const device::BluetoothGattService::ErrorCallback& error_callback); | 173 const device::BluetoothGattService::ErrorCallback& error_callback); |
| 174 | 174 |
| 175 // Returns if a given service is currently registered. | 175 // Returns if a given service is currently registered. |
| 176 bool IsGattServiceRegistered(BluetoothLocalGattServiceBlueZ* service); | 176 bool IsGattServiceRegistered(BluetoothLocalGattServiceBlueZ* service); |
| 177 | 177 |
| 178 // Send a notification for this characteristic that its value has been | 178 // Send a notification for this characteristic that its value has been |
| 179 // updated. If the service that owns that characteristic is not registered, | 179 // updated. If the service that owns that characteristic is not registered, |
| 180 // this method will return false. | 180 // this method will return false. Setting |device| to nullptr will send the |
| 181 bool SendValueChanged(BluetoothLocalGattCharacteristicBlueZ* characteristic, | 181 // notification to all connected devices. |
| 182 const std::vector<uint8_t>& value); | 182 bool SendValueChanged(const device::BluetoothDevice* device, |
| 183 BluetoothLocalGattCharacteristicBlueZ* characteristic, |
| 184 const std::vector<uint8_t>& value, |
| 185 bool indicate); |
| 183 | 186 |
| 184 // Returns the object path of the adapter. | 187 // Returns the object path of the adapter. |
| 185 dbus::ObjectPath GetApplicationObjectPath() const; | 188 dbus::ObjectPath GetApplicationObjectPath() const; |
| 186 | 189 |
| 187 protected: | 190 protected: |
| 188 // BluetoothAdapter: | 191 // BluetoothAdapter: |
| 189 void RemovePairingDelegateInternal( | 192 void RemovePairingDelegateInternal( |
| 190 device::BluetoothDevice::PairingDelegate* pairing_delegate) override; | 193 device::BluetoothDevice::PairingDelegate* pairing_delegate) override; |
| 191 | 194 |
| 192 private: | 195 private: |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 464 // Note: This should remain the last member so it'll be destroyed and | 467 // Note: This should remain the last member so it'll be destroyed and |
| 465 // invalidate its weak pointers before any other members are destroyed. | 468 // invalidate its weak pointers before any other members are destroyed. |
| 466 base::WeakPtrFactory<BluetoothAdapterBlueZ> weak_ptr_factory_; | 469 base::WeakPtrFactory<BluetoothAdapterBlueZ> weak_ptr_factory_; |
| 467 | 470 |
| 468 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterBlueZ); | 471 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterBlueZ); |
| 469 }; | 472 }; |
| 470 | 473 |
| 471 } // namespace bluez | 474 } // namespace bluez |
| 472 | 475 |
| 473 #endif // DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_ADAPTER_BLUEZ_H_ | 476 #endif // DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_ADAPTER_BLUEZ_H_ |
| OLD | NEW |