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_H_ | 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_H_ |
6 #define DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_H_ | 6 #define DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 const base::Closure& callback, | 317 const base::Closure& callback, |
318 const ErrorCallback& error_callback) = 0; | 318 const ErrorCallback& error_callback) = 0; |
319 | 319 |
320 // Clears the Out Of Band pairing data for this device. Exactly one of | 320 // Clears the Out Of Band pairing data for this device. Exactly one of |
321 // |callback| or |error_callback| will be run. | 321 // |callback| or |error_callback| will be run. |
322 virtual void ClearOutOfBandPairingData( | 322 virtual void ClearOutOfBandPairingData( |
323 const base::Closure& callback, | 323 const base::Closure& callback, |
324 const ErrorCallback& error_callback) = 0; | 324 const ErrorCallback& error_callback) = 0; |
325 | 325 |
326 protected: | 326 protected: |
327 BluetoothDevice(); | 327 BluetoothDevice(const std::string& name, |
| 328 const std::string& address, |
| 329 uint32 bluetooth_class, |
| 330 bool connected, |
| 331 bool bonded); |
328 | 332 |
329 // The Bluetooth class of the device, a bitmask that may be decoded using | 333 // The Bluetooth class of the device, a bitmask that may be decoded using |
330 // https://www.bluetooth.org/Technical/AssignedNumbers/baseband.htm | 334 // https://www.bluetooth.org/Technical/AssignedNumbers/baseband.htm |
331 uint32 bluetooth_class_; | 335 uint32 bluetooth_class_; |
332 | 336 |
333 // The name of the device, as supplied by the remote device. | 337 // The name of the device, as supplied by the remote device. |
334 std::string name_; | 338 std::string name_; |
335 | 339 |
336 // The Bluetooth address of the device. | 340 // The Bluetooth address of the device. |
337 std::string address_; | 341 std::string address_; |
(...skipping 16 matching lines...) Expand all Loading... |
354 | 358 |
355 private: | 359 private: |
356 // Returns a localized string containing the device's bluetooth address and | 360 // Returns a localized string containing the device's bluetooth address and |
357 // a device type for display when |name_| is empty. | 361 // a device type for display when |name_| is empty. |
358 string16 GetAddressWithLocalizedDeviceTypeName() const; | 362 string16 GetAddressWithLocalizedDeviceTypeName() const; |
359 }; | 363 }; |
360 | 364 |
361 } // namespace device | 365 } // namespace device |
362 | 366 |
363 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_H_ | 367 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_H_ |
OLD | NEW |