chromium/device/bluetooth/bluetooth_socket.h

// Copyright 2012 The Chromium Authors
// 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 <string>

#include "base/functional/callback.h"
#include "base/memory/ref_counted.h"
#include "device/bluetooth/bluetooth_export.h"

namespace net {
class IOBuffer;
}  // namespace net

namespace device {

class BluetoothDevice;

// 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.  In terms of threading, platform specific implementations may
// differ slightly, but platform independent consumers must guarantee calling
// various instance methods on the same thread as the thread used at
// construction time -- platform specific implementation are responsible for
// marshalling calls to a different thread if required.
class DEVICE_BLUETOOTH_EXPORT BluetoothSocket
    : public base::RefCountedThreadSafe<BluetoothSocket> {};

}  // namespace device

#endif  // DEVICE_BLUETOOTH_BLUETOOTH_SOCKET_H_