blob: 8be492c8e07740d7cde546a0003b355aaec5e134 [file] [log] [blame]
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001/**
2 * Copyright (c) 2008, The Android Open Source Project
3 *
Danica Chang6fdd0c62010-08-11 14:54:43 -07004 * 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
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08007 *
Danica Chang6fdd0c62010-08-11 14:54:43 -07008 * http://www.apache.org/licenses/LICENSE-2.0
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08009 *
Danica Chang6fdd0c62010-08-11 14:54:43 -070010 * 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
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080014 * limitations under the License.
15 */
16
17package android.net;
18
Robert Greenwaltd192dad2010-09-14 09:18:02 -070019import android.net.LinkProperties;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080020import android.net.NetworkInfo;
Robert Greenwalt434203a2010-10-11 16:00:27 -070021import android.net.ProxyProperties;
Robert Greenwalt42acef32009-08-12 16:08:25 -070022import android.os.IBinder;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080023
24/**
25 * Interface that answers queries about, and allows changing, the
26 * state of network connectivity.
27 */
28/** {@hide} */
29interface IConnectivityManager
30{
31 void setNetworkPreference(int pref);
32
33 int getNetworkPreference();
34
35 NetworkInfo getActiveNetworkInfo();
36
37 NetworkInfo getNetworkInfo(int networkType);
38
39 NetworkInfo[] getAllNetworkInfo();
40
Robert Greenwaltd192dad2010-09-14 09:18:02 -070041 LinkProperties getActiveLinkProperties();
42
43 LinkProperties getLinkProperties(int networkType);
44
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080045 boolean setRadios(boolean onOff);
46
47 boolean setRadio(int networkType, boolean turnOn);
48
Robert Greenwalt42acef32009-08-12 16:08:25 -070049 int startUsingNetworkFeature(int networkType, in String feature,
50 in IBinder binder);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080051
52 int stopUsingNetworkFeature(int networkType, in String feature);
53
54 boolean requestRouteToHost(int networkType, int hostAddress);
55
Robert Greenwalt585ac0f2010-08-27 09:24:29 -070056 boolean requestRouteToHostAddress(int networkType, in byte[] hostAddress);
57
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080058 boolean getBackgroundDataSetting();
59
60 void setBackgroundDataSetting(boolean allowBackgroundData);
Robert Greenwaltd0e18ff2010-01-26 11:40:34 -080061
Robert Greenwaltc03fa502010-02-23 18:58:05 -080062 boolean getMobileDataEnabled();
63
64 void setMobileDataEnabled(boolean enabled);
65
Robert Greenwalt5a735062010-03-02 17:25:02 -080066 int tether(String iface);
Robert Greenwaltd0e18ff2010-01-26 11:40:34 -080067
Robert Greenwalt5a735062010-03-02 17:25:02 -080068 int untether(String iface);
69
70 int getLastTetherError(String iface);
Robert Greenwaltd0e18ff2010-01-26 11:40:34 -080071
Robert Greenwalt2a091d72010-02-11 18:18:40 -080072 boolean isTetheringSupported();
73
Robert Greenwaltd0e18ff2010-01-26 11:40:34 -080074 String[] getTetherableIfaces();
75
76 String[] getTetheredIfaces();
Robert Greenwalt2a091d72010-02-11 18:18:40 -080077
Robert Greenwalt5a735062010-03-02 17:25:02 -080078 String[] getTetheringErroredIfaces();
79
Robert Greenwalt2a091d72010-02-11 18:18:40 -080080 String[] getTetherableUsbRegexs();
81
82 String[] getTetherableWifiRegexs();
Robert Greenwalt14f2ef42010-06-15 12:19:37 -070083
Danica Chang6fdd0c62010-08-11 14:54:43 -070084 String[] getTetherableBluetoothRegexs();
85
Robert Greenwalt14f2ef42010-06-15 12:19:37 -070086 void requestNetworkTransitionWakelock(in String forWhom);
Robert Greenwaltca4306c2010-09-09 13:15:32 -070087
Robert Greenwaltd7085fc2010-09-08 15:24:47 -070088 void reportInetCondition(int networkType, int percentage);
Robert Greenwalt434203a2010-10-11 16:00:27 -070089
90 ProxyProperties getGlobalProxy();
91
92 void setGlobalProxy(in ProxyProperties p);
93
94 ProxyProperties getProxy();
Robert Greenwaltd55a6b42011-03-25 13:09:25 -070095
96 void setDataDependency(int networkType, boolean met);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080097}