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