| 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. Setting |device| to nullptr will send the | 180 // this method will return false. |
| 181 // notification to all connected devices. | 181 bool SendValueChanged(BluetoothLocalGattCharacteristicBlueZ* characteristic, |
| 182 bool SendValueChanged(const device::BluetoothDevice* device, | 182 const std::vector<uint8_t>& value); |
| 183 BluetoothLocalGattCharacteristicBlueZ* characteristic, | |
| 184 const std::vector<uint8_t>& value, | |
| 185 bool indicate); | |
| 186 | 183 |
| 187 // Returns the object path of the adapter. | 184 // Returns the object path of the adapter. |
| 188 dbus::ObjectPath GetApplicationObjectPath() const; | 185 dbus::ObjectPath GetApplicationObjectPath() const; |
| 189 | 186 |
| 190 protected: | 187 protected: |
| 191 // BluetoothAdapter: | 188 // BluetoothAdapter: |
| 192 void RemovePairingDelegateInternal( | 189 void RemovePairingDelegateInternal( |
| 193 device::BluetoothDevice::PairingDelegate* pairing_delegate) override; | 190 device::BluetoothDevice::PairingDelegate* pairing_delegate) override; |
| 194 | 191 |
| 195 private: | 192 private: |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 467 // Note: This should remain the last member so it'll be destroyed and | 464 // Note: This should remain the last member so it'll be destroyed and |
| 468 // invalidate its weak pointers before any other members are destroyed. | 465 // invalidate its weak pointers before any other members are destroyed. |
| 469 base::WeakPtrFactory<BluetoothAdapterBlueZ> weak_ptr_factory_; | 466 base::WeakPtrFactory<BluetoothAdapterBlueZ> weak_ptr_factory_; |
| 470 | 467 |
| 471 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterBlueZ); | 468 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterBlueZ); |
| 472 }; | 469 }; |
| 473 | 470 |
| 474 } // namespace bluez | 471 } // namespace bluez |
| 475 | 472 |
| 476 #endif // DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_ADAPTER_BLUEZ_H_ | 473 #endif // DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_ADAPTER_BLUEZ_H_ |
| OLD | NEW |