summaryrefslogtreecommitdiff
path: root/app/remoteExample/src/main/java/de
diff options
context:
space:
mode:
Diffstat (limited to 'app/remoteExample/src/main/java/de')
-rw-r--r--app/remoteExample/src/main/java/de/blinkt/openvpn/api/APIVpnProfile.java51
1 files changed, 51 insertions, 0 deletions
diff --git a/app/remoteExample/src/main/java/de/blinkt/openvpn/api/APIVpnProfile.java b/app/remoteExample/src/main/java/de/blinkt/openvpn/api/APIVpnProfile.java
new file mode 100644
index 00000000..a44891ab
--- /dev/null
+++ b/app/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];
+ }
+ };
+
+
+}