Android Open Source - PiVPN Vpn






From Project

Back to project page PiVPN.

License

The source code is released under:

MIT License

If you think the Android project PiVPN listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package net.phedny.android.pivpn;
/*from w w  w.j av  a  2s.c o  m*/
import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by mark on 13/07/14.
 */
public class Vpn implements Parcelable {

    private String name;
    private boolean connected;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public boolean isConnected() {
        return connected;
    }

    public void setConnected(boolean connected) {
        this.connected = connected;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel parcel, int i) {
        parcel.writeString(name);
        parcel.writeInt(connected ? 1 : 0);
    }

    public static final Creator<Vpn> CREATOR = new Creator<Vpn>() {
        @Override
        public Vpn createFromParcel(Parcel parcel) {
            Vpn vpn = new Vpn();
            vpn.setName(parcel.readString());
            vpn.setConnected(parcel.readInt() != 0);
            return vpn;
        }

        @Override
        public Vpn[] newArray(int i) {
            return new Vpn[i];
        }
    };

    @Override
    public String toString() {
        return "Vpn{" +
                "name='" + name + '\'' +
                ", connected=" + connected +
                '}';
    }
}




Java Source Code List

net.phedny.android.pivpn.ApplicationTest.java
net.phedny.android.pivpn.CommService.java
net.phedny.android.pivpn.Constants.java
net.phedny.android.pivpn.InterfaceAdapter.java
net.phedny.android.pivpn.InterfaceParser.java
net.phedny.android.pivpn.Interface.java
net.phedny.android.pivpn.MainActivity.java
net.phedny.android.pivpn.SettingsActivity.java
net.phedny.android.pivpn.SettingsFragment.java
net.phedny.android.pivpn.VpnAdapter.java
net.phedny.android.pivpn.Vpn.java