| 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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 // no Bluetooth controller exists in the local system. |IsPresent| will return | 260 // no Bluetooth controller exists in the local system. |IsPresent| will return |
| 261 // false. | 261 // false. |
| 262 virtual void Shutdown(); | 262 virtual void Shutdown(); |
| 263 #endif | 263 #endif |
| 264 | 264 |
| 265 // Adds and removes observers for events on this bluetooth adapter. If | 265 // Adds and removes observers for events on this bluetooth adapter. If |
| 266 // monitoring multiple adapters, check the |adapter| parameter of observer | 266 // monitoring multiple adapters, check the |adapter| parameter of observer |
| 267 // methods to determine which adapter is issuing the event. | 267 // methods to determine which adapter is issuing the event. |
| 268 virtual void AddObserver(BluetoothAdapter::Observer* observer); | 268 virtual void AddObserver(BluetoothAdapter::Observer* observer); |
| 269 virtual void RemoveObserver(BluetoothAdapter::Observer* observer); | 269 virtual void RemoveObserver(BluetoothAdapter::Observer* observer); |
| 270 virtual bool HasObserver(BluetoothAdapter::Observer* observer); |
| 270 | 271 |
| 271 // The address of this adapter. The address format is "XX:XX:XX:XX:XX:XX", | 272 // The address of this adapter. The address format is "XX:XX:XX:XX:XX:XX", |
| 272 // where each XX is a hexadecimal number. | 273 // where each XX is a hexadecimal number. |
| 273 virtual std::string GetAddress() const = 0; | 274 virtual std::string GetAddress() const = 0; |
| 274 | 275 |
| 275 // The name of the adapter. | 276 // The name of the adapter. |
| 276 virtual std::string GetName() const = 0; | 277 virtual std::string GetName() const = 0; |
| 277 | 278 |
| 278 // Set the human-readable name of the adapter to |name|. On success, | 279 // Set the human-readable name of the adapter to |name|. On success, |
| 279 // |callback| will be called. On failure, |error_callback| will be called. | 280 // |callback| will be called. On failure, |error_callback| will be called. |
| (...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 607 std::set<BluetoothDiscoverySession*> discovery_sessions_; | 608 std::set<BluetoothDiscoverySession*> discovery_sessions_; |
| 608 | 609 |
| 609 // Note: This should remain the last member so it'll be destroyed and | 610 // Note: This should remain the last member so it'll be destroyed and |
| 610 // invalidate its weak pointers before any other members are destroyed. | 611 // invalidate its weak pointers before any other members are destroyed. |
| 611 base::WeakPtrFactory<BluetoothAdapter> weak_ptr_factory_; | 612 base::WeakPtrFactory<BluetoothAdapter> weak_ptr_factory_; |
| 612 }; | 613 }; |
| 613 | 614 |
| 614 } // namespace device | 615 } // namespace device |
| 615 | 616 |
| 616 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_H_ | 617 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_H_ |
| OLD | NEW |