blob: 6b0807414b9138813432bd2941d4b67c037f5147 [file] [log] [blame]
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001/**
2 * Copyright (c) 2008, The Android Open Source Project
3 *
Irfan Sheriff227bec42011-02-15 19:30:27 -08004 * 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
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08007 *
Irfan Sheriff227bec42011-02-15 19:30:27 -08008 * http://www.apache.org/licenses/LICENSE-2.0
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08009 *
Irfan Sheriff227bec42011-02-15 19:30:27 -080010 * 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
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080014 * 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
Irfan Sheriff227bec42011-02-15 19:30:27 -080024import android.os.Messenger;
Dianne Hackborn7e9f4eb2010-09-10 18:43:00 -070025import android.os.WorkSource;
26
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080027/**
28 * Interface that allows controlling and querying Wi-Fi connectivity.
29 *
30 * {@hide}
31 */
32interface IWifiManager
33{
34 List<WifiConfiguration> getConfiguredNetworks();
Irfan Sheriff5321aef2010-02-12 12:35:59 -080035
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080036 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
Irfan Sheriffe4984752010-08-19 11:29:22 -070046 void startScan(boolean forceActive);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080047
48 List<ScanResult> getScanResults();
49
Irfan Sheriffe4984752010-08-19 11:29:22 -070050 void disconnect();
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080051
Irfan Sheriffe4984752010-08-19 11:29:22 -070052 void reconnect();
Irfan Sheriff5321aef2010-02-12 12:35:59 -080053
Irfan Sheriffe4984752010-08-19 11:29:22 -070054 void reassociate();
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080055
56 WifiInfo getConnectionInfo();
57
58 boolean setWifiEnabled(boolean enable);
59
60 int getWifiEnabledState();
61
Irfan Sheriffed4f28b2010-10-29 15:32:10 -070062 void setCountryCode(String country, boolean persist);
Irfan Sheriff5321aef2010-02-12 12:35:59 -080063
Irfan Sheriff36f74132010-11-04 16:57:37 -070064 void setFrequencyBand(int band, boolean persist);
65
66 int getFrequencyBand();
67
68 boolean isDualBandSupported();
69
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080070 boolean saveConfiguration();
71
72 DhcpInfo getDhcpInfo();
73
Dianne Hackborn7e9f4eb2010-09-10 18:43:00 -070074 boolean acquireWifiLock(IBinder lock, int lockType, String tag, in WorkSource ws);
75
76 void updateWifiLockWorkSource(IBinder lock, in WorkSource ws);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080077
78 boolean releaseWifiLock(IBinder lock);
Robert Greenwalt5347bd42009-05-13 15:10:16 -070079
Robert Greenwalte2d155a2009-10-21 14:58:34 -070080 void initializeMulticastFiltering();
81
Robert Greenwalt58ff0212009-05-19 15:53:54 -070082 boolean isMulticastEnabled();
Robert Greenwalt5347bd42009-05-13 15:10:16 -070083
Robert Greenwaltfc1b15c2009-05-22 15:09:51 -070084 void acquireMulticastLock(IBinder binder, String tag);
Robert Greenwalt5347bd42009-05-13 15:10:16 -070085
Robert Greenwaltfc1b15c2009-05-22 15:09:51 -070086 void releaseMulticastLock();
Irfan Sheriff5321aef2010-02-12 12:35:59 -080087
Irfan Sheriffffcea7a2011-05-10 16:26:06 -070088 void setWifiApEnabled(in WifiConfiguration wifiConfig, boolean enable);
Irfan Sheriff5321aef2010-02-12 12:35:59 -080089
90 int getWifiApEnabledState();
Irfan Sheriff9ab518ad2010-03-12 15:48:17 -080091
92 WifiConfiguration getWifiApConfiguration();
Irfan Sheriff17b232b2010-06-24 11:32:26 -070093
94 void setWifiApConfiguration(in WifiConfiguration wifiConfig);
Irfan Sheriff0d255342010-07-28 09:35:20 -070095
96 void startWifi();
97
98 void stopWifi();
99
100 void addToBlacklist(String bssid);
101
102 void clearBlacklist();
Irfan Sheriffe04653c2010-08-09 09:09:59 -0700103
Irfan Sheriff07573b32012-01-27 21:00:19 -0800104 Messenger getWifiServiceMessenger();
105
106 Messenger getWifiStateMachineMessenger();
Irfan Sheriff4aeca7c52011-03-10 16:53:33 -0800107
108 String getConfigFile();
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800109}
110