AndroidAPS/app/src/main/java/info/nightscout/androidaps/dependencyInjection/AppComponent.kt
2019-12-28 02:49:00 +01:00

44 lines
1.3 KiB
Kotlin

package info.nightscout.androidaps.dependencyInjection
import dagger.BindsInstance
import dagger.Component
import dagger.android.AndroidInjectionModule
import dagger.android.AndroidInjector
import info.nightscout.androidaps.MainApp
import info.nightscout.androidaps.plugins.aps.openAPSMA.LoggerCallback
import info.nightscout.androidaps.plugins.constraints.objectives.objectives.Objective5
import info.nightscout.androidaps.plugins.general.automation.actions.ActionSendSMS
import info.nightscout.androidaps.queue.commands.CommandSetProfile
import info.nightscout.androidaps.services.DataService
import javax.inject.Singleton
@Singleton
@Component(
modules = [
AndroidInjectionModule::class,
ActivitiesModule::class,
FragmentsModule::class,
AppModule::class
]
)
interface AppComponent : AndroidInjector<MainApp> {
fun injectDataService(service: DataService)
fun injectCommandSetProfile(commandSetProfile: CommandSetProfile)
fun injectActionSendSMS(actionSendSMS: ActionSendSMS)
fun injectObjective5(objective5: Objective5)
fun injectLoggerCallback(loggerCallback: LoggerCallback)
@Component.Builder
interface Builder {
@BindsInstance
fun application(mainApp: MainApp): Builder
fun build(): AppComponent
}
}