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