Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(989)

Side by Side Diff: device/bluetooth/bluetooth_adapter.h

Issue 2098653002: device/bluetooth/bluez: add discoverable timeout adapter property (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | device/bluetooth/bluetooth_adapter_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 virtual bool IsDiscoverable() const = 0; 303 virtual bool IsDiscoverable() const = 0;
304 304
305 // Requests that the adapter change its discoverability state. If 305 // Requests that the adapter change its discoverability state. If
306 // |discoverable| is true, then it will be discoverable by other Bluetooth 306 // |discoverable| is true, then it will be discoverable by other Bluetooth
307 // devices. On successfully changing the adapter's discoverability, |callback| 307 // devices. On successfully changing the adapter's discoverability, |callback|
308 // will be called. On failure, |error_callback| will be called. 308 // will be called. On failure, |error_callback| will be called.
309 virtual void SetDiscoverable(bool discoverable, 309 virtual void SetDiscoverable(bool discoverable,
310 const base::Closure& callback, 310 const base::Closure& callback,
311 const ErrorCallback& error_callback) = 0; 311 const ErrorCallback& error_callback) = 0;
312 312
313 #if defined(OS_CHROMEOS) || defined(OS_LINUX)
314 // Returns the timeout after which the adapter exits discoverable mode in
315 // seconds, or zero if the adapter is always discoverable.
316 virtual uint32_t GetDiscoverableTimeout() const = 0;
rkc 2016/06/23 23:53:05 Is this something other platforms may need or is i
317 #endif
318
313 // Indicates whether the adapter is currently discovering new devices. 319 // Indicates whether the adapter is currently discovering new devices.
314 virtual bool IsDiscovering() const = 0; 320 virtual bool IsDiscovering() const = 0;
315 321
316 // Requests the adapter to start a new discovery session. On success, a new 322 // Requests the adapter to start a new discovery session. On success, a new
317 // instance of BluetoothDiscoverySession will be returned to the caller via 323 // instance of BluetoothDiscoverySession will be returned to the caller via
318 // |callback| and the adapter will be discovering nearby Bluetooth devices. 324 // |callback| and the adapter will be discovering nearby Bluetooth devices.
319 // The returned BluetoothDiscoverySession is owned by the caller and it's the 325 // The returned BluetoothDiscoverySession is owned by the caller and it's the
320 // owner's responsibility to properly clean it up and stop the session when 326 // owner's responsibility to properly clean it up and stop the session when
321 // device discovery is no longer needed. 327 // device discovery is no longer needed.
322 // 328 //
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
598 std::set<BluetoothDiscoverySession*> discovery_sessions_; 604 std::set<BluetoothDiscoverySession*> discovery_sessions_;
599 605
600 // Note: This should remain the last member so it'll be destroyed and 606 // Note: This should remain the last member so it'll be destroyed and
601 // invalidate its weak pointers before any other members are destroyed. 607 // invalidate its weak pointers before any other members are destroyed.
602 base::WeakPtrFactory<BluetoothAdapter> weak_ptr_factory_; 608 base::WeakPtrFactory<BluetoothAdapter> weak_ptr_factory_;
603 }; 609 };
604 610
605 } // namespace device 611 } // namespace device
606 612
607 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_H_ 613 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_H_
OLDNEW
« no previous file with comments | « no previous file | device/bluetooth/bluetooth_adapter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698