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