2021-02-05 21:45:50 +01:00
|
|
|
package org.moire.ultrasonic.di
|
|
|
|
|
|
|
|
import org.koin.android.ext.koin.androidContext
|
|
|
|
import org.koin.dsl.module
|
|
|
|
import org.moire.ultrasonic.data.ActiveServerProvider
|
|
|
|
import org.moire.ultrasonic.subsonic.ImageLoaderProvider
|
2021-07-12 16:13:34 +02:00
|
|
|
import org.moire.ultrasonic.util.MediaSessionEventDistributor
|
2021-07-13 19:25:37 +02:00
|
|
|
import org.moire.ultrasonic.util.MediaSessionHandler
|
2021-02-08 20:24:20 +01:00
|
|
|
import org.moire.ultrasonic.util.NowPlayingEventDistributor
|
2021-02-10 19:57:09 +01:00
|
|
|
import org.moire.ultrasonic.util.ThemeChangedEventDistributor
|
2021-02-05 21:45:50 +01:00
|
|
|
|
2021-03-01 17:24:25 +01:00
|
|
|
/**
|
|
|
|
* This Koin module contains the registration of general classes needed for Ultrasonic
|
|
|
|
*/
|
2021-02-05 21:45:50 +01:00
|
|
|
val applicationModule = module {
|
2021-05-09 10:25:04 +02:00
|
|
|
single { ActiveServerProvider(get()) }
|
2021-02-05 21:45:50 +01:00
|
|
|
single { ImageLoaderProvider(androidContext()) }
|
2021-02-08 20:24:20 +01:00
|
|
|
single { NowPlayingEventDistributor() }
|
2021-02-10 19:57:09 +01:00
|
|
|
single { ThemeChangedEventDistributor() }
|
2021-07-12 16:13:34 +02:00
|
|
|
single { MediaSessionEventDistributor() }
|
2021-07-13 19:25:37 +02:00
|
|
|
single { MediaSessionHandler() }
|
2021-02-05 21:45:50 +01:00
|
|
|
}
|