android-components / mozilla.components.feature.sync / FirefoxSyncFeature / <init>

<init>

FirefoxSyncFeature(coroutineContext: CoroutineContext, reifyAuth: suspend (authInfo: FxaAuthInfo) -> AuthType)

A feature implementation which orchestrates data synchronization of a set of SyncableStore which all share a common AuthType.

AuthType provides us with a layer of indirection that allows consumers of FirefoxSyncFeature to use entirely different types of SyncableStore, without this feature needing to depend on their specific implementations. Those implementations might have heavy native dependencies (e.g. places and logins depend on native libraries), and we do not want to force a consumer which only cares about syncing logins to have to import a places native library.

Parameters

coroutineContext - A CoroutineContext that will be used to perform synchronization work.

reifyAuth - A conversion method which reifies a generic FxaAuthInfo into an object of type AuthType.