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