1 /*
2  * Copyright (c) 2013 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 com.android.ims.internal;
18 
19 import com.android.ims.ImsReasonInfo;
20 
21 import android.net.Uri;
22 
23 /**
24  * A listener type for receiving notifications about the changes to
25  * the IMS connection(registration).
26  *
27  * {@hide}
28  */
29 interface IImsRegistrationListener {
30     /**
31      * Notifies the application when the device is connected to the IMS network.
32      *
33      * @deprecated see {@link registrationConnectedWithRadioTech}
34      */
registrationConnected()35     void registrationConnected();
36 
37     /**
38      * Notifies the application when the device is trying to connect the IMS network.
39      *
40      * @deprecated see {@link registrationProgressingWithRadioTech}
41      */
registrationProgressing()42     void registrationProgressing();
43 
44     /**
45      * Notifies the application when the device is connected to the IMS network.
46      *
47      * @param imsRadioTech the radio access technology. Valid values are {@code
48      * RIL_RADIO_TECHNOLOGY_*} defined in {@link ServiceState}.
49      */
registrationConnectedWithRadioTech(int imsRadioTech)50     void registrationConnectedWithRadioTech(int imsRadioTech);
51 
52     /**
53      * Notifies the application when the device is trying to connect the IMS network.
54      *
55      * @param imsRadioTech the radio access technology. Valid values are {@code
56      * RIL_RADIO_TECHNOLOGY_*} defined in {@link ServiceState}.
57      */
registrationProgressingWithRadioTech(int imsRadioTech)58     void registrationProgressingWithRadioTech(int imsRadioTech);
59 
60 
61     /**
62      * Notifies the application when the device is disconnected from the IMS network.
63      */
registrationDisconnected(in ImsReasonInfo imsReasonInfo)64     void registrationDisconnected(in ImsReasonInfo imsReasonInfo);
65 
66     /**
67      * Notifies the application when its suspended IMS connection is resumed,
68      * meaning the connection now allows throughput.
69      */
registrationResumed()70     void registrationResumed();
71 
72     /**
73      * Notifies the application when its current IMS connection is suspended,
74      * meaning there is no data throughput.
75      */
registrationSuspended()76     void registrationSuspended();
77 
78     /**
79      * Notifies the application when its current IMS connection is updated
80      * since the service setting is changed or the service is added/removed.
81      *
82      * @param serviceClass a service class specified in {@link ImsServiceClass}
83      * @param event an event type when this callback is called
84      *    If {@code event} is 0, meaning the specified service is removed from the IMS connection.
85      *    Else ({@code event} is 1), meaning the specified service is added to the IMS connection.
86      */
registrationServiceCapabilityChanged(int serviceClass, int event)87     void registrationServiceCapabilityChanged(int serviceClass, int event);
88 
89     /**
90      * Notifies the application when features on a particular service enabled or
91      * disabled successfully based on user preferences.
92      *
93      * @param serviceClass a service class specified in {@link ImsServiceClass}
94      * @param enabledFeatures features enabled as defined in com.android.ims.ImsConfig#FeatureConstants.
95      * @param disabledFeatures features disabled as defined in com.android.ims.ImsConfig#FeatureConstants.
96      */
registrationFeatureCapabilityChanged(int serviceClass, in int[] enabledFeatures, in int[] disabledFeatures)97     void registrationFeatureCapabilityChanged(int serviceClass,
98             in int[] enabledFeatures, in int[] disabledFeatures);
99 
100     /**
101      * Updates the application with the waiting voice message count.
102      * @param count The number of waiting voice messages.
103      */
voiceMessageCountUpdate(int count)104     void voiceMessageCountUpdate(int count);
105 
106     /**
107      * Notifies the application when the list of URIs associated with IMS client is updated.
108      */
registrationAssociatedUriChanged(in Uri[] uris)109     void registrationAssociatedUriChanged(in Uri[] uris);
110 }
111