diff options
author | Arne Schwabe <arne@rfc2549.org> | 2013-04-06 19:46:07 +0200 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2013-04-06 19:46:07 +0200 |
commit | bde3a3f780cc668619076df96147b76be1c4ab64 (patch) | |
tree | 0c47b7894df388844ef3b9a806711b704c227b3d /src/de/blinkt/openvpn/api/APIVpnProfile.java | |
parent | ad2256b6fe9c211d06321d99590cb457427d8e7d (diff) |
Add external API with security.
Diffstat (limited to 'src/de/blinkt/openvpn/api/APIVpnProfile.java')
-rw-r--r-- | src/de/blinkt/openvpn/api/APIVpnProfile.java | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/src/de/blinkt/openvpn/api/APIVpnProfile.java b/src/de/blinkt/openvpn/api/APIVpnProfile.java new file mode 100644 index 00000000..5445913a --- /dev/null +++ b/src/de/blinkt/openvpn/api/APIVpnProfile.java @@ -0,0 +1,56 @@ +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();
+ if(in.readInt()==0)
+ mUserEditable=false;
+ else
+ mUserEditable=true;
+ }
+
+ 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];
+ }
+ };
+
+
+}
|