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_WIN_H_ | 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_WIN_H_ |
6 #define DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_WIN_H_ | 6 #define DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_WIN_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "device/bluetooth/bluetooth_device.h" | 12 #include "device/bluetooth/bluetooth_device.h" |
13 #include "device/bluetooth/bluetooth_task_manager_win.h" | 13 #include "device/bluetooth/bluetooth_task_manager_win.h" |
14 | 14 |
15 namespace device { | 15 namespace device { |
16 | 16 |
17 class BluetoothAdapterWin; | 17 class BluetoothAdapterWin; |
18 | 18 |
19 class BluetoothDeviceWin : public BluetoothDevice { | 19 class BluetoothDeviceWin : public BluetoothDevice { |
20 public: | 20 public: |
21 explicit BluetoothDeviceWin( | 21 explicit BluetoothDeviceWin( |
22 const BluetoothTaskManagerWin::DeviceState& state); | 22 const BluetoothTaskManagerWin::DeviceState& state); |
23 virtual ~BluetoothDeviceWin(); | 23 virtual ~BluetoothDeviceWin(); |
24 | 24 |
25 // BluetoothDevice override | 25 // BluetoothDevice override |
| 26 virtual uint32 GetBluetoothClass() const OVERRIDE; |
26 virtual std::string GetAddress() const OVERRIDE; | 27 virtual std::string GetAddress() const OVERRIDE; |
| 28 virtual uint16 GetVendorID() const OVERRIDE; |
| 29 virtual uint16 GetProductID() const OVERRIDE; |
| 30 virtual uint16 GetDeviceID() const OVERRIDE; |
27 virtual bool IsPaired() const OVERRIDE; | 31 virtual bool IsPaired() const OVERRIDE; |
28 virtual bool IsConnected() const OVERRIDE; | 32 virtual bool IsConnected() const OVERRIDE; |
29 virtual bool IsConnectable() const OVERRIDE; | 33 virtual bool IsConnectable() const OVERRIDE; |
30 virtual bool IsConnecting() const OVERRIDE; | 34 virtual bool IsConnecting() const OVERRIDE; |
31 virtual ServiceList GetServices() const OVERRIDE; | 35 virtual ServiceList GetServices() const OVERRIDE; |
32 virtual void GetServiceRecords( | 36 virtual void GetServiceRecords( |
33 const ServiceRecordsCallback& callback, | 37 const ServiceRecordsCallback& callback, |
34 const ErrorCallback& error_callback) OVERRIDE; | 38 const ErrorCallback& error_callback) OVERRIDE; |
35 virtual void ProvidesServiceWithName( | 39 virtual void ProvidesServiceWithName( |
36 const std::string& name, | 40 const std::string& name, |
(...skipping 23 matching lines...) Expand all Loading... |
60 virtual void SetOutOfBandPairingData( | 64 virtual void SetOutOfBandPairingData( |
61 const BluetoothOutOfBandPairingData& data, | 65 const BluetoothOutOfBandPairingData& data, |
62 const base::Closure& callback, | 66 const base::Closure& callback, |
63 const ErrorCallback& error_callback) OVERRIDE; | 67 const ErrorCallback& error_callback) OVERRIDE; |
64 virtual void ClearOutOfBandPairingData( | 68 virtual void ClearOutOfBandPairingData( |
65 const base::Closure& callback, | 69 const base::Closure& callback, |
66 const ErrorCallback& error_callback) OVERRIDE; | 70 const ErrorCallback& error_callback) OVERRIDE; |
67 | 71 |
68 protected: | 72 protected: |
69 // BluetoothDevice override | 73 // BluetoothDevice override |
70 virtual uint32 GetBluetoothClass() const OVERRIDE; | |
71 virtual std::string GetDeviceName() const OVERRIDE; | 74 virtual std::string GetDeviceName() const OVERRIDE; |
72 | 75 |
73 private: | 76 private: |
74 friend class BluetoothAdapterWin; | 77 friend class BluetoothAdapterWin; |
75 | 78 |
76 // Used by BluetoothAdapterWin to update the visible state during | 79 // Used by BluetoothAdapterWin to update the visible state during |
77 // discovery. | 80 // discovery. |
78 void SetVisible(bool visible); | 81 void SetVisible(bool visible); |
79 | 82 |
80 // Computes the fingerprint that can be used to compare the devices. | 83 // Computes the fingerprint that can be used to compare the devices. |
(...skipping 29 matching lines...) Expand all Loading... |
110 // Used to compare the devices. | 113 // Used to compare the devices. |
111 uint32 device_fingerprint_; | 114 uint32 device_fingerprint_; |
112 ServiceRecordList service_record_list_; | 115 ServiceRecordList service_record_list_; |
113 | 116 |
114 DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceWin); | 117 DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceWin); |
115 }; | 118 }; |
116 | 119 |
117 } // namespace device | 120 } // namespace device |
118 | 121 |
119 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_WIN_H_ | 122 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_WIN_H_ |
OLD | NEW |