2 * Copyright (C) 2012 Tobias Brunner
3 * Copyright (C) 2012 Giuliano Grassi
4 * Copyright (C) 2012 Ralf Sager
5 * Hochschule fuer Technik Rapperswil
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
18 package org
.strongswan
.android
.data
;
20 public class VpnProfile
implements Cloneable
22 private String mName
, mGateway
, mUsername
, mPassword
, mCertificate
, mUserCertificate
;
23 private long mId
= -1;
30 public void setId(long id
)
35 public String
getName()
40 public void setName(String name
)
45 public String
getGateway()
50 public void setGateway(String gateway
)
52 this.mGateway
= gateway
;
55 public String
getUsername()
60 public void setUsername(String username
)
62 this.mUsername
= username
;
65 public String
getPassword()
70 public void setPassword(String password
)
72 this.mPassword
= password
;
75 public String
getCertificateAlias()
80 public void setCertificateAlias(String alias
)
82 this.mCertificate
= alias
;
85 public String
getUserCertificateAlias()
87 return mUserCertificate
;
90 public void setUserCertificateAlias(String alias
)
92 this.mUserCertificate
= alias
;
96 public String
toString()
102 public boolean equals(Object o
)
104 if (o
!= null
&& o
instanceof VpnProfile
)
106 return this.mId
== ((VpnProfile
)o
).getId();
112 public VpnProfile
clone()
116 return (VpnProfile
)super.clone();
118 catch (CloneNotSupportedException e
)
120 throw new AssertionError();