IWificond.aidl revision dea7ebe3078dc347ef4d49d2293b391a479242cf
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. 28eafdaa952e5d9de2c944d28c861a17406b54337cChristopher Wiley @nullable IApInterface createApInterface(); 29f229bbe6676ac7d12f4aa22a902eb2eefb2fc5c6Christopher Wiley 30c139fbf821d3c62523afbcf0950ebc2d1abaa93dChristopher Wiley // Create a network interface suitable for use as a WiFi client. 31c139fbf821d3c62523afbcf0950ebc2d1abaa93dChristopher Wiley @nullable IClientInterface createClientInterface(); 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 37dea7ebe3078dc347ef4d49d2293b391a479242cfNingyuan Wang // Register a callback to receive interface status updates. 38dea7ebe3078dc347ef4d49d2293b391a479242cfNingyuan Wang // 39dea7ebe3078dc347ef4d49d2293b391a479242cfNingyuan Wang // Multiple callbacks can be registered simultaneously. 40dea7ebe3078dc347ef4d49d2293b391a479242cfNingyuan Wang // Duplicate registrations of the same callback will be ignored. 41dea7ebe3078dc347ef4d49d2293b391a479242cfNingyuan Wang // 42dea7ebe3078dc347ef4d49d2293b391a479242cfNingyuan Wang // @param callback object to add to the set of registered callbacks. 43dea7ebe3078dc347ef4d49d2293b391a479242cfNingyuan Wang oneway void RegisterCallback(IInterfaceEventCallback callback); 44dea7ebe3078dc347ef4d49d2293b391a479242cfNingyuan Wang 45dea7ebe3078dc347ef4d49d2293b391a479242cfNingyuan Wang // Remove a callback from the set of registered callbacks. 46dea7ebe3078dc347ef4d49d2293b391a479242cfNingyuan Wang // 47dea7ebe3078dc347ef4d49d2293b391a479242cfNingyuan Wang // This must be the same instance as previously registered. 48dea7ebe3078dc347ef4d49d2293b391a479242cfNingyuan Wang // Requests to remove unknown callbacks will be ignored. 49dea7ebe3078dc347ef4d49d2293b391a479242cfNingyuan Wang // 50dea7ebe3078dc347ef4d49d2293b391a479242cfNingyuan Wang // @param callback object to remove from the set of registered callbacks. 51dea7ebe3078dc347ef4d49d2293b391a479242cfNingyuan Wang oneway void UnregisterCallback(IInterfaceEventCallback callback); 52dea7ebe3078dc347ef4d49d2293b391a479242cfNingyuan Wang 53fa9619e3efeb8afab8be0a71f77cda26261622cbNingyuan Wang} 54