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.stub;
18 
19 import android.telephony.satellite.stub.NtnSignalStrength;
20 import android.telephony.satellite.stub.NTRadioTechnology;
21 import android.telephony.satellite.stub.PointingInfo;
22 import android.telephony.satellite.stub.SatelliteCapabilities;
23 import android.telephony.satellite.stub.SatelliteDatagram;
24 import android.telephony.satellite.stub.SatelliteModemState;
25 
26 /**
27  * {@hide}
28  */
29 oneway interface ISatelliteListener {
30     /**
31      * Indicates that the satellite provision state has changed.
32      *
33      * @param provisioned True means the service is provisioned and false means it is not.
34      */
onSatelliteProvisionStateChanged(in boolean provisioned)35     void onSatelliteProvisionStateChanged(in boolean provisioned);
36 
37     /**
38      * Indicates that new datagrams have been received on the device.
39      *
40      * @param datagram New datagram that was received.
41      * @param pendingCount Number of additional datagrams yet to be received.
42      */
onSatelliteDatagramReceived(in SatelliteDatagram datagram, in int pendingCount)43     void onSatelliteDatagramReceived(in SatelliteDatagram datagram, in int pendingCount);
44 
45     /**
46      * Indicates that the satellite has pending datagrams for the device to be pulled.
47      */
onPendingDatagrams()48     void onPendingDatagrams();
49 
50     /**
51      * Indicates that the satellite pointing input has changed.
52      *
53      * @param pointingInfo The current pointing info.
54      */
onSatellitePositionChanged(in PointingInfo pointingInfo)55     void onSatellitePositionChanged(in PointingInfo pointingInfo);
56 
57     /**
58      * Indicates that the satellite modem state has changed.
59      *
60      * @param state The current satellite modem state.
61      */
onSatelliteModemStateChanged(in SatelliteModemState state)62     void onSatelliteModemStateChanged(in SatelliteModemState state);
63 
64     /**
65      * Called when NTN signal strength changes.
66      *
67      * @param ntnSignalStrength The new NTN signal strength.
68      */
onNtnSignalStrengthChanged(in NtnSignalStrength ntnSignalStrength)69     void onNtnSignalStrengthChanged(in NtnSignalStrength ntnSignalStrength);
70 
71     /**
72      * Called when satellite capabilities of the satellite service have changed.
73      *
74      * @param SatelliteCapabilities The current satellite capabilities.
75      */
onSatelliteCapabilitiesChanged(in SatelliteCapabilities capabilities)76     void onSatelliteCapabilitiesChanged(in SatelliteCapabilities capabilities);
77 
78     /**
79      * Called when supported state of satellite has changed
80      *
81      * @param supported True means satellite service is supported and false means it is not.
82      */
onSatelliteSupportedStateChanged(in boolean supported)83     void onSatelliteSupportedStateChanged(in boolean supported);
84 
85     /**
86      * Indicates that the satellite registration failed with following failure code
87      *
88      * @param causeCode the primary failure cause code of the procedure.
89      *        For LTE (EMM), cause codes are TS 24.301 Sec 9.9.3.9
90      */
onRegistrationFailure(in int causeCode)91     void onRegistrationFailure(in int causeCode);
92 }
93