#include "device/bluetooth/emulation/fake_remote_gatt_descriptor.h"
#include <utility>
#include "base/functional/bind.h"
#include "base/task/single_thread_task_runner.h"
#include "device/bluetooth/public/mojom/emulation/fake_bluetooth.mojom.h"
namespace bluetooth {
FakeRemoteGattDescriptor::FakeRemoteGattDescriptor(
const std::string& descriptor_id,
const device::BluetoothUUID& descriptor_uuid,
device::BluetoothRemoteGattCharacteristic* characteristic)
: … { … }
FakeRemoteGattDescriptor::~FakeRemoteGattDescriptor() = default;
void FakeRemoteGattDescriptor::SetNextReadResponse(
uint16_t gatt_code,
const std::optional<std::vector<uint8_t>>& value) { … }
void FakeRemoteGattDescriptor::SetNextWriteResponse(uint16_t gatt_code) { … }
bool FakeRemoteGattDescriptor::AllResponsesConsumed() { … }
std::string FakeRemoteGattDescriptor::GetIdentifier() const { … }
device::BluetoothUUID FakeRemoteGattDescriptor::GetUUID() const { … }
device::BluetoothRemoteGattCharacteristic::Permissions
FakeRemoteGattDescriptor::GetPermissions() const { … }
const std::vector<uint8_t>& FakeRemoteGattDescriptor::GetValue() const { … }
device::BluetoothRemoteGattCharacteristic*
FakeRemoteGattDescriptor::GetCharacteristic() const { … }
void FakeRemoteGattDescriptor::ReadRemoteDescriptor(ValueCallback callback) { … }
void FakeRemoteGattDescriptor::WriteRemoteDescriptor(
const std::vector<uint8_t>& value,
base::OnceClosure callback,
ErrorCallback error_callback) { … }
void FakeRemoteGattDescriptor::DispatchReadResponse(ValueCallback callback) { … }
void FakeRemoteGattDescriptor::DispatchWriteResponse(
base::OnceClosure callback,
ErrorCallback error_callback,
const std::vector<uint8_t>& value) { … }
}