1 /* 2 * Copyright (C) 2018 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 17 package android.net.wifi; 18 19 import android.net.wifi.SoftApCapability; 20 import android.net.wifi.SoftApInfo; 21 import android.net.wifi.WifiClient; 22 import android.net.wifi.SoftApState; 23 24 /** 25 * Interface for Soft AP callback. 26 * 27 * @hide 28 */ 29 oneway interface ISoftApCallback 30 { 31 /** 32 * Service to manager callback providing current soft AP state. The possible 33 * parameter values listed are defined in WifiManager.java 34 * 35 * @param new SoftApState 36 */ onStateChanged(in SoftApState state)37 void onStateChanged(in SoftApState state); 38 39 /** 40 * Service to manager callback providing informations of softap. 41 * 42 * @param infos The currently {@link SoftApInfo} in each AP instance. 43 * @param clients The currently connected clients in each AP instance. 44 * @param isBridged whether or not the current AP enabled on bridged mode. 45 * @param isRegistration whether or not the callbackk was triggered when register. 46 */ onConnectedClientsOrInfoChanged(in Map<String, SoftApInfo> infos, in Map<String, List<WifiClient>> clients, boolean isBridged, boolean isRegistration)47 void onConnectedClientsOrInfoChanged(in Map<String, SoftApInfo> infos, 48 in Map<String, List<WifiClient>> clients, boolean isBridged, 49 boolean isRegistration); 50 51 /** 52 * Service to manager callback providing capability of softap. 53 * 54 * @param capability is the softap capability. {@link SoftApCapability} 55 */ onCapabilityChanged(in SoftApCapability capability)56 void onCapabilityChanged(in SoftApCapability capability); 57 58 /** 59 * Service to manager callback providing blocked client of softap with specific reason code. 60 * 61 * @param client the currently blocked client. 62 * @param blockedReason one of blocked reason from {@link WifiManager.SapClientBlockedReason} 63 */ onBlockedClientConnecting(in WifiClient client, int blockedReason)64 void onBlockedClientConnecting(in WifiClient client, int blockedReason); 65 } 66