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 current connected headphone.

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 headphone model defined by connectedMimiHeadphone.

Link copied to clipboard
abstract fun notifyMimiHeadphoneConnected(headphoneIdentifier: MimiHeadphoneIdentifier, applicatorConfiguration: HeadphoneApplicatorConfiguration? = null)

Notifies the MSDK that the specified headphone has been connected.

Link copied to clipboard

Notifies the MSDK that the connected headphone has been disconnected.

Link copied to clipboard

Submit a new Hearing Test Audiogram to the Mimi backend.

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

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