| 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 22 matching lines...) Expand all Loading... |
| 33 // The BluetoothDeviceChromeOS class is an implementation of BluetoothDevice | 33 // The BluetoothDeviceChromeOS class is an implementation of BluetoothDevice |
| 34 // for Chrome OS platform. | 34 // for Chrome OS platform. |
| 35 class BluetoothDeviceChromeOS | 35 class BluetoothDeviceChromeOS |
| 36 : public device::BluetoothDevice, | 36 : public device::BluetoothDevice, |
| 37 public BluetoothDeviceClient::Observer, | 37 public BluetoothDeviceClient::Observer, |
| 38 public BluetoothAgentServiceProvider::Delegate { | 38 public BluetoothAgentServiceProvider::Delegate { |
| 39 public: | 39 public: |
| 40 virtual ~BluetoothDeviceChromeOS(); | 40 virtual ~BluetoothDeviceChromeOS(); |
| 41 | 41 |
| 42 // BluetoothDevice override | 42 // BluetoothDevice override |
| 43 virtual uint32 GetBluetoothClass() const OVERRIDE; |
| 43 virtual std::string GetAddress() const OVERRIDE; | 44 virtual std::string GetAddress() const OVERRIDE; |
| 45 virtual uint16 GetVendorID() const OVERRIDE; |
| 46 virtual uint16 GetProductID() const OVERRIDE; |
| 47 virtual uint16 GetDeviceID() const OVERRIDE; |
| 44 virtual bool IsPaired() const OVERRIDE; | 48 virtual bool IsPaired() const OVERRIDE; |
| 45 virtual bool IsConnected() const OVERRIDE; | 49 virtual bool IsConnected() const OVERRIDE; |
| 46 virtual bool IsConnectable() const OVERRIDE; | 50 virtual bool IsConnectable() const OVERRIDE; |
| 47 virtual bool IsConnecting() const OVERRIDE; | 51 virtual bool IsConnecting() const OVERRIDE; |
| 48 virtual ServiceList GetServices() const OVERRIDE; | 52 virtual ServiceList GetServices() const OVERRIDE; |
| 49 virtual void GetServiceRecords( | 53 virtual void GetServiceRecords( |
| 50 const ServiceRecordsCallback& callback, | 54 const ServiceRecordsCallback& callback, |
| 51 const ErrorCallback& error_callback) OVERRIDE; | 55 const ErrorCallback& error_callback) OVERRIDE; |
| 52 virtual void ProvidesServiceWithName( | 56 virtual void ProvidesServiceWithName( |
| 53 const std::string& name, | 57 const std::string& name, |
| (...skipping 23 matching lines...) Expand all Loading... |
| 77 virtual void SetOutOfBandPairingData( | 81 virtual void SetOutOfBandPairingData( |
| 78 const device::BluetoothOutOfBandPairingData& data, | 82 const device::BluetoothOutOfBandPairingData& data, |
| 79 const base::Closure& callback, | 83 const base::Closure& callback, |
| 80 const ErrorCallback& error_callback) OVERRIDE; | 84 const ErrorCallback& error_callback) OVERRIDE; |
| 81 virtual void ClearOutOfBandPairingData( | 85 virtual void ClearOutOfBandPairingData( |
| 82 const base::Closure& callback, | 86 const base::Closure& callback, |
| 83 const ErrorCallback& error_callback) OVERRIDE; | 87 const ErrorCallback& error_callback) OVERRIDE; |
| 84 | 88 |
| 85 protected: | 89 protected: |
| 86 // BluetoothDevice override | 90 // BluetoothDevice override |
| 87 virtual uint32 GetBluetoothClass() const OVERRIDE; | |
| 88 virtual std::string GetDeviceName() const OVERRIDE; | 91 virtual std::string GetDeviceName() const OVERRIDE; |
| 89 | 92 |
| 90 private: | 93 private: |
| 91 friend class BluetoothAdapterChromeOS; | 94 friend class BluetoothAdapterChromeOS; |
| 92 friend class device::MockBluetoothDevice; | 95 friend class device::MockBluetoothDevice; |
| 93 | 96 |
| 94 explicit BluetoothDeviceChromeOS(BluetoothAdapterChromeOS* adapter); | 97 explicit BluetoothDeviceChromeOS(BluetoothAdapterChromeOS* adapter); |
| 95 | 98 |
| 96 // Returns whether this device has an object path. | 99 // Returns whether this device has an object path. |
| 97 bool HasObjectPath() const { return !object_path_.value().empty(); } | 100 bool HasObjectPath() const { return !object_path_.value().empty(); } |
| (...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 453 // Note: This should remain the last member so it'll be destroyed and | 456 // Note: This should remain the last member so it'll be destroyed and |
| 454 // invalidate its weak pointers before any other members are destroyed. | 457 // invalidate its weak pointers before any other members are destroyed. |
| 455 base::WeakPtrFactory<BluetoothDeviceChromeOS> weak_ptr_factory_; | 458 base::WeakPtrFactory<BluetoothDeviceChromeOS> weak_ptr_factory_; |
| 456 | 459 |
| 457 DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceChromeOS); | 460 DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceChromeOS); |
| 458 }; | 461 }; |
| 459 | 462 |
| 460 } // namespace chromeos | 463 } // namespace chromeos |
| 461 | 464 |
| 462 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_CHROMEOS_H_ | 465 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_CHROMEOS_H_ |
| OLD | NEW |