blob: b444110b3a039120dce6df68091e534a5e238c74 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef DEVICE_BLUETOOTH_BLUETOOTH_SOCKET_H_
#define DEVICE_BLUETOOTH_BLUETOOTH_SOCKET_H_
#include "base/memory/ref_counted.h"
namespace device {
// BluetoothSocket represents a socket to a specific service on a
// BluetoothDevice. BluetoothSocket objects are ref counted and may outlive
// both the BluetoothDevice and BluetoothAdapter that were involved in their
// creation.
class BluetoothSocket : public base::RefCounted<BluetoothSocket> {
public:
// TODO(youngki): Replace this with an opaque id when read/write calls are
// added. This interface is platform-independent and file descriptor is
// linux-specific hence this method has to be renamed.
virtual int fd() const = 0;
protected:
friend class base::RefCounted<BluetoothSocket>;
virtual ~BluetoothSocket() {}
};
} // namespace device
#endif // DEVICE_BLUETOOTH_BLUETOOTH_SOCKET_H_
|