class FirefoxSyncFeature<AuthType>
(source)
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.
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.
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. |
fun addSyncable(name: String, store: SyncableStore<AuthType>): Unit
Adds a SyncableStore instance to a set of those that will be synchronized via sync. |
|
fun sync(account: FirefoxAccountShaped): Deferred<SyncResult>
Performs a sync of configured SyncableStore history instance. |