| 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 24 matching lines...) Expand all Loading... |
| 78 virtual void SetOutOfBandPairingData( | 82 virtual void SetOutOfBandPairingData( |
| 79 const device::BluetoothOutOfBandPairingData& data, | 83 const device::BluetoothOutOfBandPairingData& data, |
| 80 const base::Closure& callback, | 84 const base::Closure& callback, |
| 81 const ErrorCallback& error_callback) OVERRIDE; | 85 const ErrorCallback& error_callback) OVERRIDE; |
| 82 virtual void ClearOutOfBandPairingData( | 86 virtual void ClearOutOfBandPairingData( |
| 83 const base::Closure& callback, | 87 const base::Closure& callback, |
| 84 const ErrorCallback& error_callback) OVERRIDE; | 88 const ErrorCallback& error_callback) OVERRIDE; |
| 85 | 89 |
| 86 protected: | 90 protected: |
| 87 // BluetoothDevice override | 91 // BluetoothDevice override |
| 88 virtual uint32 GetBluetoothClass() const OVERRIDE; | |
| 89 virtual std::string GetDeviceName() const OVERRIDE; | 92 virtual std::string GetDeviceName() const OVERRIDE; |
| 90 | 93 |
| 91 private: | 94 private: |
| 92 friend class BluetoothAdapterChromeOS; | 95 friend class BluetoothAdapterChromeOS; |
| 93 friend class device::MockBluetoothDevice; | 96 friend class device::MockBluetoothDevice; |
| 94 | 97 |
| 95 explicit BluetoothDeviceChromeOS(BluetoothAdapterChromeOS* adapter); | 98 explicit BluetoothDeviceChromeOS(BluetoothAdapterChromeOS* adapter); |
| 96 | 99 |
| 97 // Returns whether this device has an object path. | 100 // Returns whether this device has an object path. |
| 98 bool HasObjectPath() const { return !object_path_.value().empty(); } | 101 bool HasObjectPath() const { return !object_path_.value().empty(); } |
| (...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 454 // Note: This should remain the last member so it'll be destroyed and | 457 // Note: This should remain the last member so it'll be destroyed and |
| 455 // invalidate its weak pointers before any other members are destroyed. | 458 // invalidate its weak pointers before any other members are destroyed. |
| 456 base::WeakPtrFactory<BluetoothDeviceChromeOS> weak_ptr_factory_; | 459 base::WeakPtrFactory<BluetoothDeviceChromeOS> weak_ptr_factory_; |
| 457 | 460 |
| 458 DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceChromeOS); | 461 DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceChromeOS); |
| 459 }; | 462 }; |
| 460 | 463 |
| 461 } // namespace chromeos | 464 } // namespace chromeos |
| 462 | 465 |
| 463 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_CHROMEOS_H_ | 466 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_CHROMEOS_H_ |
| OLD | NEW |