diff options
author | Arne Schwabe <arne@rfc2549.org> | 2012-06-20 22:34:08 +0200 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2012-06-20 22:34:08 +0200 |
commit | bc279dfd2cffaf8278ee0750aa2c05af9e4091e0 (patch) | |
tree | 03c5e7d12422cb17d1c1180450b9ee4afbb2cd99 /src/de/blinkt/openvpn/OpenVPN.java | |
parent | c30014c45e61a0712b5b74d0ecdf0cc44386c50f (diff) | |
parent | 47e1a6d2dd8e1416dcf4944c0258e999e7102677 (diff) |
Merge with 4fe04f90d7c3f24b98e04e3258deb3e6d0ec51d0
Diffstat (limited to 'src/de/blinkt/openvpn/OpenVPN.java')
-rw-r--r-- | src/de/blinkt/openvpn/OpenVPN.java | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/de/blinkt/openvpn/OpenVPN.java b/src/de/blinkt/openvpn/OpenVPN.java index b09eb60e..c23ee56d 100644 --- a/src/de/blinkt/openvpn/OpenVPN.java +++ b/src/de/blinkt/openvpn/OpenVPN.java @@ -41,6 +41,12 @@ public class OpenVPN { } + public LogItem(int loglevel, int ressourceId) { + mRessourceId =ressourceId; + mLevel = loglevel; + } + + String getString(Context c) { if(mMessage !=null) { return mMessage; @@ -73,7 +79,7 @@ public class OpenVPN { } public interface StateListener { - void updateState(String logmessage); + void updateState(String state, String logmessage); } synchronized static void logMessage(int level,String prefix, String message) @@ -126,9 +132,9 @@ public class OpenVPN { } - public static void updateStateString(String msg) { + public static void updateStateString(String state, String msg) { for (StateListener sl : stateListener) { - sl.updateState(msg); + sl.updateState(state,msg); } } @@ -155,6 +161,10 @@ public class OpenVPN { } + public static void logError(int ressourceId) { + newlogItem(new LogItem(LogItem.ERROR, ressourceId)); + } + } |