summaryrefslogtreecommitdiff
path: root/src/de/blinkt/openvpn/OpenVPN.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/de/blinkt/openvpn/OpenVPN.java')
-rw-r--r--src/de/blinkt/openvpn/OpenVPN.java16
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));
+ }
+
}