The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1 | /** |
| 2 | * Copyright (c) 2008, The Android Open Source Project |
| 3 | * |
Danica Chang | 6fdd0c6 | 2010-08-11 14:54:43 -0700 | [diff] [blame] | 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 |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 7 | * |
Danica Chang | 6fdd0c6 | 2010-08-11 14:54:43 -0700 | [diff] [blame] | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 9 | * |
Danica Chang | 6fdd0c6 | 2010-08-11 14:54:43 -0700 | [diff] [blame] | 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 |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | package android.net; |
| 18 | |
| 19 | import android.net.NetworkInfo; |
Robert Greenwalt | 42acef3 | 2009-08-12 16:08:25 -0700 | [diff] [blame] | 20 | import android.os.IBinder; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 21 | |
| 22 | /** |
| 23 | * Interface that answers queries about, and allows changing, the |
| 24 | * state of network connectivity. |
| 25 | */ |
| 26 | /** {@hide} */ |
| 27 | interface IConnectivityManager |
| 28 | { |
| 29 | void setNetworkPreference(int pref); |
| 30 | |
| 31 | int getNetworkPreference(); |
| 32 | |
| 33 | NetworkInfo getActiveNetworkInfo(); |
| 34 | |
| 35 | NetworkInfo getNetworkInfo(int networkType); |
| 36 | |
| 37 | NetworkInfo[] getAllNetworkInfo(); |
| 38 | |
| 39 | boolean setRadios(boolean onOff); |
| 40 | |
| 41 | boolean setRadio(int networkType, boolean turnOn); |
| 42 | |
Robert Greenwalt | 42acef3 | 2009-08-12 16:08:25 -0700 | [diff] [blame] | 43 | int startUsingNetworkFeature(int networkType, in String feature, |
| 44 | in IBinder binder); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 45 | |
| 46 | int stopUsingNetworkFeature(int networkType, in String feature); |
| 47 | |
| 48 | boolean requestRouteToHost(int networkType, int hostAddress); |
| 49 | |
Robert Greenwalt | 585ac0f | 2010-08-27 09:24:29 -0700 | [diff] [blame] | 50 | boolean requestRouteToHostAddress(int networkType, in byte[] hostAddress); |
| 51 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 52 | boolean getBackgroundDataSetting(); |
| 53 | |
| 54 | void setBackgroundDataSetting(boolean allowBackgroundData); |
Robert Greenwalt | d0e18ff | 2010-01-26 11:40:34 -0800 | [diff] [blame] | 55 | |
Robert Greenwalt | c03fa50 | 2010-02-23 18:58:05 -0800 | [diff] [blame] | 56 | boolean getMobileDataEnabled(); |
| 57 | |
| 58 | void setMobileDataEnabled(boolean enabled); |
| 59 | |
Robert Greenwalt | 5a73506 | 2010-03-02 17:25:02 -0800 | [diff] [blame] | 60 | int tether(String iface); |
Robert Greenwalt | d0e18ff | 2010-01-26 11:40:34 -0800 | [diff] [blame] | 61 | |
Robert Greenwalt | 5a73506 | 2010-03-02 17:25:02 -0800 | [diff] [blame] | 62 | int untether(String iface); |
| 63 | |
| 64 | int getLastTetherError(String iface); |
Robert Greenwalt | d0e18ff | 2010-01-26 11:40:34 -0800 | [diff] [blame] | 65 | |
Robert Greenwalt | 2a091d7 | 2010-02-11 18:18:40 -0800 | [diff] [blame] | 66 | boolean isTetheringSupported(); |
| 67 | |
Robert Greenwalt | d0e18ff | 2010-01-26 11:40:34 -0800 | [diff] [blame] | 68 | String[] getTetherableIfaces(); |
| 69 | |
| 70 | String[] getTetheredIfaces(); |
Robert Greenwalt | 2a091d7 | 2010-02-11 18:18:40 -0800 | [diff] [blame] | 71 | |
Robert Greenwalt | 5a73506 | 2010-03-02 17:25:02 -0800 | [diff] [blame] | 72 | String[] getTetheringErroredIfaces(); |
| 73 | |
Robert Greenwalt | 2a091d7 | 2010-02-11 18:18:40 -0800 | [diff] [blame] | 74 | String[] getTetherableUsbRegexs(); |
| 75 | |
| 76 | String[] getTetherableWifiRegexs(); |
Robert Greenwalt | 14f2ef4 | 2010-06-15 12:19:37 -0700 | [diff] [blame] | 77 | |
Danica Chang | 6fdd0c6 | 2010-08-11 14:54:43 -0700 | [diff] [blame] | 78 | String[] getTetherableBluetoothRegexs(); |
| 79 | |
Robert Greenwalt | 14f2ef4 | 2010-06-15 12:19:37 -0700 | [diff] [blame] | 80 | void requestNetworkTransitionWakelock(in String forWhom); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 81 | } |