diff options
author | Arne Schwabe <arne@rfc2549.org> | 2012-06-20 22:30:53 +0200 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2012-06-20 22:30:53 +0200 |
commit | 47e1a6d2dd8e1416dcf4944c0258e999e7102677 (patch) | |
tree | da2e4a094a3e352ce7a842cba86d29864947c0a2 /src/de/blinkt/openvpn/OpenVPN.java | |
parent | e8ea1db33db4fb9b4ef360125d2ec95071cd6424 (diff) | |
parent | e9b93deeff850a113870e1b27bde251d266b9d7c (diff) |
merge
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)); + } + } |