feat: add profile scoped device catalog
This commit is contained in:
@@ -67,6 +67,7 @@ dependencies {
|
||||
implementation(project(":domain"))
|
||||
implementation(project(":android:core:designsystem"))
|
||||
implementation(project(":android:core:preferences"))
|
||||
implementation(project(":android:core:devicecatalog"))
|
||||
implementation(project(":android:core:session"))
|
||||
implementation(project(":android:feature:infrared"))
|
||||
implementation(project(":absdk-bridge"))
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
package com.flagship.abox.manager.di
|
||||
|
||||
import com.flagship.abox.manager.domain.DeviceCatalog
|
||||
import com.flagship.abox.manager.testing.fakes.FakeDeviceCatalog
|
||||
import dagger.Module
|
||||
import dagger.Provides
|
||||
import dagger.hilt.InstallIn
|
||||
import dagger.hilt.components.SingletonComponent
|
||||
import javax.inject.Singleton
|
||||
|
||||
@Module
|
||||
@InstallIn(SingletonComponent::class)
|
||||
object FoundationModule {
|
||||
// TEMPORARY boundary: ABSDK has no device catalog, and the provider-scoped production
|
||||
// ABox catalog is owned by the device-catalog module. Until that exists, debug builds
|
||||
// keep the fake ABox catalog here. Do NOT route ABox catalog requests to
|
||||
// SimulationDeviceCatalog; release builds must not request a DeviceCatalog binding
|
||||
// until a real release consumer appears.
|
||||
@Provides
|
||||
@Singleton
|
||||
fun provideDeviceCatalog(): DeviceCatalog = FakeDeviceCatalog()
|
||||
}
|
||||
@@ -2,12 +2,16 @@ package com.flagship.abox.manager.di
|
||||
|
||||
import com.flagship.abox.manager.absdk.bridge.AbsdkBridge
|
||||
import com.flagship.abox.manager.domain.InfraredGateway
|
||||
import com.flagship.abox.manager.domain.DeviceCatalog
|
||||
import com.flagship.abox.manager.domain.ProviderProfileStore
|
||||
import com.flagship.abox.manager.domain.SocketGateway
|
||||
import com.flagship.abox.manager.domain.TemperatureHumidityGateway
|
||||
import com.flagship.abox.manager.simulation.SimulationInfraredGateway
|
||||
import com.flagship.abox.manager.simulation.SimulationSocketGateway
|
||||
import com.flagship.abox.manager.simulation.SimulationTemperatureHumidityGateway
|
||||
import com.flagship.abox.manager.simulation.SimulationDeviceCatalog
|
||||
import com.flagship.abox.manager.devicecatalog.RoutingDeviceCatalog
|
||||
import com.flagship.abox.manager.devicecatalog.data.RoomConfiguredDeviceRepository
|
||||
import dagger.Module
|
||||
import dagger.Provides
|
||||
import dagger.hilt.InstallIn
|
||||
@@ -22,6 +26,18 @@ import javax.inject.Singleton
|
||||
@Module
|
||||
@InstallIn(SingletonComponent::class)
|
||||
object DeviceGatewayModule {
|
||||
@Provides
|
||||
@Singleton
|
||||
fun provideSimulationDeviceCatalog(): SimulationDeviceCatalog = SimulationDeviceCatalog()
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
fun provideDeviceCatalog(
|
||||
profileStore: ProviderProfileStore,
|
||||
configured: RoomConfiguredDeviceRepository,
|
||||
simulation: SimulationDeviceCatalog,
|
||||
): DeviceCatalog = RoutingDeviceCatalog(profileStore, configured, simulation)
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
fun provideSimulationSocketGateway(): SimulationSocketGateway = SimulationSocketGateway()
|
||||
|
||||
Reference in New Issue
Block a user