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 | * |
Irfan Sheriff | 227bec4 | 2011-02-15 19:30:27 -0800 | [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 | * |
Irfan Sheriff | 227bec4 | 2011-02-15 19:30:27 -0800 | [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 | * |
Irfan Sheriff | 227bec4 | 2011-02-15 19:30:27 -0800 | [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.wifi; |
| 18 | |
| 19 | import android.net.wifi.WifiInfo; |
| 20 | import android.net.wifi.WifiConfiguration; |
| 21 | import android.net.wifi.ScanResult; |
| 22 | import android.net.DhcpInfo; |
| 23 | |
Irfan Sheriff | 227bec4 | 2011-02-15 19:30:27 -0800 | [diff] [blame] | 24 | import android.os.Messenger; |
Dianne Hackborn | 7e9f4eb | 2010-09-10 18:43:00 -0700 | [diff] [blame] | 25 | import android.os.WorkSource; |
| 26 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 27 | /** |
| 28 | * Interface that allows controlling and querying Wi-Fi connectivity. |
| 29 | * |
| 30 | * {@hide} |
| 31 | */ |
| 32 | interface IWifiManager |
| 33 | { |
| 34 | List<WifiConfiguration> getConfiguredNetworks(); |
Irfan Sheriff | 5321aef | 2010-02-12 12:35:59 -0800 | [diff] [blame] | 35 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 36 | int addOrUpdateNetwork(in WifiConfiguration config); |
| 37 | |
| 38 | boolean removeNetwork(int netId); |
| 39 | |
| 40 | boolean enableNetwork(int netId, boolean disableOthers); |
| 41 | |
| 42 | boolean disableNetwork(int netId); |
| 43 | |
| 44 | boolean pingSupplicant(); |
| 45 | |
Irfan Sheriff | e498475 | 2010-08-19 11:29:22 -0700 | [diff] [blame] | 46 | void startScan(boolean forceActive); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 47 | |
| 48 | List<ScanResult> getScanResults(); |
| 49 | |
Irfan Sheriff | e498475 | 2010-08-19 11:29:22 -0700 | [diff] [blame] | 50 | void disconnect(); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 51 | |
Irfan Sheriff | e498475 | 2010-08-19 11:29:22 -0700 | [diff] [blame] | 52 | void reconnect(); |
Irfan Sheriff | 5321aef | 2010-02-12 12:35:59 -0800 | [diff] [blame] | 53 | |
Irfan Sheriff | e498475 | 2010-08-19 11:29:22 -0700 | [diff] [blame] | 54 | void reassociate(); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 55 | |
| 56 | WifiInfo getConnectionInfo(); |
| 57 | |
| 58 | boolean setWifiEnabled(boolean enable); |
| 59 | |
| 60 | int getWifiEnabledState(); |
| 61 | |
Irfan Sheriff | ed4f28b | 2010-10-29 15:32:10 -0700 | [diff] [blame] | 62 | void setCountryCode(String country, boolean persist); |
Irfan Sheriff | 5321aef | 2010-02-12 12:35:59 -0800 | [diff] [blame] | 63 | |
Irfan Sheriff | 36f7413 | 2010-11-04 16:57:37 -0700 | [diff] [blame] | 64 | void setFrequencyBand(int band, boolean persist); |
| 65 | |
| 66 | int getFrequencyBand(); |
| 67 | |
| 68 | boolean isDualBandSupported(); |
| 69 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 70 | boolean saveConfiguration(); |
| 71 | |
| 72 | DhcpInfo getDhcpInfo(); |
| 73 | |
Dianne Hackborn | 7e9f4eb | 2010-09-10 18:43:00 -0700 | [diff] [blame] | 74 | boolean acquireWifiLock(IBinder lock, int lockType, String tag, in WorkSource ws); |
| 75 | |
| 76 | void updateWifiLockWorkSource(IBinder lock, in WorkSource ws); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 77 | |
| 78 | boolean releaseWifiLock(IBinder lock); |
Robert Greenwalt | 5347bd4 | 2009-05-13 15:10:16 -0700 | [diff] [blame] | 79 | |
Robert Greenwalt | e2d155a | 2009-10-21 14:58:34 -0700 | [diff] [blame] | 80 | void initializeMulticastFiltering(); |
| 81 | |
Robert Greenwalt | 58ff021 | 2009-05-19 15:53:54 -0700 | [diff] [blame] | 82 | boolean isMulticastEnabled(); |
Robert Greenwalt | 5347bd4 | 2009-05-13 15:10:16 -0700 | [diff] [blame] | 83 | |
Robert Greenwalt | fc1b15c | 2009-05-22 15:09:51 -0700 | [diff] [blame] | 84 | void acquireMulticastLock(IBinder binder, String tag); |
Robert Greenwalt | 5347bd4 | 2009-05-13 15:10:16 -0700 | [diff] [blame] | 85 | |
Robert Greenwalt | fc1b15c | 2009-05-22 15:09:51 -0700 | [diff] [blame] | 86 | void releaseMulticastLock(); |
Irfan Sheriff | 5321aef | 2010-02-12 12:35:59 -0800 | [diff] [blame] | 87 | |
Irfan Sheriff | ffcea7a | 2011-05-10 16:26:06 -0700 | [diff] [blame] | 88 | void setWifiApEnabled(in WifiConfiguration wifiConfig, boolean enable); |
Irfan Sheriff | 5321aef | 2010-02-12 12:35:59 -0800 | [diff] [blame] | 89 | |
| 90 | int getWifiApEnabledState(); |
Irfan Sheriff | 9ab518ad | 2010-03-12 15:48:17 -0800 | [diff] [blame] | 91 | |
| 92 | WifiConfiguration getWifiApConfiguration(); |
Irfan Sheriff | 17b232b | 2010-06-24 11:32:26 -0700 | [diff] [blame] | 93 | |
| 94 | void setWifiApConfiguration(in WifiConfiguration wifiConfig); |
Irfan Sheriff | 0d25534 | 2010-07-28 09:35:20 -0700 | [diff] [blame] | 95 | |
| 96 | void startWifi(); |
| 97 | |
| 98 | void stopWifi(); |
| 99 | |
| 100 | void addToBlacklist(String bssid); |
| 101 | |
| 102 | void clearBlacklist(); |
Irfan Sheriff | e04653c | 2010-08-09 09:09:59 -0700 | [diff] [blame] | 103 | |
Irfan Sheriff | 07573b3 | 2012-01-27 21:00:19 -0800 | [diff] [blame] | 104 | Messenger getWifiServiceMessenger(); |
| 105 | |
| 106 | Messenger getWifiStateMachineMessenger(); |
Irfan Sheriff | 4aeca7c5 | 2011-03-10 16:53:33 -0800 | [diff] [blame] | 107 | |
| 108 | String getConfigFile(); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 109 | } |
| 110 | |