IClientInterface.aidl revision 223dfaafe0214c54ac6eb6ab0dc6899b3f2c58c3
17971782245f5f5b8c7a13fbd1f5a753040e01377Christopher Wiley/* 27971782245f5f5b8c7a13fbd1f5a753040e01377Christopher Wiley * Copyright (C) 2016 The Android Open Source Project 37971782245f5f5b8c7a13fbd1f5a753040e01377Christopher Wiley * 47971782245f5f5b8c7a13fbd1f5a753040e01377Christopher Wiley * Licensed under the Apache License, Version 2.0 (the "License"); 57971782245f5f5b8c7a13fbd1f5a753040e01377Christopher Wiley * you may not use this file except in compliance with the License. 67971782245f5f5b8c7a13fbd1f5a753040e01377Christopher Wiley * You may obtain a copy of the License at 77971782245f5f5b8c7a13fbd1f5a753040e01377Christopher Wiley * 87971782245f5f5b8c7a13fbd1f5a753040e01377Christopher Wiley * http://www.apache.org/licenses/LICENSE-2.0 97971782245f5f5b8c7a13fbd1f5a753040e01377Christopher Wiley * 107971782245f5f5b8c7a13fbd1f5a753040e01377Christopher Wiley * Unless required by applicable law or agreed to in writing, software 117971782245f5f5b8c7a13fbd1f5a753040e01377Christopher Wiley * distributed under the License is distributed on an "AS IS" BASIS, 127971782245f5f5b8c7a13fbd1f5a753040e01377Christopher Wiley * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 137971782245f5f5b8c7a13fbd1f5a753040e01377Christopher Wiley * See the License for the specific language governing permissions and 147971782245f5f5b8c7a13fbd1f5a753040e01377Christopher Wiley * limitations under the License. 157971782245f5f5b8c7a13fbd1f5a753040e01377Christopher Wiley */ 167971782245f5f5b8c7a13fbd1f5a753040e01377Christopher Wiley 177971782245f5f5b8c7a13fbd1f5a753040e01377Christopher Wileypackage android.net.wifi; 187971782245f5f5b8c7a13fbd1f5a753040e01377Christopher Wiley 197971782245f5f5b8c7a13fbd1f5a753040e01377Christopher Wiley// IClientInterface represents a network interface that can be used to connect 207971782245f5f5b8c7a13fbd1f5a753040e01377Christopher Wiley// to access points and obtain internet connectivity. 217971782245f5f5b8c7a13fbd1f5a753040e01377Christopher Wileyinterface IClientInterface { 227971782245f5f5b8c7a13fbd1f5a753040e01377Christopher Wiley 2366527843f7df41d152e09b21dec2f0d931db08dbChristopher Wiley // Enable a wpa_supplicant instance running against this interface. 2466527843f7df41d152e09b21dec2f0d931db08dbChristopher Wiley // Returns true if supplicant was successfully enabled, or is already enabled. 2566527843f7df41d152e09b21dec2f0d931db08dbChristopher Wiley boolean enableSupplicant(); 2666527843f7df41d152e09b21dec2f0d931db08dbChristopher Wiley 2766527843f7df41d152e09b21dec2f0d931db08dbChristopher Wiley // Remove this interface from wpa_supplicant's control. 2866527843f7df41d152e09b21dec2f0d931db08dbChristopher Wiley // Returns true if removal was successful. 2966527843f7df41d152e09b21dec2f0d931db08dbChristopher Wiley boolean disableSupplicant(); 30a12253e46c1328548c4b37d7f365b4009a6e5776Ningyuan Wang 31a12253e46c1328548c4b37d7f365b4009a6e5776Ningyuan Wang // Get packet counters for this interface. 32a12253e46c1328548c4b37d7f365b4009a6e5776Ningyuan Wang // First element in array is the number of successfully transmitted packets. 33a12253e46c1328548c4b37d7f365b4009a6e5776Ningyuan Wang // Second element in array is the number of tramsmission failure. 34b52f635f890b0370349014890fcb6bc49ebabd66Ningyuan Wang // This call is valid only when interface is associated with an AP, otherwise 35b52f635f890b0370349014890fcb6bc49ebabd66Ningyuan Wang // it returns an empty array. 36a12253e46c1328548c4b37d7f365b4009a6e5776Ningyuan Wang int[] getPacketCounters(); 37cc77f636f4c790dd8a7ecefc3bbe8568fc8b040bNingyuan Wang 38b52f635f890b0370349014890fcb6bc49ebabd66Ningyuan Wang // Do signal poll for this interface. 39b52f635f890b0370349014890fcb6bc49ebabd66Ningyuan Wang // First element in array is the RSSI value in dBM. 40b52f635f890b0370349014890fcb6bc49ebabd66Ningyuan Wang // Second element in array is the transmission bit rate in Mbps. 41b52f635f890b0370349014890fcb6bc49ebabd66Ningyuan Wang // This call is valid only when interface is associated with an AP, otherwise 42b52f635f890b0370349014890fcb6bc49ebabd66Ningyuan Wang // it returns an empty array. 43b52f635f890b0370349014890fcb6bc49ebabd66Ningyuan Wang int[] signalPoll(); 44b52f635f890b0370349014890fcb6bc49ebabd66Ningyuan Wang 45cc77f636f4c790dd8a7ecefc3bbe8568fc8b040bNingyuan Wang // Get the MAC address of this interface. 46cc77f636f4c790dd8a7ecefc3bbe8568fc8b040bNingyuan Wang byte[] getMacAddress(); 47223dfaafe0214c54ac6eb6ab0dc6899b3f2c58c3Christopher Wiley 48223dfaafe0214c54ac6eb6ab0dc6899b3f2c58c3Christopher Wiley // Retrieve the name of the network interface corresponding to this 49223dfaafe0214c54ac6eb6ab0dc6899b3f2c58c3Christopher Wiley // IClientInterface instance (e.g. "wlan0") 50223dfaafe0214c54ac6eb6ab0dc6899b3f2c58c3Christopher Wiley @utf8InCpp 51223dfaafe0214c54ac6eb6ab0dc6899b3f2c58c3Christopher Wiley String getInterfaceName(); 52223dfaafe0214c54ac6eb6ab0dc6899b3f2c58c3Christopher Wiley 537971782245f5f5b8c7a13fbd1f5a753040e01377Christopher Wiley} 54