Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_BLUETOOTH_ADAPTER_H_ | 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_H_ |
| 6 #define DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_H_ | 6 #define DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <list> | 10 #include <list> |
| (...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 391 const AcquiredCallback& callback, | 391 const AcquiredCallback& callback, |
| 392 const BluetoothAudioSink::ErrorCallback& error_callback) = 0; | 392 const BluetoothAudioSink::ErrorCallback& error_callback) = 0; |
| 393 | 393 |
| 394 // Creates and registers an advertisement for broadcast over the LE channel. | 394 // Creates and registers an advertisement for broadcast over the LE channel. |
| 395 // The created advertisement will be returned via the success callback. | 395 // The created advertisement will be returned via the success callback. |
| 396 virtual void RegisterAdvertisement( | 396 virtual void RegisterAdvertisement( |
| 397 scoped_ptr<BluetoothAdvertisement::Data> advertisement_data, | 397 scoped_ptr<BluetoothAdvertisement::Data> advertisement_data, |
| 398 const CreateAdvertisementCallback& callback, | 398 const CreateAdvertisementCallback& callback, |
| 399 const CreateAdvertisementErrorCallback& error_callback) = 0; | 399 const CreateAdvertisementErrorCallback& error_callback) = 0; |
| 400 | 400 |
| 401 // Send adapter state changed event to observers. | |
| 402 void NotifyAdapterStateChanged(bool powered); | |
|
scheib
2016/02/26 00:05:59
Merge with block of all Notify* methods below, and
perja
2016/02/26 10:51:04
Done.
| |
| 403 | |
| 401 // The following methods are used to send various GATT observer events to | 404 // The following methods are used to send various GATT observer events to |
| 402 // observers. | 405 // observers. |
| 403 void NotifyGattServiceAdded(BluetoothGattService* service); | 406 void NotifyGattServiceAdded(BluetoothGattService* service); |
| 404 void NotifyGattServiceRemoved(BluetoothGattService* service); | 407 void NotifyGattServiceRemoved(BluetoothGattService* service); |
| 405 void NotifyGattServiceChanged(BluetoothGattService* service); | 408 void NotifyGattServiceChanged(BluetoothGattService* service); |
| 406 void NotifyGattServicesDiscovered(BluetoothDevice* device); | 409 void NotifyGattServicesDiscovered(BluetoothDevice* device); |
| 407 void NotifyGattDiscoveryComplete(BluetoothGattService* service); | 410 void NotifyGattDiscoveryComplete(BluetoothGattService* service); |
| 408 void NotifyGattCharacteristicAdded( | 411 void NotifyGattCharacteristicAdded( |
| 409 BluetoothGattCharacteristic* characteristic); | 412 BluetoothGattCharacteristic* characteristic); |
| 410 void NotifyGattCharacteristicRemoved( | 413 void NotifyGattCharacteristicRemoved( |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 548 std::set<BluetoothDiscoverySession*> discovery_sessions_; | 551 std::set<BluetoothDiscoverySession*> discovery_sessions_; |
| 549 | 552 |
| 550 // Note: This should remain the last member so it'll be destroyed and | 553 // Note: This should remain the last member so it'll be destroyed and |
| 551 // invalidate its weak pointers before any other members are destroyed. | 554 // invalidate its weak pointers before any other members are destroyed. |
| 552 base::WeakPtrFactory<BluetoothAdapter> weak_ptr_factory_; | 555 base::WeakPtrFactory<BluetoothAdapter> weak_ptr_factory_; |
| 553 }; | 556 }; |
| 554 | 557 |
| 555 } // namespace device | 558 } // namespace device |
| 556 | 559 |
| 557 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_H_ | 560 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_H_ |
| OLD | NEW |