chromium/device/bluetooth/server_socket.cc

// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "device/bluetooth/server_socket.h"

#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/memory/ptr_util.h"
#include "device/bluetooth/bluetooth_device.h"
#include "device/bluetooth/bluetooth_socket.h"
#include "device/bluetooth/device.h"
#include "device/bluetooth/socket.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "mojo/public/cpp/bindings/receiver.h"
#include "mojo/public/cpp/bindings/self_owned_receiver.h"
#include "net/base/io_buffer.h"

namespace bluetooth {
namespace {
// TODO(b/269348144) - BluetoothSocket is constructed in UI thread and must also
// be destructed in UI thread. We must keep this reference until disconnect
// completes so that the destructor does not run in the socket thread.
void HoldReferenceUntilDisconnected(
    scoped_refptr<device::BluetoothSocket> server_socket,
    mojom::ServerSocket::DisconnectCallback callback) {}
}  // namespace

ServerSocket::ServerSocket(
    scoped_refptr<device::BluetoothSocket> bluetooth_socket)
    :{}

ServerSocket::~ServerSocket() {}

void ServerSocket::Accept(AcceptCallback callback) {}

void ServerSocket::Disconnect(DisconnectCallback callback) {}

void ServerSocket::OnAccept(
    AcceptCallback callback,
    const device::BluetoothDevice* device,
    scoped_refptr<device::BluetoothSocket> bluetooth_socket) {}

void ServerSocket::OnAcceptError(AcceptCallback callback,
                                 const std::string& error_message) {}

}  // namespace bluetooth