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
3 // found in the LICENSE file.
5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_SOCKET_WIN_H_
6 #define DEVICE_BLUETOOTH_BLUETOOTH_SOCKET_WIN_H_
12 #include "base/memory/ref_counted.h"
13 #include "device/bluetooth/bluetooth_socket.h"
17 class DrainableIOBuffer
;
18 class GrowableIOBuffer
;
24 class BluetoothServiceRecord
;
26 // This class is an implementation of BluetoothSocket class for Windows
28 class BluetoothSocketWin
: public BluetoothSocket
{
30 static scoped_refptr
<BluetoothSocket
> CreateBluetoothSocket(
31 const BluetoothServiceRecord
& service_record
);
33 // BluetoothSocket override
34 virtual bool Receive(net::GrowableIOBuffer
* buffer
) OVERRIDE
;
35 virtual bool Send(net::DrainableIOBuffer
* buffer
) OVERRIDE
;
36 virtual std::string
GetLastErrorMessage() const OVERRIDE
;
39 virtual ~BluetoothSocketWin();
42 explicit BluetoothSocketWin(SOCKET fd
);
45 std::string error_message_
;
47 DISALLOW_COPY_AND_ASSIGN(BluetoothSocketWin
);
52 #endif // DEVICE_BLUETOOTH_BLUETOOTH_SOCKET_WIN_H_