1 /* 2 * Copyright (C) 2023 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.p2p; 18 19 import android.net.wifi.p2p.WifiP2pDevice; 20 import android.net.wifi.p2p.WifiP2pDeviceList; 21 import android.net.wifi.p2p.WifiP2pInfo; 22 import android.net.wifi.p2p.WifiP2pGroup; 23 import android.net.wifi.p2p.WifiP2pGroupList; 24 25 /** 26 * Interface for Wi-Fi p2p listener. 27 * @hide 28 */ 29 oneway interface IWifiP2pListener 30 { onP2pStateChanged(int state)31 void onP2pStateChanged(int state); onDiscoveryStateChanged(int state)32 void onDiscoveryStateChanged(int state); onListenStateChanged(int state)33 void onListenStateChanged(int state); onDeviceConfigurationChanged(in WifiP2pDevice p2pDevice)34 void onDeviceConfigurationChanged(in WifiP2pDevice p2pDevice); onPeerListChanged(in WifiP2pDeviceList p2pDeviceList)35 void onPeerListChanged(in WifiP2pDeviceList p2pDeviceList); onPersistentGroupsChanged(in WifiP2pGroupList p2pGroupList)36 void onPersistentGroupsChanged(in WifiP2pGroupList p2pGroupList); onGroupCreating()37 void onGroupCreating(); onGroupNegotiationRejectedByUser()38 void onGroupNegotiationRejectedByUser(); onGroupCreationFailed(int reason)39 void onGroupCreationFailed(int reason); onGroupCreated(in WifiP2pInfo p2pInfo, in WifiP2pGroup p2pGroup)40 void onGroupCreated(in WifiP2pInfo p2pInfo, in WifiP2pGroup p2pGroup); onPeerClientJoined(in WifiP2pInfo p2pInfo, in WifiP2pGroup p2pGroup)41 void onPeerClientJoined(in WifiP2pInfo p2pInfo, in WifiP2pGroup p2pGroup); onPeerClientDisconnected(in WifiP2pInfo p2pInfo, in WifiP2pGroup p2pGroup)42 void onPeerClientDisconnected(in WifiP2pInfo p2pInfo, in WifiP2pGroup p2pGroup); onFrequencyChanged(in WifiP2pInfo p2pInfo, in WifiP2pGroup p2pGroup)43 void onFrequencyChanged(in WifiP2pInfo p2pInfo, in WifiP2pGroup p2pGroup); onGroupRemoved()44 void onGroupRemoved(); 45 } 46