diff options
| author | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2019-11-20 10:07:23 +0000 |
|---|---|---|
| committer | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2019-12-04 12:17:23 +0000 |
| commit | 1f227d9f9d88fb3fd91af52892845f4d813a2712 (patch) | |
| tree | 11ae645d4bb7372e2997e2ae4d489d9e0f65f40b | |
| parent | c51184f3000f725736b5c03bc451a5f767a96c91 (diff) | |
| download | mullvadvpn-1f227d9f9d88fb3fd91af52892845f4d813a2712.tar.xz mullvadvpn-1f227d9f9d88fb3fd91af52892845f4d813a2712.zip | |
Implement stub offline monitor for Android
| -rw-r--r-- | talpid-core/src/offline/android.rs | 21 | ||||
| -rw-r--r-- | talpid-core/src/offline/mod.rs | 11 |
2 files changed, 31 insertions, 1 deletions
diff --git a/talpid-core/src/offline/android.rs b/talpid-core/src/offline/android.rs new file mode 100644 index 0000000000..e62147a03c --- /dev/null +++ b/talpid-core/src/offline/android.rs @@ -0,0 +1,21 @@ +use crate::tunnel_state_machine::TunnelCommand; +use futures::sync::mpsc::UnboundedSender; +use std::sync::Weak; + +#[derive(err_derive::Error, Debug)] +#[error(display = "Unknown offline monitor error")] +pub struct Error; + +pub struct MonitorHandle; + +impl MonitorHandle { + pub fn is_offline(&self) -> bool { + false + } +} + +pub fn spawn_monitor( + _sender: Weak<UnboundedSender<TunnelCommand>>, +) -> Result<MonitorHandle, Error> { + Ok(MonitorHandle) +} diff --git a/talpid-core/src/offline/mod.rs b/talpid-core/src/offline/mod.rs index 2092da2f0a..3ef1340fb6 100644 --- a/talpid-core/src/offline/mod.rs +++ b/talpid-core/src/offline/mod.rs @@ -14,7 +14,16 @@ mod imp; #[path = "linux.rs"] mod imp; -#[cfg(not(any(windows, target_os = "linux", target_os = "macos")))] +#[cfg(target_os = "android")] +#[path = "android.rs"] +mod imp; + +#[cfg(not(any( + windows, + target_os = "android", + target_os = "linux", + target_os = "macos" +)))] #[path = "dummy.rs"] mod imp; |
