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_CHROMEOS_H_
6 #define DEVICE_BLUETOOTH_BLUETOOTH_SOCKET_CHROMEOS_H_
10 #include "base/memory/ref_counted.h"
11 #include "device/bluetooth/bluetooth_socket.h"
15 class BluetoothServiceRecord
;
21 class DrainableIOBuffer
;
22 class GrowableIOBuffer
;
28 // This class is an implementation of BluetoothSocket class for Chrome OS
30 class BluetoothSocketChromeOS
: public device::BluetoothSocket
{
32 static scoped_refptr
<device::BluetoothSocket
> CreateBluetoothSocket(
33 const device::BluetoothServiceRecord
& service_record
);
35 // BluetoothSocket override
36 virtual bool Receive(net::GrowableIOBuffer
* buffer
) OVERRIDE
;
37 virtual bool Send(net::DrainableIOBuffer
* buffer
) OVERRIDE
;
38 virtual std::string
GetLastErrorMessage() const OVERRIDE
;
41 virtual ~BluetoothSocketChromeOS();
44 BluetoothSocketChromeOS(int fd
);
47 std::string error_message_
;
49 DISALLOW_COPY_AND_ASSIGN(BluetoothSocketChromeOS
);
52 } // namespace chromeos
54 #endif // DEVICE_BLUETOOTH_BLUETOOTH_SOCKET_CHROMEOS_H_