diff options
author | kwadronaut <kwadronaut@leap.se> | 2016-09-19 12:38:29 +0200 |
---|---|---|
committer | kwadronaut <kwadronaut@leap.se> | 2016-09-19 12:38:29 +0200 |
commit | f9c44da143a2d29baac6260c2e5caf9a96dacbc3 (patch) | |
tree | c2435766b6a8d7ddd70f2a0dcfc501a7d93c45f4 /app/src/main/java/de/blinkt/openvpn/core/OpenVPNManagement.java | |
parent | 00ebc6d66ff9e8a0fa01b808ce7dbd0335933baf (diff) | |
parent | 56ba118a5713fe0e24120815cd28db141709a497 (diff) |
Merge remote-tracking branch 'upstream/develop' into develop
Diffstat (limited to 'app/src/main/java/de/blinkt/openvpn/core/OpenVPNManagement.java')
-rw-r--r-- | app/src/main/java/de/blinkt/openvpn/core/OpenVPNManagement.java | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/app/src/main/java/de/blinkt/openvpn/core/OpenVPNManagement.java b/app/src/main/java/de/blinkt/openvpn/core/OpenVPNManagement.java index 1f28c77d..2911fb1e 100644 --- a/app/src/main/java/de/blinkt/openvpn/core/OpenVPNManagement.java +++ b/app/src/main/java/de/blinkt/openvpn/core/OpenVPNManagement.java @@ -1,29 +1,39 @@ /* - * Copyright (c) 2012-2014 Arne Schwabe + * Copyright (c) 2012-2016 Arne Schwabe * Distributed under the GNU GPL v2 with additional terms. For full terms see the file doc/LICENSE.txt */ package de.blinkt.openvpn.core; public interface OpenVPNManagement { + interface PausedStateCallback { + boolean shouldBeRunning(); + } + enum pauseReason { noNetwork, userPause, screenOff } - int mBytecountInterval =2; + int mBytecountInterval = 2; - void reconnect(); + void reconnect(); - void pause(pauseReason reason); + void pause(pauseReason reason); - void resume(); + void resume(); - boolean stopVPN(); + /** + * @param replaceConnection True if the VPN is connected by a new connection. + * @return true if there was a process that has been send a stop signal + */ + boolean stopVPN(boolean replaceConnection); /* * Rebind the interface */ - void networkChange(); + void networkChange(boolean sameNetwork); + + void setPauseCallback(PausedStateCallback callback); } |