Wink Saville | f8458ff | 2014-06-25 16:08:02 -0700 | [diff] [blame] | 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 | |
Brad Ebinger | f8c3cd8 | 2018-01-22 13:51:52 -0800 | [diff] [blame] | 19 | import android.telephony.ims.ImsReasonInfo; |
Omkar Kolangade | d4e44bb | 2015-05-04 17:49:14 -0700 | [diff] [blame] | 20 | |
Pavel Zhamaitsiak | ae4cc15 | 2016-02-11 17:19:09 -0800 | [diff] [blame] | 21 | import android.net.Uri; |
| 22 | |
Wink Saville | f8458ff | 2014-06-25 16:08:02 -0700 | [diff] [blame] | 23 | /** |
| 24 | * A listener type for receiving notifications about the changes to |
| 25 | * the IMS connection(registration). |
| 26 | * |
| 27 | * {@hide} |
| 28 | */ |
Brad Ebinger | 14c4f3d | 2017-07-27 12:57:03 -0700 | [diff] [blame] | 29 | oneway interface IImsRegistrationListener { |
Wink Saville | f8458ff | 2014-06-25 16:08:02 -0700 | [diff] [blame] | 30 | /** |
| 31 | * Notifies the application when the device is connected to the IMS network. |
Omkar Kolangade | d4e44bb | 2015-05-04 17:49:14 -0700 | [diff] [blame] | 32 | * |
| 33 | * @deprecated see {@link registrationConnectedWithRadioTech} |
Wink Saville | f8458ff | 2014-06-25 16:08:02 -0700 | [diff] [blame] | 34 | */ |
Andrei Onea | 903da37 | 2019-02-27 15:45:08 +0000 | [diff] [blame] | 35 | @UnsupportedAppUsage |
Wink Saville | f8458ff | 2014-06-25 16:08:02 -0700 | [diff] [blame] | 36 | void registrationConnected(); |
| 37 | |
| 38 | /** |
Rekha Kumar | b54d218 | 2015-02-24 11:45:36 -0800 | [diff] [blame] | 39 | * Notifies the application when the device is trying to connect the IMS network. |
Omkar Kolangade | d4e44bb | 2015-05-04 17:49:14 -0700 | [diff] [blame] | 40 | * |
| 41 | * @deprecated see {@link registrationProgressingWithRadioTech} |
Rekha Kumar | b54d218 | 2015-02-24 11:45:36 -0800 | [diff] [blame] | 42 | */ |
| 43 | void registrationProgressing(); |
| 44 | |
| 45 | /** |
Omkar Kolangade | d4e44bb | 2015-05-04 17:49:14 -0700 | [diff] [blame] | 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 | */ |
Andrei Onea | 903da37 | 2019-02-27 15:45:08 +0000 | [diff] [blame] | 51 | @UnsupportedAppUsage |
Omkar Kolangade | d4e44bb | 2015-05-04 17:49:14 -0700 | [diff] [blame] | 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 | */ |
Andrei Onea | 903da37 | 2019-02-27 15:45:08 +0000 | [diff] [blame] | 60 | @UnsupportedAppUsage |
Omkar Kolangade | d4e44bb | 2015-05-04 17:49:14 -0700 | [diff] [blame] | 61 | void registrationProgressingWithRadioTech(int imsRadioTech); |
| 62 | |
| 63 | |
| 64 | /** |
Wink Saville | f8458ff | 2014-06-25 16:08:02 -0700 | [diff] [blame] | 65 | * Notifies the application when the device is disconnected from the IMS network. |
| 66 | */ |
Andrei Onea | 903da37 | 2019-02-27 15:45:08 +0000 | [diff] [blame] | 67 | @UnsupportedAppUsage |
Rekha Kumar | b54d218 | 2015-02-24 11:45:36 -0800 | [diff] [blame] | 68 | void registrationDisconnected(in ImsReasonInfo imsReasonInfo); |
Wink Saville | f8458ff | 2014-06-25 16:08:02 -0700 | [diff] [blame] | 69 | |
| 70 | /** |
| 71 | * Notifies the application when its suspended IMS connection is resumed, |
| 72 | * meaning the connection now allows throughput. |
| 73 | */ |
| 74 | void registrationResumed(); |
| 75 | |
| 76 | /** |
| 77 | * Notifies the application when its current IMS connection is suspended, |
| 78 | * meaning there is no data throughput. |
| 79 | */ |
| 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 | */ |
| 91 | void registrationServiceCapabilityChanged(int serviceClass, int event); |
ram | ab458a1 | 2014-07-16 21:38:42 +0530 | [diff] [blame] | 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 | */ |
Andrei Onea | 903da37 | 2019-02-27 15:45:08 +0000 | [diff] [blame] | 101 | @UnsupportedAppUsage |
ram | ab458a1 | 2014-07-16 21:38:42 +0530 | [diff] [blame] | 102 | void registrationFeatureCapabilityChanged(int serviceClass, |
Pavel Zhamaitsiak | 0f1ddb5 | 2015-09-02 11:01:34 -0700 | [diff] [blame] | 103 | in int[] enabledFeatures, in int[] disabledFeatures); |
Shriram Ganesh | ddf570e | 2015-05-31 09:18:48 -0700 | [diff] [blame] | 104 | |
| 105 | /** |
| 106 | * Updates the application with the waiting voice message count. |
| 107 | * @param count The number of waiting voice messages. |
| 108 | */ |
Andrei Onea | 903da37 | 2019-02-27 15:45:08 +0000 | [diff] [blame] | 109 | @UnsupportedAppUsage |
Shriram Ganesh | ddf570e | 2015-05-31 09:18:48 -0700 | [diff] [blame] | 110 | void voiceMessageCountUpdate(int count); |
Pavel Zhamaitsiak | ae4cc15 | 2016-02-11 17:19:09 -0800 | [diff] [blame] | 111 | |
| 112 | /** |
| 113 | * Notifies the application when the list of URIs associated with IMS client is updated. |
| 114 | */ |
Andrei Onea | 903da37 | 2019-02-27 15:45:08 +0000 | [diff] [blame] | 115 | @UnsupportedAppUsage |
Pavel Zhamaitsiak | ae4cc15 | 2016-02-11 17:19:09 -0800 | [diff] [blame] | 116 | void registrationAssociatedUriChanged(in Uri[] uris); |
Dheeraj Shetty | 07b64b8 | 2016-12-07 11:38:49 -0800 | [diff] [blame] | 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 | */ |
Andrei Onea | 903da37 | 2019-02-27 15:45:08 +0000 | [diff] [blame] | 126 | @UnsupportedAppUsage |
Dheeraj Shetty | 07b64b8 | 2016-12-07 11:38:49 -0800 | [diff] [blame] | 127 | void registrationChangeFailed(in int targetAccessTech, in ImsReasonInfo imsReasonInfo); |
Wink Saville | f8458ff | 2014-06-25 16:08:02 -0700 | [diff] [blame] | 128 | } |