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 
startLocationRestrictedScan(in WorkSource ws)64     void startLocationRestrictedScan(in WorkSource ws);
65 
getScanResults(String callingPackage)66     List<ScanResult> getScanResults(String callingPackage);
67 
disconnect()68     void disconnect();
69 
reconnect()70     void reconnect();
71 
reassociate()72     void reassociate();
73 
getConnectionInfo()74     WifiInfo getConnectionInfo();
75 
setWifiEnabled(boolean enable)76     boolean setWifiEnabled(boolean enable);
77 
getWifiEnabledState()78     int getWifiEnabledState();
79 
setCountryCode(String country, boolean persist)80     void setCountryCode(String country, boolean persist);
81 
setFrequencyBand(int band, boolean persist)82     void setFrequencyBand(int band, boolean persist);
83 
getFrequencyBand()84     int getFrequencyBand();
85 
isDualBandSupported()86     boolean isDualBandSupported();
87 
saveConfiguration()88     boolean saveConfiguration();
89 
getDhcpInfo()90     DhcpInfo getDhcpInfo();
91 
isScanAlwaysAvailable()92     boolean isScanAlwaysAvailable();
93 
acquireWifiLock(IBinder lock, int lockType, String tag, in WorkSource ws)94     boolean acquireWifiLock(IBinder lock, int lockType, String tag, in WorkSource ws);
95 
updateWifiLockWorkSource(IBinder lock, in WorkSource ws)96     void updateWifiLockWorkSource(IBinder lock, in WorkSource ws);
97 
releaseWifiLock(IBinder lock)98     boolean releaseWifiLock(IBinder lock);
99 
initializeMulticastFiltering()100     void initializeMulticastFiltering();
101 
isMulticastEnabled()102     boolean isMulticastEnabled();
103 
acquireMulticastLock(IBinder binder, String tag)104     void acquireMulticastLock(IBinder binder, String tag);
105 
releaseMulticastLock()106     void releaseMulticastLock();
107 
setWifiApEnabled(in WifiConfiguration wifiConfig, boolean enable)108     void setWifiApEnabled(in WifiConfiguration wifiConfig, boolean enable);
109 
getWifiApEnabledState()110     int getWifiApEnabledState();
111 
getWifiApConfiguration()112     WifiConfiguration getWifiApConfiguration();
113 
setWifiApConfiguration(in WifiConfiguration wifiConfig)114     void setWifiApConfiguration(in WifiConfiguration wifiConfig);
115 
startWifi()116     void startWifi();
117 
stopWifi()118     void stopWifi();
119 
addToBlacklist(String bssid)120     void addToBlacklist(String bssid);
121 
clearBlacklist()122     void clearBlacklist();
123 
getWifiServiceMessenger()124     Messenger getWifiServiceMessenger();
125 
getConfigFile()126     String getConfigFile();
127 
enableTdls(String remoteIPAddress, boolean enable)128     void enableTdls(String remoteIPAddress, boolean enable);
129 
enableTdlsWithMacAddress(String remoteMacAddress, boolean enable)130     void enableTdlsWithMacAddress(String remoteMacAddress, boolean enable);
131 
requestBatchedScan(in BatchedScanSettings requested, IBinder binder, in WorkSource ws)132     boolean requestBatchedScan(in BatchedScanSettings requested, IBinder binder, in WorkSource ws);
133 
stopBatchedScan(in BatchedScanSettings requested)134     void stopBatchedScan(in BatchedScanSettings requested);
135 
getBatchedScanResults(String callingPackage)136     List<BatchedScanResult> getBatchedScanResults(String callingPackage);
137 
isBatchedScanSupported()138     boolean isBatchedScanSupported();
139 
pollBatchedScan()140     void pollBatchedScan();
141 
getWpsNfcConfigurationToken(int netId)142     String getWpsNfcConfigurationToken(int netId);
143 
enableVerboseLogging(int verbose)144     void enableVerboseLogging(int verbose);
145 
getVerboseLoggingLevel()146     int getVerboseLoggingLevel();
147 
getAggressiveHandover()148     int getAggressiveHandover();
149 
enableAggressiveHandover(int enabled)150     void enableAggressiveHandover(int enabled);
151 
getAllowScansWithTraffic()152     int getAllowScansWithTraffic();
153 
setAllowScansWithTraffic(int enabled)154     void setAllowScansWithTraffic(int enabled);
155 
getConnectionStatistics()156     WifiConnectionStatistics getConnectionStatistics();
157 
disableEphemeralNetwork(String SSID)158     void disableEphemeralNetwork(String SSID);
159 }
160 
161