diff options
Diffstat (limited to 'ics-openvpn-stripped/remoteExample/src/main')
-rw-r--r-- | ics-openvpn-stripped/remoteExample/src/main/java/de/blinkt/openvpn/api/APIVpnProfile.java | 51 | ||||
-rw-r--r-- | ics-openvpn-stripped/remoteExample/src/main/res/values/strings.xml | 15 |
2 files changed, 66 insertions, 0 deletions
diff --git a/ics-openvpn-stripped/remoteExample/src/main/java/de/blinkt/openvpn/api/APIVpnProfile.java b/ics-openvpn-stripped/remoteExample/src/main/java/de/blinkt/openvpn/api/APIVpnProfile.java new file mode 100644 index 00000000..a44891ab --- /dev/null +++ b/ics-openvpn-stripped/remoteExample/src/main/java/de/blinkt/openvpn/api/APIVpnProfile.java @@ -0,0 +1,51 @@ +package de.blinkt.openvpn.api; + +import android.os.Parcel; +import android.os.Parcelable; + +public class APIVpnProfile implements Parcelable { + + public final String mUUID; + public final String mName; + public final boolean mUserEditable; + + public APIVpnProfile(Parcel in) { + mUUID = in.readString(); + mName = in.readString(); + mUserEditable = in.readInt() != 0; + } + + public APIVpnProfile(String uuidString, String name, boolean userEditable) { + mUUID=uuidString; + mName = name; + mUserEditable=userEditable; + } + + @Override + public int describeContents() { + return 0; + } + + @Override + public void writeToParcel(Parcel dest, int flags) { + dest.writeString(mUUID); + dest.writeString(mName); + if(mUserEditable) + dest.writeInt(0); + else + dest.writeInt(1); + } + + public static final Parcelable.Creator<APIVpnProfile> CREATOR + = new Parcelable.Creator<APIVpnProfile>() { + public APIVpnProfile createFromParcel(Parcel in) { + return new APIVpnProfile(in); + } + + public APIVpnProfile[] newArray(int size) { + return new APIVpnProfile[size]; + } + }; + + +} diff --git a/ics-openvpn-stripped/remoteExample/src/main/res/values/strings.xml b/ics-openvpn-stripped/remoteExample/src/main/res/values/strings.xml new file mode 100644 index 00000000..bbaee226 --- /dev/null +++ b/ics-openvpn-stripped/remoteExample/src/main/res/values/strings.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + + <string name="app_name">OpenVPN Remote</string> + <string name="hello_world">Hello world!</string> + <string name="action_settings">Settings</string> + <string name="permission_description">Allows another app to control OpenVPN</string> + <string name="no_status_yet">No Status yet</string> + <string name="no_now">Not now</string> + <string name="show_my_ip">Show my IP</string> + <string name="disconnect">Disconnect</string> + <string name="start_embedded">Start embedded profile</string> + + +</resources> |