blob: f3738e309830cb959d6683906c30d4044c4a8ae7 [file] [log] [blame]
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001/**
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
24/**
25 * Interface that allows controlling and querying Wi-Fi connectivity.
26 *
27 * {@hide}
28 */
29interface IWifiManager
30{
31 List<WifiConfiguration> getConfiguredNetworks();
32
33 int addOrUpdateNetwork(in WifiConfiguration config);
34
35 boolean removeNetwork(int netId);
36
37 boolean enableNetwork(int netId, boolean disableOthers);
38
39 boolean disableNetwork(int netId);
40
41 boolean pingSupplicant();
42
Mike Lockwooda5ec95c2009-07-08 17:11:17 -040043 boolean startScan(boolean forceActive);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080044
45 List<ScanResult> getScanResults();
46
47 boolean disconnect();
48
49 boolean reconnect();
50
51 boolean reassociate();
52
53 WifiInfo getConnectionInfo();
54
55 boolean setWifiEnabled(boolean enable);
56
57 int getWifiEnabledState();
58
59 int getNumAllowedChannels();
60
Robert Greenwaltb5010cc2009-05-21 15:11:40 -070061 boolean setNumAllowedChannels(int numChannels, boolean persist);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080062
63 int[] getValidChannelCounts();
64
65 boolean saveConfiguration();
66
67 DhcpInfo getDhcpInfo();
68
69 boolean acquireWifiLock(IBinder lock, int lockType, String tag);
70
71 boolean releaseWifiLock(IBinder lock);
Robert Greenwalt5347bd42009-05-13 15:10:16 -070072
Robert Greenwalte2d155a2009-10-21 14:58:34 -070073 void initializeMulticastFiltering();
74
Robert Greenwalt58ff0212009-05-19 15:53:54 -070075 boolean isMulticastEnabled();
Robert Greenwalt5347bd42009-05-13 15:10:16 -070076
Robert Greenwaltfc1b15c2009-05-22 15:09:51 -070077 void acquireMulticastLock(IBinder binder, String tag);
Robert Greenwalt5347bd42009-05-13 15:10:16 -070078
Robert Greenwaltfc1b15c2009-05-22 15:09:51 -070079 void releaseMulticastLock();
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080080}
81