1 /*
2  * Copyright 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.telephony.satellite;
18 
19 import android.telephony.satellite.PointingInfo;
20 
21 /**
22  * Interface for position update and datagram transfer state change callback.
23  * @hide
24  */
25 oneway interface ISatelliteTransmissionUpdateCallback {
26     /**
27      * Called when satellite datagram send state changed.
28      *
29      * @param datagramType The datagram type of currently being sent.
30      * @param state The new send datagram transfer state.
31      * @param sendPendingCount The number of datagrams that are currently being sent.
32      * @param errorCode If datagram transfer failed, the reason for failure.
33      */
onSendDatagramStateChanged(int datagramType, int state, int sendPendingCount, int errorCode)34     void onSendDatagramStateChanged(int datagramType, int state, int sendPendingCount,
35             int errorCode);
36 
37     /**
38      * Called when satellite datagram receive state changed.
39      *
40      * @param state The new receive datagram transfer state.
41      * @param receivePendingCount The number of datagrams that are currently pending to be received.
42      * @param errorCode If datagram transfer failed, the reason for failure.
43      */
onReceiveDatagramStateChanged(int state, int receivePendingCount, int errorCode)44     void onReceiveDatagramStateChanged(int state, int receivePendingCount, int errorCode);
45 
46     /**
47      * Called when the satellite position changed.
48      *
49      * @param pointingInfo The pointing info containing the satellite location.
50      *                     Satellite location is based on magnetic north direction.
51      */
onSatellitePositionChanged(in PointingInfo pointingInfo)52     void onSatellitePositionChanged(in PointingInfo pointingInfo);
53 }
54