chromium/device/bluetooth/floss/bluetooth_remote_gatt_characteristic_floss.cc

// Copyright 2022 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/floss/bluetooth_remote_gatt_characteristic_floss.h"

#include "base/memory/ptr_util.h"
#include "base/notreached.h"
#include "base/strings/stringprintf.h"
#include "device/bluetooth/bluetooth_gatt_service.h"
#include "device/bluetooth/bluetooth_remote_gatt_descriptor.h"
#include "device/bluetooth/floss/bluetooth_adapter_floss.h"
#include "device/bluetooth/floss/bluetooth_device_floss.h"
#include "device/bluetooth/floss/bluetooth_gatt_service_floss.h"
#include "device/bluetooth/floss/bluetooth_remote_gatt_descriptor_floss.h"
#include "device/bluetooth/floss/bluetooth_remote_gatt_service_floss.h"
#include "device/bluetooth/floss/floss_dbus_manager.h"
#include "device/bluetooth/floss/floss_gatt_manager_client.h"

namespace floss {

// static
std::unique_ptr<BluetoothRemoteGattCharacteristicFloss>
BluetoothRemoteGattCharacteristicFloss::Create(
    BluetoothRemoteGattServiceFloss* service,
    GattCharacteristic* characteristic) {}

BluetoothRemoteGattCharacteristicFloss::BluetoothRemoteGattCharacteristicFloss(
    BluetoothRemoteGattServiceFloss* service,
    GattCharacteristic* characteristic)
    :{}

BluetoothRemoteGattCharacteristicFloss::
    ~BluetoothRemoteGattCharacteristicFloss() {}

std::string BluetoothRemoteGattCharacteristicFloss::GetIdentifier() const {}

device::BluetoothUUID BluetoothRemoteGattCharacteristicFloss::GetUUID() const {}

BluetoothRemoteGattCharacteristicFloss::Properties
BluetoothRemoteGattCharacteristicFloss::GetProperties() const {}

BluetoothRemoteGattCharacteristicFloss::Permissions
BluetoothRemoteGattCharacteristicFloss::GetPermissions() const {}

const std::vector<uint8_t>& BluetoothRemoteGattCharacteristicFloss::GetValue()
    const {}

device::BluetoothRemoteGattService*
BluetoothRemoteGattCharacteristicFloss::GetService() const {}

void BluetoothRemoteGattCharacteristicFloss::ReadRemoteCharacteristic(
    ValueCallback callback) {}

void BluetoothRemoteGattCharacteristicFloss::WriteRemoteCharacteristic(
    const std::vector<uint8_t>& value,
    device::BluetoothRemoteGattCharacteristic::WriteType write_type,
    base::OnceClosure callback,
    ErrorCallback error_callback) {}

void BluetoothRemoteGattCharacteristicFloss::
    DeprecatedWriteRemoteCharacteristic(const std::vector<uint8_t>& value,
                                        base::OnceClosure callback,
                                        ErrorCallback error_callback) {}

#if BUILDFLAG(IS_CHROMEOS)
void BluetoothRemoteGattCharacteristicFloss::PrepareWriteRemoteCharacteristic(
    const std::vector<uint8_t>& value,
    base::OnceClosure callback,
    ErrorCallback error_callback) {
  // Make sure we're using reliable writes before starting a prepared write.
  BluetoothDeviceFloss* device =
      static_cast<BluetoothDeviceFloss*>(service_->GetDevice());
  if (device && !device->UsingReliableWrite()) {
    device->BeginReliableWrite();
  }

  WriteRemoteCharacteristicImpl(value, floss::WriteType::kWritePrepare,
                                std::move(callback), std::move(error_callback));
}
#endif  // BUILDFLAG(IS_CHROMEOS)

void BluetoothRemoteGattCharacteristicFloss::WriteRemoteCharacteristicImpl(
    const std::vector<uint8_t>& value,
    floss::WriteType write_type,
    base::OnceClosure callback,
    ErrorCallback error_callback) {}

void BluetoothRemoteGattCharacteristicFloss::GattCharacteristicRead(
    std::string address,
    GattStatus status,
    int32_t handle,
    const std::vector<uint8_t>& data) {}

void BluetoothRemoteGattCharacteristicFloss::GattCharacteristicWrite(
    std::string address,
    GattStatus status,
    int32_t handle) {}

void BluetoothRemoteGattCharacteristicFloss::GattNotify(
    std::string address,
    int32_t handle,
    const std::vector<uint8_t>& data) {}

void BluetoothRemoteGattCharacteristicFloss::OnReadCharacteristic(
    ValueCallback callback,
    DBusResult<Void> result) {}

void BluetoothRemoteGattCharacteristicFloss::OnWriteCharacteristic(
    base::OnceClosure callback,
    ErrorCallback error_callback,
    std::vector<uint8_t> data,
    DBusResult<GattWriteRequestStatus> result) {}

void BluetoothRemoteGattCharacteristicFloss::SubscribeToNotifications(
    device::BluetoothRemoteGattDescriptor* ccc_descriptor,
#if BUILDFLAG(IS_CHROMEOS)
    NotificationType notification_type,
#endif  // BUILDFLAG(IS_CHROMEOS)
    base::OnceClosure callback,
    ErrorCallback error_callback) {}

void BluetoothRemoteGattCharacteristicFloss::UnsubscribeFromNotifications(
    device::BluetoothRemoteGattDescriptor* ccc_descriptor,
    base::OnceClosure callback,
    ErrorCallback error_callback) {}

void BluetoothRemoteGattCharacteristicFloss::OnRegisterForNotification(
    device::BluetoothRemoteGattDescriptor* ccc_descriptor,
    const std::vector<uint8_t>& value,
    base::OnceClosure callback,
    ErrorCallback error_callback,
    DBusResult<GattStatus> result) {}

AuthRequired BluetoothRemoteGattCharacteristicFloss::GetAuthForRead() const {}

AuthRequired BluetoothRemoteGattCharacteristicFloss::GetAuthForWrite() const {}

void BluetoothRemoteGattCharacteristicFloss::NotifyValueChanged() {}

}  // namespace floss