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 17package com.android.ims.internal; 18 19/** 20 * A listener type for receiving notifications about the changes to 21 * the IMS connection(registration). 22 * 23 * {@hide} 24 */ 25interface IImsRegistrationListener { 26 /** 27 * Notifies the application when the device is connected to the IMS network. 28 */ 29 void registrationConnected(); 30 31 /** 32 * Notifies the application when the device is disconnected from the IMS network. 33 */ 34 void registrationDisconnected(); 35 36 /** 37 * Notifies the application when its suspended IMS connection is resumed, 38 * meaning the connection now allows throughput. 39 */ 40 void registrationResumed(); 41 42 /** 43 * Notifies the application when its current IMS connection is suspended, 44 * meaning there is no data throughput. 45 */ 46 void registrationSuspended(); 47 48 /** 49 * Notifies the application when its current IMS connection is updated 50 * since the service setting is changed or the service is added/removed. 51 * 52 * @param serviceClass a service class specified in {@link ImsServiceClass} 53 * @param event an event type when this callback is called 54 * If {@code event} is 0, meaning the specified service is removed from the IMS connection. 55 * Else ({@code event} is 1), meaning the specified service is added to the IMS connection. 56 */ 57 void registrationServiceCapabilityChanged(int serviceClass, int event); 58 59 /** 60 * Notifies the application when features on a particular service enabled or 61 * disabled successfully based on user preferences. 62 * 63 * @param serviceClass a service class specified in {@link ImsServiceClass} 64 * @param enabledFeatures features enabled as defined in com.android.ims.ImsConfig#FeatureConstants. 65 * @param disabledFeatures features disabled as defined in com.android.ims.ImsConfig#FeatureConstants. 66 */ 67 void registrationFeatureCapabilityChanged(int serviceClass, 68 out int[] enabledFeatures, out int[] disabledFeatures); 69} 70