AndroidAPS/app/src/main/java/info/nightscout/androidaps/dependencyInjection/AppComponent.kt

71 lines
2.7 KiB
Kotlin
Raw Normal View History

2019-12-13 02:12:19 +01:00
package info.nightscout.androidaps.dependencyInjection
2019-12-21 20:17:08 +01:00
import dagger.BindsInstance
2019-12-13 02:12:19 +01:00
import dagger.Component
import dagger.android.AndroidInjectionModule
2019-12-21 20:17:08 +01:00
import dagger.android.AndroidInjector
2019-12-13 02:12:19 +01:00
import info.nightscout.androidaps.MainApp
2020-01-01 23:23:16 +01:00
import info.nightscout.androidaps.db.BgReading
2019-12-28 02:49:00 +01:00
import info.nightscout.androidaps.plugins.aps.openAPSMA.LoggerCallback
2019-12-30 00:53:44 +01:00
import info.nightscout.androidaps.plugins.constraints.objectives.objectives.*
2020-01-02 19:20:36 +01:00
import info.nightscout.androidaps.plugins.general.automation.actions.*
2020-01-01 23:23:16 +01:00
import info.nightscout.androidaps.plugins.general.overview.notifications.NotificationWithAction
import info.nightscout.androidaps.plugins.treatments.Treatment
import info.nightscout.androidaps.queue.commands.CommandSetProfile
2019-12-31 11:57:58 +01:00
import info.nightscout.androidaps.utils.wizard.BolusWizard
import info.nightscout.androidaps.utils.wizard.QuickWizardEntry
2019-12-21 20:17:08 +01:00
import javax.inject.Singleton
2019-12-13 02:12:19 +01:00
2019-12-21 20:17:08 +01:00
@Singleton
2019-12-13 02:12:19 +01:00
@Component(
2019-12-21 20:17:08 +01:00
modules = [
AndroidInjectionModule::class,
ActivitiesModule::class,
2019-12-23 13:27:15 +01:00
FragmentsModule::class,
2019-12-30 00:53:44 +01:00
AppModule::class,
ReceiversModule::class,
ServicesModule::class
2019-12-21 20:17:08 +01:00
]
2019-12-13 02:12:19 +01:00
)
2019-12-21 20:17:08 +01:00
interface AppComponent : AndroidInjector<MainApp> {
fun injectCommandSetProfile(commandSetProfile: CommandSetProfile)
2019-12-30 00:53:44 +01:00
fun injectObjective0(objective0: Objective0)
fun injectObjective1(objective1: Objective1)
fun injectObjective2(objective2: Objective2)
fun injectObjective3(objective3: Objective3)
2019-12-28 01:14:04 +01:00
fun injectObjective5(objective5: Objective5)
2019-12-30 00:53:44 +01:00
fun injectObjective6(objective6: Objective6)
2019-12-28 01:14:04 +01:00
2020-01-02 19:20:36 +01:00
fun injectAction(action: Action)
fun injectActionDummy(action: ActionDummy)
fun injectActionLoopDisable(action: ActionLoopDisable)
fun injectActionLoopEnable(action: ActionLoopEnable)
fun injectActionLoopResume(action: ActionLoopResume)
fun injectAction(action: ActionLoopSuspend)
fun injectActionLoopSuspend(action: ActionNotification)
fun injectActionProfileSwitch(action: ActionProfileSwitch)
fun injectAction(action: ActionProfileSwitchPercent)
fun injectActionProfileSwitchPercent(action: ActionSendSMS)
fun injectActionStartTempTarget(action: ActionStartTempTarget)
fun injectActionStopTempTarget(action: ActionStopTempTarget)
2020-01-01 23:23:16 +01:00
fun injectTreatment(treatment: Treatment)
fun injectBgReading(bgReading: BgReading)
fun injectNotification(notificationWithAction: NotificationWithAction)
2019-12-28 02:49:00 +01:00
fun injectLoggerCallback(loggerCallback: LoggerCallback)
2019-12-31 11:57:58 +01:00
fun injectBolusWizard(bolusWizard: BolusWizard)
fun injectQuickWizardEntry(quickWizardEntry: QuickWizardEntry)
2019-12-28 02:49:00 +01:00
2019-12-21 20:17:08 +01:00
@Component.Builder
interface Builder {
@BindsInstance
2019-12-26 17:50:16 +01:00
fun application(mainApp: MainApp): Builder
2019-12-13 02:12:19 +01:00
2019-12-21 20:17:08 +01:00
fun build(): AppComponent
}
2019-12-13 02:12:19 +01:00
}