aboutsummaryrefslogtreecommitdiffstats
path: root/app/src/de/blinkt/openvpn/api/APIVpnProfile.java
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/de/blinkt/openvpn/api/APIVpnProfile.java')
-rw-r--r--app/src/de/blinkt/openvpn/api/APIVpnProfile.java61
1 files changed, 61 insertions, 0 deletions
diff --git a/app/src/de/blinkt/openvpn/api/APIVpnProfile.java b/app/src/de/blinkt/openvpn/api/APIVpnProfile.java
new file mode 100644
index 0000000..6acbf43
--- /dev/null
+++ b/app/src/de/blinkt/openvpn/api/APIVpnProfile.java
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2012-2015 Arne Schwabe
+ * Distributed under the GNU GPL v2 with additional terms.
+ * For full terms see the file https://github.com/schwabe/ics-openvpn/blob/master/doc/LICENSE.txt
+ */
+
+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 final String mProfileCreator;
+
+ public APIVpnProfile(Parcel in) {
+ mUUID = in.readString();
+ mName = in.readString();
+ mUserEditable = in.readInt() != 0;
+ //mProfileCreator = in.readString();
+ }
+
+ public APIVpnProfile(String uuidString, String name, boolean userEditable, String profileCreator) {
+ mUUID = uuidString;
+ mName = name;
+ mUserEditable = userEditable;
+ //mProfileCreator = profileCreator;
+ }
+
+ @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);
+ //dest.writeString(mProfileCreator);
+ }
+
+ public static final Creator<APIVpnProfile> CREATOR
+ = new Creator<APIVpnProfile>() {
+ public APIVpnProfile createFromParcel(Parcel in) {
+ return new APIVpnProfile(in);
+ }
+
+ public APIVpnProfile[] newArray(int size) {
+ return new APIVpnProfile[size];
+ }
+ };
+
+
+}