| 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 // The following methods are used to send various GATT observer events to | 401 // The following methods are used to send various events to observers. |
| 402 // observers. | 402 void NotifyAdapterStateChanged(bool powered); |
| 403 void NotifyGattServiceAdded(BluetoothGattService* service); | 403 void NotifyGattServiceAdded(BluetoothGattService* service); |
| 404 void NotifyGattServiceRemoved(BluetoothGattService* service); | 404 void NotifyGattServiceRemoved(BluetoothGattService* service); |
| 405 void NotifyGattServiceChanged(BluetoothGattService* service); | 405 void NotifyGattServiceChanged(BluetoothGattService* service); |
| 406 void NotifyGattServicesDiscovered(BluetoothDevice* device); | 406 void NotifyGattServicesDiscovered(BluetoothDevice* device); |
| 407 void NotifyGattDiscoveryComplete(BluetoothGattService* service); | 407 void NotifyGattDiscoveryComplete(BluetoothGattService* service); |
| 408 void NotifyGattCharacteristicAdded( | 408 void NotifyGattCharacteristicAdded( |
| 409 BluetoothGattCharacteristic* characteristic); | 409 BluetoothGattCharacteristic* characteristic); |
| 410 void NotifyGattCharacteristicRemoved( | 410 void NotifyGattCharacteristicRemoved( |
| 411 BluetoothGattCharacteristic* characteristic); | 411 BluetoothGattCharacteristic* characteristic); |
| 412 void NotifyGattDescriptorAdded(BluetoothGattDescriptor* descriptor); | 412 void NotifyGattDescriptorAdded(BluetoothGattDescriptor* descriptor); |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 548 std::set<BluetoothDiscoverySession*> discovery_sessions_; | 548 std::set<BluetoothDiscoverySession*> discovery_sessions_; |
| 549 | 549 |
| 550 // Note: This should remain the last member so it'll be destroyed and | 550 // Note: This should remain the last member so it'll be destroyed and |
| 551 // invalidate its weak pointers before any other members are destroyed. | 551 // invalidate its weak pointers before any other members are destroyed. |
| 552 base::WeakPtrFactory<BluetoothAdapter> weak_ptr_factory_; | 552 base::WeakPtrFactory<BluetoothAdapter> weak_ptr_factory_; |
| 553 }; | 553 }; |
| 554 | 554 |
| 555 } // namespace device | 555 } // namespace device |
| 556 | 556 |
| 557 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_H_ | 557 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_H_ |
| OLD | NEW |