#include <string>
#include "base/memory/ref_counted.h"
+#include "device/bluetooth/bluetooth_adapter.h"
#include "device/bluetooth/bluetooth_service_record_win.h"
#include "device/bluetooth/bluetooth_socket.h"
#include "device/bluetooth/bluetooth_socket_net.h"
public:
static scoped_refptr<BluetoothSocketWin> CreateBluetoothSocket(
scoped_refptr<base::SequencedTaskRunner> ui_task_runner,
- scoped_refptr<BluetoothSocketThread> socket_thread,
- net::NetLog* net_log,
- const net::NetLog::Source& source);
+ scoped_refptr<BluetoothSocketThread> socket_thread);
// Connect to the peer device and calls |success_callback| when the
// connection has been established successfully. If an error occurs, calls
const ErrorCompletionCallback& error_callback);
// Listens using this socket using an RFCOMM service published as UUID |uuid|
- // with Channel |channel|. |success_callback| will be called if the service
+ // with Channel |options.channel|, or an automatically allocated Channel if
+ // |options.channel| is null. |success_callback| will be called if the service
// is successfully registered, |error_callback| on failure with a message
// explaining the cause.
void Listen(scoped_refptr<BluetoothAdapter> adapter,
const BluetoothUUID& uuid,
- int rfcomm_channel,
+ const BluetoothAdapter::ServiceOptions& options,
const base::Closure& success_callback,
const ErrorCompletionCallback& error_callback);
// BluetoothSocket:
virtual void Accept(const AcceptCompletionCallback& success_callback,
- const ErrorCompletionCallback& error_callback) OVERRIDE;
+ const ErrorCompletionCallback& error_callback) override;
protected:
virtual ~BluetoothSocketWin();
struct ServiceRegData;
BluetoothSocketWin(scoped_refptr<base::SequencedTaskRunner> ui_task_runner,
- scoped_refptr<BluetoothSocketThread> socket_thread,
- net::NetLog* net_log,
- const net::NetLog::Source& source);
-
+ scoped_refptr<BluetoothSocketThread> socket_thread);
void DoConnect(const base::Closure& success_callback,
const ErrorCompletionCallback& error_callback);