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