1 /*
2  * Copyright (C) 2016 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.aware;
18 
19 import android.net.wifi.aware.AwarePairingConfig;
20 import android.net.wifi.OuiKeyedData;
21 
22 /**
23  * Callback interface that WifiAwareManager implements
24  *
25  * {@hide}
26  */
27 oneway interface IWifiAwareDiscoverySessionCallback
28 {
onSessionStarted(int discoverySessionId)29     void onSessionStarted(int discoverySessionId);
onSessionConfigSuccess()30     void onSessionConfigSuccess();
onSessionConfigFail(int reason)31     void onSessionConfigFail(int reason);
onSessionTerminated(int reason)32     void onSessionTerminated(int reason);
onSessionSuspendSucceeded()33     void onSessionSuspendSucceeded();
onSessionSuspendFail(int reason)34     void onSessionSuspendFail(int reason);
onSessionResumeSucceeded()35     void onSessionResumeSucceeded();
onSessionResumeFail(int reason)36     void onSessionResumeFail(int reason);
37 
onMatch(int peerId, in byte[] serviceSpecificInfo, in byte[] matchFilter, int peerCipherSuite, in byte[] scid, String pairingAlias, in AwarePairingConfig pairingConfig, in OuiKeyedData[] vendorData)38     void onMatch(int peerId, in byte[] serviceSpecificInfo, in byte[] matchFilter,
39             int peerCipherSuite, in byte[] scid, String pairingAlias,
40             in AwarePairingConfig pairingConfig, in OuiKeyedData[] vendorData);
onMatchWithDistance(int peerId, in byte[] serviceSpecificInfo, in byte[] matchFilter, int distanceMm, int peerCipherSuite, in byte[] scid, String pairingAlias, in AwarePairingConfig pairingConfig, in OuiKeyedData[] vendorData)41     void onMatchWithDistance(int peerId, in byte[] serviceSpecificInfo, in byte[] matchFilter,
42             int distanceMm, int peerCipherSuite, in byte[] scid, String pairingAlias,
43             in AwarePairingConfig pairingConfig, in OuiKeyedData[] vendorData);
44 
onMessageSendSuccess(int messageId)45     void onMessageSendSuccess(int messageId);
onMessageSendFail(int messageId, int reason)46     void onMessageSendFail(int messageId, int reason);
onMessageReceived(int peerId, in byte[] message)47     void onMessageReceived(int peerId, in byte[] message);
onMatchExpired(int peerId)48     void onMatchExpired(int peerId);
onPairingSetupRequestReceived(int peerId, int requestId)49     void onPairingSetupRequestReceived(int peerId, int requestId);
onPairingSetupConfirmed(int peerId, boolean accept, String alias)50     void onPairingSetupConfirmed(int peerId, boolean accept, String alias);
onPairingVerificationConfirmed(int peerId, boolean accept, String alias)51     void onPairingVerificationConfirmed(int peerId, boolean accept, String alias);
onBootstrappingVerificationConfirmed(int peerId, boolean accept, int method)52     void onBootstrappingVerificationConfirmed(int peerId, boolean accept, int method);
53 }
54