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 CHROME_BROWSER_CHROMEOS_BLUETOOTH_BLUETOOTH_ADAPTER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_BLUETOOTH_BLUETOOTH_ADAPTER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_BLUETOOTH_BLUETOOTH_ADAPTER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_BLUETOOTH_BLUETOOTH_ADAPTER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 // will turn on the radio and false will turn it off. On success, callback | 111 // will turn on the radio and false will turn it off. On success, callback |
112 // will be called. On failure, |error_callback| will be called. | 112 // will be called. On failure, |error_callback| will be called. |
113 void SetPowered(bool powered, | 113 void SetPowered(bool powered, |
114 const base::Closure& callback, | 114 const base::Closure& callback, |
115 const ErrorCallback& error_callback); | 115 const ErrorCallback& error_callback); |
116 | 116 |
117 // Indicates whether the adapter is currently discovering new devices, | 117 // Indicates whether the adapter is currently discovering new devices, |
118 // note that a typical discovery process has phases of this being true | 118 // note that a typical discovery process has phases of this being true |
119 // followed by phases of being false when the adapter interrogates the | 119 // followed by phases of being false when the adapter interrogates the |
120 // devices found. | 120 // devices found. |
121 bool IsDiscovering() const; | 121 virtual bool IsDiscovering() const; |
122 | 122 |
123 // Requests that the adapter either begin discovering new devices when | 123 // Requests that the adapter either begin discovering new devices when |
124 // |discovering| is true, or cease any discovery when false. On success, | 124 // |discovering| is true, or cease any discovery when false. On success, |
125 // callback will be called. On failure, |error_callback| will be called. | 125 // callback will be called. On failure, |error_callback| will be called. |
126 virtual void SetDiscovering(bool discovering, | 126 virtual void SetDiscovering(bool discovering, |
127 const base::Closure& callback, | 127 const base::Closure& callback, |
128 const ErrorCallback& error_callback); | 128 const ErrorCallback& error_callback); |
129 | 129 |
130 // Requests the list of devices from the adapter, all are returned | 130 // Requests the list of devices from the adapter, all are returned |
131 // including those currently connected and those paired. Use the | 131 // including those currently connected and those paired. Use the |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
327 // instance. | 327 // instance. |
328 typedef std::map<const std::string, BluetoothDevice*> DevicesMap; | 328 typedef std::map<const std::string, BluetoothDevice*> DevicesMap; |
329 DevicesMap devices_; | 329 DevicesMap devices_; |
330 | 330 |
331 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapter); | 331 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapter); |
332 }; | 332 }; |
333 | 333 |
334 } // namespace chromeos | 334 } // namespace chromeos |
335 | 335 |
336 #endif // CHROME_BROWSER_CHROMEOS_BLUETOOTH_BLUETOOTH_ADAPTER_H_ | 336 #endif // CHROME_BROWSER_CHROMEOS_BLUETOOTH_BLUETOOTH_ADAPTER_H_ |
OLD | NEW |