chromium/third_party/blink/renderer/modules/bluetooth/bluetooth_remote_gatt_characteristic.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_characteristic.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/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/core/execution_context/agent.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_characteristic_properties.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_descriptor.h"
#include "third_party/blink/renderer/modules/bluetooth/bluetooth_remote_gatt_service.h"
#include "third_party/blink/renderer/modules/bluetooth/bluetooth_remote_gatt_utils.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/heap/garbage_collected.h"
#include "third_party/blink/renderer/platform/scheduler/public/event_loop.h"
#include "third_party/blink/renderer/platform/wtf/functional.h"

namespace blink {

BluetoothRemoteGATTCharacteristic::BluetoothRemoteGATTCharacteristic(
    ExecutionContext* context,
    mojom::blink::WebBluetoothRemoteGATTCharacteristicPtr characteristic,
    BluetoothRemoteGATTService* service,
    BluetoothDevice* device)
    :{}

void BluetoothRemoteGATTCharacteristic::SetValue(DOMDataView* dom_data_view) {}

void BluetoothRemoteGATTCharacteristic::RemoteCharacteristicValueChanged(
    const Vector<uint8_t>& value) {}

const WTF::AtomicString& BluetoothRemoteGATTCharacteristic::InterfaceName()
    const {}

ExecutionContext* BluetoothRemoteGATTCharacteristic::GetExecutionContext()
    const {}

bool BluetoothRemoteGATTCharacteristic::HasPendingActivity() const {}

void BluetoothRemoteGATTCharacteristic::AddedEventListener(
    const AtomicString& event_type,
    RegisteredEventListener& registered_listener) {}

void BluetoothRemoteGATTCharacteristic::ReadValueCallback(
    ScriptPromiseResolver<NotShared<DOMDataView>>* resolver,
    mojom::blink::WebBluetoothResult result,
    const std::optional<Vector<uint8_t>>& value) {}

ScriptPromise<NotShared<DOMDataView>>
BluetoothRemoteGATTCharacteristic::readValue(ScriptState* script_state,
                                             ExceptionState& exception_state) {}

void BluetoothRemoteGATTCharacteristic::WriteValueCallback(
    ScriptPromiseResolver<IDLUndefined>* resolver,
    const Vector<uint8_t>& value,
    mojom::blink::WebBluetoothResult result) {}

ScriptPromise<IDLUndefined>
BluetoothRemoteGATTCharacteristic::WriteCharacteristicValue(
    ScriptState* script_state,
    const DOMArrayPiece& value,
    mojom::blink::WebBluetoothWriteType write_type,
    ExceptionState& exception_state) {}

ScriptPromise<IDLUndefined> BluetoothRemoteGATTCharacteristic::writeValue(
    ScriptState* script_state,
    const DOMArrayPiece& value,
    ExceptionState& exception_state) {}

ScriptPromise<IDLUndefined>
BluetoothRemoteGATTCharacteristic::writeValueWithResponse(
    ScriptState* script_state,
    const DOMArrayPiece& value,
    ExceptionState& exception_state) {}

ScriptPromise<IDLUndefined>
BluetoothRemoteGATTCharacteristic::writeValueWithoutResponse(
    ScriptState* script_state,
    const DOMArrayPiece& value,
    ExceptionState& exception_state) {}

void BluetoothRemoteGATTCharacteristic::NotificationsCallback(
    ScriptPromiseResolver<BluetoothRemoteGATTCharacteristic>* resolver,
    bool started,
    mojom::blink::WebBluetoothResult result) {}

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

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

ScriptPromise<BluetoothRemoteGATTDescriptor>
BluetoothRemoteGATTCharacteristic::getDescriptor(
    ScriptState* script_state,
    const V8BluetoothDescriptorUUID* descriptor_uuid,
    ExceptionState& exception_state) {}

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

ScriptPromise<IDLSequence<BluetoothRemoteGATTDescriptor>>
BluetoothRemoteGATTCharacteristic::getDescriptors(
    ScriptState* script_state,
    const V8BluetoothDescriptorUUID* descriptor_uuid,
    ExceptionState& exception_state) {}

void BluetoothRemoteGATTCharacteristic::GetDescriptorsImpl(
    ScriptPromiseResolverBase* resolver,
    ExceptionState& exception_state,
    mojom::blink::WebBluetoothGATTQueryQuantity quantity,
    const String& descriptors_uuid) {}

// Callback that allows us to resolve the promise with a single descriptor
// or with a vector owning the descriptors.
void BluetoothRemoteGATTCharacteristic::GetDescriptorsCallback(
    const String& requested_descriptor_uuid,
    const String& characteristic_instance_id,
    mojom::blink::WebBluetoothGATTQueryQuantity quantity,
    ScriptPromiseResolverBase* resolver,
    mojom::blink::WebBluetoothResult result,
    std::optional<Vector<mojom::blink::WebBluetoothRemoteGATTDescriptorPtr>>
        descriptors) {}

String
BluetoothRemoteGATTCharacteristic::CreateInvalidCharacteristicErrorMessage() {}

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

void BluetoothRemoteGATTCharacteristic::DeferredValueChange::Trace(
    Visitor* visitor) const {}

}  // namespace blink