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-02-08 20:24:20 +01:00
|
|
|
import org.moire.ultrasonic.util.NowPlayingEventDistributor
|
2021-02-05 21:45:50 +01:00
|
|
|
import org.moire.ultrasonic.util.PermissionUtil
|
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 {
|
|
|
|
single { ActiveServerProvider(get(), androidContext()) }
|
|
|
|
single { ImageLoaderProvider(androidContext()) }
|
|
|
|
single { PermissionUtil(androidContext()) }
|
2021-02-08 20:24:20 +01:00
|
|
|
single { NowPlayingEventDistributor() }
|
2021-02-10 19:57:09 +01:00
|
|
|
single { ThemeChangedEventDistributor() }
|
2021-02-05 21:45:50 +01:00
|
|
|
}
|