Move RileyLink components to a separate dependency injection module
Having them in the Medtronic module will only create confusion later on.
This commit is contained in:
parent
69da89b19b
commit
7d52228e15
|
@ -26,6 +26,7 @@ import javax.inject.Singleton
|
||||||
CommandQueueModule::class,
|
CommandQueueModule::class,
|
||||||
ObjectivesModule::class,
|
ObjectivesModule::class,
|
||||||
WizardModule::class,
|
WizardModule::class,
|
||||||
|
RileyLinkModule::class,
|
||||||
MedtronicModule::class,
|
MedtronicModule::class,
|
||||||
OmnipodModule::class,
|
OmnipodModule::class,
|
||||||
APSModule::class,
|
APSModule::class,
|
||||||
|
|
|
@ -2,33 +2,12 @@ package info.nightscout.androidaps.dependencyInjection
|
||||||
|
|
||||||
import dagger.Module
|
import dagger.Module
|
||||||
import dagger.android.ContributesAndroidInjector
|
import dagger.android.ContributesAndroidInjector
|
||||||
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkCommunicationManager
|
|
||||||
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.RFSpy
|
|
||||||
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.RileyLinkBLE
|
|
||||||
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.command.SendAndListen
|
|
||||||
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.command.SetPreamble
|
|
||||||
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.data.RadioPacket
|
|
||||||
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.data.RadioResponse
|
|
||||||
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.service.tasks.*
|
|
||||||
import info.nightscout.androidaps.plugins.pump.medtronic.comm.MedtronicCommunicationManager
|
import info.nightscout.androidaps.plugins.pump.medtronic.comm.MedtronicCommunicationManager
|
||||||
import info.nightscout.androidaps.plugins.pump.medtronic.comm.ui.MedtronicUITask
|
import info.nightscout.androidaps.plugins.pump.medtronic.comm.ui.MedtronicUITask
|
||||||
|
|
||||||
@Module
|
@Module
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
abstract class MedtronicModule {
|
abstract class MedtronicModule {
|
||||||
@ContributesAndroidInjector abstract fun rileyLinkCommunicationManagerProvider(): RileyLinkCommunicationManager
|
|
||||||
@ContributesAndroidInjector abstract fun medtronicCommunicationManagerProvider(): MedtronicCommunicationManager
|
@ContributesAndroidInjector abstract fun medtronicCommunicationManagerProvider(): MedtronicCommunicationManager
|
||||||
@ContributesAndroidInjector abstract fun medtronicUITaskProvider(): MedtronicUITask
|
@ContributesAndroidInjector abstract fun medtronicUITaskProvider(): MedtronicUITask
|
||||||
@ContributesAndroidInjector abstract fun serviceTaskProvider(): ServiceTask
|
|
||||||
@ContributesAndroidInjector abstract fun pumpTaskProvider(): PumpTask
|
|
||||||
@ContributesAndroidInjector abstract fun discoverGattServicesTaskProvider(): DiscoverGattServicesTask
|
|
||||||
@ContributesAndroidInjector abstract fun initializePumpManagerTaskProvider(): InitializePumpManagerTask
|
|
||||||
@ContributesAndroidInjector abstract fun resetRileyLinkConfigurationTaskProvider(): ResetRileyLinkConfigurationTask
|
|
||||||
@ContributesAndroidInjector abstract fun wakeAndTuneTaskProvider(): WakeAndTuneTask
|
|
||||||
@ContributesAndroidInjector abstract fun radioResponseProvider(): RadioResponse
|
|
||||||
@ContributesAndroidInjector abstract fun rileyLinkBLEProvider(): RileyLinkBLE
|
|
||||||
@ContributesAndroidInjector abstract fun rfSpyProvider(): RFSpy
|
|
||||||
@ContributesAndroidInjector abstract fun sendAndListenProvider(): SendAndListen
|
|
||||||
@ContributesAndroidInjector abstract fun setPreambleProvider(): SetPreamble
|
|
||||||
@ContributesAndroidInjector abstract fun radioPacketProvider(): RadioPacket
|
|
||||||
}
|
}
|
|
@ -0,0 +1,30 @@
|
||||||
|
package info.nightscout.androidaps.dependencyInjection
|
||||||
|
|
||||||
|
import dagger.Module
|
||||||
|
import dagger.android.ContributesAndroidInjector
|
||||||
|
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkCommunicationManager
|
||||||
|
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.RFSpy
|
||||||
|
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.RileyLinkBLE
|
||||||
|
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.command.SendAndListen
|
||||||
|
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.command.SetPreamble
|
||||||
|
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.data.RadioPacket
|
||||||
|
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.data.RadioResponse
|
||||||
|
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.service.tasks.*
|
||||||
|
|
||||||
|
@Module
|
||||||
|
@Suppress("unused")
|
||||||
|
abstract class RileyLinkModule {
|
||||||
|
@ContributesAndroidInjector abstract fun rileyLinkCommunicationManagerProvider(): RileyLinkCommunicationManager
|
||||||
|
@ContributesAndroidInjector abstract fun serviceTaskProvider(): ServiceTask
|
||||||
|
@ContributesAndroidInjector abstract fun pumpTaskProvider(): PumpTask
|
||||||
|
@ContributesAndroidInjector abstract fun discoverGattServicesTaskProvider(): DiscoverGattServicesTask
|
||||||
|
@ContributesAndroidInjector abstract fun initializePumpManagerTaskProvider(): InitializePumpManagerTask
|
||||||
|
@ContributesAndroidInjector abstract fun resetRileyLinkConfigurationTaskProvider(): ResetRileyLinkConfigurationTask
|
||||||
|
@ContributesAndroidInjector abstract fun wakeAndTuneTaskProvider(): WakeAndTuneTask
|
||||||
|
@ContributesAndroidInjector abstract fun radioResponseProvider(): RadioResponse
|
||||||
|
@ContributesAndroidInjector abstract fun rileyLinkBLEProvider(): RileyLinkBLE
|
||||||
|
@ContributesAndroidInjector abstract fun rfSpyProvider(): RFSpy
|
||||||
|
@ContributesAndroidInjector abstract fun sendAndListenProvider(): SendAndListen
|
||||||
|
@ContributesAndroidInjector abstract fun setPreambleProvider(): SetPreamble
|
||||||
|
@ContributesAndroidInjector abstract fun radioPacketProvider(): RadioPacket
|
||||||
|
}
|
Loading…
Reference in a new issue