| 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_SOCKET_H_ | 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_SOCKET_H_ |
| 6 #define DEVICE_BLUETOOTH_BLUETOOTH_SOCKET_H_ | 6 #define DEVICE_BLUETOOTH_BLUETOOTH_SOCKET_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "device/bluetooth/bluetooth_export.h" | 12 #include "device/bluetooth/bluetooth_export.h" |
| 13 | 13 |
| 14 namespace net { | 14 namespace net { |
| 15 class IOBuffer; | 15 class IOBuffer; |
| 16 } // namespace net | 16 } // namespace net |
| 17 | 17 |
| 18 namespace device { | 18 namespace device { |
| 19 | 19 |
| 20 class BluetoothDevice; | 20 class BluetoothDevice; |
| 21 class BluetoothUUID; | |
| 22 | 21 |
| 23 // BluetoothSocket represents a socket to a specific service on a | 22 // BluetoothSocket represents a socket to a specific service on a |
| 24 // BluetoothDevice. BluetoothSocket objects are ref counted and may outlive | 23 // BluetoothDevice. BluetoothSocket objects are ref counted and may outlive |
| 25 // both the BluetoothDevice and BluetoothAdapter that were involved in their | 24 // both the BluetoothDevice and BluetoothAdapter that were involved in their |
| 26 // creation. In terms of threading, platform specific implementations may | 25 // creation. In terms of threading, platform specific implementations may |
| 27 // differ slightly, but platform independent consumers must guarantee calling | 26 // differ slightly, but platform independent consumers must guarantee calling |
| 28 // various instance methods on the same thread as the thread used at | 27 // various instance methods on the same thread as the thread used at |
| 29 // construction time -- platform specific implementation are responsible for | 28 // construction time -- platform specific implementation are responsible for |
| 30 // marshalling calls to a different thread if required. | 29 // marshalling calls to a different thread if required. |
| 31 class DEVICE_BLUETOOTH_EXPORT BluetoothSocket | 30 class DEVICE_BLUETOOTH_EXPORT BluetoothSocket |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 const ErrorCompletionCallback& error_callback) = 0; | 77 const ErrorCompletionCallback& error_callback) = 0; |
| 79 | 78 |
| 80 protected: | 79 protected: |
| 81 friend class base::RefCountedThreadSafe<BluetoothSocket>; | 80 friend class base::RefCountedThreadSafe<BluetoothSocket>; |
| 82 virtual ~BluetoothSocket(); | 81 virtual ~BluetoothSocket(); |
| 83 }; | 82 }; |
| 84 | 83 |
| 85 } // namespace device | 84 } // namespace device |
| 86 | 85 |
| 87 #endif // DEVICE_BLUETOOTH_BLUETOOTH_SOCKET_H_ | 86 #endif // DEVICE_BLUETOOTH_BLUETOOTH_SOCKET_H_ |
| OLD | NEW |