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.WifiInfo;
20import android.net.wifi.WifiConfiguration;
21import android.net.wifi.ScanResult;
22import android.net.DhcpInfo;
23
24import android.os.Messenger;
25import android.os.WorkSource;
26
27/**
28 * Interface that allows controlling and querying Wi-Fi connectivity.
29 *
30 * {@hide}
31 */
32interface IWifiManager
33{
34    List<WifiConfiguration> getConfiguredNetworks();
35
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
46    void startScan(boolean forceActive);
47
48    List<ScanResult> getScanResults();
49
50    void disconnect();
51
52    void reconnect();
53
54    void reassociate();
55
56    WifiInfo getConnectionInfo();
57
58    boolean setWifiEnabled(boolean enable);
59
60    int getWifiEnabledState();
61
62    void setCountryCode(String country, boolean persist);
63
64    void setFrequencyBand(int band, boolean persist);
65
66    int getFrequencyBand();
67
68    boolean isDualBandSupported();
69
70    boolean saveConfiguration();
71
72    DhcpInfo getDhcpInfo();
73
74    boolean acquireWifiLock(IBinder lock, int lockType, String tag, in WorkSource ws);
75
76    void updateWifiLockWorkSource(IBinder lock, in WorkSource ws);
77
78    boolean releaseWifiLock(IBinder lock);
79
80    void initializeMulticastFiltering();
81
82    boolean isMulticastEnabled();
83
84    void acquireMulticastLock(IBinder binder, String tag);
85
86    void releaseMulticastLock();
87
88    void setWifiApEnabled(in WifiConfiguration wifiConfig, boolean enable);
89
90    int getWifiApEnabledState();
91
92    WifiConfiguration getWifiApConfiguration();
93
94    void setWifiApConfiguration(in WifiConfiguration wifiConfig);
95
96    void startWifi();
97
98    void stopWifi();
99
100    void addToBlacklist(String bssid);
101
102    void clearBlacklist();
103
104    Messenger getWifiServiceMessenger();
105
106    Messenger getWifiStateMachineMessenger();
107
108    String getConfigFile();
109
110    void captivePortalCheckComplete();
111}
112
113