Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(208)

Side by Side Diff: device/bluetooth/bluetooth_device_win.h

Issue 320463002: Bluetooth: Implement socket API for Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: DeviceWin return SDRWin to avoid cast Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « device/bluetooth/bluetooth_adapter_win.cc ('k') | device/bluetooth/bluetooth_device_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « device/bluetooth/bluetooth_adapter_win.cc ('k') | device/bluetooth/bluetooth_device_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698