AndroidAPS/app/src/main/java/info/nightscout/androidaps/di/PluginsModule.kt

416 lines
12 KiB
Kotlin
Raw Normal View History

2022-01-06 17:45:00 +01:00
package info.nightscout.androidaps.di
2020-03-25 23:51:04 +01:00
import dagger.Binds
import dagger.Module
import dagger.multibindings.IntKey
import dagger.multibindings.IntoMap
2020-05-11 20:05:12 +02:00
import info.nightscout.androidaps.danaRKorean.DanaRKoreanPlugin
import info.nightscout.androidaps.danaRv2.DanaRv2Plugin
import info.nightscout.androidaps.danar.DanaRPlugin
2020-05-10 20:10:08 +02:00
import info.nightscout.androidaps.danars.DanaRSPlugin
2021-06-08 23:27:14 +02:00
import info.nightscout.androidaps.diaconn.DiaconnG8Plugin
2020-03-25 23:51:04 +01:00
import info.nightscout.androidaps.interfaces.PluginBase
import info.nightscout.androidaps.plugin.general.openhumans.OpenHumansUploader
2020-03-25 23:51:04 +01:00
import info.nightscout.androidaps.plugins.aps.loop.LoopPlugin
import info.nightscout.androidaps.plugins.aps.openAPSAMA.OpenAPSAMAPlugin
import info.nightscout.androidaps.plugins.aps.openAPSSMB.OpenAPSSMBPlugin
2022-02-17 21:08:50 +01:00
import info.nightscout.androidaps.plugins.aps.openAPSSMBDynamicISF.OpenAPSSMBDynamicISFPlugin
2020-03-25 23:51:04 +01:00
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin
2021-11-05 13:16:23 +01:00
import info.nightscout.androidaps.plugins.constraints.bgQualityCheck.BgQualityCheckPlugin
2020-03-25 23:51:04 +01:00
import info.nightscout.androidaps.plugins.constraints.dstHelper.DstHelperPlugin
import info.nightscout.androidaps.plugins.constraints.objectives.ObjectivesPlugin
import info.nightscout.androidaps.plugins.constraints.safety.SafetyPlugin
import info.nightscout.androidaps.plugins.constraints.signatureVerifier.SignatureVerifierPlugin
import info.nightscout.androidaps.plugins.constraints.storage.StorageConstraintPlugin
import info.nightscout.androidaps.plugins.constraints.versionChecker.VersionCheckerPlugin
import info.nightscout.androidaps.plugins.general.actions.ActionsPlugin
2020-04-02 18:48:37 +02:00
import info.nightscout.androidaps.plugins.general.automation.AutomationPlugin
2020-03-25 23:51:04 +01:00
import info.nightscout.androidaps.plugins.general.dataBroadcaster.DataBroadcastPlugin
import info.nightscout.androidaps.plugins.general.food.FoodPlugin
import info.nightscout.androidaps.plugins.general.maintenance.MaintenancePlugin
import info.nightscout.androidaps.plugins.general.nsclient.NSClientPlugin
import info.nightscout.androidaps.plugins.general.overview.OverviewPlugin
import info.nightscout.androidaps.plugins.general.persistentNotification.PersistentNotificationPlugin
import info.nightscout.androidaps.plugins.general.smsCommunicator.SmsCommunicatorPlugin
2022-03-18 16:04:08 +01:00
import info.nightscout.androidaps.plugins.general.themes.ThemeSwitcherPlugin
2020-03-25 23:51:04 +01:00
import info.nightscout.androidaps.plugins.general.wear.WearPlugin
import info.nightscout.androidaps.plugins.general.xdripStatusline.StatusLinePlugin
2020-10-01 18:48:32 +02:00
import info.nightscout.androidaps.plugins.insulin.InsulinLyumjevPlugin
2020-03-25 23:51:04 +01:00
import info.nightscout.androidaps.plugins.insulin.InsulinOrefFreePeakPlugin
import info.nightscout.androidaps.plugins.insulin.InsulinOrefRapidActingPlugin
import info.nightscout.androidaps.plugins.insulin.InsulinOrefUltraRapidActingPlugin
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.IobCobCalculatorPlugin
import info.nightscout.androidaps.plugins.profile.local.LocalProfilePlugin
import info.nightscout.androidaps.plugins.pump.combo.ComboPlugin
import info.nightscout.androidaps.plugins.pump.insight.LocalInsightPlugin
import info.nightscout.androidaps.plugins.pump.mdi.MDIPlugin
import info.nightscout.androidaps.plugins.pump.medtronic.MedtronicPumpPlugin
2021-02-23 01:26:57 +01:00
import info.nightscout.androidaps.plugins.pump.omnipod.dash.OmnipodDashPumpPlugin
import info.nightscout.androidaps.plugins.pump.omnipod.eros.OmnipodErosPumpPlugin
2020-03-25 23:51:04 +01:00
import info.nightscout.androidaps.plugins.pump.virtual.VirtualPumpPlugin
import info.nightscout.androidaps.plugins.sensitivity.SensitivityAAPSPlugin
import info.nightscout.androidaps.plugins.sensitivity.SensitivityOref1Plugin
import info.nightscout.androidaps.plugins.sensitivity.SensitivityWeightedAveragePlugin
import info.nightscout.androidaps.plugins.source.*
import javax.inject.Qualifier
2022-01-06 17:45:00 +01:00
@Suppress("unused")
2020-03-25 23:51:04 +01:00
@Module
abstract class PluginsModule {
@Binds
@AllConfigs
@IntoMap
@IntKey(0)
abstract fun bindPersistentNotificationPlugin(plugin: PersistentNotificationPlugin): PluginBase
@Binds
@AllConfigs
@IntoMap
@IntKey(5)
2020-03-25 23:51:04 +01:00
abstract fun bindOverviewPlugin(plugin: OverviewPlugin): PluginBase
@Binds
@AllConfigs
@IntoMap
@IntKey(10)
abstract fun bindIobCobCalculatorPlugin(plugin: IobCobCalculatorPlugin): PluginBase
@Binds
2020-05-15 08:20:09 +02:00
@AllConfigs
2020-03-25 23:51:04 +01:00
@IntoMap
@IntKey(20)
abstract fun bindActionsPlugin(plugin: ActionsPlugin): PluginBase
@Binds
@AllConfigs
@IntoMap
@IntKey(30)
abstract fun bindInsulinOrefRapidActingPlugin(plugin: InsulinOrefRapidActingPlugin): PluginBase
@Binds
@AllConfigs
@IntoMap
@IntKey(40)
abstract fun bindInsulinOrefUltraRapidActingPlugin(plugin: InsulinOrefUltraRapidActingPlugin): PluginBase
2020-10-01 18:48:32 +02:00
@Binds
@AllConfigs
@IntoMap
@IntKey(42)
abstract fun bindInsulinLyumjevPlugin(plugin: InsulinLyumjevPlugin): PluginBase
2020-03-25 23:51:04 +01:00
@Binds
@AllConfigs
@IntoMap
@IntKey(50)
abstract fun bindInsulinOrefFreePeakPlugin(plugin: InsulinOrefFreePeakPlugin): PluginBase
@Binds
@AllConfigs
@IntoMap
@IntKey(60)
abstract fun bindSensitivityAAPSPlugin(plugin: SensitivityAAPSPlugin): PluginBase
@Binds
@AllConfigs
@IntoMap
2020-04-05 12:02:37 +02:00
@IntKey(70)
2020-03-25 23:51:04 +01:00
abstract fun bindSensitivityWeightedAveragePlugin(plugin: SensitivityWeightedAveragePlugin): PluginBase
@Binds
@AllConfigs
@IntoMap
2020-04-05 12:02:37 +02:00
@IntKey(80)
2020-03-25 23:51:04 +01:00
abstract fun bindSensitivityOref1Plugin(plugin: SensitivityOref1Plugin): PluginBase
@Binds
@PumpDriver
@IntoMap
2020-04-05 12:02:37 +02:00
@IntKey(90)
2020-05-11 20:05:12 +02:00
abstract fun bindDanaRPlugin(plugin: DanaRPlugin): PluginBase
2020-03-25 23:51:04 +01:00
@Binds
@PumpDriver
@IntoMap
2020-04-05 12:02:37 +02:00
@IntKey(100)
2020-05-11 20:05:12 +02:00
abstract fun bindDanaRKoreanPlugin(plugin: DanaRKoreanPlugin): PluginBase
2020-03-25 23:51:04 +01:00
@Binds
@PumpDriver
@IntoMap
2020-04-05 12:02:37 +02:00
@IntKey(110)
2020-05-11 20:05:12 +02:00
abstract fun bindDanaRv2Plugin(plugin: DanaRv2Plugin): PluginBase
2020-03-25 23:51:04 +01:00
@Binds
@PumpDriver
@IntoMap
2020-04-05 12:02:37 +02:00
@IntKey(120)
2020-03-25 23:51:04 +01:00
abstract fun bindDanaRSPlugin(plugin: DanaRSPlugin): PluginBase
@Binds
@PumpDriver
@IntoMap
2020-04-05 12:02:37 +02:00
@IntKey(130)
2020-03-25 23:51:04 +01:00
abstract fun bindLocalInsightPlugin(plugin: LocalInsightPlugin): PluginBase
@Binds
@PumpDriver
@IntoMap
2020-04-05 12:02:37 +02:00
@IntKey(140)
2020-03-25 23:51:04 +01:00
abstract fun bindComboPlugin(plugin: ComboPlugin): PluginBase
2021-05-30 14:51:57 +02:00
@Binds
@PumpDriver
@IntoMap
2022-01-06 17:45:00 +01:00
@IntKey(145)
abstract fun bindOmnipodErosPumpPlugin(plugin: OmnipodErosPumpPlugin): PluginBase
2020-03-25 23:51:04 +01:00
2021-02-23 01:26:57 +01:00
@Binds
@PumpDriver
@IntoMap
2022-01-06 17:45:00 +01:00
@IntKey(148)
2021-02-23 01:26:57 +01:00
abstract fun bindOmnipodDashPumpPlugin(plugin: OmnipodDashPumpPlugin): PluginBase
@Binds
@PumpDriver
@IntoMap
2022-01-06 17:45:00 +01:00
@IntKey(150)
abstract fun bindMedtronicPumpPlugin(plugin: MedtronicPumpPlugin): PluginBase
2021-06-08 23:27:14 +02:00
@Binds
@PumpDriver
@IntoMap
@IntKey(155)
abstract fun bindDiaconnG8Plugin(plugin: DiaconnG8Plugin): PluginBase
2020-03-25 23:51:04 +01:00
@Binds
@NotNSClient
@IntoMap
2020-04-05 12:02:37 +02:00
@IntKey(160)
2020-03-25 23:51:04 +01:00
abstract fun bindMDIPlugin(plugin: MDIPlugin): PluginBase
@Binds
2020-04-03 12:09:57 +02:00
@AllConfigs
2020-03-25 23:51:04 +01:00
@IntoMap
2020-04-05 12:02:37 +02:00
@IntKey(170)
2020-03-25 23:51:04 +01:00
abstract fun bindVirtualPumpPlugin(plugin: VirtualPumpPlugin): PluginBase
@Binds
@APS
@IntoMap
2020-04-05 12:02:37 +02:00
@IntKey(190)
2020-03-25 23:51:04 +01:00
abstract fun bindLoopPlugin(plugin: LoopPlugin): PluginBase
@Binds
@APS
@IntoMap
2020-04-05 12:02:37 +02:00
@IntKey(210)
2020-03-25 23:51:04 +01:00
abstract fun bindOpenAPSAMAPlugin(plugin: OpenAPSAMAPlugin): PluginBase
@Binds
@APS
@IntoMap
2020-04-05 12:02:37 +02:00
@IntKey(220)
2020-03-25 23:51:04 +01:00
abstract fun bindOpenAPSSMBPlugin(plugin: OpenAPSSMBPlugin): PluginBase
2022-02-16 00:03:21 +01:00
@Binds
@APS
@IntoMap
@IntKey(222)
2022-02-17 21:08:50 +01:00
abstract fun bindOpenAPSSMBAutoISFPlugin(plugin: OpenAPSSMBDynamicISFPlugin): PluginBase
2022-02-16 00:03:21 +01:00
2020-03-25 23:51:04 +01:00
@Binds
@AllConfigs
@IntoMap
2020-04-05 12:02:37 +02:00
@IntKey(240)
2020-03-25 23:51:04 +01:00
abstract fun bindLocalProfilePlugin(plugin: LocalProfilePlugin): PluginBase
2020-04-02 18:48:37 +02:00
@Binds
2021-01-20 21:03:45 +01:00
@AllConfigs
2020-04-02 18:48:37 +02:00
@IntoMap
2020-04-05 12:02:37 +02:00
@IntKey(250)
2020-04-02 18:48:37 +02:00
abstract fun bindAutomationPlugin(plugin: AutomationPlugin): PluginBase
2020-03-25 23:51:04 +01:00
@Binds
2020-04-24 22:39:56 +02:00
@AllConfigs
2020-04-25 22:31:39 +02:00
@IntoMap
@IntKey(265)
2020-03-25 23:51:04 +01:00
abstract fun bindSafetyPlugin(plugin: SafetyPlugin): PluginBase
@Binds
@NotNSClient
@IntoMap
@IntKey(270)
abstract fun bindVersionCheckerPlugin(plugin: VersionCheckerPlugin): PluginBase
@Binds
@NotNSClient
@IntoMap
@IntKey(280)
abstract fun bindSmsCommunicatorPlugin(plugin: SmsCommunicatorPlugin): PluginBase
@Binds
@APS
@IntoMap
@IntKey(290)
abstract fun bindStorageConstraintPlugin(plugin: StorageConstraintPlugin): PluginBase
@Binds
@APS
@IntoMap
@IntKey(300)
abstract fun bindSignatureVerifierPlugin(plugin: SignatureVerifierPlugin): PluginBase
@Binds
@APS
@IntoMap
@IntKey(310)
abstract fun bindObjectivesPlugin(plugin: ObjectivesPlugin): PluginBase
@Binds
@AllConfigs
@IntoMap
@IntKey(320)
abstract fun bindFoodPlugin(plugin: FoodPlugin): PluginBase
@Binds
@AllConfigs
@IntoMap
@IntKey(330)
abstract fun bindWearPlugin(plugin: WearPlugin): PluginBase
@Binds
@AllConfigs
@IntoMap
@IntKey(340)
abstract fun bindStatusLinePlugin(plugin: StatusLinePlugin): PluginBase
@Binds
@AllConfigs
@IntoMap
@IntKey(360)
abstract fun bindNSClientPlugin(plugin: NSClientPlugin): PluginBase
@Binds
@AllConfigs
@IntoMap
@IntKey(370)
abstract fun bindMaintenancePlugin(plugin: MaintenancePlugin): PluginBase
@Binds
@AllConfigs
@IntoMap
@IntKey(380)
abstract fun bindDstHelperPlugin(plugin: DstHelperPlugin): PluginBase
2021-11-05 13:16:23 +01:00
@Binds
@AllConfigs
@IntoMap
@IntKey(381)
abstract fun bindBgQualityCheckPlugin(plugin: BgQualityCheckPlugin): PluginBase
2020-03-25 23:51:04 +01:00
@Binds
@AllConfigs
@IntoMap
@IntKey(390)
abstract fun bindDataBroadcastPlugin(plugin: DataBroadcastPlugin): PluginBase
@Binds
@AllConfigs
@IntoMap
@IntKey(400)
abstract fun bindXdripPlugin(plugin: XdripPlugin): PluginBase
@Binds
@AllConfigs
@IntoMap
@IntKey(410)
abstract fun bindNSClientSourcePlugin(plugin: NSClientSourcePlugin): PluginBase
@Binds
@AllConfigs
@IntoMap
@IntKey(420)
abstract fun bindMM640gPlugin(plugin: MM640gPlugin): PluginBase
@Binds
@AllConfigs
@IntoMap
@IntKey(430)
abstract fun bindGlimpPlugin(plugin: GlimpPlugin): PluginBase
@Binds
@AllConfigs
@IntoMap
@IntKey(440)
abstract fun bindDexcomPlugin(plugin: DexcomPlugin): PluginBase
@Binds
@AllConfigs
@IntoMap
@IntKey(450)
abstract fun bindPoctechPlugin(plugin: PoctechPlugin): PluginBase
@Binds
@AllConfigs
@IntoMap
@IntKey(460)
abstract fun bindTomatoPlugin(plugin: TomatoPlugin): PluginBase
@Binds
@AllConfigs
@IntoMap
@IntKey(465)
abstract fun bindAidexPlugin(plugin: AidexPlugin): PluginBase
2020-03-25 23:51:04 +01:00
@Binds
@AllConfigs
@IntoMap
@IntKey(470)
2021-11-09 15:26:09 +01:00
abstract fun bindGlunovoPlugin(plugin: GlunovoPlugin): PluginBase
@Binds
@AllConfigs
@IntoMap
@IntKey(475)
2020-03-25 23:51:04 +01:00
abstract fun bindRandomBgPlugin(plugin: RandomBgPlugin): PluginBase
2021-05-17 21:17:15 +02:00
// @Binds
// @NotNSClient
// @IntoMap
// @IntKey(480)
// abstract fun bindOpenHumansPlugin(plugin: OpenHumansUploader): PluginBase
@Binds
@NotNSClient
@IntoMap
@IntKey(480)
abstract fun bindsOpenHumansPlugin(plugin: OpenHumansUploader): PluginBase
@Binds
@AllConfigs
@IntoMap
@IntKey(490)
2020-03-25 23:51:04 +01:00
abstract fun bindConfigBuilderPlugin(plugin: ConfigBuilderPlugin): PluginBase
2022-03-18 16:04:08 +01:00
@Binds
@AllConfigs
@IntoMap
@IntKey(500)
abstract fun bindThemeSwitcherPlugin(plugin: ThemeSwitcherPlugin): PluginBase
2020-03-25 23:51:04 +01:00
@Qualifier
annotation class AllConfigs
@Qualifier
annotation class PumpDriver
@Qualifier
annotation class NotNSClient
@Qualifier
annotation class APS
}