1 /*
2  * Copyright (C) 2024 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 /**
20  * Interface for target wake time (TWT) callback
21  *
22  * @hide
23  */
24 oneway interface ITwtCallback
25 {
26     /**
27      * Called when a TWT session setup operation fails.
28      *
29      * @param errorCode setup error code
30      * @hide
31      */
onFailure(int errorCode)32     void onFailure(int errorCode);
33     /**
34      * Called when a TWT session is torndown. Can be called as a response to
35      * {@link TwtSession#teardown()} or unsolicited. Check the {@link TwtReasonCode} for more
36      * details.
37      *
38      * @param reasonCode Teardown reason code
39      * @hide
40      */
onTeardown(int reasonCode)41     void onTeardown(int reasonCode);
42     /**
43      * Called when the TWT session is created.
44      *
45      * @param wakeDuration TWT session wake duration
46      * @param wakeInterval TWT session wake interval
47      * @param mloLinkId Multi link operation link id
48      * @param owner Owner of this session
49      * @param sessionId TWT session id
50      * @hide
51      */
onCreate(int wakeDuration, long wakeInterval, int mloLinkId, int owner, int sessionId)52     void onCreate(int wakeDuration, long wakeInterval, int mloLinkId, int owner, int sessionId);
53 }
54