2 * Copyright (C) 2016 The Android Open Source Project
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 package android.net.wifi;
19 import android.net.wifi.IApInterface;
20 import android.net.wifi.IClientInterface;
21 import android.net.wifi.IInterfaceEventCallback;
23 // Service interface that exposes primitives for controlling the WiFi
24 // subsystems of a device.
27 // Create a network interface suitable for use as an AP.
28 @nullable IApInterface createApInterface();
30 // Create a network interface suitable for use as a WiFi client.
31 @nullable IClientInterface createClientInterface();
33 // Tear down all existing interfaces. This should enable clients to create
34 // future interfaces immediately after this method returns.
35 void tearDownInterfaces();
37 // @return list of the currently configured IClientInterface instances.
38 List<IBinder> GetClientInterfaces();
40 // @return list of the currently configured IApInterface instances.
41 List<IBinder> GetApInterfaces();
43 // Register a callback to receive interface status updates.
45 // Multiple callbacks can be registered simultaneously.
46 // Duplicate registrations of the same callback will be ignored.
48 // @param callback object to add to the set of registered callbacks.
49 oneway void RegisterCallback(IInterfaceEventCallback callback);
51 // Remove a callback from the set of registered callbacks.
53 // This must be the same instance as previously registered.
54 // Requests to remove unknown callbacks will be ignored.
56 // @param callback object to remove from the set of registered callbacks.
57 oneway void UnregisterCallback(IInterfaceEventCallback callback);