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.telephony.satellite;
18 
19 import android.annotation.NonNull;
20 
21 /**
22  * A callback class for monitoring satellite position update and datagram transfer state change
23  * events.
24  *
25  * @hide
26  */
27 public interface SatelliteTransmissionUpdateCallback {
28     /**
29      * Called when the satellite position changed.
30      *
31      * @param pointingInfo The pointing info containing the satellite location.
32      */
onSatellitePositionChanged(@onNull PointingInfo pointingInfo)33     void onSatellitePositionChanged(@NonNull PointingInfo pointingInfo);
34 
35     /**
36      * Called when satellite datagram send state changed.
37      *
38      * @param state The new send datagram transfer state.
39      * @param sendPendingCount The number of datagrams that are currently being sent.
40      * @param errorCode If datagram transfer failed, the reason for failure.
41      */
onSendDatagramStateChanged( @atelliteManager.SatelliteDatagramTransferState int state, int sendPendingCount, @SatelliteManager.SatelliteError int errorCode)42     void onSendDatagramStateChanged(
43             @SatelliteManager.SatelliteDatagramTransferState int state, int sendPendingCount,
44             @SatelliteManager.SatelliteError int errorCode);
45 
46     /**
47      * Called when satellite datagram receive state changed.
48      *
49      * @param state The new receive datagram transfer state.
50      * @param receivePendingCount The number of datagrams that are currently pending to be received.
51      * @param errorCode If datagram transfer failed, the reason for failure.
52      */
onReceiveDatagramStateChanged( @atelliteManager.SatelliteDatagramTransferState int state, int receivePendingCount, @SatelliteManager.SatelliteError int errorCode)53     void onReceiveDatagramStateChanged(
54             @SatelliteManager.SatelliteDatagramTransferState int state, int receivePendingCount,
55             @SatelliteManager.SatelliteError int errorCode);
56 }
57