bluetooth_socket_chromeos.h revision 5821806d5e7f356e8fa4b058a389a808ea183019
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.
4
5#ifndef DEVICE_BLUETOOTH_BLUETOOTH_SOCKET_CHROMEOS_H_
6#define DEVICE_BLUETOOTH_BLUETOOTH_SOCKET_CHROMEOS_H_
7
8#include <string>
9
10#include "base/memory/ref_counted.h"
11#include "device/bluetooth/bluetooth_socket.h"
12
13namespace device {
14
15class BluetoothServiceRecord;
16
17}  // namespace device
18
19namespace chromeos {
20
21// This class is an implementation of BluetoothSocket class for Chrome OS
22// platform.
23class BluetoothSocketChromeOs : public device::BluetoothSocket {
24 public:
25  static scoped_refptr<device::BluetoothSocket> CreateBluetoothSocket(
26      const device::BluetoothServiceRecord& service_record);
27
28  // BluetoothSocket override
29  virtual int fd() const OVERRIDE;
30
31 protected:
32  virtual ~BluetoothSocketChromeOs();
33
34 private:
35  BluetoothSocketChromeOs(const std::string& address, int fd);
36
37  const std::string address_;
38  const int fd_;
39
40  DISALLOW_COPY_AND_ASSIGN(BluetoothSocketChromeOs);
41};
42
43}  // namespace chromeos
44
45#endif  // DEVICE_BLUETOOTH_BLUETOOTH_SOCKET_CHROMEOS_H_
46