diff options
author | Arne Schwabe <arne@rfc2549.org> | 2012-05-18 00:06:49 +0200 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2012-05-18 00:06:49 +0200 |
commit | f743921f5812cd7f6c6b681382d60508ed02a4a9 (patch) | |
tree | abc5069ab0559e074436fcb58f5ac5bb6e7fc6ed /src/de/blinkt/openvpn/OpenVPN.java | |
parent | e445ab7fdc6c3912291eaad7aac209b511bcd245 (diff) |
- Make Ipv6 support complete (minus tun-ipv6 warning)
- Implement byte counter support in the log window
- Fix spelling of secret (closes issue #22)
- Replace "quot; with ", no idea what went wrong there (closes issue #21)
Diffstat (limited to 'src/de/blinkt/openvpn/OpenVPN.java')
-rw-r--r-- | src/de/blinkt/openvpn/OpenVPN.java | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/de/blinkt/openvpn/OpenVPN.java b/src/de/blinkt/openvpn/OpenVPN.java index 24281d13..1d9eb6e0 100644 --- a/src/de/blinkt/openvpn/OpenVPN.java +++ b/src/de/blinkt/openvpn/OpenVPN.java @@ -10,12 +10,16 @@ public class OpenVPN { public static LinkedList<String> logbuffer = new LinkedList<String>(); private static Vector<LogListener> logListener=new Vector<OpenVPN.LogListener>(); + private static Vector<SpeedListener> speedListener=new Vector<OpenVPN.SpeedListener>(); private static String[] mBconfig; public interface LogListener { void newLog(String logmessage); } + public interface SpeedListener { + void updateSpeed(String logmessage); + } synchronized static void logMessage(int level,String prefix, String message) { @@ -41,6 +45,16 @@ public class OpenVPN { logListener.remove(ll); } + + synchronized static void addSpeedListener(SpeedListener sl){ + speedListener.add(sl); + } + + synchronized static void removeSpeedListener(SpeedListener sl) { + speedListener.remove(sl); + } + + synchronized public static String[] getlogbuffer() { @@ -62,4 +76,10 @@ public class OpenVPN { } } + + public static void updateSpeedString(String msg) { + for (SpeedListener sl : speedListener) { + sl.updateSpeed(msg); + } + } } |