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 "base/observer_list.h" | 12 #include "base/observer_list.h" |
13 #include "device/bluetooth/bluetooth_device.h" | 13 #include "device/bluetooth/bluetooth_device.h" |
14 #include "device/bluetooth/bluetooth_task_manager_win.h" | 14 #include "device/bluetooth/bluetooth_task_manager_win.h" |
15 | 15 |
16 namespace device { | 16 namespace device { |
17 | 17 |
18 class BluetoothAdapterWin; | 18 class BluetoothAdapterWin; |
19 class BluetoothServiceRecord; | 19 class BluetoothServiceRecordWin; |
20 class BluetoothSocketThread; | 20 class BluetoothSocketThread; |
21 | 21 |
22 class BluetoothDeviceWin : public BluetoothDevice { | 22 class BluetoothDeviceWin : public BluetoothDevice { |
23 public: | 23 public: |
24 explicit BluetoothDeviceWin( | 24 explicit BluetoothDeviceWin( |
25 const BluetoothTaskManagerWin::DeviceState& state, | 25 const BluetoothTaskManagerWin::DeviceState& state, |
26 scoped_refptr<base::SequencedTaskRunner> ui_task_runner, | 26 scoped_refptr<base::SequencedTaskRunner> ui_task_runner, |
27 scoped_refptr<BluetoothSocketThread> socket_thread, | 27 scoped_refptr<BluetoothSocketThread> socket_thread, |
28 net::NetLog* net_log, | 28 net::NetLog* net_log, |
29 const net::NetLog::Source& net_log_source); | 29 const net::NetLog::Source& net_log_source); |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 virtual void ConnectToService( | 71 virtual void ConnectToService( |
72 const BluetoothUUID& uuid, | 72 const BluetoothUUID& uuid, |
73 const ConnectToServiceCallback& callback, | 73 const ConnectToServiceCallback& callback, |
74 const ConnectToServiceErrorCallback& error_callback) OVERRIDE; | 74 const ConnectToServiceErrorCallback& error_callback) OVERRIDE; |
75 virtual void StartConnectionMonitor( | 75 virtual void StartConnectionMonitor( |
76 const base::Closure& callback, | 76 const base::Closure& callback, |
77 const ErrorCallback& error_callback) OVERRIDE; | 77 const ErrorCallback& error_callback) OVERRIDE; |
78 | 78 |
79 // Used by BluetoothProfileWin to retrieve the service record for the given | 79 // Used by BluetoothProfileWin to retrieve the service record for the given |
80 // |uuid|. | 80 // |uuid|. |
81 const BluetoothServiceRecord* GetServiceRecord( | 81 const BluetoothServiceRecordWin* GetServiceRecord( |
82 const device::BluetoothUUID& uuid) const; | 82 const device::BluetoothUUID& uuid) const; |
83 | 83 |
84 protected: | 84 protected: |
85 // BluetoothDevice override | 85 // BluetoothDevice override |
86 virtual std::string GetDeviceName() const OVERRIDE; | 86 virtual std::string GetDeviceName() const OVERRIDE; |
87 | 87 |
88 private: | 88 private: |
89 friend class BluetoothAdapterWin; | 89 friend class BluetoothAdapterWin; |
90 | 90 |
91 // Used by BluetoothAdapterWin to update the visible state during | 91 // Used by BluetoothAdapterWin to update the visible state during |
(...skipping 24 matching lines...) Expand all Loading... |
116 bool connected_; | 116 bool connected_; |
117 | 117 |
118 // Used to send change notifications when a device disappears during | 118 // Used to send change notifications when a device disappears during |
119 // discovery. | 119 // discovery. |
120 bool visible_; | 120 bool visible_; |
121 | 121 |
122 // The services (identified by UUIDs) that this device provides. | 122 // The services (identified by UUIDs) that this device provides. |
123 UUIDList uuids_; | 123 UUIDList uuids_; |
124 | 124 |
125 // The service records retrieved from SDP. | 125 // The service records retrieved from SDP. |
126 typedef ScopedVector<BluetoothServiceRecord> ServiceRecordList; | 126 typedef ScopedVector<BluetoothServiceRecordWin> ServiceRecordList; |
127 ServiceRecordList service_record_list_; | 127 ServiceRecordList service_record_list_; |
128 | 128 |
129 DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceWin); | 129 DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceWin); |
130 }; | 130 }; |
131 | 131 |
132 } // namespace device | 132 } // namespace device |
133 | 133 |
134 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_WIN_H_ | 134 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_WIN_H_ |
OLD | NEW |