Loading Android.mk +2 −0 Original line number Diff line number Diff line Loading @@ -155,6 +155,7 @@ LOCAL_SRC_FILES += \ tts/java/android/tts/ITts.aidl \ wifi/java/android/net/wifi/IWifiManager.aidl \ telephony/java/com/android/internal/telephony/IExtendedNetworkService.aidl vpn/java/android/net/vpn/IVpnService.aidl \ # FRAMEWORKS_BASE_JAVA_SRC_DIRS comes from build/core/pathmap.mk LOCAL_AIDL_INCLUDES += $(FRAMEWORKS_BASE_JAVA_SRC_DIRS) Loading Loading @@ -228,6 +229,7 @@ aidl_files := \ frameworks/base/telephony/java/android/telephony/ServiceState.aidl \ frameworks/base/telephony/java/com/android/internal/telephony/IPhoneSubInfo.aidl \ frameworks/base/telephony/java/com/android/internal/telephony/ITelephony.aidl frameworks/base/vpn/java/android/net/vpn/IVpnService.aidl \ gen := $(TARGET_OUT_COMMON_INTERMEDIATES)/framework.aidl $(gen): PRIVATE_SRC_FILES := $(aidl_files) Loading vpn/java/android/net/vpn/IVpnService.aidl 0 → 100644 +43 −0 Original line number Diff line number Diff line /* * Copyright (C) 2007, The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.net.vpn; import android.net.vpn.VpnProfile; /** * Interface to access a VPN service. * {@hide} */ interface IVpnService { /** * Sets up the VPN connection. * @param profile the profile object * @param username the username for authentication * @param password the corresponding password for authentication */ boolean connect(in VpnProfile profile, String username, String password); /** * Tears down the VPN connection. */ void disconnect(); /** * Makes the service broadcast the connectivity state. */ void checkStatus(in VpnProfile profile); } vpn/java/android/net/vpn/L2tpIpsecProfile.java 0 → 100644 +74 −0 Original line number Diff line number Diff line /* * Copyright (C) 2007, The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.net.vpn; import android.os.Parcel; /** * The profile for L2TP-over-IPSec type of VPN. * {@hide} */ public class L2tpIpsecProfile extends SingleServerProfile { private String mUserCertificate; private String mCaCertificate; private String mUserkey; @Override public VpnType getType() { return VpnType.L2TP_IPSEC; } public void setCaCertificate(String name) { mCaCertificate = name; } public String getCaCertificate() { return mCaCertificate; } public void setUserCertificate(String name) { mUserCertificate = name; } public String getUserCertificate() { return mUserCertificate; } public void setUserkey(String name) { mUserkey = name; } public String getUserkey() { return mUserkey; } @Override protected void readFromParcel(Parcel in) { super.readFromParcel(in); mCaCertificate = in.readString(); mUserCertificate = in.readString(); mUserkey = in.readString(); } @Override public void writeToParcel(Parcel parcel, int flags) { super.writeToParcel(parcel, flags); parcel.writeString(mCaCertificate); parcel.writeString(mUserCertificate); parcel.writeString(mUserkey); } } vpn/java/android/net/vpn/L2tpProfile.java 0 → 100644 +28 −0 Original line number Diff line number Diff line /* * Copyright (C) 2007, The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.net.vpn; /** * The profile for L2TP type of VPN. * {@hide} */ public class L2tpProfile extends SingleServerProfile { @Override public VpnType getType() { return VpnType.L2TP; } } vpn/java/android/net/vpn/SingleServerProfile.java 0 → 100644 +47 −0 Original line number Diff line number Diff line /* * Copyright (C) 2007, The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.net.vpn; import android.os.Parcel; /** * The profile for single-server type of VPN. * {@hide} */ public abstract class SingleServerProfile extends VpnProfile { private String mServerName; public void setServerName(String name) { mServerName = name; } public String getServerName() { return mServerName; } @Override protected void readFromParcel(Parcel in) { super.readFromParcel(in); mServerName = in.readString(); } @Override public void writeToParcel(Parcel parcel, int flags) { super.writeToParcel(parcel, flags); parcel.writeString(mServerName); } } Loading
Android.mk +2 −0 Original line number Diff line number Diff line Loading @@ -155,6 +155,7 @@ LOCAL_SRC_FILES += \ tts/java/android/tts/ITts.aidl \ wifi/java/android/net/wifi/IWifiManager.aidl \ telephony/java/com/android/internal/telephony/IExtendedNetworkService.aidl vpn/java/android/net/vpn/IVpnService.aidl \ # FRAMEWORKS_BASE_JAVA_SRC_DIRS comes from build/core/pathmap.mk LOCAL_AIDL_INCLUDES += $(FRAMEWORKS_BASE_JAVA_SRC_DIRS) Loading Loading @@ -228,6 +229,7 @@ aidl_files := \ frameworks/base/telephony/java/android/telephony/ServiceState.aidl \ frameworks/base/telephony/java/com/android/internal/telephony/IPhoneSubInfo.aidl \ frameworks/base/telephony/java/com/android/internal/telephony/ITelephony.aidl frameworks/base/vpn/java/android/net/vpn/IVpnService.aidl \ gen := $(TARGET_OUT_COMMON_INTERMEDIATES)/framework.aidl $(gen): PRIVATE_SRC_FILES := $(aidl_files) Loading
vpn/java/android/net/vpn/IVpnService.aidl 0 → 100644 +43 −0 Original line number Diff line number Diff line /* * Copyright (C) 2007, The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.net.vpn; import android.net.vpn.VpnProfile; /** * Interface to access a VPN service. * {@hide} */ interface IVpnService { /** * Sets up the VPN connection. * @param profile the profile object * @param username the username for authentication * @param password the corresponding password for authentication */ boolean connect(in VpnProfile profile, String username, String password); /** * Tears down the VPN connection. */ void disconnect(); /** * Makes the service broadcast the connectivity state. */ void checkStatus(in VpnProfile profile); }
vpn/java/android/net/vpn/L2tpIpsecProfile.java 0 → 100644 +74 −0 Original line number Diff line number Diff line /* * Copyright (C) 2007, The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.net.vpn; import android.os.Parcel; /** * The profile for L2TP-over-IPSec type of VPN. * {@hide} */ public class L2tpIpsecProfile extends SingleServerProfile { private String mUserCertificate; private String mCaCertificate; private String mUserkey; @Override public VpnType getType() { return VpnType.L2TP_IPSEC; } public void setCaCertificate(String name) { mCaCertificate = name; } public String getCaCertificate() { return mCaCertificate; } public void setUserCertificate(String name) { mUserCertificate = name; } public String getUserCertificate() { return mUserCertificate; } public void setUserkey(String name) { mUserkey = name; } public String getUserkey() { return mUserkey; } @Override protected void readFromParcel(Parcel in) { super.readFromParcel(in); mCaCertificate = in.readString(); mUserCertificate = in.readString(); mUserkey = in.readString(); } @Override public void writeToParcel(Parcel parcel, int flags) { super.writeToParcel(parcel, flags); parcel.writeString(mCaCertificate); parcel.writeString(mUserCertificate); parcel.writeString(mUserkey); } }
vpn/java/android/net/vpn/L2tpProfile.java 0 → 100644 +28 −0 Original line number Diff line number Diff line /* * Copyright (C) 2007, The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.net.vpn; /** * The profile for L2TP type of VPN. * {@hide} */ public class L2tpProfile extends SingleServerProfile { @Override public VpnType getType() { return VpnType.L2TP; } }
vpn/java/android/net/vpn/SingleServerProfile.java 0 → 100644 +47 −0 Original line number Diff line number Diff line /* * Copyright (C) 2007, The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.net.vpn; import android.os.Parcel; /** * The profile for single-server type of VPN. * {@hide} */ public abstract class SingleServerProfile extends VpnProfile { private String mServerName; public void setServerName(String name) { mServerName = name; } public String getServerName() { return mServerName; } @Override protected void readFromParcel(Parcel in) { super.readFromParcel(in); mServerName = in.readString(); } @Override public void writeToParcel(Parcel parcel, int flags) { super.writeToParcel(parcel, flags); parcel.writeString(mServerName); } }