chromium/third_party/blink/renderer/modules/bluetooth/bluetooth_remote_gatt_service.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_service.h"

#include <utility>

#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/inspector/console_message.h"
#include "third_party/blink/renderer/modules/bluetooth/bluetooth.h"
#include "third_party/blink/renderer/modules/bluetooth/bluetooth_error.h"
#include "third_party/blink/renderer/modules/bluetooth/bluetooth_remote_gatt_characteristic.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 {

BluetoothRemoteGATTService::BluetoothRemoteGATTService(
    mojom::blink::WebBluetoothRemoteGATTServicePtr service,
    bool is_primary,
    const String& device_instance_id,
    BluetoothDevice* device)
    :{}

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

// Callback that allows us to resolve the promise with a single characteristic
// or with a vector owning the characteristics.
void BluetoothRemoteGATTService::GetCharacteristicsCallback(
    const String& service_instance_id,
    const String& requested_characteristic_uuid,
    mojom::blink::WebBluetoothGATTQueryQuantity quantity,
    ScriptPromiseResolverBase* resolver,
    mojom::blink::WebBluetoothResult result,
    std::optional<Vector<mojom::blink::WebBluetoothRemoteGATTCharacteristicPtr>>
        characteristics) {}

ScriptPromise<BluetoothRemoteGATTCharacteristic>
BluetoothRemoteGATTService::getCharacteristic(
    ScriptState* script_state,
    const V8BluetoothCharacteristicUUID* characteristic,
    ExceptionState& exception_state) {}

ScriptPromise<IDLSequence<BluetoothRemoteGATTCharacteristic>>
BluetoothRemoteGATTService::getCharacteristics(
    ScriptState* script_state,
    const V8BluetoothCharacteristicUUID* characteristic,
    ExceptionState& exception_state) {}

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

void BluetoothRemoteGATTService::GetCharacteristicsImpl(
    ScriptPromiseResolverBase* resolver,
    ExceptionState& exception_state,
    mojom::blink::WebBluetoothGATTQueryQuantity quantity,
    const String& characteristics_uuid) {}

}  // namespace blink