class AudioDeviceRegistryServerTestBase

Defined at line 44 of file ../../src/media/audio/services/device_registry/adr_server_unittest_base.h

This provides shared unittest functions for AudioDeviceRegistry and the six FIDL server classes.

Protected Members

static basic_string kClassName

Public Methods

void SetUp ()

Defined at line 46 of file ../../src/media/audio/services/device_registry/adr_server_unittest_base.h

Protected Methods

std::shared_ptr<FakeCodec> CreateFakeCodecInput ()

Create a FakeCodec that can mock a real device that has been detected, using default settings.

From here, the fake Codec can be customized before it is enabled.

Defined at line 56 of file ../../src/media/audio/services/device_registry/adr_server_unittest_base.h

std::shared_ptr<FakeCodec> CreateFakeCodecOutput ()

Defined at line 57 of file ../../src/media/audio/services/device_registry/adr_server_unittest_base.h

std::shared_ptr<FakeCodec> CreateFakeCodecNoDirection ()

Defined at line 58 of file ../../src/media/audio/services/device_registry/adr_server_unittest_base.h

std::shared_ptr<FakeComposite> CreateFakeComposite ()

Create a FakeComposite that can mock a real device that has been detected, using default

settings. From here, the fake Composite can be customized before it is enabled.

Defined at line 62 of file ../../src/media/audio/services/device_registry/adr_server_unittest_base.h

void AddDeviceForDetection (std::string_view name, fuchsia_audio_device::DeviceType device_type, fuchsia_audio_device::DriverClient driver_client)

Device

Create a Device object (backed by a fake driver); insert it to ADR as if it had been detected.

Through the driver_client connection, this will communicate with the fake driver.

Defined at line 73 of file ../../src/media/audio/services/device_registry/adr_server_unittest_base.h

const std::unordered_map<TopologyId, std::vector<fuchsia_hardware_audio_signalprocessing::EdgePair>> & topology_map (const std::shared_ptr<Device> & device)

Defined at line 80 of file ../../src/media/audio/services/device_registry/adr_server_unittest_base.h

const std::unordered_map<ElementId, ElementRecord> & element_map (const std::shared_ptr<Device> & device)

Defined at line 85 of file ../../src/media/audio/services/device_registry/adr_server_unittest_base.h

std::unique_ptr<TestServerAndNaturalAsyncClient<ProviderServer>> CreateTestProviderServer ()

Provider support

Defined at line 102 of file ../../src/media/audio/services/device_registry/adr_server_unittest_base.h

std::optional<zx_status_t> & provider_fidl_error_status ()

Defined at line 125 of file ../../src/media/audio/services/device_registry/adr_server_unittest_base.h

std::unique_ptr<TestServerAndNaturalAsyncClient<RegistryServer>> CreateTestRegistryServerNoDeviceDiscovery ()

Registry support

Defined at line 128 of file ../../src/media/audio/services/device_registry/adr_server_unittest_base.h

std::unique_ptr<TestServerAndNaturalAsyncClient<RegistryServer>> CreateTestRegistryServer ()

Defined at line 138 of file ../../src/media/audio/services/device_registry/adr_server_unittest_base.h

std::optional<zx_status_t> & registry_fidl_error_status ()

Defined at line 157 of file ../../src/media/audio/services/device_registry/adr_server_unittest_base.h

std::unique_ptr<TestServerAndNaturalAsyncClient<ControlCreatorServer>> CreateTestControlCreatorServer ()

ControlCreator support

Defined at line 160 of file ../../src/media/audio/services/device_registry/adr_server_unittest_base.h

std::optional<zx_status_t> & control_creator_fidl_error_status ()

Defined at line 187 of file ../../src/media/audio/services/device_registry/adr_server_unittest_base.h

std::unique_ptr<TestServerAndNaturalAsyncClient<ObserverServer>> CreateTestObserverServer (const std::shared_ptr<Device> & observed_device)

Observer support

Defined at line 192 of file ../../src/media/audio/services/device_registry/adr_server_unittest_base.h

const std::unique_ptr<ObserverFidlHandler> & observer_fidl_handler ()

Defined at line 216 of file ../../src/media/audio/services/device_registry/adr_server_unittest_base.h

std::optional<zx_status_t> & observer_fidl_error_status ()

Defined at line 219 of file ../../src/media/audio/services/device_registry/adr_server_unittest_base.h

std::unique_ptr<TestServerAndNaturalAsyncClient<ControlServer>> CreateTestControlServer (const std::shared_ptr<Device> & device_to_control)

Control support

Defined at line 222 of file ../../src/media/audio/services/device_registry/adr_server_unittest_base.h

const std::unique_ptr<ControlFidlHandler> & control_fidl_handler ()

Defined at line 246 of file ../../src/media/audio/services/device_registry/adr_server_unittest_base.h

std::optional<zx_status_t> & control_fidl_error_status ()

Defined at line 249 of file ../../src/media/audio/services/device_registry/adr_server_unittest_base.h

const std::unique_ptr<RingBufferFidlHandler> & ring_buffer_fidl_handler ()

Defined at line 268 of file ../../src/media/audio/services/device_registry/adr_server_unittest_base.h

std::shared_ptr<media_audio::AudioDeviceRegistry> adr_service ()

General members

Defined at line 273 of file ../../src/media/audio/services/device_registry/adr_server_unittest_base.h

Records