1f8458ff9d97f8961d67c41ee107129ecba873f36Wink Saville/*
2f8458ff9d97f8961d67c41ee107129ecba873f36Wink Saville * Copyright (c) 2013 The Android Open Source Project
3f8458ff9d97f8961d67c41ee107129ecba873f36Wink Saville *
4f8458ff9d97f8961d67c41ee107129ecba873f36Wink Saville * Licensed under the Apache License, Version 2.0 (the "License");
5f8458ff9d97f8961d67c41ee107129ecba873f36Wink Saville * you may not use this file except in compliance with the License.
6f8458ff9d97f8961d67c41ee107129ecba873f36Wink Saville * You may obtain a copy of the License at
7f8458ff9d97f8961d67c41ee107129ecba873f36Wink Saville *
8f8458ff9d97f8961d67c41ee107129ecba873f36Wink Saville *      http://www.apache.org/licenses/LICENSE-2.0
9f8458ff9d97f8961d67c41ee107129ecba873f36Wink Saville *
10f8458ff9d97f8961d67c41ee107129ecba873f36Wink Saville * Unless required by applicable law or agreed to in writing, software
11f8458ff9d97f8961d67c41ee107129ecba873f36Wink Saville * distributed under the License is distributed on an "AS IS" BASIS,
12f8458ff9d97f8961d67c41ee107129ecba873f36Wink Saville * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13f8458ff9d97f8961d67c41ee107129ecba873f36Wink Saville * See the License for the specific language governing permissions and
14f8458ff9d97f8961d67c41ee107129ecba873f36Wink Saville * limitations under the License.
15f8458ff9d97f8961d67c41ee107129ecba873f36Wink Saville */
16f8458ff9d97f8961d67c41ee107129ecba873f36Wink Saville
17f8458ff9d97f8961d67c41ee107129ecba873f36Wink Savillepackage com.android.ims.internal;
18f8458ff9d97f8961d67c41ee107129ecba873f36Wink Saville
19b54d218d8b1c765865d0efb4a40e631f8bfa02deRekha Kumarimport com.android.ims.ImsReasonInfo;
20d4e44bbdbf2d1bd7307501658b694b3c92fd668bOmkar Kolangade
21ae4cc1519db844f2f5e8c3a56adefeba13b217cbPavel Zhamaitsiakimport android.net.Uri;
22ae4cc1519db844f2f5e8c3a56adefeba13b217cbPavel Zhamaitsiak
23f8458ff9d97f8961d67c41ee107129ecba873f36Wink Saville/**
24f8458ff9d97f8961d67c41ee107129ecba873f36Wink Saville * A listener type for receiving notifications about the changes to
25f8458ff9d97f8961d67c41ee107129ecba873f36Wink Saville * the IMS connection(registration).
26f8458ff9d97f8961d67c41ee107129ecba873f36Wink Saville *
27f8458ff9d97f8961d67c41ee107129ecba873f36Wink Saville * {@hide}
28f8458ff9d97f8961d67c41ee107129ecba873f36Wink Saville */
29f8458ff9d97f8961d67c41ee107129ecba873f36Wink Savilleinterface IImsRegistrationListener {
30f8458ff9d97f8961d67c41ee107129ecba873f36Wink Saville    /**
31f8458ff9d97f8961d67c41ee107129ecba873f36Wink Saville     * Notifies the application when the device is connected to the IMS network.
32d4e44bbdbf2d1bd7307501658b694b3c92fd668bOmkar Kolangade     *
33d4e44bbdbf2d1bd7307501658b694b3c92fd668bOmkar Kolangade     * @deprecated see {@link registrationConnectedWithRadioTech}
34f8458ff9d97f8961d67c41ee107129ecba873f36Wink Saville     */
35f8458ff9d97f8961d67c41ee107129ecba873f36Wink Saville    void registrationConnected();
36f8458ff9d97f8961d67c41ee107129ecba873f36Wink Saville
37f8458ff9d97f8961d67c41ee107129ecba873f36Wink Saville    /**
38b54d218d8b1c765865d0efb4a40e631f8bfa02deRekha Kumar     * Notifies the application when the device is trying to connect the IMS network.
39d4e44bbdbf2d1bd7307501658b694b3c92fd668bOmkar Kolangade     *
40d4e44bbdbf2d1bd7307501658b694b3c92fd668bOmkar Kolangade     * @deprecated see {@link registrationProgressingWithRadioTech}
41b54d218d8b1c765865d0efb4a40e631f8bfa02deRekha Kumar     */
42b54d218d8b1c765865d0efb4a40e631f8bfa02deRekha Kumar    void registrationProgressing();
43b54d218d8b1c765865d0efb4a40e631f8bfa02deRekha Kumar
44b54d218d8b1c765865d0efb4a40e631f8bfa02deRekha Kumar    /**
45d4e44bbdbf2d1bd7307501658b694b3c92fd668bOmkar Kolangade     * Notifies the application when the device is connected to the IMS network.
46d4e44bbdbf2d1bd7307501658b694b3c92fd668bOmkar Kolangade     *
47d4e44bbdbf2d1bd7307501658b694b3c92fd668bOmkar Kolangade     * @param imsRadioTech the radio access technology. Valid values are {@code
48d4e44bbdbf2d1bd7307501658b694b3c92fd668bOmkar Kolangade     * RIL_RADIO_TECHNOLOGY_*} defined in {@link ServiceState}.
49d4e44bbdbf2d1bd7307501658b694b3c92fd668bOmkar Kolangade     */
50d4e44bbdbf2d1bd7307501658b694b3c92fd668bOmkar Kolangade    void registrationConnectedWithRadioTech(int imsRadioTech);
51d4e44bbdbf2d1bd7307501658b694b3c92fd668bOmkar Kolangade
52d4e44bbdbf2d1bd7307501658b694b3c92fd668bOmkar Kolangade    /**
53d4e44bbdbf2d1bd7307501658b694b3c92fd668bOmkar Kolangade     * Notifies the application when the device is trying to connect the IMS network.
54d4e44bbdbf2d1bd7307501658b694b3c92fd668bOmkar Kolangade     *
55d4e44bbdbf2d1bd7307501658b694b3c92fd668bOmkar Kolangade     * @param imsRadioTech the radio access technology. Valid values are {@code
56d4e44bbdbf2d1bd7307501658b694b3c92fd668bOmkar Kolangade     * RIL_RADIO_TECHNOLOGY_*} defined in {@link ServiceState}.
57d4e44bbdbf2d1bd7307501658b694b3c92fd668bOmkar Kolangade     */
58d4e44bbdbf2d1bd7307501658b694b3c92fd668bOmkar Kolangade    void registrationProgressingWithRadioTech(int imsRadioTech);
59d4e44bbdbf2d1bd7307501658b694b3c92fd668bOmkar Kolangade
60d4e44bbdbf2d1bd7307501658b694b3c92fd668bOmkar Kolangade
61d4e44bbdbf2d1bd7307501658b694b3c92fd668bOmkar Kolangade    /**
62f8458ff9d97f8961d67c41ee107129ecba873f36Wink Saville     * Notifies the application when the device is disconnected from the IMS network.
63f8458ff9d97f8961d67c41ee107129ecba873f36Wink Saville     */
64b54d218d8b1c765865d0efb4a40e631f8bfa02deRekha Kumar    void registrationDisconnected(in ImsReasonInfo imsReasonInfo);
65f8458ff9d97f8961d67c41ee107129ecba873f36Wink Saville
66f8458ff9d97f8961d67c41ee107129ecba873f36Wink Saville    /**
67f8458ff9d97f8961d67c41ee107129ecba873f36Wink Saville     * Notifies the application when its suspended IMS connection is resumed,
68f8458ff9d97f8961d67c41ee107129ecba873f36Wink Saville     * meaning the connection now allows throughput.
69f8458ff9d97f8961d67c41ee107129ecba873f36Wink Saville     */
70f8458ff9d97f8961d67c41ee107129ecba873f36Wink Saville    void registrationResumed();
71f8458ff9d97f8961d67c41ee107129ecba873f36Wink Saville
72f8458ff9d97f8961d67c41ee107129ecba873f36Wink Saville    /**
73f8458ff9d97f8961d67c41ee107129ecba873f36Wink Saville     * Notifies the application when its current IMS connection is suspended,
74f8458ff9d97f8961d67c41ee107129ecba873f36Wink Saville     * meaning there is no data throughput.
75f8458ff9d97f8961d67c41ee107129ecba873f36Wink Saville     */
76f8458ff9d97f8961d67c41ee107129ecba873f36Wink Saville    void registrationSuspended();
77f8458ff9d97f8961d67c41ee107129ecba873f36Wink Saville
78f8458ff9d97f8961d67c41ee107129ecba873f36Wink Saville    /**
79f8458ff9d97f8961d67c41ee107129ecba873f36Wink Saville     * Notifies the application when its current IMS connection is updated
80f8458ff9d97f8961d67c41ee107129ecba873f36Wink Saville     * since the service setting is changed or the service is added/removed.
81f8458ff9d97f8961d67c41ee107129ecba873f36Wink Saville     *
82f8458ff9d97f8961d67c41ee107129ecba873f36Wink Saville     * @param serviceClass a service class specified in {@link ImsServiceClass}
83f8458ff9d97f8961d67c41ee107129ecba873f36Wink Saville     * @param event an event type when this callback is called
84f8458ff9d97f8961d67c41ee107129ecba873f36Wink Saville     *    If {@code event} is 0, meaning the specified service is removed from the IMS connection.
85f8458ff9d97f8961d67c41ee107129ecba873f36Wink Saville     *    Else ({@code event} is 1), meaning the specified service is added to the IMS connection.
86f8458ff9d97f8961d67c41ee107129ecba873f36Wink Saville     */
87f8458ff9d97f8961d67c41ee107129ecba873f36Wink Saville    void registrationServiceCapabilityChanged(int serviceClass, int event);
88ab458a18583e5dc9984210c3b4cc01dabcb1b39fram
89ab458a18583e5dc9984210c3b4cc01dabcb1b39fram    /**
90ab458a18583e5dc9984210c3b4cc01dabcb1b39fram     * Notifies the application when features on a particular service enabled or
91ab458a18583e5dc9984210c3b4cc01dabcb1b39fram     * disabled successfully based on user preferences.
92ab458a18583e5dc9984210c3b4cc01dabcb1b39fram     *
93ab458a18583e5dc9984210c3b4cc01dabcb1b39fram     * @param serviceClass a service class specified in {@link ImsServiceClass}
94ab458a18583e5dc9984210c3b4cc01dabcb1b39fram     * @param enabledFeatures features enabled as defined in com.android.ims.ImsConfig#FeatureConstants.
95ab458a18583e5dc9984210c3b4cc01dabcb1b39fram     * @param disabledFeatures features disabled as defined in com.android.ims.ImsConfig#FeatureConstants.
96ab458a18583e5dc9984210c3b4cc01dabcb1b39fram     */
97ab458a18583e5dc9984210c3b4cc01dabcb1b39fram    void registrationFeatureCapabilityChanged(int serviceClass,
980f1ddb586b6a1ee46596ed75be901c986d5cc2c7Pavel Zhamaitsiak            in int[] enabledFeatures, in int[] disabledFeatures);
99ddf570e8226bd21448b44b3327d4bcb2608f4d00Shriram Ganesh
100ddf570e8226bd21448b44b3327d4bcb2608f4d00Shriram Ganesh    /**
101ddf570e8226bd21448b44b3327d4bcb2608f4d00Shriram Ganesh     * Updates the application with the waiting voice message count.
102ddf570e8226bd21448b44b3327d4bcb2608f4d00Shriram Ganesh     * @param count The number of waiting voice messages.
103ddf570e8226bd21448b44b3327d4bcb2608f4d00Shriram Ganesh     */
104ddf570e8226bd21448b44b3327d4bcb2608f4d00Shriram Ganesh    void voiceMessageCountUpdate(int count);
105ae4cc1519db844f2f5e8c3a56adefeba13b217cbPavel Zhamaitsiak
106ae4cc1519db844f2f5e8c3a56adefeba13b217cbPavel Zhamaitsiak    /**
107ae4cc1519db844f2f5e8c3a56adefeba13b217cbPavel Zhamaitsiak     * Notifies the application when the list of URIs associated with IMS client is updated.
108ae4cc1519db844f2f5e8c3a56adefeba13b217cbPavel Zhamaitsiak     */
109ae4cc1519db844f2f5e8c3a56adefeba13b217cbPavel Zhamaitsiak    void registrationAssociatedUriChanged(in Uri[] uris);
11007b64b8a40a3c53aa4a01992ef25efe7c875d302Dheeraj Shetty
11107b64b8a40a3c53aa4a01992ef25efe7c875d302Dheeraj Shetty    /**
11207b64b8a40a3c53aa4a01992ef25efe7c875d302Dheeraj Shetty     * Notifies the application when IMS registration attempt on a target
11307b64b8a40a3c53aa4a01992ef25efe7c875d302Dheeraj Shetty     * access tech fails.
11407b64b8a40a3c53aa4a01992ef25efe7c875d302Dheeraj Shetty     *
11507b64b8a40a3c53aa4a01992ef25efe7c875d302Dheeraj Shetty     * @param targetAccessTech Radio access technology on which the IMS registration was
11607b64b8a40a3c53aa4a01992ef25efe7c875d302Dheeraj Shetty     *         attempted.
11707b64b8a40a3c53aa4a01992ef25efe7c875d302Dheeraj Shetty     * @param imsReasonInfo Reason for the failure.
11807b64b8a40a3c53aa4a01992ef25efe7c875d302Dheeraj Shetty     */
11907b64b8a40a3c53aa4a01992ef25efe7c875d302Dheeraj Shetty    void registrationChangeFailed(in int targetAccessTech, in ImsReasonInfo imsReasonInfo);
120f8458ff9d97f8961d67c41ee107129ecba873f36Wink Saville}
121