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

354 lines
9.8 KiB
Kotlin
Raw Normal View History

2020-03-25 23:51:04 +01:00
package info.nightscout.androidaps.dependencyInjection
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
2020-03-25 23:51:04 +01:00
import info.nightscout.androidaps.interfaces.PluginBase
import info.nightscout.androidaps.plugins.aps.loop.LoopPlugin
import info.nightscout.androidaps.plugins.aps.openAPSAMA.OpenAPSAMAPlugin
import info.nightscout.androidaps.plugins.aps.openAPSSMB.OpenAPSSMBPlugin
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin
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
import info.nightscout.androidaps.plugins.general.wear.WearPlugin
import info.nightscout.androidaps.plugins.general.xdripStatusline.StatusLinePlugin
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.profile.ns.NSProfilePlugin
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
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 info.nightscout.androidaps.plugins.treatments.TreatmentsPlugin
import javax.inject.Qualifier
@Module
abstract class PluginsModule {
@Binds
@AllConfigs
@IntoMap
@IntKey(0)
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
@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
@Binds
@PumpDriver
@IntoMap
2020-04-05 12:02:37 +02:00
@IntKey(150)
2020-03-25 23:51:04 +01:00
abstract fun bindMedtronicPumpPlugin(plugin: MedtronicPumpPlugin): PluginBase
@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
@Binds
@AllConfigs
@IntoMap
2020-04-05 12:02:37 +02:00
@IntKey(230)
2020-03-25 23:51:04 +01:00
abstract fun bindNSProfilePlugin(plugin: NSProfilePlugin): PluginBase
@Binds
@NotNSClient
@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
2020-07-24 13:30:19 +02:00
@APS
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
@AllConfigs
@IntoMap
@IntKey(260)
abstract fun bindTreatmentsPlugin(plugin: TreatmentsPlugin): PluginBase
@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(350)
abstract fun bindPersistentNotificationPlugin(plugin: PersistentNotificationPlugin): 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
@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(470)
abstract fun bindRandomBgPlugin(plugin: RandomBgPlugin): PluginBase
@Binds
@AllConfigs
@IntoMap
@IntKey(480)
abstract fun bindConfigBuilderPlugin(plugin: ConfigBuilderPlugin): PluginBase
@Qualifier
annotation class AllConfigs
@Qualifier
annotation class PumpDriver
@Qualifier
annotation class NotNSClient
@Qualifier
annotation class APS
}