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

169 lines
8.2 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-03-10 18:58:27 +01:00
import info.nightscout.androidaps.data.Profile
2020-02-05 17:40:13 +01:00
import info.nightscout.androidaps.data.ProfileStore
2020-03-06 23:43:29 +01:00
import info.nightscout.androidaps.data.PumpEnactResult
2020-01-01 23:23:16 +01:00
import info.nightscout.androidaps.db.BgReading
2020-03-19 18:02:24 +01:00
import info.nightscout.androidaps.db.ProfileSwitch
2020-03-08 22:42:36 +01:00
import info.nightscout.androidaps.plugins.aps.loop.APSResult
import info.nightscout.androidaps.plugins.aps.openAPSAMA.DetermineBasalResultAMA
import info.nightscout.androidaps.plugins.aps.openAPSMA.DetermineBasalResultMA
2019-12-28 02:49:00 +01:00
import info.nightscout.androidaps.plugins.aps.openAPSMA.LoggerCallback
2020-03-08 22:42:36 +01:00
import info.nightscout.androidaps.plugins.aps.openAPSSMB.DetermineBasalAdapterSMBJS
import info.nightscout.androidaps.plugins.aps.openAPSSMB.DetermineBasalResultSMB
2019-12-30 00:53:44 +01:00
import info.nightscout.androidaps.plugins.constraints.objectives.objectives.*
2020-01-05 12:02:32 +01:00
import info.nightscout.androidaps.plugins.general.automation.AutomationEvent
2020-01-02 19:20:36 +01:00
import info.nightscout.androidaps.plugins.general.automation.actions.*
2020-01-05 12:02:32 +01:00
import info.nightscout.androidaps.plugins.general.automation.elements.*
import info.nightscout.androidaps.plugins.general.automation.triggers.*
2020-01-01 23:23:16 +01:00
import info.nightscout.androidaps.plugins.general.overview.notifications.NotificationWithAction
2020-03-09 23:49:00 +01:00
import info.nightscout.androidaps.plugins.general.smsCommunicator.AuthRequest
2020-01-10 23:14:58 +01:00
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.AutosensData
2020-03-10 18:58:27 +01:00
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.GlucoseStatus
2020-01-10 23:14:58 +01:00
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.IobCobOref1Thread
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.IobCobThread
2020-01-01 23:23:16 +01:00
import info.nightscout.androidaps.plugins.treatments.Treatment
2020-01-10 23:14:58 +01:00
import info.nightscout.androidaps.queue.CommandQueue
import info.nightscout.androidaps.queue.commands.*
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> {
2020-02-05 17:40:13 +01:00
fun injectProfileStore(profileStore: ProfileStore)
2020-03-06 23:43:29 +01:00
fun injectPumpEnactResult(pumpEnactResult: PumpEnactResult)
2020-03-08 22:42:36 +01:00
fun injectAPSResult(apsResult: APSResult)
fun injectDetermineBasalResultSMB(determineBasalResultSMB: DetermineBasalResultSMB)
fun injectDetermineBasalResultMA(determineBasalResultMA: DetermineBasalResultMA)
fun injectDetermineBasalResultAMA(determineBasalResultAMA: DetermineBasalResultAMA)
fun injectDetermineBasalAdapterSMBJS(determineBasalAdapterSMBJS: DetermineBasalAdapterSMBJS)
2020-02-05 17:40:13 +01:00
2020-01-10 23:14:58 +01:00
fun injectCommandQueue(commandQueue: CommandQueue)
fun injectCommandBolus(commandBolus: CommandBolus)
fun injectCommandCancelExtendedBolus(commandCancelExtendedBolus: CommandCancelExtendedBolus)
fun injectCommandCancelTempBasal(commandCancelTempBasal: CommandCancelTempBasal)
fun injectCommandExtendedBolus(commandExtendedBolus: CommandExtendedBolus)
fun injectCommandInsightSetTBROverNotification(commandInsightSetTBROverNotification: CommandInsightSetTBROverNotification)
fun injectCommandLoadEvents(commandLoadEvents: CommandLoadEvents)
fun injectCommandLoadHistory(commandLoadHistory: CommandLoadHistory)
2020-01-12 23:43:44 +01:00
fun injectCommandLoadTDDs(commandLoadTDDs: CommandLoadTDDs)
2020-01-10 23:14:58 +01:00
fun injectCommandReadStatus(commandReadStatus: CommandReadStatus)
fun injectCommandSetProfile(commandSetProfile: CommandSetProfile)
2020-01-10 23:14:58 +01:00
fun injectCommandCommandSMBBolus(commandSMBBolus: CommandSMBBolus)
fun injectCommandStartPump(commandStartPump: CommandStartPump)
fun injectCommandStopPump(commandStopPump: CommandStopPump)
fun injectCommandTempBasalAbsolute(commandTempBasalAbsolute: CommandTempBasalAbsolute)
fun injectCommandTempBasalPercent(commandTempBasalPercent: CommandTempBasalPercent)
2020-01-12 23:43:44 +01:00
fun injectCommandSetUserSettings(commandSetUserSettings: CommandSetUserSettings)
2020-03-14 16:47:48 +01:00
fun injectObjective(objective: Objective)
2019-12-30 00:53:44 +01:00
fun injectObjective0(objective0: Objective0)
fun injectObjective1(objective1: Objective1)
fun injectObjective2(objective2: Objective2)
fun injectObjective3(objective3: Objective3)
2020-03-14 16:47:48 +01:00
fun injectObjective3(objective4: Objective4)
2019-12-28 01:14:04 +01:00
fun injectObjective5(objective5: Objective5)
2019-12-30 00:53:44 +01:00
fun injectObjective6(objective6: Objective6)
2020-03-14 16:47:48 +01:00
fun injectObjective6(objective7: Objective7)
fun injectObjective6(objective8: Objective8)
fun injectObjective6(objective9: Objective9)
2019-12-28 01:14:04 +01:00
2020-01-05 12:02:32 +01:00
fun injectAutomationEvent(automationEvent: AutomationEvent)
fun injectTrigger(trigger: Trigger)
fun injectTrigger(triggerAutosensValue: TriggerAutosensValue)
fun injectTrigger(triggerBg: TriggerBg)
fun injectTrigger(triggerBolusAgo: TriggerBolusAgo)
fun injectTrigger(triggerCOB: TriggerCOB)
fun injectTrigger(triggerConnector: TriggerConnector)
fun injectTrigger(triggerDelta: TriggerDelta)
fun injectTrigger(triggerDummy: TriggerDummy)
fun injectTrigger(triggerIob: TriggerIob)
fun injectTrigger(triggerLocation: TriggerLocation)
fun injectTrigger(triggerProfilePercent: TriggerProfilePercent)
fun injectTrigger(triggerPumpLastConnection: TriggerPumpLastConnection)
fun injectTrigger(triggerRecurringTime: TriggerRecurringTime)
fun injectTrigger(triggerTempTarget: TriggerTempTarget)
fun injectTrigger(triggerTime: TriggerTime)
2020-01-10 23:14:58 +01:00
fun injectTrigger(triggerTimeRange: TriggerTimeRange)
2020-01-05 12:02:32 +01:00
fun injectTrigger(triggerWifiSsid: TriggerWifiSsid)
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-05 12:02:32 +01:00
fun injectElement(element: Element)
fun injectElement(inputBg: InputBg)
fun injectElement(inputButton: InputButton)
2020-01-05 17:19:03 +01:00
fun injectElement(comparator: Comparator)
fun injectElement(comparatorExists: ComparatorExists)
fun injectElement(inputDateTime: InputDateTime)
2020-01-05 12:02:32 +01:00
fun injectElement(inputDelta: InputDelta)
fun injectElement(inputDouble: InputDouble)
fun injectElement(inputDuration: InputDuration)
fun injectElement(inputInsulin: InputInsulin)
fun injectElement(inputLocationMode: InputLocationMode)
fun injectElement(inputPercent: InputPercent)
fun injectElement(inputProfileName: InputProfileName)
fun injectElement(inputString: InputString)
fun injectElement(inputTempTarget: InputTempTarget)
2020-01-05 17:19:03 +01:00
fun injectElement(inputTimeRange: InputTimeRange)
2020-01-05 19:23:20 +01:00
fun injectElement(inputTime: InputTime)
fun injectElement(inputWeekDay: InputWeekDay)
2020-01-05 12:02:32 +01:00
fun injectElement(labelWithElement: LabelWithElement)
fun injectElement(staticLabel: StaticLabel)
2020-01-10 23:14:58 +01:00
fun injectAutosensDate(autosensData: AutosensData)
fun injectIobCobThread(iobCobThread: IobCobThread)
fun injectIobCobOref1Thread(iobCobOref1Thread: IobCobOref1Thread)
2020-01-01 23:23:16 +01:00
fun injectTreatment(treatment: Treatment)
fun injectBgReading(bgReading: BgReading)
2020-03-19 18:02:24 +01:00
fun injectProfileSwitch(profileSwitch: ProfileSwitch)
2020-01-01 23:23:16 +01:00
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
2020-03-09 23:49:00 +01:00
fun injectAuthRequest(authRequest: AuthRequest)
2020-03-10 18:58:27 +01:00
fun injectProfile(profile: Profile)
fun injectGlucoseStatus(glucoseStatus: GlucoseStatus)
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
}