DataSourceBinder

@Module
interface DataSourceBinder

Tells Hilt which implementation should be used for injected data source interfaces. This module is installed in the SingletonComponent.

Functions

Link copied to clipboard
@Singleton
@Binds
abstract fun bindAdministrativeUnitDataSource(administrativeUnitLocalDataSource: AdministrativeUnitLocalDataSource): AdministrativeUnitDataSource

Tells Hilt to use a singleton instance of AdministrativeUnitLocalDataSource when injecting the AdministrativeUnitDataSource interface. This ensures all classes have access to the same instance.

Link copied to clipboard

Tells Hilt to use the AdministrativeUnitNameRoomDataSource implementation when injecting the AdministrativeUnitNameDataSource interface.

Link copied to clipboard
@Singleton
@Binds
abstract fun bindCurrentRegionDataSource(currentRegionLocalDataSource: CurrentRegionLocalDataSource): CurrentRegionDataSource

Tells Hilt to use a singleton instance of CurrentRegionLocalDataSource when injecting the CurrentRegionDataSource interface. This ensures all classes have access to the same instance.

Link copied to clipboard
@Binds
abstract fun bindImageDataSource(imageRoomDataSource: ImageRoomDataSource): ImageDataSource

Tells Hilt to use the ImageRoomDataSource implementation when injecting the ImageDataSource interface.