android: Add field for MTU to data model
[strongswan.git] / src / frontends / android / src / org / strongswan / android / data / VpnProfile.java
1 /*
2 * Copyright (C) 2012-2015 Tobias Brunner
3 * Copyright (C) 2012 Giuliano Grassi
4 * Copyright (C) 2012 Ralf Sager
5 * Hochschule fuer Technik Rapperswil
6 *
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>.
11 *
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
15 * for more details.
16 */
17
18 package org.strongswan.android.data;
19
20 public class VpnProfile implements Cloneable
21 {
22 private String mName, mGateway, mUsername, mPassword, mCertificate, mUserCertificate;
23 private Integer mMTU;
24 private VpnType mVpnType;
25 private long mId = -1;
26
27 public long getId()
28 {
29 return mId;
30 }
31
32 public void setId(long id)
33 {
34 this.mId = id;
35 }
36
37 public String getName()
38 {
39 return mName;
40 }
41
42 public void setName(String name)
43 {
44 this.mName = name;
45 }
46
47 public String getGateway()
48 {
49 return mGateway;
50 }
51
52 public void setGateway(String gateway)
53 {
54 this.mGateway = gateway;
55 }
56
57 public VpnType getVpnType()
58 {
59 return mVpnType;
60 }
61
62 public void setVpnType(VpnType type)
63 {
64 this.mVpnType = type;
65 }
66
67 public String getUsername()
68 {
69 return mUsername;
70 }
71
72 public void setUsername(String username)
73 {
74 this.mUsername = username;
75 }
76
77 public String getPassword()
78 {
79 return mPassword;
80 }
81
82 public void setPassword(String password)
83 {
84 this.mPassword = password;
85 }
86
87 public String getCertificateAlias()
88 {
89 return mCertificate;
90 }
91
92 public void setCertificateAlias(String alias)
93 {
94 this.mCertificate = alias;
95 }
96
97 public String getUserCertificateAlias()
98 {
99 return mUserCertificate;
100 }
101
102 public void setUserCertificateAlias(String alias)
103 {
104 this.mUserCertificate = alias;
105 }
106
107 public Integer getMTU()
108 {
109 return mMTU;
110 }
111
112 public void setMTU(Integer mtu)
113 {
114 this.mMTU = mtu;
115 }
116
117 @Override
118 public String toString()
119 {
120 return mName;
121 }
122
123 @Override
124 public boolean equals(Object o)
125 {
126 if (o != null && o instanceof VpnProfile)
127 {
128 return this.mId == ((VpnProfile)o).getId();
129 }
130 return false;
131 }
132
133 @Override
134 public VpnProfile clone()
135 {
136 try
137 {
138 return (VpnProfile)super.clone();
139 }
140 catch (CloneNotSupportedException e)
141 {
142 throw new AssertionError();
143 }
144 }
145 }