diff options
author | Parménides GV <parmegv@sdf.org> | 2014-05-28 17:15:44 +0200 |
---|---|---|
committer | Parménides GV <parmegv@sdf.org> | 2014-05-28 17:15:44 +0200 |
commit | 6fcd101fcbc7779ffd7239cc35e5c3359ae38fcf (patch) | |
tree | 190d57ad5785b1397d6a8346726136b83d0aa870 /ics-openvpn-stripped/remoteExample/src/main/java | |
parent | a0a7be518a758ad3c17111e8a5f3694d1a711d73 (diff) |
Resources merge correctly.
Diffstat (limited to 'ics-openvpn-stripped/remoteExample/src/main/java')
-rw-r--r-- | ics-openvpn-stripped/remoteExample/src/main/java/de/blinkt/openvpn/api/APIVpnProfile.java | 51 |
1 files changed, 51 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]; + } + }; + + +} |