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