summaryrefslogtreecommitdiff
path: root/src/de/blinkt/openvpn/OpenVPN.java
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2012-06-18 00:27:03 +0200
committerArne Schwabe <arne@rfc2549.org>2012-06-18 00:27:03 +0200
commit421141e64541a0c6f30b11304209f90545926a4b (patch)
tree6bd879fc55012fcbe50467be259ea026d38b33ac /src/de/blinkt/openvpn/OpenVPN.java
parent6a3b2e74504b1377db6a5a8f1d7a5080001d3047 (diff)
Add a status message which shows the status of the connecting/connected VPN
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));
+ }
+
}