generated from bitwarden/template
-
Notifications
You must be signed in to change notification settings - Fork 9
/
AuthenticatorRepositoryModule.kt
36 lines (32 loc) · 1.27 KB
/
AuthenticatorRepositoryModule.kt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package com.bitwarden.authenticator.data.authenticator.repository.di
import com.bitwarden.authenticator.data.authenticator.datasource.disk.AuthenticatorDiskSource
import com.bitwarden.authenticator.data.authenticator.manager.FileManager
import com.bitwarden.authenticator.data.authenticator.manager.TotpCodeManager
import com.bitwarden.authenticator.data.authenticator.repository.AuthenticatorRepository
import com.bitwarden.authenticator.data.authenticator.repository.AuthenticatorRepositoryImpl
import com.bitwarden.authenticator.data.platform.manager.DispatcherManager
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import javax.inject.Singleton
/**
* Provides repositories in the authenticator package.
*/
@Module
@InstallIn(SingletonComponent::class)
object AuthenticatorRepositoryModule {
@Provides
@Singleton
fun provideAuthenticatorRepository(
authenticatorDiskSource: AuthenticatorDiskSource,
dispatcherManager: DispatcherManager,
totpCodeManager: TotpCodeManager,
fileManager: FileManager,
): AuthenticatorRepository = AuthenticatorRepositoryImpl(
authenticatorDiskSource,
totpCodeManager,
fileManager,
dispatcherManager,
)
}