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_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 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 // Called by BluetoothAdapterClient when a call to GetServiceRecords() | 132 // Called by BluetoothAdapterClient when a call to GetServiceRecords() |
133 // completes. |callback| and |error_callback| are the callbacks provided to | 133 // completes. |callback| and |error_callback| are the callbacks provided to |
134 // GetServiceRecords. | 134 // GetServiceRecords. |
135 void CollectServiceRecordsCallback( | 135 void CollectServiceRecordsCallback( |
136 const ServiceRecordsCallback& callback, | 136 const ServiceRecordsCallback& callback, |
137 const ErrorCallback& error_callback, | 137 const ErrorCallback& error_callback, |
138 const dbus::ObjectPath& device_path, | 138 const dbus::ObjectPath& device_path, |
139 const BluetoothDeviceClient::ServiceMap& service_map, | 139 const BluetoothDeviceClient::ServiceMap& service_map, |
140 bool success); | 140 bool success); |
141 | 141 |
142 // Called by BluetoothProperty when the call to Set() for the Trusted | 142 // Set the device as trusted. Trusted devices can connect to us automatically, |
143 // property completes. |success| indicates whether or not the request | 143 // and we can connect to them after rebooting. This also causes the device to |
144 // succeeded. | 144 // be remembered by the stack even if not paired. |success| to the callback |
| 145 // indicates whether or not the request succeeded. |
| 146 void SetTrusted(); |
145 void OnSetTrusted(bool success); | 147 void OnSetTrusted(bool success); |
146 | 148 |
147 // Called by BluetoothAdapterClient when a call to GetServiceRecords() | 149 // Called by BluetoothAdapterClient when a call to GetServiceRecords() |
148 // fails. |callback| and |error_callback| are the callbacks provided to | 150 // fails. |callback| and |error_callback| are the callbacks provided to |
149 // GetServiceRecords(). | 151 // GetServiceRecords(). |
150 void OnGetServiceRecordsError(const ServiceRecordsCallback& callback, | 152 void OnGetServiceRecordsError(const ServiceRecordsCallback& callback, |
151 const ErrorCallback& error_callback); | 153 const ErrorCallback& error_callback); |
152 | 154 |
153 // Called by BluetoothAdapterClient when the initial call to | 155 // Called by BluetoothAdapterClient when the initial call to |
154 // GetServiceRecords() after pairing completes. |callback| and | 156 // GetServiceRecords() after pairing completes. |callback| and |
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
448 // Note: This should remain the last member so it'll be destroyed and | 450 // Note: This should remain the last member so it'll be destroyed and |
449 // invalidate its weak pointers before any other members are destroyed. | 451 // invalidate its weak pointers before any other members are destroyed. |
450 base::WeakPtrFactory<BluetoothDeviceChromeOS> weak_ptr_factory_; | 452 base::WeakPtrFactory<BluetoothDeviceChromeOS> weak_ptr_factory_; |
451 | 453 |
452 DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceChromeOS); | 454 DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceChromeOS); |
453 }; | 455 }; |
454 | 456 |
455 } // namespace chromeos | 457 } // namespace chromeos |
456 | 458 |
457 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_CHROMEOS_H_ | 459 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_CHROMEOS_H_ |
OLD | NEW |