TestsController

interface TestsController

Defining access to a user's tests results.

Important: This interface is not stable for inheritance, as new methods may be added, but is stable for use.

Since

5.0.0

Properties

Link copied to clipboard

The MimiConnectedHeadphoneProvider function which notifies the MSDK which headphones model is currently connected.

Link copied to clipboard

A MimiObservable exposing the latest MimiTestResults for the current user.

Functions

Link copied to clipboard
abstract suspend fun deleteTestResult(id: String)

Deletes the hearing test result from the backend, updates the latestTestResults

Link copied to clipboard
abstract suspend fun loadHeadphones(connectionType: Headphone.ConnectionType = Headphone.ConnectionType.ALL): List<Headphone>

Loads the available calibrated headphones list

Link copied to clipboard
abstract suspend fun loadLatestTestResults(): MimiTestResults

Reloads the latest MimiTestResults (MT and PTT hearing testings) for the current user from the backend, updates the latestTestResults state and returns the MimiTestResults to the caller.

Link copied to clipboard
abstract suspend fun loadTestResults(testType: TestParadigm, page: Int, limit: Int): MimiPagedItems<MimiTestResult>

Returns paged TestResults for a given testing paradigm. No side-effects.

Link copied to clipboard
abstract suspend fun loadTestTypeConfiguration(headphoneIdentifier: MimiHeadphoneIdentifier?, allowedTestTypesFilter: (MimiTestType) -> Boolean): MimiTestTypeConfiguration

Returns the supported and selected MimiTestTypes for the provided headphone model returned from the MimiConnectedHeadphoneProvider defined by connectedHeadphoneProvider.

Link copied to clipboard
abstract suspend fun submitTest(hearingTest: HearingTest)

Submits the HearingTest to the backend, updates the latestTestResults and does not return anything.

Link copied to clipboard

Submits the HearingTest to the backend, updates the latestTestResults and returns the MimiSubmitHearingTestResponse to caller