OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_SOCKET_CHROMEOS_H_ | 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_SOCKET_CHROMEOS_H_ |
6 #define DEVICE_BLUETOOTH_BLUETOOTH_SOCKET_CHROMEOS_H_ | 6 #define DEVICE_BLUETOOTH_BLUETOOTH_SOCKET_CHROMEOS_H_ |
7 | 7 |
8 #include <queue> | 8 #include <queue> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 | 141 |
142 // Method run on the socket thread with a valid file descriptor |fd|, once | 142 // Method run on the socket thread with a valid file descriptor |fd|, once |
143 // complete calls |callback| on the UI thread with an appropriate argument | 143 // complete calls |callback| on the UI thread with an appropriate argument |
144 // indicating success or failure. | 144 // indicating success or failure. |
145 void DoConnect(scoped_ptr<dbus::FileDescriptor> fd, | 145 void DoConnect(scoped_ptr<dbus::FileDescriptor> fd, |
146 const ConfirmationCallback& callback); | 146 const ConfirmationCallback& callback); |
147 | 147 |
148 // Method run to clean-up a listening socket. | 148 // Method run to clean-up a listening socket. |
149 void DoCloseListening(); | 149 void DoCloseListening(); |
150 | 150 |
151 // Unregister the underlying profile client object from the Bluetooth Daemon. | 151 // Unregisters this socket's usage of the Bluetooth profile which cleans up |
| 152 // the profile if no one is using it. |
152 void UnregisterProfile(); | 153 void UnregisterProfile(); |
153 | 154 |
154 // Releases the profile after the delegate is gone. | |
155 void ReleaseProfile(BluetoothAdapterProfileChromeOS* profile); | |
156 | |
157 // Adapter the profile is registered against | 155 // Adapter the profile is registered against |
158 scoped_refptr<device::BluetoothAdapter> adapter_; | 156 scoped_refptr<device::BluetoothAdapter> adapter_; |
159 | 157 |
160 // Address and D-Bus object path of the device being connected to, empty and | 158 // Address and D-Bus object path of the device being connected to, empty and |
161 // ignored if the socket is listening. | 159 // ignored if the socket is listening. |
162 std::string device_address_; | 160 std::string device_address_; |
163 dbus::ObjectPath device_path_; | 161 dbus::ObjectPath device_path_; |
164 | 162 |
165 // UUID of the profile being connected to, or listening on. | 163 // UUID of the profile being connected to, or listening on. |
166 device::BluetoothUUID uuid_; | 164 device::BluetoothUUID uuid_; |
(...skipping 27 matching lines...) Expand all Loading... |
194 bool cancelled; | 192 bool cancelled; |
195 }; | 193 }; |
196 std::queue<linked_ptr<ConnectionRequest> > connection_request_queue_; | 194 std::queue<linked_ptr<ConnectionRequest> > connection_request_queue_; |
197 | 195 |
198 DISALLOW_COPY_AND_ASSIGN(BluetoothSocketChromeOS); | 196 DISALLOW_COPY_AND_ASSIGN(BluetoothSocketChromeOS); |
199 }; | 197 }; |
200 | 198 |
201 } // namespace chromeos | 199 } // namespace chromeos |
202 | 200 |
203 #endif // DEVICE_BLUETOOTH_BLUETOOTH_SOCKET_CHROMEOS_H_ | 201 #endif // DEVICE_BLUETOOTH_BLUETOOTH_SOCKET_CHROMEOS_H_ |
OLD | NEW |