| 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 <list> | 8 #include <list> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 // remote GATT characteristic. | 167 // remote GATT characteristic. |
| 168 virtual void GattCharacteristicValueChanged( | 168 virtual void GattCharacteristicValueChanged( |
| 169 BluetoothAdapter* adapter, | 169 BluetoothAdapter* adapter, |
| 170 BluetoothGattCharacteristic* characteristic, | 170 BluetoothGattCharacteristic* characteristic, |
| 171 const std::vector<uint8>& value) {} | 171 const std::vector<uint8>& value) {} |
| 172 | 172 |
| 173 // Called when the value of a characteristic descriptor has been updated. | 173 // Called when the value of a characteristic descriptor has been updated. |
| 174 virtual void GattDescriptorValueChanged(BluetoothAdapter* adapter, | 174 virtual void GattDescriptorValueChanged(BluetoothAdapter* adapter, |
| 175 BluetoothGattDescriptor* descriptor, | 175 BluetoothGattDescriptor* descriptor, |
| 176 const std::vector<uint8>& value) {} | 176 const std::vector<uint8>& value) {} |
| 177 |
| 178 protected: |
| 179 Observer() = default; |
| 177 }; | 180 }; |
| 178 | 181 |
| 179 // Used to configure a listening servie. | 182 // Used to configure a listening servie. |
| 180 struct DEVICE_BLUETOOTH_EXPORT ServiceOptions { | 183 struct DEVICE_BLUETOOTH_EXPORT ServiceOptions { |
| 181 ServiceOptions(); | 184 ServiceOptions(); |
| 182 ~ServiceOptions(); | 185 ~ServiceOptions(); |
| 183 | 186 |
| 184 scoped_ptr<int> channel; | 187 scoped_ptr<int> channel; |
| 185 scoped_ptr<int> psm; | 188 scoped_ptr<int> psm; |
| 186 scoped_ptr<std::string> name; | 189 scoped_ptr<std::string> name; |
| (...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 525 std::set<BluetoothDiscoverySession*> discovery_sessions_; | 528 std::set<BluetoothDiscoverySession*> discovery_sessions_; |
| 526 | 529 |
| 527 // Note: This should remain the last member so it'll be destroyed and | 530 // Note: This should remain the last member so it'll be destroyed and |
| 528 // invalidate its weak pointers before any other members are destroyed. | 531 // invalidate its weak pointers before any other members are destroyed. |
| 529 base::WeakPtrFactory<BluetoothAdapter> weak_ptr_factory_; | 532 base::WeakPtrFactory<BluetoothAdapter> weak_ptr_factory_; |
| 530 }; | 533 }; |
| 531 | 534 |
| 532 } // namespace device | 535 } // namespace device |
| 533 | 536 |
| 534 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_H_ | 537 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_H_ |
| OLD | NEW |