2020-04-24 12:00:31 +02:00
|
|
|
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.data.Profile
|
|
|
|
import info.nightscout.androidaps.data.ProfileStore
|
|
|
|
import info.nightscout.androidaps.data.PumpEnactResult
|
|
|
|
import info.nightscout.androidaps.db.BgReading
|
2020-04-24 22:39:56 +02:00
|
|
|
import info.nightscout.androidaps.db.CareportalEvent
|
2020-04-24 12:00:31 +02:00
|
|
|
import info.nightscout.androidaps.db.ProfileSwitch
|
2020-04-24 22:39:56 +02:00
|
|
|
import info.nightscout.androidaps.db.TemporaryBasal
|
|
|
|
import info.nightscout.androidaps.plugins.aps.logger.LoggerCallback
|
2020-04-24 12:00:31 +02:00
|
|
|
import info.nightscout.androidaps.plugins.aps.loop.APSResult
|
|
|
|
import info.nightscout.androidaps.plugins.aps.openAPSAMA.DetermineBasalResultAMA
|
|
|
|
import info.nightscout.androidaps.plugins.aps.openAPSSMB.DetermineBasalAdapterSMBJS
|
|
|
|
import info.nightscout.androidaps.plugins.aps.openAPSSMB.DetermineBasalResultSMB
|
|
|
|
import info.nightscout.androidaps.plugins.constraints.objectives.objectives.*
|
|
|
|
import info.nightscout.androidaps.plugins.general.automation.AutomationEvent
|
|
|
|
import info.nightscout.androidaps.plugins.general.automation.actions.*
|
|
|
|
import info.nightscout.androidaps.plugins.general.automation.elements.*
|
|
|
|
import info.nightscout.androidaps.plugins.general.automation.triggers.*
|
|
|
|
import info.nightscout.androidaps.plugins.general.overview.graphData.GraphData
|
|
|
|
import info.nightscout.androidaps.plugins.general.overview.notifications.NotificationWithAction
|
|
|
|
import info.nightscout.androidaps.plugins.general.smsCommunicator.AuthRequest
|
|
|
|
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.AutosensData
|
|
|
|
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.GlucoseStatus
|
|
|
|
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.IobCobOref1Thread
|
|
|
|
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.IobCobThread
|
2020-04-26 23:52:29 +02:00
|
|
|
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkCommunicationManager
|
2020-04-27 20:22:00 +02:00
|
|
|
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.RFSpy
|
2020-04-27 18:14:06 +02:00
|
|
|
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.RileyLinkBLE
|
2020-04-27 20:22:00 +02:00
|
|
|
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.command.SendAndListen
|
|
|
|
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.command.SetPreamble
|
2020-04-27 22:19:50 +02:00
|
|
|
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.data.RadioPacket
|
2020-04-27 18:14:06 +02:00
|
|
|
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.data.RadioResponse
|
2020-04-26 22:47:13 +02:00
|
|
|
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.service.tasks.*
|
2020-04-26 23:52:29 +02:00
|
|
|
import info.nightscout.androidaps.plugins.pump.medtronic.comm.MedtronicCommunicationManager
|
|
|
|
import info.nightscout.androidaps.plugins.pump.medtronic.comm.ui.MedtronicUITask
|
2020-04-29 18:35:55 +02:00
|
|
|
import info.nightscout.androidaps.plugins.pump.omnipod.comm.OmnipodCommunicationManager
|
|
|
|
import info.nightscout.androidaps.plugins.pump.omnipod.driver.ui.OmnipodUITask
|
2020-04-24 12:00:31 +02:00
|
|
|
import info.nightscout.androidaps.plugins.treatments.Treatment
|
|
|
|
import info.nightscout.androidaps.queue.CommandQueue
|
|
|
|
import info.nightscout.androidaps.queue.commands.*
|
|
|
|
import info.nightscout.androidaps.setupwizard.SWEventListener
|
|
|
|
import info.nightscout.androidaps.setupwizard.SWScreen
|
|
|
|
import info.nightscout.androidaps.setupwizard.elements.*
|
|
|
|
import info.nightscout.androidaps.utils.wizard.BolusWizard
|
|
|
|
import info.nightscout.androidaps.utils.wizard.QuickWizardEntry
|
|
|
|
import javax.inject.Singleton
|
|
|
|
|
|
|
|
@Singleton
|
|
|
|
@Component(
|
|
|
|
modules = [
|
|
|
|
AndroidInjectionModule::class,
|
|
|
|
ActivitiesModule::class,
|
|
|
|
FragmentsModule::class,
|
|
|
|
AppModule::class,
|
|
|
|
ReceiversModule::class,
|
|
|
|
ServicesModule::class
|
|
|
|
]
|
|
|
|
)
|
|
|
|
interface AppComponent : AndroidInjector<MainApp> {
|
|
|
|
|
|
|
|
fun injectProfileStore(profileStore: ProfileStore)
|
|
|
|
fun injectPumpEnactResult(pumpEnactResult: PumpEnactResult)
|
|
|
|
fun injectAPSResult(apsResult: APSResult)
|
|
|
|
fun injectDetermineBasalResultSMB(determineBasalResultSMB: DetermineBasalResultSMB)
|
|
|
|
fun injectDetermineBasalResultAMA(determineBasalResultAMA: DetermineBasalResultAMA)
|
|
|
|
fun injectDetermineBasalAdapterSMBJS(determineBasalAdapterSMBJS: DetermineBasalAdapterSMBJS)
|
|
|
|
|
|
|
|
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)
|
|
|
|
fun injectCommandLoadTDDs(commandLoadTDDs: CommandLoadTDDs)
|
|
|
|
fun injectCommandReadStatus(commandReadStatus: CommandReadStatus)
|
|
|
|
fun injectCommandSetProfile(commandSetProfile: CommandSetProfile)
|
|
|
|
fun injectCommandCommandSMBBolus(commandSMBBolus: CommandSMBBolus)
|
|
|
|
fun injectCommandStartPump(commandStartPump: CommandStartPump)
|
|
|
|
fun injectCommandStopPump(commandStopPump: CommandStopPump)
|
|
|
|
fun injectCommandTempBasalAbsolute(commandTempBasalAbsolute: CommandTempBasalAbsolute)
|
|
|
|
fun injectCommandTempBasalPercent(commandTempBasalPercent: CommandTempBasalPercent)
|
|
|
|
fun injectCommandSetUserSettings(commandSetUserSettings: CommandSetUserSettings)
|
|
|
|
|
|
|
|
fun injectObjective(objective: Objective)
|
|
|
|
fun injectObjective0(objective0: Objective0)
|
|
|
|
fun injectObjective1(objective1: Objective1)
|
|
|
|
fun injectObjective2(objective2: Objective2)
|
|
|
|
fun injectObjective3(objective3: Objective3)
|
|
|
|
fun injectObjective4(objective4: Objective4)
|
|
|
|
fun injectObjective5(objective5: Objective5)
|
|
|
|
fun injectObjective6(objective6: Objective6)
|
|
|
|
fun injectObjective7(objective7: Objective7)
|
|
|
|
fun injectObjective8(objective8: Objective8)
|
|
|
|
fun injectObjective9(objective9: Objective9)
|
|
|
|
fun injectObjective10(objective10: Objective10)
|
|
|
|
|
|
|
|
fun injectAutomationEvent(automationEvent: AutomationEvent)
|
|
|
|
|
|
|
|
fun injectTrigger(trigger: Trigger)
|
|
|
|
fun injectTrigger(triggerAutosensValue: TriggerAutosensValue)
|
|
|
|
fun injectTrigger(triggerBg: TriggerBg)
|
|
|
|
fun injectTrigger(triggerBolusAgo: TriggerBolusAgo)
|
|
|
|
fun injectTrigger(triggerBTDevice: TriggerBTDevice)
|
|
|
|
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)
|
|
|
|
fun injectTrigger(triggerTimeRange: TriggerTimeRange)
|
|
|
|
fun injectTrigger(triggerWifiSsid: TriggerWifiSsid)
|
|
|
|
|
|
|
|
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)
|
|
|
|
|
|
|
|
fun injectElement(element: Element)
|
|
|
|
fun injectElement(inputBg: InputBg)
|
|
|
|
fun injectElement(inputButton: InputButton)
|
|
|
|
fun injectElement(comparator: Comparator)
|
|
|
|
fun injectElement(comparatorExists: ComparatorExists)
|
|
|
|
fun injectElement(comparatorConnect: ComparatorConnect)
|
|
|
|
fun injectElement(inputDateTime: InputDateTime)
|
|
|
|
fun injectElement(inputDelta: InputDelta)
|
|
|
|
fun injectElement(inputDropdownMenu: InputDropdownMenu)
|
|
|
|
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)
|
|
|
|
fun injectElement(inputTimeRange: InputTimeRange)
|
|
|
|
fun injectElement(inputTime: InputTime)
|
|
|
|
fun injectElement(inputWeekDay: InputWeekDay)
|
|
|
|
fun injectElement(labelWithElement: LabelWithElement)
|
|
|
|
fun injectElement(staticLabel: StaticLabel)
|
|
|
|
|
|
|
|
fun injectAutosensDate(autosensData: AutosensData)
|
|
|
|
fun injectIobCobThread(iobCobThread: IobCobThread)
|
|
|
|
fun injectIobCobOref1Thread(iobCobOref1Thread: IobCobOref1Thread)
|
|
|
|
|
|
|
|
fun injectTreatment(treatment: Treatment)
|
|
|
|
fun injectBgReading(bgReading: BgReading)
|
|
|
|
fun injectProfileSwitch(profileSwitch: ProfileSwitch)
|
2020-04-24 22:39:56 +02:00
|
|
|
fun injectTemporaryBasal(temporaryBasal: TemporaryBasal)
|
|
|
|
fun injectCareportalEvent(careportalEvent: CareportalEvent)
|
2020-04-24 12:00:31 +02:00
|
|
|
|
|
|
|
fun injectNotification(notificationWithAction: NotificationWithAction)
|
|
|
|
|
|
|
|
fun injectLoggerCallback(loggerCallback: LoggerCallback)
|
|
|
|
fun injectBolusWizard(bolusWizard: BolusWizard)
|
|
|
|
fun injectQuickWizardEntry(quickWizardEntry: QuickWizardEntry)
|
|
|
|
|
|
|
|
fun injectAuthRequest(authRequest: AuthRequest)
|
|
|
|
|
|
|
|
fun injectSWBreak(swBreak: SWBreak)
|
|
|
|
fun injectSWButton(swButton: SWButton)
|
|
|
|
fun injectSWEditNumberWithUnits(swEditNumberWithUnits: SWEditNumberWithUnits)
|
|
|
|
fun injectSWEditString(swEditString: SWEditString)
|
|
|
|
fun injectSWEditEncryptedPassword(swSWEditEncryptedPassword: SWEditEncryptedPassword)
|
|
|
|
fun injectSWEditUrl(swEditUrl: SWEditUrl)
|
|
|
|
fun injectSWFragment(swFragment: SWFragment)
|
|
|
|
fun injectSSWHtmlLink(swHtmlLink: SWHtmlLink)
|
|
|
|
fun injectSWInfotext(swInfotext: SWInfotext)
|
|
|
|
fun injectSWItem(swItem: SWItem)
|
|
|
|
fun injectSWPlugin(swPlugin: SWPlugin)
|
|
|
|
fun injectSWRadioButton(swRadioButton: SWRadioButton)
|
|
|
|
fun injectSWScreen(swScreen: SWScreen)
|
|
|
|
fun injectSWEventListener(swEventListener: SWEventListener)
|
|
|
|
|
|
|
|
fun injectProfile(profile: Profile)
|
|
|
|
fun injectGlucoseStatus(glucoseStatus: GlucoseStatus)
|
|
|
|
|
|
|
|
fun injectGraphData(graphData: GraphData)
|
|
|
|
|
2020-04-29 18:35:55 +02:00
|
|
|
// Medtronic
|
2020-04-26 23:52:29 +02:00
|
|
|
fun injectRileyLinkCommunicationManager(rileyLinkCommunicationManager: RileyLinkCommunicationManager)
|
|
|
|
fun injectMedtronicCommunicationManager(medtronicCommunicationManager: MedtronicCommunicationManager)
|
|
|
|
fun injectMedtronicUITask(medtronicUITask: MedtronicUITask)
|
2020-04-26 22:47:13 +02:00
|
|
|
fun injectServiceTask(serviceTask: ServiceTask)
|
|
|
|
fun injectPumpTask(pumpTask: PumpTask)
|
|
|
|
fun injectDiscoverGattServicesTask(discoverGattServicesTask: DiscoverGattServicesTask)
|
|
|
|
fun injectInitializePumpManagerTask(initializePumpManagerTask: InitializePumpManagerTask)
|
|
|
|
fun injectResetRileyLinkConfigurationTask(resetRileyLinkConfigurationTask: ResetRileyLinkConfigurationTask)
|
|
|
|
fun injectWakeAndTuneTask(wakeAndTuneTask: WakeAndTuneTask)
|
2020-04-27 18:14:06 +02:00
|
|
|
fun injectRadioResponse(radioResponse: RadioResponse)
|
|
|
|
fun injectRileyLinkBLE(rileyLinkBLE: RileyLinkBLE)
|
2020-04-27 20:22:00 +02:00
|
|
|
fun injectRFSpy(rfSpy: RFSpy)
|
|
|
|
fun injectSendAndListen(sendAndListen: SendAndListen)
|
|
|
|
fun injectSetPreamble(setPreamble: SetPreamble)
|
2020-04-27 22:19:50 +02:00
|
|
|
fun injectRadioPacket(radioPacket: RadioPacket)
|
2020-04-29 18:35:55 +02:00
|
|
|
fun injectOmnipodUITask(omnipodUITask: OmnipodUITask)
|
|
|
|
|
|
|
|
|
|
|
|
// Omnipod
|
|
|
|
fun injectOmnipodCommunicationManager(omnipodCommunicationManager: OmnipodCommunicationManager)
|
2020-04-26 22:47:13 +02:00
|
|
|
|
2020-04-24 12:00:31 +02:00
|
|
|
@Component.Builder
|
|
|
|
interface Builder {
|
|
|
|
|
|
|
|
@BindsInstance
|
|
|
|
fun application(mainApp: MainApp): Builder
|
|
|
|
|
|
|
|
fun build(): AppComponent
|
|
|
|
}
|
2020-04-25 17:55:07 +02:00
|
|
|
}
|