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 com.android.internal.R; 20 21/** 22 * Enumeration of all supported VPN types. 23 * {@hide} 24 */ 25public enum VpnType { 26 PPTP("PPTP", R.string.pptp_vpn_description, PptpProfile.class), 27 L2TP("L2TP", R.string.l2tp_vpn_description, L2tpProfile.class), 28 L2TP_IPSEC_PSK("L2TP/IPSec PSK", R.string.l2tp_ipsec_psk_vpn_description, 29 L2tpIpsecPskProfile.class), 30 L2TP_IPSEC("L2TP/IPSec CRT", R.string.l2tp_ipsec_crt_vpn_description, 31 L2tpIpsecProfile.class); 32 33 private String mDisplayName; 34 private int mDescriptionId; 35 private Class<? extends VpnProfile> mClass; 36 37 VpnType(String displayName, int descriptionId, 38 Class<? extends VpnProfile> klass) { 39 mDisplayName = displayName; 40 mDescriptionId = descriptionId; 41 mClass = klass; 42 } 43 44 public String getDisplayName() { 45 return mDisplayName; 46 } 47 48 public int getDescriptionId() { 49 return mDescriptionId; 50 } 51 52 public Class<? extends VpnProfile> getProfileClass() { 53 return mClass; 54 } 55} 56