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 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
253 const ErrorCallback& error_callback) = 0; | 253 const ErrorCallback& error_callback) = 0; |
254 | 254 |
255 // Indicates whether the adapter is initialized and ready to use. | 255 // Indicates whether the adapter is initialized and ready to use. |
256 virtual bool IsInitialized() const = 0; | 256 virtual bool IsInitialized() const = 0; |
257 | 257 |
258 // Indicates whether the adapter is actually present on the system. For the | 258 // Indicates whether the adapter is actually present on the system. For the |
259 // default adapter, this indicates whether any adapter is present. An adapter | 259 // default adapter, this indicates whether any adapter is present. An adapter |
260 // is only considered present if the address has been obtained. | 260 // is only considered present if the address has been obtained. |
261 virtual bool IsPresent() const = 0; | 261 virtual bool IsPresent() const = 0; |
262 | 262 |
263 #if defined(OS_CHROMEOS) | |
scheib
2016/04/12 19:20:39
Explain here why this is only ChromeOS.
Andrew T Wilson (Slow)
2016/04/13 13:55:11
Or just make it on all platforms - the API and imp
Ivan Šandrk
2016/04/13 17:19:04
Done.
Ivan Šandrk
2016/04/13 17:19:04
Made it available on all platforms.
scheib
2016/04/13 19:45:41
But not implemented there, thus the try job failur
Ivan Šandrk
2016/04/14 18:08:47
That's a very good point. My apologies for pushing
| |
264 // Disables Bluetooth completely without shutting it down. | |
265 virtual void SetDisabled(bool disabled) = 0; | |
266 #endif | |
267 | |
263 // Indicates whether the adapter radio is powered. | 268 // Indicates whether the adapter radio is powered. |
264 virtual bool IsPowered() const = 0; | 269 virtual bool IsPowered() const = 0; |
265 | 270 |
266 // Requests a change to the adapter radio power. Setting |powered| to true | 271 // Requests a change to the adapter radio power. Setting |powered| to true |
267 // will turn on the radio and false will turn it off. On success, |callback| | 272 // will turn on the radio and false will turn it off. On success, |callback| |
268 // will be called. On failure, |error_callback| will be called. | 273 // will be called. On failure, |error_callback| will be called. |
269 virtual void SetPowered(bool powered, | 274 virtual void SetPowered(bool powered, |
270 const base::Closure& callback, | 275 const base::Closure& callback, |
271 const ErrorCallback& error_callback) = 0; | 276 const ErrorCallback& error_callback) = 0; |
272 | 277 |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
548 std::set<BluetoothDiscoverySession*> discovery_sessions_; | 553 std::set<BluetoothDiscoverySession*> discovery_sessions_; |
549 | 554 |
550 // Note: This should remain the last member so it'll be destroyed and | 555 // Note: This should remain the last member so it'll be destroyed and |
551 // invalidate its weak pointers before any other members are destroyed. | 556 // invalidate its weak pointers before any other members are destroyed. |
552 base::WeakPtrFactory<BluetoothAdapter> weak_ptr_factory_; | 557 base::WeakPtrFactory<BluetoothAdapter> weak_ptr_factory_; |
553 }; | 558 }; |
554 | 559 |
555 } // namespace device | 560 } // namespace device |
556 | 561 |
557 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_H_ | 562 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_H_ |
OLD | NEW |