1/*
2 * Copyright (C) 2009, The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *     http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package android.net.vpn;
18
19import android.os.Parcel;
20
21/**
22 * The profile for pre-shared-key-based L2TP-over-IPSec type of VPN.
23 * {@hide}
24 */
25public class L2tpIpsecPskProfile extends L2tpProfile {
26    private static final long serialVersionUID = 1L;
27
28    private String mPresharedKey;
29
30    @Override
31    public VpnType getType() {
32        return VpnType.L2TP_IPSEC_PSK;
33    }
34
35    public void setPresharedKey(String key) {
36        mPresharedKey = key;
37    }
38
39    public String getPresharedKey() {
40        return mPresharedKey;
41    }
42
43    @Override
44    protected void readFromParcel(Parcel in) {
45        super.readFromParcel(in);
46        mPresharedKey = in.readString();
47    }
48
49    @Override
50    public void writeToParcel(Parcel parcel, int flags) {
51        super.writeToParcel(parcel, flags);
52        parcel.writeString(mPresharedKey);
53    }
54}
55