1/* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
45#![allow(unknown_lints)]
6#![warn(rust_2018_idioms)]
78pub mod error;
9pub mod manager;
10mod types;
1112pub use sync15::DeviceType;
1314pub use error::{Result, SyncManagerError};
15pub use types::*;
1617use manager::SyncManager;
18use parking_lot::Mutex;
1920lazy_static::lazy_static! {
21static ref MANAGER: Mutex<SyncManager> = Mutex::new(SyncManager::new());
22}
2324pub(crate) fn wipe(engine: &str) -> Result<()> {
25let manager = MANAGER.lock();
26 manager.wipe(engine)
27}
2829pub(crate) fn reset(engine: &str) -> Result<()> {
30let manager = MANAGER.lock();
31 manager.reset(engine)
32}
3334pub(crate) fn reset_all() -> Result<()> {
35let manager = MANAGER.lock();
36 manager.reset_all()
37}
3839uniffi::include_scaffolding!("syncmanager");