IConnectivityManager.aidl revision 100155a310fbb5028fc48e359bdfb7c4d3531843
1/** 2 * Copyright (c) 2008, 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; 18 19import android.net.LinkProperties; 20import android.net.NetworkInfo; 21import android.net.NetworkState; 22import android.net.ProxyProperties; 23import android.os.IBinder; 24import android.os.ParcelFileDescriptor; 25 26import com.android.internal.net.VpnConfig; 27 28/** 29 * Interface that answers queries about, and allows changing, the 30 * state of network connectivity. 31 */ 32/** {@hide} */ 33interface IConnectivityManager 34{ 35 void setNetworkPreference(int pref); 36 37 int getNetworkPreference(); 38 39 NetworkInfo getActiveNetworkInfo(); 40 NetworkInfo getActiveNetworkInfoForUid(int uid); 41 NetworkInfo getNetworkInfo(int networkType); 42 NetworkInfo[] getAllNetworkInfo(); 43 44 LinkProperties getActiveLinkProperties(); 45 LinkProperties getLinkProperties(int networkType); 46 47 NetworkState[] getAllNetworkState(); 48 49 boolean setRadios(boolean onOff); 50 51 boolean setRadio(int networkType, boolean turnOn); 52 53 int startUsingNetworkFeature(int networkType, in String feature, 54 in IBinder binder); 55 56 int stopUsingNetworkFeature(int networkType, in String feature); 57 58 boolean requestRouteToHost(int networkType, int hostAddress); 59 60 boolean requestRouteToHostAddress(int networkType, in byte[] hostAddress); 61 62 boolean getBackgroundDataSetting(); 63 64 void setBackgroundDataSetting(boolean allowBackgroundData); 65 66 boolean getMobileDataEnabled(); 67 68 void setMobileDataEnabled(boolean enabled); 69 70 int tether(String iface); 71 72 int untether(String iface); 73 74 int getLastTetherError(String iface); 75 76 boolean isTetheringSupported(); 77 78 String[] getTetherableIfaces(); 79 80 String[] getTetheredIfaces(); 81 82 String[] getTetheringErroredIfaces(); 83 84 String[] getTetherableUsbRegexs(); 85 86 String[] getTetherableWifiRegexs(); 87 88 String[] getTetherableBluetoothRegexs(); 89 90 void requestNetworkTransitionWakelock(in String forWhom); 91 92 void reportInetCondition(int networkType, int percentage); 93 94 ProxyProperties getGlobalProxy(); 95 96 void setGlobalProxy(in ProxyProperties p); 97 98 ProxyProperties getProxy(); 99 100 void setDataDependency(int networkType, boolean met); 101 102 void protectVpn(in ParcelFileDescriptor socket); 103 104 boolean prepareVpn(String oldPackage, String newPackage); 105 106 ParcelFileDescriptor establishVpn(in VpnConfig config); 107 108 void doLegacyVpn(in VpnConfig config, in String[] racoon, in String[] mtpd); 109} 110