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_MAC_H_ | 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_SOCKET_MAC_H_ |
6 #define DEVICE_BLUETOOTH_BLUETOOTH_SOCKET_MAC_H_ | 6 #define DEVICE_BLUETOOTH_BLUETOOTH_SOCKET_MAC_H_ |
7 | 7 |
8 #include <queue> | 8 #include <queue> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 // |success_callback| will be called if the service is successfully | 68 // |success_callback| will be called if the service is successfully |
69 // registered, |error_callback| on failure with a message explaining the | 69 // registered, |error_callback| on failure with a message explaining the |
70 // cause. | 70 // cause. |
71 void ListenUsingL2cap(scoped_refptr<BluetoothAdapterMac> adapter, | 71 void ListenUsingL2cap(scoped_refptr<BluetoothAdapterMac> adapter, |
72 const BluetoothUUID& uuid, | 72 const BluetoothUUID& uuid, |
73 const BluetoothAdapter::ServiceOptions& options, | 73 const BluetoothAdapter::ServiceOptions& options, |
74 const base::Closure& success_callback, | 74 const base::Closure& success_callback, |
75 const ErrorCompletionCallback& error_callback); | 75 const ErrorCompletionCallback& error_callback); |
76 | 76 |
77 // BluetoothSocket: | 77 // BluetoothSocket: |
78 virtual void Close() OVERRIDE; | 78 virtual void Close() override; |
79 virtual void Disconnect(const base::Closure& callback) OVERRIDE; | 79 virtual void Disconnect(const base::Closure& callback) override; |
80 virtual void Receive( | 80 virtual void Receive( |
81 int /* buffer_size */, | 81 int /* buffer_size */, |
82 const ReceiveCompletionCallback& success_callback, | 82 const ReceiveCompletionCallback& success_callback, |
83 const ReceiveErrorCompletionCallback& error_callback) OVERRIDE; | 83 const ReceiveErrorCompletionCallback& error_callback) override; |
84 virtual void Send(scoped_refptr<net::IOBuffer> buffer, | 84 virtual void Send(scoped_refptr<net::IOBuffer> buffer, |
85 int buffer_size, | 85 int buffer_size, |
86 const SendCompletionCallback& success_callback, | 86 const SendCompletionCallback& success_callback, |
87 const ErrorCompletionCallback& error_callback) OVERRIDE; | 87 const ErrorCompletionCallback& error_callback) override; |
88 virtual void Accept(const AcceptCompletionCallback& success_callback, | 88 virtual void Accept(const AcceptCompletionCallback& success_callback, |
89 const ErrorCompletionCallback& error_callback) OVERRIDE; | 89 const ErrorCompletionCallback& error_callback) override; |
90 | 90 |
91 // Callback that is invoked when the OS completes an SDP query. | 91 // Callback that is invoked when the OS completes an SDP query. |
92 // |status| is the returned status from the SDP query, |device| is the | 92 // |status| is the returned status from the SDP query, |device| is the |
93 // IOBluetoothDevice for which the query was made. The remaining | 93 // IOBluetoothDevice for which the query was made. The remaining |
94 // parameters are those from |Connect()|. | 94 // parameters are those from |Connect()|. |
95 void OnSDPQueryComplete( | 95 void OnSDPQueryComplete( |
96 IOReturn status, | 96 IOReturn status, |
97 IOBluetoothDevice* device, | 97 IOBluetoothDevice* device, |
98 const base::Closure& success_callback, | 98 const base::Closure& success_callback, |
99 const ErrorCompletionCallback& error_callback); | 99 const ErrorCompletionCallback& error_callback); |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 | 197 |
198 // Queue of incoming connections. | 198 // Queue of incoming connections. |
199 std::queue<linked_ptr<BluetoothChannelMac>> accept_queue_; | 199 std::queue<linked_ptr<BluetoothChannelMac>> accept_queue_; |
200 | 200 |
201 DISALLOW_COPY_AND_ASSIGN(BluetoothSocketMac); | 201 DISALLOW_COPY_AND_ASSIGN(BluetoothSocketMac); |
202 }; | 202 }; |
203 | 203 |
204 } // namespace device | 204 } // namespace device |
205 | 205 |
206 #endif // DEVICE_BLUETOOTH_BLUETOOTH_SOCKET_MAC_H_ | 206 #endif // DEVICE_BLUETOOTH_BLUETOOTH_SOCKET_MAC_H_ |
OLD | NEW |