chromium/third_party/blink/renderer/modules/bluetooth/bluetooth_remote_gatt_server.cc

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

#include "third_party/blink/renderer/modules/bluetooth/bluetooth_remote_gatt_server.h"

#include <utility>

#include "mojo/public/cpp/bindings/associated_receiver_set.h"
#include "mojo/public/cpp/bindings/pending_associated_remote.h"
#include "third_party/blink/public/mojom/bluetooth/web_bluetooth.mojom-blink.h"
#include "third_party/blink/renderer/bindings/core/v8/callback_promise_adapter.h"
#include "third_party/blink/renderer/bindings/core/v8/script_promise.h"
#include "third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h"
#include "third_party/blink/renderer/core/dom/dom_exception.h"
#include "third_party/blink/renderer/core/dom/events/event.h"
#include "third_party/blink/renderer/modules/bluetooth/bluetooth.h"
#include "third_party/blink/renderer/modules/bluetooth/bluetooth_device.h"
#include "third_party/blink/renderer/modules/bluetooth/bluetooth_error.h"
#include "third_party/blink/renderer/modules/bluetooth/bluetooth_remote_gatt_service.h"
#include "third_party/blink/renderer/modules/bluetooth/bluetooth_uuid.h"
#include "third_party/blink/renderer/platform/bindings/exception_state.h"
#include "third_party/blink/renderer/platform/wtf/functional.h"

namespace blink {

BluetoothRemoteGATTServer::BluetoothRemoteGATTServer(ExecutionContext* context,
                                                     BluetoothDevice* device)
    :{}

void BluetoothRemoteGATTServer::GATTServerDisconnected() {}

void BluetoothRemoteGATTServer::AddToActiveAlgorithms(
    ScriptPromiseResolverBase* resolver) {}

bool BluetoothRemoteGATTServer::RemoveFromActiveAlgorithms(
    ScriptPromiseResolverBase* resolver) {}

void BluetoothRemoteGATTServer::CleanupDisconnectedDeviceAndFireEvent() {}

void BluetoothRemoteGATTServer::DispatchDisconnected() {}

void BluetoothRemoteGATTServer::Trace(Visitor* visitor) const {}

void BluetoothRemoteGATTServer::ConnectCallback(
    ScriptPromiseResolver<BluetoothRemoteGATTServer>* resolver,
    mojom::blink::WebBluetoothResult result) {}

ScriptPromise<BluetoothRemoteGATTServer> BluetoothRemoteGATTServer::connect(
    ScriptState* script_state,
    ExceptionState& exception_state) {}

void BluetoothRemoteGATTServer::disconnect(ScriptState* script_state,
                                           ExceptionState& exception_state) {}

// Callback that allows us to resolve the promise with a single service or
// with a vector owning the services.
void BluetoothRemoteGATTServer::GetPrimaryServicesCallback(
    const String& requested_service_uuid,
    mojom::blink::WebBluetoothGATTQueryQuantity quantity,
    ScriptPromiseResolverBase* resolver,
    mojom::blink::WebBluetoothResult result,
    std::optional<Vector<mojom::blink::WebBluetoothRemoteGATTServicePtr>>
        services) {}

ScriptPromise<BluetoothRemoteGATTService>
BluetoothRemoteGATTServer::getPrimaryService(
    ScriptState* script_state,
    const V8BluetoothServiceUUID* service,
    ExceptionState& exception_state) {}

ScriptPromise<IDLSequence<BluetoothRemoteGATTService>>
BluetoothRemoteGATTServer::getPrimaryServices(
    ScriptState* script_state,
    const V8BluetoothServiceUUID* service,
    ExceptionState& exception_state) {}

ScriptPromise<IDLSequence<BluetoothRemoteGATTService>>
BluetoothRemoteGATTServer::getPrimaryServices(ScriptState* script_state,
                                              ExceptionState& exception_state) {}

void BluetoothRemoteGATTServer::GetPrimaryServicesImpl(
    ScriptPromiseResolverBase* resolver,
    mojom::blink::WebBluetoothGATTQueryQuantity quantity,
    String services_uuid) {}

}  // namespace blink