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