Pavel Zhamaitsiak | cfedd20 | 2016-03-18 16:09:50 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2016 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.uce.uceservice; |
| 18 | |
| 19 | import com.android.ims.internal.uce.uceservice.IUceListener; |
| 20 | import com.android.ims.internal.uce.presence.IPresenceService; |
| 21 | import com.android.ims.internal.uce.options.IOptionsListener; |
| 22 | import com.android.ims.internal.uce.presence.IPresenceListener; |
| 23 | import com.android.ims.internal.uce.options.IOptionsService; |
| 24 | import com.android.ims.internal.uce.common.UceLong; |
| 25 | import com.android.ims.internal.uce.common.StatusCode; |
| 26 | |
| 27 | /** IUceService |
| 28 | * UCE service interface class. |
| 29 | * {@hide} */ |
| 30 | interface IUceService |
| 31 | { |
| 32 | |
| 33 | /** |
| 34 | * Starts the Uce service. |
| 35 | * @param uceListener IUceListener object |
| 36 | * @return boolean true if the service stop start is processed successfully, FALSE otherwise. |
| 37 | * |
| 38 | * Service status is returned in setStatus callback in IUceListener. |
| 39 | * @hide |
| 40 | */ |
Andrei Onea | 903da37 | 2019-02-27 15:45:08 +0000 | [diff] [blame] | 41 | @UnsupportedAppUsage |
Pavel Zhamaitsiak | cfedd20 | 2016-03-18 16:09:50 -0700 | [diff] [blame] | 42 | boolean startService(IUceListener uceListener); |
| 43 | |
| 44 | /** |
| 45 | * Stops the UCE service. |
| 46 | * @return boolean true if the service stop request is processed successfully, FALSE otherwise. |
| 47 | * @hide |
| 48 | */ |
Andrei Onea | 903da37 | 2019-02-27 15:45:08 +0000 | [diff] [blame] | 49 | @UnsupportedAppUsage |
Pavel Zhamaitsiak | cfedd20 | 2016-03-18 16:09:50 -0700 | [diff] [blame] | 50 | boolean stopService(); |
| 51 | |
| 52 | |
| 53 | |
| 54 | /** |
| 55 | * Requests the UCE service start status. |
| 56 | * @return boolean true if service started else false. |
| 57 | * @hide |
| 58 | */ |
Andrei Onea | 903da37 | 2019-02-27 15:45:08 +0000 | [diff] [blame] | 59 | @UnsupportedAppUsage |
Pavel Zhamaitsiak | cfedd20 | 2016-03-18 16:09:50 -0700 | [diff] [blame] | 60 | boolean isServiceStarted(); |
| 61 | |
| 62 | /** |
| 63 | * Creates a options service for Capability Discovery. |
| 64 | * @param optionsListener IOptionsListener object. |
| 65 | * @param optionsServiceListenerHdl wrapper for client's listener handle to be stored. |
| 66 | * |
| 67 | * The service will fill UceLong.mUceLong with presenceListenerHandle allocated and |
| 68 | * used to validate callbacks received in IPresenceListener are indeed from the |
| 69 | * service the client created. |
| 70 | * |
| 71 | * @return optionsServiceHandle |
Gnaneshwar Gatla | cd816ab | 2019-01-04 15:35:04 -0800 | [diff] [blame] | 72 | * |
Pavel Zhamaitsiak | cfedd20 | 2016-03-18 16:09:50 -0700 | [diff] [blame] | 73 | * @hide |
Gnaneshwar Gatla | cd816ab | 2019-01-04 15:35:04 -0800 | [diff] [blame] | 74 | * |
| 75 | * @deprecated This is replaced with new API createOptionsServiceForSubscription() |
Pavel Zhamaitsiak | cfedd20 | 2016-03-18 16:09:50 -0700 | [diff] [blame] | 76 | */ |
Andrei Onea | 903da37 | 2019-02-27 15:45:08 +0000 | [diff] [blame] | 77 | @UnsupportedAppUsage |
Pavel Zhamaitsiak | cfedd20 | 2016-03-18 16:09:50 -0700 | [diff] [blame] | 78 | int createOptionsService(IOptionsListener optionsListener, |
| 79 | inout UceLong optionsServiceListenerHdl); |
Gnaneshwar Gatla | cd816ab | 2019-01-04 15:35:04 -0800 | [diff] [blame] | 80 | /** |
| 81 | * Creates a options service for Capability Discovery. |
| 82 | * @param optionsListener IOptionsListener object. |
| 83 | * @param optionsServiceListenerHdl wrapper for client's listener handle to be stored. |
| 84 | * @param iccId the ICC-ID derived from SubscriptionInfo for the Service requested |
| 85 | * |
| 86 | * The service will fill UceLong.mUceLong with presenceListenerHandle allocated and |
| 87 | * used to validate callbacks received in IPresenceListener are indeed from the |
| 88 | * service the client created. |
| 89 | * |
| 90 | * @return optionsServiceHandle |
| 91 | * |
| 92 | * @hide |
| 93 | */ |
| 94 | int createOptionsServiceForSubscription(IOptionsListener optionsListener, |
| 95 | inout UceLong optionsServiceListenerHdl, |
| 96 | in String iccId); |
Pavel Zhamaitsiak | cfedd20 | 2016-03-18 16:09:50 -0700 | [diff] [blame] | 97 | |
| 98 | /** |
| 99 | * Destroys a Options service. |
| 100 | * @param optionsServiceHandle this is received in serviceCreated() callback |
| 101 | * in IOptionsListener |
| 102 | * @hide |
| 103 | */ |
Andrei Onea | 903da37 | 2019-02-27 15:45:08 +0000 | [diff] [blame] | 104 | @UnsupportedAppUsage |
Pavel Zhamaitsiak | cfedd20 | 2016-03-18 16:09:50 -0700 | [diff] [blame] | 105 | void destroyOptionsService(int optionsServiceHandle); |
| 106 | |
| 107 | /** |
| 108 | * Creates a presence service. |
| 109 | * @param presenceServiceListener IPresenceListener object |
| 110 | * @param presenceServiceListenerHdl wrapper for client's listener handle to be stored. |
| 111 | * |
| 112 | * The service will fill UceLong.mUceLong with presenceListenerHandle allocated and |
| 113 | * used to validate callbacks received in IPresenceListener are indeed from the |
| 114 | * service the client created. |
| 115 | * |
| 116 | * @return presenceServiceHdl |
Gnaneshwar Gatla | cd816ab | 2019-01-04 15:35:04 -0800 | [diff] [blame] | 117 | * |
Pavel Zhamaitsiak | cfedd20 | 2016-03-18 16:09:50 -0700 | [diff] [blame] | 118 | * @hide |
Gnaneshwar Gatla | cd816ab | 2019-01-04 15:35:04 -0800 | [diff] [blame] | 119 | * |
| 120 | * @deprecated This is replaced with new API createPresenceServiceForSubscription() |
Pavel Zhamaitsiak | cfedd20 | 2016-03-18 16:09:50 -0700 | [diff] [blame] | 121 | */ |
Andrei Onea | 903da37 | 2019-02-27 15:45:08 +0000 | [diff] [blame] | 122 | @UnsupportedAppUsage |
Pavel Zhamaitsiak | cfedd20 | 2016-03-18 16:09:50 -0700 | [diff] [blame] | 123 | int createPresenceService(IPresenceListener presenceServiceListener, |
| 124 | inout UceLong presenceServiceListenerHdl); |
Gnaneshwar Gatla | cd816ab | 2019-01-04 15:35:04 -0800 | [diff] [blame] | 125 | /** |
| 126 | * Creates a presence service. |
| 127 | * @param presenceServiceListener IPresenceListener object |
| 128 | * @param presenceServiceListenerHdl wrapper for client's listener handle to be stored. |
| 129 | * @param iccId the ICC-ID derived from SubscriptionInfo for the Service requested |
| 130 | * |
| 131 | * The service will fill UceLong.mUceLong with presenceListenerHandle allocated and |
| 132 | * used to validate callbacks received in IPresenceListener are indeed from the |
| 133 | * service the client created. |
| 134 | * |
| 135 | * @return presenceServiceHdl |
| 136 | * |
| 137 | * @hide |
| 138 | */ |
| 139 | int createPresenceServiceForSubscription(IPresenceListener presenceServiceListener, |
| 140 | inout UceLong presenceServiceListenerHdl, |
| 141 | in String iccId); |
Pavel Zhamaitsiak | cfedd20 | 2016-03-18 16:09:50 -0700 | [diff] [blame] | 142 | |
| 143 | /** |
| 144 | * Destroys a presence service. |
Gnaneshwar Gatla | cd816ab | 2019-01-04 15:35:04 -0800 | [diff] [blame] | 145 | * |
Pavel Zhamaitsiak | cfedd20 | 2016-03-18 16:09:50 -0700 | [diff] [blame] | 146 | * @param presenceServiceHdl handle returned during createPresenceService() |
Gnaneshwar Gatla | cd816ab | 2019-01-04 15:35:04 -0800 | [diff] [blame] | 147 | * |
Pavel Zhamaitsiak | cfedd20 | 2016-03-18 16:09:50 -0700 | [diff] [blame] | 148 | * @hide |
| 149 | */ |
Andrei Onea | 903da37 | 2019-02-27 15:45:08 +0000 | [diff] [blame] | 150 | @UnsupportedAppUsage |
Pavel Zhamaitsiak | cfedd20 | 2016-03-18 16:09:50 -0700 | [diff] [blame] | 151 | void destroyPresenceService(int presenceServiceHdl); |
| 152 | |
| 153 | |
| 154 | |
| 155 | /** |
| 156 | * Query the UCE Service for information to know whether the is registered. |
Gnaneshwar Gatla | cd816ab | 2019-01-04 15:35:04 -0800 | [diff] [blame] | 157 | * |
Pavel Zhamaitsiak | cfedd20 | 2016-03-18 16:09:50 -0700 | [diff] [blame] | 158 | * @return boolean, true if Registered to for network events else false. |
Gnaneshwar Gatla | cd816ab | 2019-01-04 15:35:04 -0800 | [diff] [blame] | 159 | * |
Pavel Zhamaitsiak | cfedd20 | 2016-03-18 16:09:50 -0700 | [diff] [blame] | 160 | * @hide |
| 161 | */ |
Andrei Onea | 903da37 | 2019-02-27 15:45:08 +0000 | [diff] [blame] | 162 | @UnsupportedAppUsage |
Pavel Zhamaitsiak | cfedd20 | 2016-03-18 16:09:50 -0700 | [diff] [blame] | 163 | boolean getServiceStatus(); |
| 164 | |
| 165 | /** |
| 166 | * Query the UCE Service for presence Service. |
Gnaneshwar Gatla | cd816ab | 2019-01-04 15:35:04 -0800 | [diff] [blame] | 167 | * |
Pavel Zhamaitsiak | cfedd20 | 2016-03-18 16:09:50 -0700 | [diff] [blame] | 168 | * @return IPresenceService object. |
Gnaneshwar Gatla | cd816ab | 2019-01-04 15:35:04 -0800 | [diff] [blame] | 169 | * |
Pavel Zhamaitsiak | cfedd20 | 2016-03-18 16:09:50 -0700 | [diff] [blame] | 170 | * @hide |
Gnaneshwar Gatla | cd816ab | 2019-01-04 15:35:04 -0800 | [diff] [blame] | 171 | * |
| 172 | * @deprecated use API getPresenceServiceForSubscription() |
Pavel Zhamaitsiak | cfedd20 | 2016-03-18 16:09:50 -0700 | [diff] [blame] | 173 | */ |
Andrei Onea | 903da37 | 2019-02-27 15:45:08 +0000 | [diff] [blame] | 174 | @UnsupportedAppUsage |
Pavel Zhamaitsiak | cfedd20 | 2016-03-18 16:09:50 -0700 | [diff] [blame] | 175 | IPresenceService getPresenceService(); |
| 176 | |
| 177 | /** |
Gnaneshwar Gatla | cd816ab | 2019-01-04 15:35:04 -0800 | [diff] [blame] | 178 | * Query the UCE Service for presence Service. |
| 179 | * |
| 180 | * @param iccId the ICC-ID derived from SubscriptionInfo for the Service requested |
| 181 | * |
| 182 | * @return IPresenceService object. |
| 183 | * |
| 184 | * @hide |
| 185 | */ |
| 186 | IPresenceService getPresenceServiceForSubscription(in String iccId); |
| 187 | |
| 188 | /** |
Pavel Zhamaitsiak | cfedd20 | 2016-03-18 16:09:50 -0700 | [diff] [blame] | 189 | * Query the UCE Service for options service object. |
Gnaneshwar Gatla | cd816ab | 2019-01-04 15:35:04 -0800 | [diff] [blame] | 190 | * |
Pavel Zhamaitsiak | cfedd20 | 2016-03-18 16:09:50 -0700 | [diff] [blame] | 191 | * @return IOptionsService object. |
Gnaneshwar Gatla | cd816ab | 2019-01-04 15:35:04 -0800 | [diff] [blame] | 192 | * |
| 193 | * @deprecated use API getOptionsServiceForSubscription() |
| 194 | * |
Pavel Zhamaitsiak | cfedd20 | 2016-03-18 16:09:50 -0700 | [diff] [blame] | 195 | * @hide |
| 196 | */ |
Andrei Onea | 903da37 | 2019-02-27 15:45:08 +0000 | [diff] [blame] | 197 | @UnsupportedAppUsage |
Pavel Zhamaitsiak | cfedd20 | 2016-03-18 16:09:50 -0700 | [diff] [blame] | 198 | IOptionsService getOptionsService(); |
| 199 | |
Gnaneshwar Gatla | cd816ab | 2019-01-04 15:35:04 -0800 | [diff] [blame] | 200 | /** |
| 201 | * Query the UCE Service for options service object. |
| 202 | * |
| 203 | * @param iccId the ICC-ID derived from SubscriptionInfo for the Service requested |
| 204 | * |
| 205 | * @return IOptionsService object. |
| 206 | * |
| 207 | * @hide |
| 208 | */ |
| 209 | IOptionsService getOptionsServiceForSubscription(in String iccId); |
| 210 | |
Pavel Zhamaitsiak | cfedd20 | 2016-03-18 16:09:50 -0700 | [diff] [blame] | 211 | } |