#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-private-field"
#endif
#include "device/bluetooth/public/mojom/emulation/fake_bluetooth.mojom.h"
#include <math.h>
#include <stdint.h>
#include <utility>
#include "base/debug/alias.h"
#include "base/hash/md5_constexpr.h"
#include "base/run_loop.h"
#include "base/strings/string_number_conversions.h"
#include "base/task/thread_pool/thread_pool_instance.h"
#include "base/trace_event/trace_event.h"
#include "base/trace_event/typed_macros.h"
#include "mojo/public/cpp/bindings/features.h"
#include "mojo/public/cpp/bindings/lib/default_construct_tag_internal.h"
#include "mojo/public/cpp/bindings/lib/generated_code_util.h"
#include "mojo/public/cpp/bindings/lib/message_internal.h"
#include "mojo/public/cpp/bindings/lib/proxy_to_responder.h"
#include "mojo/public/cpp/bindings/lib/send_message_helper.h"
#include "mojo/public/cpp/bindings/lib/serialization_util.h"
#include "mojo/public/cpp/bindings/lib/unserialized_message_context.h"
#include "mojo/public/cpp/bindings/lib/validate_params.h"
#include "mojo/public/cpp/bindings/lib/validation_errors.h"
#include "mojo/public/cpp/bindings/mojo_buildflags.h"
#include "mojo/public/cpp/bindings/urgent_message_scope.h"
#include "mojo/public/interfaces/bindings/interface_control_messages.mojom.h"
#include "third_party/perfetto/include/perfetto/tracing/traced_value.h"
#include "device/bluetooth/public/mojom/emulation/fake_bluetooth.mojom-params-data.h"
#include "device/bluetooth/public/mojom/emulation/fake_bluetooth.mojom-shared-message-ids.h"
#include "device/bluetooth/public/mojom/emulation/fake_bluetooth.mojom-import-headers.h"
#include "device/bluetooth/public/mojom/emulation/fake_bluetooth.mojom-test-utils.h"
namespace bluetooth::mojom {
Appearance::Appearance()
: … { … }
Appearance::Appearance(
bool has_value_in,
int8_t value_in)
: … { … }
Appearance::~Appearance() = default;
size_t Appearance::Hash(size_t seed) const { … }
void Appearance::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool Appearance::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
Power::Power()
: … { … }
Power::Power(
bool has_value_in,
int8_t value_in)
: … { … }
Power::~Power() = default;
size_t Power::Hash(size_t seed) const { … }
void Power::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool Power::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
ServiceDataMap::ServiceDataMap()
: … { … }
ServiceDataMap::ServiceDataMap(
const base::flat_map<std::string, std::vector<uint8_t>>& service_data_in)
: … { … }
ServiceDataMap::~ServiceDataMap() = default;
void ServiceDataMap::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool ServiceDataMap::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
ScanRecord::ScanRecord()
: … { … }
ScanRecord::ScanRecord(
const std::optional<std::string>& name_in,
std::optional<std::vector<::device::BluetoothUUID>> uuids_in,
AppearancePtr appearance_in,
PowerPtr tx_power_in,
const std::optional<base::flat_map<uint16_t, std::vector<uint8_t>>>& manufacturer_data_in,
const std::optional<::device::BluetoothDevice::ServiceDataMap>& service_data_in)
: … { … }
ScanRecord::~ScanRecord() = default;
void ScanRecord::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool ScanRecord::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
ScanResult::ScanResult()
: … { … }
ScanResult::ScanResult(
const std::string& device_address_in,
int8_t rssi_in,
ScanRecordPtr scan_record_in)
: … { … }
ScanResult::~ScanResult() = default;
void ScanResult::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool ScanResult::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
CharacteristicProperties::CharacteristicProperties()
: … { … }
CharacteristicProperties::CharacteristicProperties(
bool broadcast_in,
bool read_in,
bool write_without_response_in,
bool write_in,
bool notify_in,
bool indicate_in,
bool authenticated_signed_writes_in,
bool extended_properties_in)
: … { … }
CharacteristicProperties::~CharacteristicProperties() = default;
size_t CharacteristicProperties::Hash(size_t seed) const { … }
void CharacteristicProperties::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool CharacteristicProperties::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
const char FakeBluetooth::Name_[] = …;
FakeBluetooth::IPCStableHashFunction FakeBluetooth::MessageToMethodInfo_(mojo::Message& message) { … }
const char* FakeBluetooth::MessageToMethodName_(mojo::Message& message) { … }
#if !BUILDFLAG(IS_FUCHSIA)
uint32_t FakeBluetooth::SetLESupported_Sym::IPCStableHash() { … }
uint32_t FakeBluetooth::SimulateCentral_Sym::IPCStableHash() { … }
uint32_t FakeBluetooth::AllResponsesConsumed_Sym::IPCStableHash() { … }
# endif
class FakeBluetooth_SetLESupported_ForwardToCallback
: public mojo::MessageReceiver { … };
class FakeBluetooth_SimulateCentral_ForwardToCallback
: public mojo::MessageReceiver { … };
class FakeBluetooth_AllResponsesConsumed_ForwardToCallback
: public mojo::MessageReceiver { … };
FakeBluetoothProxy::FakeBluetoothProxy(mojo::MessageReceiverWithResponder* receiver)
: … { … }
void FakeBluetoothProxy::SetLESupported(
bool in_available, SetLESupportedCallback callback) { … }
void FakeBluetoothProxy::SimulateCentral(
CentralState in_state, SimulateCentralCallback callback) { … }
void FakeBluetoothProxy::AllResponsesConsumed(
AllResponsesConsumedCallback callback) { … }
class FakeBluetooth_SetLESupported_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool FakeBluetooth_SetLESupported_ForwardToCallback::Accept(
mojo::Message* message) { … }
void FakeBluetooth_SetLESupported_ProxyToResponder::Run(
) { … }
class FakeBluetooth_SimulateCentral_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool FakeBluetooth_SimulateCentral_ForwardToCallback::Accept(
mojo::Message* message) { … }
void FakeBluetooth_SimulateCentral_ProxyToResponder::Run(
::mojo::PendingRemote<FakeCentral> in_fake_central) { … }
class FakeBluetooth_AllResponsesConsumed_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool FakeBluetooth_AllResponsesConsumed_ForwardToCallback::Accept(
mojo::Message* message) { … }
void FakeBluetooth_AllResponsesConsumed_ProxyToResponder::Run(
bool in_consumed) { … }
bool FakeBluetoothStubDispatch::Accept(
FakeBluetooth* impl,
mojo::Message* message) { … }
bool FakeBluetoothStubDispatch::AcceptWithResponder(
FakeBluetooth* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) { … }
namespace {
}
static const mojo::internal::GenericValidationInfo kFakeBluetoothValidationInfo[] = …;
bool FakeBluetoothRequestValidator::Accept(mojo::Message* message) { … }
bool FakeBluetoothResponseValidator::Accept(mojo::Message* message) { … }
const char FakeCentral::Name_[] = …;
FakeCentral::IPCStableHashFunction FakeCentral::MessageToMethodInfo_(mojo::Message& message) { … }
const char* FakeCentral::MessageToMethodName_(mojo::Message& message) { … }
#if !BUILDFLAG(IS_FUCHSIA)
uint32_t FakeCentral::SimulatePreconnectedPeripheral_Sym::IPCStableHash() { … }
uint32_t FakeCentral::SimulateAdvertisementReceived_Sym::IPCStableHash() { … }
uint32_t FakeCentral::SetState_Sym::IPCStableHash() { … }
uint32_t FakeCentral::SetNextGATTConnectionResponse_Sym::IPCStableHash() { … }
uint32_t FakeCentral::SetNextGATTDiscoveryResponse_Sym::IPCStableHash() { … }
uint32_t FakeCentral::SimulateGATTDisconnection_Sym::IPCStableHash() { … }
uint32_t FakeCentral::SimulateGATTServicesChanged_Sym::IPCStableHash() { … }
uint32_t FakeCentral::AddFakeService_Sym::IPCStableHash() { … }
uint32_t FakeCentral::RemoveFakeService_Sym::IPCStableHash() { … }
uint32_t FakeCentral::AddFakeCharacteristic_Sym::IPCStableHash() { … }
uint32_t FakeCentral::RemoveFakeCharacteristic_Sym::IPCStableHash() { … }
uint32_t FakeCentral::AddFakeDescriptor_Sym::IPCStableHash() { … }
uint32_t FakeCentral::RemoveFakeDescriptor_Sym::IPCStableHash() { … }
uint32_t FakeCentral::SetNextReadCharacteristicResponse_Sym::IPCStableHash() { … }
uint32_t FakeCentral::SetNextWriteCharacteristicResponse_Sym::IPCStableHash() { … }
uint32_t FakeCentral::SetNextSubscribeToNotificationsResponse_Sym::IPCStableHash() { … }
uint32_t FakeCentral::SetNextUnsubscribeFromNotificationsResponse_Sym::IPCStableHash() { … }
uint32_t FakeCentral::IsNotifying_Sym::IPCStableHash() { … }
uint32_t FakeCentral::GetLastWrittenCharacteristicValue_Sym::IPCStableHash() { … }
uint32_t FakeCentral::SetNextReadDescriptorResponse_Sym::IPCStableHash() { … }
uint32_t FakeCentral::SetNextWriteDescriptorResponse_Sym::IPCStableHash() { … }
uint32_t FakeCentral::GetLastWrittenDescriptorValue_Sym::IPCStableHash() { … }
# endif
class FakeCentral_SimulatePreconnectedPeripheral_ForwardToCallback
: public mojo::MessageReceiver { … };
class FakeCentral_SimulateAdvertisementReceived_ForwardToCallback
: public mojo::MessageReceiver { … };
class FakeCentral_SetState_ForwardToCallback
: public mojo::MessageReceiver { … };
class FakeCentral_SetNextGATTConnectionResponse_ForwardToCallback
: public mojo::MessageReceiver { … };
class FakeCentral_SetNextGATTDiscoveryResponse_ForwardToCallback
: public mojo::MessageReceiver { … };
class FakeCentral_SimulateGATTDisconnection_ForwardToCallback
: public mojo::MessageReceiver { … };
class FakeCentral_SimulateGATTServicesChanged_ForwardToCallback
: public mojo::MessageReceiver { … };
class FakeCentral_AddFakeService_ForwardToCallback
: public mojo::MessageReceiver { … };
class FakeCentral_RemoveFakeService_ForwardToCallback
: public mojo::MessageReceiver { … };
class FakeCentral_AddFakeCharacteristic_ForwardToCallback
: public mojo::MessageReceiver { … };
class FakeCentral_RemoveFakeCharacteristic_ForwardToCallback
: public mojo::MessageReceiver { … };
class FakeCentral_AddFakeDescriptor_ForwardToCallback
: public mojo::MessageReceiver { … };
class FakeCentral_RemoveFakeDescriptor_ForwardToCallback
: public mojo::MessageReceiver { … };
class FakeCentral_SetNextReadCharacteristicResponse_ForwardToCallback
: public mojo::MessageReceiver { … };
class FakeCentral_SetNextWriteCharacteristicResponse_ForwardToCallback
: public mojo::MessageReceiver { … };
class FakeCentral_SetNextSubscribeToNotificationsResponse_ForwardToCallback
: public mojo::MessageReceiver { … };
class FakeCentral_SetNextUnsubscribeFromNotificationsResponse_ForwardToCallback
: public mojo::MessageReceiver { … };
class FakeCentral_IsNotifying_ForwardToCallback
: public mojo::MessageReceiver { … };
class FakeCentral_GetLastWrittenCharacteristicValue_ForwardToCallback
: public mojo::MessageReceiver { … };
class FakeCentral_SetNextReadDescriptorResponse_ForwardToCallback
: public mojo::MessageReceiver { … };
class FakeCentral_SetNextWriteDescriptorResponse_ForwardToCallback
: public mojo::MessageReceiver { … };
class FakeCentral_GetLastWrittenDescriptorValue_ForwardToCallback
: public mojo::MessageReceiver { … };
FakeCentralProxy::FakeCentralProxy(mojo::MessageReceiverWithResponder* receiver)
: … { … }
void FakeCentralProxy::SimulatePreconnectedPeripheral(
const std::string& in_address, const std::string& in_name, const base::flat_map<uint16_t, std::vector<uint8_t>>& in_manufacturer_data, const std::vector<::device::BluetoothUUID>& in_known_service_uuids, SimulatePreconnectedPeripheralCallback callback) { … }
void FakeCentralProxy::SimulateAdvertisementReceived(
ScanResultPtr in_result, SimulateAdvertisementReceivedCallback callback) { … }
void FakeCentralProxy::SetState(
CentralState in_state, SetStateCallback callback) { … }
void FakeCentralProxy::SetNextGATTConnectionResponse(
const std::string& in_address, uint16_t in_code, SetNextGATTConnectionResponseCallback callback) { … }
void FakeCentralProxy::SetNextGATTDiscoveryResponse(
const std::string& in_address, uint16_t in_code, SetNextGATTDiscoveryResponseCallback callback) { … }
void FakeCentralProxy::SimulateGATTDisconnection(
const std::string& in_address, SimulateGATTDisconnectionCallback callback) { … }
void FakeCentralProxy::SimulateGATTServicesChanged(
const std::string& in_address, SimulateGATTServicesChangedCallback callback) { … }
void FakeCentralProxy::AddFakeService(
const std::string& in_peripheral_address, const ::device::BluetoothUUID& in_service_uuid, AddFakeServiceCallback callback) { … }
void FakeCentralProxy::RemoveFakeService(
const std::string& in_service_id, const std::string& in_peripheral_address, RemoveFakeServiceCallback callback) { … }
void FakeCentralProxy::AddFakeCharacteristic(
const ::device::BluetoothUUID& in_characteristic_uuid, CharacteristicPropertiesPtr in_properties, const std::string& in_service_id, const std::string& in_peripheral_address, AddFakeCharacteristicCallback callback) { … }
void FakeCentralProxy::RemoveFakeCharacteristic(
const std::string& in_identifier, const std::string& in_service_id, const std::string& in_peripheral_address, RemoveFakeCharacteristicCallback callback) { … }
void FakeCentralProxy::AddFakeDescriptor(
const ::device::BluetoothUUID& in_descriptor_uuid, const std::string& in_characteristic_id, const std::string& in_service_id, const std::string& in_peripheral_address, AddFakeDescriptorCallback callback) { … }
void FakeCentralProxy::RemoveFakeDescriptor(
const std::string& in_descriptor_id, const std::string& in_characteristic_id, const std::string& in_service_id, const std::string& in_peripheral_address, RemoveFakeDescriptorCallback callback) { … }
void FakeCentralProxy::SetNextReadCharacteristicResponse(
uint16_t in_gatt_code, const std::optional<std::vector<uint8_t>>& in_value, const std::string& in_characteristic_id, const std::string& in_service_id, const std::string& in_peripheral_address, SetNextReadCharacteristicResponseCallback callback) { … }
void FakeCentralProxy::SetNextWriteCharacteristicResponse(
uint16_t in_gatt_code, const std::string& in_characteristic_id, const std::string& in_service_id, const std::string& in_peripheral_address, SetNextWriteCharacteristicResponseCallback callback) { … }
void FakeCentralProxy::SetNextSubscribeToNotificationsResponse(
uint16_t in_gatt_code, const std::string& in_characteristic_id, const std::string& in_service_id, const std::string& in_peripheral_address, SetNextSubscribeToNotificationsResponseCallback callback) { … }
void FakeCentralProxy::SetNextUnsubscribeFromNotificationsResponse(
uint16_t in_gatt_code, const std::string& in_characteristic_id, const std::string& in_service_id, const std::string& in_peripheral_address, SetNextUnsubscribeFromNotificationsResponseCallback callback) { … }
void FakeCentralProxy::IsNotifying(
const std::string& in_characteristic_id, const std::string& in_service_id, const std::string& in_peripheral_address, IsNotifyingCallback callback) { … }
void FakeCentralProxy::GetLastWrittenCharacteristicValue(
const std::string& in_characteristic_id, const std::string& in_service_id, const std::string& in_peripheral_address, GetLastWrittenCharacteristicValueCallback callback) { … }
void FakeCentralProxy::SetNextReadDescriptorResponse(
uint16_t in_gatt_code, const std::optional<std::vector<uint8_t>>& in_value, const std::string& in_descriptor_id, const std::string& in_characteristic_id, const std::string& in_service_id, const std::string& in_peripheral_address, SetNextReadDescriptorResponseCallback callback) { … }
void FakeCentralProxy::SetNextWriteDescriptorResponse(
uint16_t in_gatt_code, const std::string& in_descriptor_id, const std::string& in_characteristic_id, const std::string& in_service_id, const std::string& in_peripheral_address, SetNextWriteDescriptorResponseCallback callback) { … }
void FakeCentralProxy::GetLastWrittenDescriptorValue(
const std::string& in_descriptor_id, const std::string& in_characteristic_id, const std::string& in_service_id, const std::string& in_peripheral_address, GetLastWrittenDescriptorValueCallback callback) { … }
class FakeCentral_SimulatePreconnectedPeripheral_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool FakeCentral_SimulatePreconnectedPeripheral_ForwardToCallback::Accept(
mojo::Message* message) { … }
void FakeCentral_SimulatePreconnectedPeripheral_ProxyToResponder::Run(
) { … }
class FakeCentral_SimulateAdvertisementReceived_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool FakeCentral_SimulateAdvertisementReceived_ForwardToCallback::Accept(
mojo::Message* message) { … }
void FakeCentral_SimulateAdvertisementReceived_ProxyToResponder::Run(
) { … }
class FakeCentral_SetState_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool FakeCentral_SetState_ForwardToCallback::Accept(
mojo::Message* message) { … }
void FakeCentral_SetState_ProxyToResponder::Run(
) { … }
class FakeCentral_SetNextGATTConnectionResponse_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool FakeCentral_SetNextGATTConnectionResponse_ForwardToCallback::Accept(
mojo::Message* message) { … }
void FakeCentral_SetNextGATTConnectionResponse_ProxyToResponder::Run(
bool in_success) { … }
class FakeCentral_SetNextGATTDiscoveryResponse_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool FakeCentral_SetNextGATTDiscoveryResponse_ForwardToCallback::Accept(
mojo::Message* message) { … }
void FakeCentral_SetNextGATTDiscoveryResponse_ProxyToResponder::Run(
bool in_success) { … }
class FakeCentral_SimulateGATTDisconnection_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool FakeCentral_SimulateGATTDisconnection_ForwardToCallback::Accept(
mojo::Message* message) { … }
void FakeCentral_SimulateGATTDisconnection_ProxyToResponder::Run(
bool in_success) { … }
class FakeCentral_SimulateGATTServicesChanged_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool FakeCentral_SimulateGATTServicesChanged_ForwardToCallback::Accept(
mojo::Message* message) { … }
void FakeCentral_SimulateGATTServicesChanged_ProxyToResponder::Run(
bool in_success) { … }
class FakeCentral_AddFakeService_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool FakeCentral_AddFakeService_ForwardToCallback::Accept(
mojo::Message* message) { … }
void FakeCentral_AddFakeService_ProxyToResponder::Run(
const std::optional<std::string>& in_service_id) { … }
class FakeCentral_RemoveFakeService_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool FakeCentral_RemoveFakeService_ForwardToCallback::Accept(
mojo::Message* message) { … }
void FakeCentral_RemoveFakeService_ProxyToResponder::Run(
bool in_success) { … }
class FakeCentral_AddFakeCharacteristic_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool FakeCentral_AddFakeCharacteristic_ForwardToCallback::Accept(
mojo::Message* message) { … }
void FakeCentral_AddFakeCharacteristic_ProxyToResponder::Run(
const std::optional<std::string>& in_characteristic_id) { … }
class FakeCentral_RemoveFakeCharacteristic_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool FakeCentral_RemoveFakeCharacteristic_ForwardToCallback::Accept(
mojo::Message* message) { … }
void FakeCentral_RemoveFakeCharacteristic_ProxyToResponder::Run(
bool in_success) { … }
class FakeCentral_AddFakeDescriptor_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool FakeCentral_AddFakeDescriptor_ForwardToCallback::Accept(
mojo::Message* message) { … }
void FakeCentral_AddFakeDescriptor_ProxyToResponder::Run(
const std::optional<std::string>& in_descriptor_id) { … }
class FakeCentral_RemoveFakeDescriptor_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool FakeCentral_RemoveFakeDescriptor_ForwardToCallback::Accept(
mojo::Message* message) { … }
void FakeCentral_RemoveFakeDescriptor_ProxyToResponder::Run(
bool in_success) { … }
class FakeCentral_SetNextReadCharacteristicResponse_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool FakeCentral_SetNextReadCharacteristicResponse_ForwardToCallback::Accept(
mojo::Message* message) { … }
void FakeCentral_SetNextReadCharacteristicResponse_ProxyToResponder::Run(
bool in_success) { … }
class FakeCentral_SetNextWriteCharacteristicResponse_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool FakeCentral_SetNextWriteCharacteristicResponse_ForwardToCallback::Accept(
mojo::Message* message) { … }
void FakeCentral_SetNextWriteCharacteristicResponse_ProxyToResponder::Run(
bool in_success) { … }
class FakeCentral_SetNextSubscribeToNotificationsResponse_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool FakeCentral_SetNextSubscribeToNotificationsResponse_ForwardToCallback::Accept(
mojo::Message* message) { … }
void FakeCentral_SetNextSubscribeToNotificationsResponse_ProxyToResponder::Run(
bool in_success) { … }
class FakeCentral_SetNextUnsubscribeFromNotificationsResponse_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool FakeCentral_SetNextUnsubscribeFromNotificationsResponse_ForwardToCallback::Accept(
mojo::Message* message) { … }
void FakeCentral_SetNextUnsubscribeFromNotificationsResponse_ProxyToResponder::Run(
bool in_success) { … }
class FakeCentral_IsNotifying_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool FakeCentral_IsNotifying_ForwardToCallback::Accept(
mojo::Message* message) { … }
void FakeCentral_IsNotifying_ProxyToResponder::Run(
bool in_success, bool in_is_notifying) { … }
class FakeCentral_GetLastWrittenCharacteristicValue_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool FakeCentral_GetLastWrittenCharacteristicValue_ForwardToCallback::Accept(
mojo::Message* message) { … }
void FakeCentral_GetLastWrittenCharacteristicValue_ProxyToResponder::Run(
bool in_success, const std::optional<std::vector<uint8_t>>& in_value, WriteType in_write_type) { … }
class FakeCentral_SetNextReadDescriptorResponse_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool FakeCentral_SetNextReadDescriptorResponse_ForwardToCallback::Accept(
mojo::Message* message) { … }
void FakeCentral_SetNextReadDescriptorResponse_ProxyToResponder::Run(
bool in_success) { … }
class FakeCentral_SetNextWriteDescriptorResponse_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool FakeCentral_SetNextWriteDescriptorResponse_ForwardToCallback::Accept(
mojo::Message* message) { … }
void FakeCentral_SetNextWriteDescriptorResponse_ProxyToResponder::Run(
bool in_success) { … }
class FakeCentral_GetLastWrittenDescriptorValue_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool FakeCentral_GetLastWrittenDescriptorValue_ForwardToCallback::Accept(
mojo::Message* message) { … }
void FakeCentral_GetLastWrittenDescriptorValue_ProxyToResponder::Run(
bool in_success, const std::optional<std::vector<uint8_t>>& in_value) { … }
bool FakeCentralStubDispatch::Accept(
FakeCentral* impl,
mojo::Message* message) { … }
bool FakeCentralStubDispatch::AcceptWithResponder(
FakeCentral* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) { … }
namespace {
}
static const mojo::internal::GenericValidationInfo kFakeCentralValidationInfo[] = …;
bool FakeCentralRequestValidator::Accept(mojo::Message* message) { … }
bool FakeCentralResponseValidator::Accept(mojo::Message* message) { … }
}
namespace mojo {
bool StructTraits<::bluetooth::mojom::Appearance::DataView, ::bluetooth::mojom::AppearancePtr>::Read(
::bluetooth::mojom::Appearance::DataView input,
::bluetooth::mojom::AppearancePtr* output) { … }
bool StructTraits<::bluetooth::mojom::Power::DataView, ::bluetooth::mojom::PowerPtr>::Read(
::bluetooth::mojom::Power::DataView input,
::bluetooth::mojom::PowerPtr* output) { … }
bool StructTraits<::bluetooth::mojom::ServiceDataMap::DataView, ::bluetooth::mojom::ServiceDataMapPtr>::Read(
::bluetooth::mojom::ServiceDataMap::DataView input,
::bluetooth::mojom::ServiceDataMapPtr* output) { … }
bool StructTraits<::bluetooth::mojom::ScanRecord::DataView, ::bluetooth::mojom::ScanRecordPtr>::Read(
::bluetooth::mojom::ScanRecord::DataView input,
::bluetooth::mojom::ScanRecordPtr* output) { … }
bool StructTraits<::bluetooth::mojom::ScanResult::DataView, ::bluetooth::mojom::ScanResultPtr>::Read(
::bluetooth::mojom::ScanResult::DataView input,
::bluetooth::mojom::ScanResultPtr* output) { … }
bool StructTraits<::bluetooth::mojom::CharacteristicProperties::DataView, ::bluetooth::mojom::CharacteristicPropertiesPtr>::Read(
::bluetooth::mojom::CharacteristicProperties::DataView input,
::bluetooth::mojom::CharacteristicPropertiesPtr* output) { … }
}
namespace bluetooth::mojom {
void FakeBluetoothInterceptorForTesting::SetLESupported(bool available, SetLESupportedCallback callback) { … }
void FakeBluetoothInterceptorForTesting::SimulateCentral(CentralState state, SimulateCentralCallback callback) { … }
void FakeBluetoothInterceptorForTesting::AllResponsesConsumed(AllResponsesConsumedCallback callback) { … }
FakeBluetoothAsyncWaiter::FakeBluetoothAsyncWaiter(
FakeBluetooth* proxy) : … { … }
FakeBluetoothAsyncWaiter::~FakeBluetoothAsyncWaiter() = default;
void FakeBluetoothAsyncWaiter::SetLESupported(
bool available) { … }
void FakeBluetoothAsyncWaiter::SimulateCentral(
CentralState state, ::mojo::PendingRemote<FakeCentral>* out_fake_central) { … }
::mojo::PendingRemote<FakeCentral> FakeBluetoothAsyncWaiter::SimulateCentral(
CentralState state) { … }
void FakeBluetoothAsyncWaiter::AllResponsesConsumed(
bool* out_consumed) { … }
bool FakeBluetoothAsyncWaiter::AllResponsesConsumed(
) { … }
void FakeCentralInterceptorForTesting::SimulatePreconnectedPeripheral(const std::string& address, const std::string& name, const base::flat_map<uint16_t, std::vector<uint8_t>>& manufacturer_data, const std::vector<::device::BluetoothUUID>& known_service_uuids, SimulatePreconnectedPeripheralCallback callback) { … }
void FakeCentralInterceptorForTesting::SimulateAdvertisementReceived(ScanResultPtr result, SimulateAdvertisementReceivedCallback callback) { … }
void FakeCentralInterceptorForTesting::SetState(CentralState state, SetStateCallback callback) { … }
void FakeCentralInterceptorForTesting::SetNextGATTConnectionResponse(const std::string& address, uint16_t code, SetNextGATTConnectionResponseCallback callback) { … }
void FakeCentralInterceptorForTesting::SetNextGATTDiscoveryResponse(const std::string& address, uint16_t code, SetNextGATTDiscoveryResponseCallback callback) { … }
void FakeCentralInterceptorForTesting::SimulateGATTDisconnection(const std::string& address, SimulateGATTDisconnectionCallback callback) { … }
void FakeCentralInterceptorForTesting::SimulateGATTServicesChanged(const std::string& address, SimulateGATTServicesChangedCallback callback) { … }
void FakeCentralInterceptorForTesting::AddFakeService(const std::string& peripheral_address, const ::device::BluetoothUUID& service_uuid, AddFakeServiceCallback callback) { … }
void FakeCentralInterceptorForTesting::RemoveFakeService(const std::string& service_id, const std::string& peripheral_address, RemoveFakeServiceCallback callback) { … }
void FakeCentralInterceptorForTesting::AddFakeCharacteristic(const ::device::BluetoothUUID& characteristic_uuid, CharacteristicPropertiesPtr properties, const std::string& service_id, const std::string& peripheral_address, AddFakeCharacteristicCallback callback) { … }
void FakeCentralInterceptorForTesting::RemoveFakeCharacteristic(const std::string& identifier, const std::string& service_id, const std::string& peripheral_address, RemoveFakeCharacteristicCallback callback) { … }
void FakeCentralInterceptorForTesting::AddFakeDescriptor(const ::device::BluetoothUUID& descriptor_uuid, const std::string& characteristic_id, const std::string& service_id, const std::string& peripheral_address, AddFakeDescriptorCallback callback) { … }
void FakeCentralInterceptorForTesting::RemoveFakeDescriptor(const std::string& descriptor_id, const std::string& characteristic_id, const std::string& service_id, const std::string& peripheral_address, RemoveFakeDescriptorCallback callback) { … }
void FakeCentralInterceptorForTesting::SetNextReadCharacteristicResponse(uint16_t gatt_code, const std::optional<std::vector<uint8_t>>& value, const std::string& characteristic_id, const std::string& service_id, const std::string& peripheral_address, SetNextReadCharacteristicResponseCallback callback) { … }
void FakeCentralInterceptorForTesting::SetNextWriteCharacteristicResponse(uint16_t gatt_code, const std::string& characteristic_id, const std::string& service_id, const std::string& peripheral_address, SetNextWriteCharacteristicResponseCallback callback) { … }
void FakeCentralInterceptorForTesting::SetNextSubscribeToNotificationsResponse(uint16_t gatt_code, const std::string& characteristic_id, const std::string& service_id, const std::string& peripheral_address, SetNextSubscribeToNotificationsResponseCallback callback) { … }
void FakeCentralInterceptorForTesting::SetNextUnsubscribeFromNotificationsResponse(uint16_t gatt_code, const std::string& characteristic_id, const std::string& service_id, const std::string& peripheral_address, SetNextUnsubscribeFromNotificationsResponseCallback callback) { … }
void FakeCentralInterceptorForTesting::IsNotifying(const std::string& characteristic_id, const std::string& service_id, const std::string& peripheral_address, IsNotifyingCallback callback) { … }
void FakeCentralInterceptorForTesting::GetLastWrittenCharacteristicValue(const std::string& characteristic_id, const std::string& service_id, const std::string& peripheral_address, GetLastWrittenCharacteristicValueCallback callback) { … }
void FakeCentralInterceptorForTesting::SetNextReadDescriptorResponse(uint16_t gatt_code, const std::optional<std::vector<uint8_t>>& value, const std::string& descriptor_id, const std::string& characteristic_id, const std::string& service_id, const std::string& peripheral_address, SetNextReadDescriptorResponseCallback callback) { … }
void FakeCentralInterceptorForTesting::SetNextWriteDescriptorResponse(uint16_t gatt_code, const std::string& descriptor_id, const std::string& characteristic_id, const std::string& service_id, const std::string& peripheral_address, SetNextWriteDescriptorResponseCallback callback) { … }
void FakeCentralInterceptorForTesting::GetLastWrittenDescriptorValue(const std::string& descriptor_id, const std::string& characteristic_id, const std::string& service_id, const std::string& peripheral_address, GetLastWrittenDescriptorValueCallback callback) { … }
FakeCentralAsyncWaiter::FakeCentralAsyncWaiter(
FakeCentral* proxy) : … { … }
FakeCentralAsyncWaiter::~FakeCentralAsyncWaiter() = default;
void FakeCentralAsyncWaiter::SimulatePreconnectedPeripheral(
const std::string& address, const std::string& name, const base::flat_map<uint16_t, std::vector<uint8_t>>& manufacturer_data, const std::vector<::device::BluetoothUUID>& known_service_uuids) { … }
void FakeCentralAsyncWaiter::SimulateAdvertisementReceived(
ScanResultPtr result) { … }
void FakeCentralAsyncWaiter::SetState(
CentralState state) { … }
void FakeCentralAsyncWaiter::SetNextGATTConnectionResponse(
const std::string& address, uint16_t code, bool* out_success) { … }
bool FakeCentralAsyncWaiter::SetNextGATTConnectionResponse(
const std::string& address, uint16_t code) { … }
void FakeCentralAsyncWaiter::SetNextGATTDiscoveryResponse(
const std::string& address, uint16_t code, bool* out_success) { … }
bool FakeCentralAsyncWaiter::SetNextGATTDiscoveryResponse(
const std::string& address, uint16_t code) { … }
void FakeCentralAsyncWaiter::SimulateGATTDisconnection(
const std::string& address, bool* out_success) { … }
bool FakeCentralAsyncWaiter::SimulateGATTDisconnection(
const std::string& address) { … }
void FakeCentralAsyncWaiter::SimulateGATTServicesChanged(
const std::string& address, bool* out_success) { … }
bool FakeCentralAsyncWaiter::SimulateGATTServicesChanged(
const std::string& address) { … }
void FakeCentralAsyncWaiter::AddFakeService(
const std::string& peripheral_address, const ::device::BluetoothUUID& service_uuid, std::optional<std::string>* out_service_id) { … }
std::optional<std::string> FakeCentralAsyncWaiter::AddFakeService(
const std::string& peripheral_address, const ::device::BluetoothUUID& service_uuid) { … }
void FakeCentralAsyncWaiter::RemoveFakeService(
const std::string& service_id, const std::string& peripheral_address, bool* out_success) { … }
bool FakeCentralAsyncWaiter::RemoveFakeService(
const std::string& service_id, const std::string& peripheral_address) { … }
void FakeCentralAsyncWaiter::AddFakeCharacteristic(
const ::device::BluetoothUUID& characteristic_uuid, CharacteristicPropertiesPtr properties, const std::string& service_id, const std::string& peripheral_address, std::optional<std::string>* out_characteristic_id) { … }
std::optional<std::string> FakeCentralAsyncWaiter::AddFakeCharacteristic(
const ::device::BluetoothUUID& characteristic_uuid, CharacteristicPropertiesPtr properties, const std::string& service_id, const std::string& peripheral_address) { … }
void FakeCentralAsyncWaiter::RemoveFakeCharacteristic(
const std::string& identifier, const std::string& service_id, const std::string& peripheral_address, bool* out_success) { … }
bool FakeCentralAsyncWaiter::RemoveFakeCharacteristic(
const std::string& identifier, const std::string& service_id, const std::string& peripheral_address) { … }
void FakeCentralAsyncWaiter::AddFakeDescriptor(
const ::device::BluetoothUUID& descriptor_uuid, const std::string& characteristic_id, const std::string& service_id, const std::string& peripheral_address, std::optional<std::string>* out_descriptor_id) { … }
std::optional<std::string> FakeCentralAsyncWaiter::AddFakeDescriptor(
const ::device::BluetoothUUID& descriptor_uuid, const std::string& characteristic_id, const std::string& service_id, const std::string& peripheral_address) { … }
void FakeCentralAsyncWaiter::RemoveFakeDescriptor(
const std::string& descriptor_id, const std::string& characteristic_id, const std::string& service_id, const std::string& peripheral_address, bool* out_success) { … }
bool FakeCentralAsyncWaiter::RemoveFakeDescriptor(
const std::string& descriptor_id, const std::string& characteristic_id, const std::string& service_id, const std::string& peripheral_address) { … }
void FakeCentralAsyncWaiter::SetNextReadCharacteristicResponse(
uint16_t gatt_code, const std::optional<std::vector<uint8_t>>& value, const std::string& characteristic_id, const std::string& service_id, const std::string& peripheral_address, bool* out_success) { … }
bool FakeCentralAsyncWaiter::SetNextReadCharacteristicResponse(
uint16_t gatt_code, const std::optional<std::vector<uint8_t>>& value, const std::string& characteristic_id, const std::string& service_id, const std::string& peripheral_address) { … }
void FakeCentralAsyncWaiter::SetNextWriteCharacteristicResponse(
uint16_t gatt_code, const std::string& characteristic_id, const std::string& service_id, const std::string& peripheral_address, bool* out_success) { … }
bool FakeCentralAsyncWaiter::SetNextWriteCharacteristicResponse(
uint16_t gatt_code, const std::string& characteristic_id, const std::string& service_id, const std::string& peripheral_address) { … }
void FakeCentralAsyncWaiter::SetNextSubscribeToNotificationsResponse(
uint16_t gatt_code, const std::string& characteristic_id, const std::string& service_id, const std::string& peripheral_address, bool* out_success) { … }
bool FakeCentralAsyncWaiter::SetNextSubscribeToNotificationsResponse(
uint16_t gatt_code, const std::string& characteristic_id, const std::string& service_id, const std::string& peripheral_address) { … }
void FakeCentralAsyncWaiter::SetNextUnsubscribeFromNotificationsResponse(
uint16_t gatt_code, const std::string& characteristic_id, const std::string& service_id, const std::string& peripheral_address, bool* out_success) { … }
bool FakeCentralAsyncWaiter::SetNextUnsubscribeFromNotificationsResponse(
uint16_t gatt_code, const std::string& characteristic_id, const std::string& service_id, const std::string& peripheral_address) { … }
void FakeCentralAsyncWaiter::IsNotifying(
const std::string& characteristic_id, const std::string& service_id, const std::string& peripheral_address, bool* out_success, bool* out_is_notifying) { … }
void FakeCentralAsyncWaiter::GetLastWrittenCharacteristicValue(
const std::string& characteristic_id, const std::string& service_id, const std::string& peripheral_address, bool* out_success, std::optional<std::vector<uint8_t>>* out_value, WriteType* out_write_type) { … }
void FakeCentralAsyncWaiter::SetNextReadDescriptorResponse(
uint16_t gatt_code, const std::optional<std::vector<uint8_t>>& value, const std::string& descriptor_id, const std::string& characteristic_id, const std::string& service_id, const std::string& peripheral_address, bool* out_success) { … }
bool FakeCentralAsyncWaiter::SetNextReadDescriptorResponse(
uint16_t gatt_code, const std::optional<std::vector<uint8_t>>& value, const std::string& descriptor_id, const std::string& characteristic_id, const std::string& service_id, const std::string& peripheral_address) { … }
void FakeCentralAsyncWaiter::SetNextWriteDescriptorResponse(
uint16_t gatt_code, const std::string& descriptor_id, const std::string& characteristic_id, const std::string& service_id, const std::string& peripheral_address, bool* out_success) { … }
bool FakeCentralAsyncWaiter::SetNextWriteDescriptorResponse(
uint16_t gatt_code, const std::string& descriptor_id, const std::string& characteristic_id, const std::string& service_id, const std::string& peripheral_address) { … }
void FakeCentralAsyncWaiter::GetLastWrittenDescriptorValue(
const std::string& descriptor_id, const std::string& characteristic_id, const std::string& service_id, const std::string& peripheral_address, bool* out_success, std::optional<std::vector<uint8_t>>* out_value) { … }
}
#if defined(__clang__)
#pragma clang diagnostic pop
#endif