Package-level declarations

Types

Link copied to clipboard

This use case is responsible for clearing the client data. The proteus client will be cleared and the MLS client will be cleared.

Link copied to clipboard
internal class ClearClientDataUseCaseImpl(mlsClientProvider: MLSClientProvider, proteusClientProvider: ProteusClientProvider, dispatchers: <Error class: unknown class> = KaliumDispatcherImpl) : ClearClientDataUseCase
Link copied to clipboard

Clear all NewClients for the UserId from the BD. Use it after informing user about NewClients, or when user logs out.

Link copied to clipboard

Retrieves the Proteus-specific fingerprint of a client. If no session exists for the client, a new session is established.

Link copied to clipboard
Link copied to clipboard
class ClientScope constructor(val clientRepository: ClientRepository, pushTokenRepository: PushTokenRepository, logoutRepository: LogoutRepository, preKeyRepository: PreKeyRepository, keyPackageRepository: KeyPackageRepository, keyPackageLimitsProvider: KeyPackageLimitsProvider, mlsClientProvider: MLSClientProvider, notificationTokenRepository: NotificationTokenRepository, clientRemoteRepository: ClientRemoteRepository, proteusClientProvider: ProteusClientProvider, sessionRepository: SessionRepository, upgradeCurrentSessionUseCase: UpgradeCurrentSessionUseCase, selfUserId: <Error class: unknown class>, isAllowedToRegisterMLSClient: IsAllowedToRegisterMLSClientUseCase, clientIdProvider: CurrentClientIdProvider, userRepository: UserRepository, secondFactorVerificationRepository: SecondFactorVerificationRepository, slowSyncRepository: SlowSyncRepository, cachedClientIdClearer: CachedClientIdClearer, updateSupportedProtocolsAndResolveOneOnOnes: UpdateSupportedProtocolsAndResolveOneOnOnesUseCase, registerMLSClientUseCase: RegisterMLSClientUseCase, syncFeatureConfigsUseCase: SyncFeatureConfigsUseCase)
Link copied to clipboard
sealed class DeleteClientResult
Link copied to clipboard

This use case is responsible for deleting the client. The client will be deleted from the backend and the local storage.

Link copied to clipboard
internal class DeleteClientUseCaseImpl(clientRepository: ClientRepository, updateSupportedProtocolsAndResolveOneOnOnes: UpdateSupportedProtocolsAndResolveOneOnOnesUseCase) : DeleteClientUseCase
Link copied to clipboard

Fetches the list of clients of the current user from remote.

Link copied to clipboard

Use case to get the other users clients (devices) from remote and save it in our local db so it can be fetched later

Link copied to clipboard
internal class FetchUsersClientsFromRemoteUseCaseImpl(clientRemoteRepository: ClientRemoteRepository, clientRepository: ClientRepository, clientMapper: ClientMapper = MapperProvider.clientMapper()) : FetchUsersClientsFromRemoteUseCase
Link copied to clipboard
Link copied to clipboard

This use case is responsible for getting the client. If the client is not found, it will be registered.

Link copied to clipboard
internal class GetOrRegisterClientUseCaseImpl(clientRepository: ClientRepository, pushTokenRepository: PushTokenRepository, logoutRepository: LogoutRepository, registerClient: RegisterClientUseCase, clearClientData: ClearClientDataUseCase, verifyExistingClientUseCase: VerifyExistingClientUseCase, upgradeCurrentSessionUseCase: UpgradeCurrentSessionUseCase, cachedClientIdClearer: CachedClientIdClearer, syncFeatureConfigsUseCase: SyncFeatureConfigsUseCase) : GetOrRegisterClientUseCase
Link copied to clipboard
Link copied to clipboard

Use case to get fingerprint of current user client (device). Only applies to proteus devices.

Link copied to clipboard
Link copied to clipboard
internal class ImportClientUseCaseImpl(clientRepository: ClientRepository, getOrRegisterClient: GetOrRegisterClientUseCase) : ImportClientUseCase
Link copied to clipboard

Answers the question if the self user allowed to register an MLS client

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
internal class MLSClientManagerImpl(currentClientIdProvider: CurrentClientIdProvider, isAllowedToRegisterMLSClient: IsAllowedToRegisterMLSClientUseCase, incrementalSyncRepository: IncrementalSyncRepository, slowSyncRepository: <Error class: unknown class><SlowSyncRepository>, clientRepository: <Error class: unknown class><ClientRepository>, registerMLSClient: <Error class: unknown class><RegisterMLSClientUseCase>, kaliumDispatcher: <Error class: unknown class> = KaliumDispatcherImpl) : MLSClientManager

MLSClientManager is responsible for registering an MLS client when a user upgrades to an MLS supported build.

Link copied to clipboard

This use case will return true if the current user needs to register a client.

Link copied to clipboard
internal class NeedsToRegisterClientUseCaseImpl(currentClientIdProvider: CurrentClientIdProvider, sessionRepository: SessionRepository, proteusClientProvider: ProteusClientProvider, selfUserId: <Error class: unknown class>) : NeedsToRegisterClientUseCase
Link copied to clipboard
sealed class NewClientResult
Link copied to clipboard

This use case will return the details of a client.

Link copied to clipboard

Use case to fetch all the other user clients (devices) information from the local db for specific user

Link copied to clipboard

This use case will observe and return the current client id of the current user.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Observes new Clients for all the users that are logged in on device returns NewClientResult which may be: NewClientResult.InCurrentAccount if new Clients appears for the user that is currently used. NewClientResult.InOtherAccount if new Clients appears for the user that is logged in on device, but not currently used. NewClientResult.Empty if there are no new Clients for any of the logged-in Users. NewClientResult.Error in case of error, in most cases it means that the user for which new Client appeared is no longer logged it on the device.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

This use case is responsible for registering the client. The client will be registered on the backend and the local storage.

Link copied to clipboard
class RegisterClientUseCaseImpl constructor(isAllowedToRegisterMLSClient: IsAllowedToRegisterMLSClientUseCase, clientRepository: ClientRepository, preKeyRepository: PreKeyRepository, sessionRepository: SessionRepository, selfUserId: <Error class: unknown class>, userRepository: UserRepository, secondFactorVerificationRepository: SecondFactorVerificationRepository, registerMLSClientUseCase: RegisterMLSClientUseCase, dispatchers: <Error class: unknown class> = KaliumDispatcherImpl) : RegisterClientUseCase
Link copied to clipboard
Link copied to clipboard

Register an MLS client with an existing client already registered on the backend.

Link copied to clipboard
internal class RegisterMLSClientUseCaseImpl(mlsClientProvider: MLSClientProvider, clientRepository: ClientRepository, keyPackageRepository: KeyPackageRepository, keyPackageLimitsProvider: KeyPackageLimitsProvider, userConfigRepository: UserConfigRepository) : RegisterMLSClientUseCase
Link copied to clipboard
interface Result
Link copied to clipboard
sealed class SelfClientsResult
Link copied to clipboard

Updates the verification status of a client.

Link copied to clipboard
Link copied to clipboard

Checks if the given client is still exists on the backend, otherwise returns failure.

Link copied to clipboard
internal class VerifyExistingClientUseCaseImpl constructor(selfUserId: <Error class: unknown class>, clientRepository: ClientRepository, isAllowedToRegisterMLSClient: IsAllowedToRegisterMLSClientUseCase, registerMLSClientUseCase: RegisterMLSClientUseCase) : VerifyExistingClientUseCase