OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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_PROFILE_H_ | 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_PROFILE_H_ |
6 #define DEVICE_BLUETOOTH_BLUETOOTH_PROFILE_H_ | 6 #define DEVICE_BLUETOOTH_BLUETOOTH_PROFILE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 // connection initiated by BluetoothDevice::ConnectToProfile() or incoming | 88 // connection initiated by BluetoothDevice::ConnectToProfile() or incoming |
89 // connections from devices, will have a BluetoothSocket created and passed | 89 // connections from devices, will have a BluetoothSocket created and passed |
90 // to this callback. | 90 // to this callback. |
91 // | 91 // |
92 // The socket will be closed when all references are released; none of the | 92 // The socket will be closed when all references are released; none of the |
93 // BluetoothProfile, or BluetoothAdapter or BluetoothDevice objects are | 93 // BluetoothProfile, or BluetoothAdapter or BluetoothDevice objects are |
94 // guaranteed to hold a reference so this may outlive all of them. | 94 // guaranteed to hold a reference so this may outlive all of them. |
95 typedef base::Callback<void(scoped_refptr<BluetoothSocket>)> SocketCallback; | 95 typedef base::Callback<void(scoped_refptr<BluetoothSocket>)> SocketCallback; |
96 virtual void SetConnectionCallback(const SocketCallback& callback) = 0; | 96 virtual void SetConnectionCallback(const SocketCallback& callback) = 0; |
97 | 97 |
98 private: | 98 protected: |
99 friend class BluetoothProfileMac; | |
100 | |
101 BluetoothProfile(); | 99 BluetoothProfile(); |
102 virtual ~BluetoothProfile(); | 100 virtual ~BluetoothProfile(); |
103 }; | 101 }; |
104 | 102 |
105 } // namespace device | 103 } // namespace device |
106 | 104 |
107 #endif // DEVICE_BLUETOOTH_BLUETOOTH_PROFILE_H_ | 105 #endif // DEVICE_BLUETOOTH_BLUETOOTH_PROFILE_H_ |
OLD | NEW |