Home | History | Annotate | Download | only in vpn2
      1 /*
      2  * Copyright (C) 2013 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 
     17 package com.android.settings.vpn2;
     18 
     19 import com.android.internal.net.VpnProfile;
     20 
     21 /**
     22  * Wrapper for VPN Profile and associated certificate files
     23  */
     24 public class VpnInfo {
     25     // VPN Profile
     26     private VpnProfile mVpnProfile;
     27     // Certificate file in PC12 format for user certificates and private keys
     28     private String mCertificateFile = null;
     29     // Password to extract certificates from the file
     30     private String mPassword = null;
     31 
     32     public VpnInfo(VpnProfile vpnProfile, String certFile, String password) {
     33         mVpnProfile = vpnProfile;
     34         mCertificateFile = certFile;
     35         mPassword = password;
     36     }
     37 
     38     public VpnInfo(VpnProfile vpnProfile) {
     39         mVpnProfile = vpnProfile;
     40     }
     41 
     42     public void setVpnProfile(VpnProfile vpnProfile) {
     43         mVpnProfile = vpnProfile;
     44     }
     45 
     46     public void setCertificateFile(String certFile) {
     47         mCertificateFile = certFile;
     48     }
     49 
     50     public void setPassword(String password) {
     51         mPassword = password;
     52     }
     53 
     54     public VpnProfile getVpnProfile() {
     55         return mVpnProfile;
     56     }
     57 
     58     public String getCertificateFile() {
     59         return mCertificateFile;
     60     }
     61 
     62     public String getPassword() {
     63         return mPassword;
     64     }
     65 }
     66