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 android.telephony.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 oneway interface IImsRegistrationListener { 30 /** 31 * Notifies the application when the device is connected to the IMS network. 32 * 33 * @deprecated see {@link registrationConnectedWithRadioTech} 34 */ 35 @UnsupportedAppUsage registrationConnected()36 void registrationConnected(); 37 38 /** 39 * Notifies the application when the device is trying to connect the IMS network. 40 * 41 * @deprecated see {@link registrationProgressingWithRadioTech} 42 */ registrationProgressing()43 void registrationProgressing(); 44 45 /** 46 * Notifies the application when the device is connected to the IMS network. 47 * 48 * @param imsRadioTech the radio access technology. Valid values are {@code 49 * RIL_RADIO_TECHNOLOGY_*} defined in {@link ServiceState}. 50 */ 51 @UnsupportedAppUsage registrationConnectedWithRadioTech(int imsRadioTech)52 void registrationConnectedWithRadioTech(int imsRadioTech); 53 54 /** 55 * Notifies the application when the device is trying to connect the IMS network. 56 * 57 * @param imsRadioTech the radio access technology. Valid values are {@code 58 * RIL_RADIO_TECHNOLOGY_*} defined in {@link ServiceState}. 59 */ 60 @UnsupportedAppUsage registrationProgressingWithRadioTech(int imsRadioTech)61 void registrationProgressingWithRadioTech(int imsRadioTech); 62 63 64 /** 65 * Notifies the application when the device is disconnected from the IMS network. 66 */ 67 @UnsupportedAppUsage registrationDisconnected(in ImsReasonInfo imsReasonInfo)68 void registrationDisconnected(in ImsReasonInfo imsReasonInfo); 69 70 /** 71 * Notifies the application when its suspended IMS connection is resumed, 72 * meaning the connection now allows throughput. 73 */ registrationResumed()74 void registrationResumed(); 75 76 /** 77 * Notifies the application when its current IMS connection is suspended, 78 * meaning there is no data throughput. 79 */ registrationSuspended()80 void registrationSuspended(); 81 82 /** 83 * Notifies the application when its current IMS connection is updated 84 * since the service setting is changed or the service is added/removed. 85 * 86 * @param serviceClass a service class specified in {@link ImsServiceClass} 87 * @param event an event type when this callback is called 88 * If {@code event} is 0, meaning the specified service is removed from the IMS connection. 89 * Else ({@code event} is 1), meaning the specified service is added to the IMS connection. 90 */ registrationServiceCapabilityChanged(int serviceClass, int event)91 void registrationServiceCapabilityChanged(int serviceClass, int event); 92 93 /** 94 * Notifies the application when features on a particular service enabled or 95 * disabled successfully based on user preferences. 96 * 97 * @param serviceClass a service class specified in {@link ImsServiceClass} 98 * @param enabledFeatures features enabled as defined in com.android.ims.ImsConfig#FeatureConstants. 99 * @param disabledFeatures features disabled as defined in com.android.ims.ImsConfig#FeatureConstants. 100 */ 101 @UnsupportedAppUsage registrationFeatureCapabilityChanged(int serviceClass, in int[] enabledFeatures, in int[] disabledFeatures)102 void registrationFeatureCapabilityChanged(int serviceClass, 103 in int[] enabledFeatures, in int[] disabledFeatures); 104 105 /** 106 * Updates the application with the waiting voice message count. 107 * @param count The number of waiting voice messages. 108 */ 109 @UnsupportedAppUsage voiceMessageCountUpdate(int count)110 void voiceMessageCountUpdate(int count); 111 112 /** 113 * Notifies the application when the list of URIs associated with IMS client is updated. 114 */ 115 @UnsupportedAppUsage registrationAssociatedUriChanged(in Uri[] uris)116 void registrationAssociatedUriChanged(in Uri[] uris); 117 118 /** 119 * Notifies the application when IMS registration attempt on a target 120 * access tech fails. 121 * 122 * @param targetAccessTech Radio access technology on which the IMS registration was 123 * attempted. 124 * @param imsReasonInfo Reason for the failure. 125 */ 126 @UnsupportedAppUsage registrationChangeFailed(in int targetAccessTech, in ImsReasonInfo imsReasonInfo)127 void registrationChangeFailed(in int targetAccessTech, in ImsReasonInfo imsReasonInfo); 128 } 129