OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_DEVICE_CHROMEOS_H | 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_CHROMEOS_H |
6 #define DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_CHROMEOS_H | 6 #define DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_CHROMEOS_H |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 void OnCancelPairingError(const std::string& error_name, | 139 void OnCancelPairingError(const std::string& error_name, |
140 const std::string& error_message); | 140 const std::string& error_message); |
141 | 141 |
142 // Internal method to set the device as trusted. Trusted devices can connect | 142 // Internal method to set the device as trusted. Trusted devices can connect |
143 // to us automatically, and we can connect to them after rebooting; it also | 143 // to us automatically, and we can connect to them after rebooting; it also |
144 // causes the device to be remembered by the stack even if not paired. | 144 // causes the device to be remembered by the stack even if not paired. |
145 // |success| to the callback indicates whether or not the request succeeded. | 145 // |success| to the callback indicates whether or not the request succeeded. |
146 void SetTrusted(); | 146 void SetTrusted(); |
147 void OnSetTrusted(bool success); | 147 void OnSetTrusted(bool success); |
148 | 148 |
| 149 // Internal method to enable the connection monitor when connecting to this |
| 150 // device. The connection monitor mode tracks the connection RSSI and TX |
| 151 // power of the connection. |
| 152 void StartConnectionMonitor(); |
| 153 void OnStartConnectionMonitorError(const std::string& error_name, |
| 154 const std::string& error_message); |
| 155 |
149 // Called by dbus:: on completion of the D-Bus method call to disconnect the | 156 // Called by dbus:: on completion of the D-Bus method call to disconnect the |
150 // device. | 157 // device. |
151 void OnDisconnect(const base::Closure& callback); | 158 void OnDisconnect(const base::Closure& callback); |
152 void OnDisconnectError(const ErrorCallback& error_callback, | 159 void OnDisconnectError(const ErrorCallback& error_callback, |
153 const std::string& error_name, | 160 const std::string& error_name, |
154 const std::string& error_message); | 161 const std::string& error_message); |
155 | 162 |
156 // Called by dbus:: on failure of the D-Bus method call to unpair the device; | 163 // Called by dbus:: on failure of the D-Bus method call to unpair the device; |
157 // there is no matching completion call since this object is deleted in the | 164 // there is no matching completion call since this object is deleted in the |
158 // process of unpairing. | 165 // process of unpairing. |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 // Note: This should remain the last member so it'll be destroyed and | 204 // Note: This should remain the last member so it'll be destroyed and |
198 // invalidate its weak pointers before any other members are destroyed. | 205 // invalidate its weak pointers before any other members are destroyed. |
199 base::WeakPtrFactory<BluetoothDeviceChromeOS> weak_ptr_factory_; | 206 base::WeakPtrFactory<BluetoothDeviceChromeOS> weak_ptr_factory_; |
200 | 207 |
201 DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceChromeOS); | 208 DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceChromeOS); |
202 }; | 209 }; |
203 | 210 |
204 } // namespace chromeos | 211 } // namespace chromeos |
205 | 212 |
206 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_CHROMEOS_H | 213 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_CHROMEOS_H |
OLD | NEW |