IWificond.aidl revision 47443838f760908b9a6571aed4f4fa4e93ad37bc
1fa9619e3efeb8afab8be0a71f77cda26261622cbNingyuan Wang/* 2fa9619e3efeb8afab8be0a71f77cda26261622cbNingyuan Wang * Copyright (C) 2016 The Android Open Source Project 3fa9619e3efeb8afab8be0a71f77cda26261622cbNingyuan Wang * 4fa9619e3efeb8afab8be0a71f77cda26261622cbNingyuan Wang * Licensed under the Apache License, Version 2.0 (the "License"); 5fa9619e3efeb8afab8be0a71f77cda26261622cbNingyuan Wang * you may not use this file except in compliance with the License. 6fa9619e3efeb8afab8be0a71f77cda26261622cbNingyuan Wang * You may obtain a copy of the License at 7fa9619e3efeb8afab8be0a71f77cda26261622cbNingyuan Wang * 8fa9619e3efeb8afab8be0a71f77cda26261622cbNingyuan Wang * http://www.apache.org/licenses/LICENSE-2.0 9fa9619e3efeb8afab8be0a71f77cda26261622cbNingyuan Wang * 10fa9619e3efeb8afab8be0a71f77cda26261622cbNingyuan Wang * Unless required by applicable law or agreed to in writing, software 11fa9619e3efeb8afab8be0a71f77cda26261622cbNingyuan Wang * distributed under the License is distributed on an "AS IS" BASIS, 12fa9619e3efeb8afab8be0a71f77cda26261622cbNingyuan Wang * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13fa9619e3efeb8afab8be0a71f77cda26261622cbNingyuan Wang * See the License for the specific language governing permissions and 14fa9619e3efeb8afab8be0a71f77cda26261622cbNingyuan Wang * limitations under the License. 15fa9619e3efeb8afab8be0a71f77cda26261622cbNingyuan Wang */ 16fa9619e3efeb8afab8be0a71f77cda26261622cbNingyuan Wang 17f771ca1e6e0961f7a9296f140f4df0eaea9dcaddChristopher Wileypackage android.net.wifi; 18f771ca1e6e0961f7a9296f140f4df0eaea9dcaddChristopher Wiley 19f229bbe6676ac7d12f4aa22a902eb2eefb2fc5c6Christopher Wileyimport android.net.wifi.IApInterface; 20c139fbf821d3c62523afbcf0950ebc2d1abaa93dChristopher Wileyimport android.net.wifi.IClientInterface; 21dea7ebe3078dc347ef4d49d2293b391a479242cfNingyuan Wangimport android.net.wifi.IInterfaceEventCallback; 22f229bbe6676ac7d12f4aa22a902eb2eefb2fc5c6Christopher Wiley 23f771ca1e6e0961f7a9296f140f4df0eaea9dcaddChristopher Wiley// Service interface that exposes primitives for controlling the WiFi 24fb2880c1108cf2b68599f3a879bf2f97dce6a3d4Christopher Wiley// subsystems of a device. 25f771ca1e6e0961f7a9296f140f4df0eaea9dcaddChristopher Wileyinterface IWificond { 26f771ca1e6e0961f7a9296f140f4df0eaea9dcaddChristopher Wiley 2730b1d2976873e3fe3cf7b8c5f381848c9c1ccdb2Christopher Wiley // Create a network interface suitable for use as an AP. 2847443838f760908b9a6571aed4f4fa4e93ad37bcRoshan Pius @nullable IApInterface createApInterface(@utf8InCpp String iface_name); 29f229bbe6676ac7d12f4aa22a902eb2eefb2fc5c6Christopher Wiley 30c139fbf821d3c62523afbcf0950ebc2d1abaa93dChristopher Wiley // Create a network interface suitable for use as a WiFi client. 3147443838f760908b9a6571aed4f4fa4e93ad37bcRoshan Pius @nullable IClientInterface createClientInterface(@utf8InCpp String iface_name); 32c139fbf821d3c62523afbcf0950ebc2d1abaa93dChristopher Wiley 3330b1d2976873e3fe3cf7b8c5f381848c9c1ccdb2Christopher Wiley // Tear down all existing interfaces. This should enable clients to create 3430b1d2976873e3fe3cf7b8c5f381848c9c1ccdb2Christopher Wiley // future interfaces immediately after this method returns. 3530b1d2976873e3fe3cf7b8c5f381848c9c1ccdb2Christopher Wiley void tearDownInterfaces(); 36f229bbe6676ac7d12f4aa22a902eb2eefb2fc5c6Christopher Wiley 3729fca8817115e7b30eac16cce5917520b1fc2834Ningyuan Wang // @return list of the currently configured IClientInterface instances. 3829fca8817115e7b30eac16cce5917520b1fc2834Ningyuan Wang List<IBinder> GetClientInterfaces(); 3929fca8817115e7b30eac16cce5917520b1fc2834Ningyuan Wang 4029fca8817115e7b30eac16cce5917520b1fc2834Ningyuan Wang // @return list of the currently configured IApInterface instances. 4129fca8817115e7b30eac16cce5917520b1fc2834Ningyuan Wang List<IBinder> GetApInterfaces(); 4229fca8817115e7b30eac16cce5917520b1fc2834Ningyuan Wang 43dea7ebe3078dc347ef4d49d2293b391a479242cfNingyuan Wang // Register a callback to receive interface status updates. 44dea7ebe3078dc347ef4d49d2293b391a479242cfNingyuan Wang // 45dea7ebe3078dc347ef4d49d2293b391a479242cfNingyuan Wang // Multiple callbacks can be registered simultaneously. 46dea7ebe3078dc347ef4d49d2293b391a479242cfNingyuan Wang // Duplicate registrations of the same callback will be ignored. 47dea7ebe3078dc347ef4d49d2293b391a479242cfNingyuan Wang // 48dea7ebe3078dc347ef4d49d2293b391a479242cfNingyuan Wang // @param callback object to add to the set of registered callbacks. 49dea7ebe3078dc347ef4d49d2293b391a479242cfNingyuan Wang oneway void RegisterCallback(IInterfaceEventCallback callback); 50dea7ebe3078dc347ef4d49d2293b391a479242cfNingyuan Wang 51dea7ebe3078dc347ef4d49d2293b391a479242cfNingyuan Wang // Remove a callback from the set of registered callbacks. 52dea7ebe3078dc347ef4d49d2293b391a479242cfNingyuan Wang // 53dea7ebe3078dc347ef4d49d2293b391a479242cfNingyuan Wang // This must be the same instance as previously registered. 54dea7ebe3078dc347ef4d49d2293b391a479242cfNingyuan Wang // Requests to remove unknown callbacks will be ignored. 55dea7ebe3078dc347ef4d49d2293b391a479242cfNingyuan Wang // 56dea7ebe3078dc347ef4d49d2293b391a479242cfNingyuan Wang // @param callback object to remove from the set of registered callbacks. 57dea7ebe3078dc347ef4d49d2293b391a479242cfNingyuan Wang oneway void UnregisterCallback(IInterfaceEventCallback callback); 58fa9619e3efeb8afab8be0a71f77cda26261622cbNingyuan Wang} 59