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 17 package android.net.wifi; 18 19 import android.net.wifi.BatchedScanResult; 20 import android.net.wifi.BatchedScanSettings; 21 import android.net.wifi.WifiConfiguration; 22 import android.net.wifi.WifiInfo; 23 import android.net.wifi.ScanSettings; 24 import android.net.wifi.WifiChannel; 25 import android.net.wifi.ScanResult; 26 import android.net.wifi.WifiConnectionStatistics; 27 import android.net.wifi.WifiActivityEnergyInfo; 28 29 import android.net.DhcpInfo; 30 31 32 import android.os.Messenger; 33 import android.os.WorkSource; 34 35 /** 36 * Interface that allows controlling and querying Wi-Fi connectivity. 37 * 38 * {@hide} 39 */ 40 interface IWifiManager 41 { getSupportedFeatures()42 int getSupportedFeatures(); 43 reportActivityInfo()44 WifiActivityEnergyInfo reportActivityInfo(); 45 getConfiguredNetworks()46 List<WifiConfiguration> getConfiguredNetworks(); 47 getPrivilegedConfiguredNetworks()48 List<WifiConfiguration> getPrivilegedConfiguredNetworks(); 49 addOrUpdateNetwork(in WifiConfiguration config)50 int addOrUpdateNetwork(in WifiConfiguration config); 51 removeNetwork(int netId)52 boolean removeNetwork(int netId); 53 enableNetwork(int netId, boolean disableOthers)54 boolean enableNetwork(int netId, boolean disableOthers); 55 disableNetwork(int netId)56 boolean disableNetwork(int netId); 57 pingSupplicant()58 boolean pingSupplicant(); 59 getChannelList()60 List<WifiChannel> getChannelList(); 61 startScan(in ScanSettings requested, in WorkSource ws)62 void startScan(in ScanSettings requested, in WorkSource ws); 63 getScanResults(String callingPackage)64 List<ScanResult> getScanResults(String callingPackage); 65 disconnect()66 void disconnect(); 67 reconnect()68 void reconnect(); 69 reassociate()70 void reassociate(); 71 getConnectionInfo()72 WifiInfo getConnectionInfo(); 73 setWifiEnabled(boolean enable)74 boolean setWifiEnabled(boolean enable); 75 getWifiEnabledState()76 int getWifiEnabledState(); 77 setCountryCode(String country, boolean persist)78 void setCountryCode(String country, boolean persist); 79 setFrequencyBand(int band, boolean persist)80 void setFrequencyBand(int band, boolean persist); 81 getFrequencyBand()82 int getFrequencyBand(); 83 isDualBandSupported()84 boolean isDualBandSupported(); 85 saveConfiguration()86 boolean saveConfiguration(); 87 getDhcpInfo()88 DhcpInfo getDhcpInfo(); 89 isScanAlwaysAvailable()90 boolean isScanAlwaysAvailable(); 91 acquireWifiLock(IBinder lock, int lockType, String tag, in WorkSource ws)92 boolean acquireWifiLock(IBinder lock, int lockType, String tag, in WorkSource ws); 93 updateWifiLockWorkSource(IBinder lock, in WorkSource ws)94 void updateWifiLockWorkSource(IBinder lock, in WorkSource ws); 95 releaseWifiLock(IBinder lock)96 boolean releaseWifiLock(IBinder lock); 97 initializeMulticastFiltering()98 void initializeMulticastFiltering(); 99 isMulticastEnabled()100 boolean isMulticastEnabled(); 101 acquireMulticastLock(IBinder binder, String tag)102 void acquireMulticastLock(IBinder binder, String tag); 103 releaseMulticastLock()104 void releaseMulticastLock(); 105 setWifiApEnabled(in WifiConfiguration wifiConfig, boolean enable)106 void setWifiApEnabled(in WifiConfiguration wifiConfig, boolean enable); 107 getWifiApEnabledState()108 int getWifiApEnabledState(); 109 getWifiApConfiguration()110 WifiConfiguration getWifiApConfiguration(); 111 setWifiApConfiguration(in WifiConfiguration wifiConfig)112 void setWifiApConfiguration(in WifiConfiguration wifiConfig); 113 startWifi()114 void startWifi(); 115 stopWifi()116 void stopWifi(); 117 addToBlacklist(String bssid)118 void addToBlacklist(String bssid); 119 clearBlacklist()120 void clearBlacklist(); 121 getWifiServiceMessenger()122 Messenger getWifiServiceMessenger(); 123 getConfigFile()124 String getConfigFile(); 125 enableTdls(String remoteIPAddress, boolean enable)126 void enableTdls(String remoteIPAddress, boolean enable); 127 enableTdlsWithMacAddress(String remoteMacAddress, boolean enable)128 void enableTdlsWithMacAddress(String remoteMacAddress, boolean enable); 129 requestBatchedScan(in BatchedScanSettings requested, IBinder binder, in WorkSource ws)130 boolean requestBatchedScan(in BatchedScanSettings requested, IBinder binder, in WorkSource ws); 131 stopBatchedScan(in BatchedScanSettings requested)132 void stopBatchedScan(in BatchedScanSettings requested); 133 getBatchedScanResults(String callingPackage)134 List<BatchedScanResult> getBatchedScanResults(String callingPackage); 135 isBatchedScanSupported()136 boolean isBatchedScanSupported(); 137 pollBatchedScan()138 void pollBatchedScan(); 139 getWpsNfcConfigurationToken(int netId)140 String getWpsNfcConfigurationToken(int netId); 141 enableVerboseLogging(int verbose)142 void enableVerboseLogging(int verbose); 143 getVerboseLoggingLevel()144 int getVerboseLoggingLevel(); 145 getAggressiveHandover()146 int getAggressiveHandover(); 147 enableAggressiveHandover(int enabled)148 void enableAggressiveHandover(int enabled); 149 getAllowScansWithTraffic()150 int getAllowScansWithTraffic(); 151 setAllowScansWithTraffic(int enabled)152 void setAllowScansWithTraffic(int enabled); 153 getConnectionStatistics()154 WifiConnectionStatistics getConnectionStatistics(); 155 } 156 157