blob: ec45371689cf5576b262a7fb5d036555620f96af [file] [log] [blame]
Pavel Zhamaitsiakcfedd202016-03-18 16:09:50 -07001/*
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
17package com.android.ims.internal.uce.uceservice;
18
19import com.android.ims.internal.uce.uceservice.IUceListener;
20import com.android.ims.internal.uce.presence.IPresenceService;
21import com.android.ims.internal.uce.options.IOptionsListener;
22import com.android.ims.internal.uce.presence.IPresenceListener;
23import com.android.ims.internal.uce.options.IOptionsService;
24import com.android.ims.internal.uce.common.UceLong;
25import com.android.ims.internal.uce.common.StatusCode;
26
27/** IUceService
28 * UCE service interface class.
29 * {@hide} */
30interface 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 Onea903da372019-02-27 15:45:08 +000041 @UnsupportedAppUsage
Pavel Zhamaitsiakcfedd202016-03-18 16:09:50 -070042 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 Onea903da372019-02-27 15:45:08 +000049 @UnsupportedAppUsage
Pavel Zhamaitsiakcfedd202016-03-18 16:09:50 -070050 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 Onea903da372019-02-27 15:45:08 +000059 @UnsupportedAppUsage
Pavel Zhamaitsiakcfedd202016-03-18 16:09:50 -070060 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 Gatlacd816ab2019-01-04 15:35:04 -080072 *
Pavel Zhamaitsiakcfedd202016-03-18 16:09:50 -070073 * @hide
Gnaneshwar Gatlacd816ab2019-01-04 15:35:04 -080074 *
75 * @deprecated This is replaced with new API createOptionsServiceForSubscription()
Pavel Zhamaitsiakcfedd202016-03-18 16:09:50 -070076 */
Andrei Onea903da372019-02-27 15:45:08 +000077 @UnsupportedAppUsage
Pavel Zhamaitsiakcfedd202016-03-18 16:09:50 -070078 int createOptionsService(IOptionsListener optionsListener,
79 inout UceLong optionsServiceListenerHdl);
Gnaneshwar Gatlacd816ab2019-01-04 15:35:04 -080080 /**
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 Zhamaitsiakcfedd202016-03-18 16:09:50 -070097
98 /**
99 * Destroys a Options service.
100 * @param optionsServiceHandle this is received in serviceCreated() callback
101 * in IOptionsListener
102 * @hide
103 */
Andrei Onea903da372019-02-27 15:45:08 +0000104 @UnsupportedAppUsage
Pavel Zhamaitsiakcfedd202016-03-18 16:09:50 -0700105 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 Gatlacd816ab2019-01-04 15:35:04 -0800117 *
Pavel Zhamaitsiakcfedd202016-03-18 16:09:50 -0700118 * @hide
Gnaneshwar Gatlacd816ab2019-01-04 15:35:04 -0800119 *
120 * @deprecated This is replaced with new API createPresenceServiceForSubscription()
Pavel Zhamaitsiakcfedd202016-03-18 16:09:50 -0700121 */
Andrei Onea903da372019-02-27 15:45:08 +0000122 @UnsupportedAppUsage
Pavel Zhamaitsiakcfedd202016-03-18 16:09:50 -0700123 int createPresenceService(IPresenceListener presenceServiceListener,
124 inout UceLong presenceServiceListenerHdl);
Gnaneshwar Gatlacd816ab2019-01-04 15:35:04 -0800125 /**
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 Zhamaitsiakcfedd202016-03-18 16:09:50 -0700142
143 /**
144 * Destroys a presence service.
Gnaneshwar Gatlacd816ab2019-01-04 15:35:04 -0800145 *
Pavel Zhamaitsiakcfedd202016-03-18 16:09:50 -0700146 * @param presenceServiceHdl handle returned during createPresenceService()
Gnaneshwar Gatlacd816ab2019-01-04 15:35:04 -0800147 *
Pavel Zhamaitsiakcfedd202016-03-18 16:09:50 -0700148 * @hide
149 */
Andrei Onea903da372019-02-27 15:45:08 +0000150 @UnsupportedAppUsage
Pavel Zhamaitsiakcfedd202016-03-18 16:09:50 -0700151 void destroyPresenceService(int presenceServiceHdl);
152
153
154
155 /**
156 * Query the UCE Service for information to know whether the is registered.
Gnaneshwar Gatlacd816ab2019-01-04 15:35:04 -0800157 *
Pavel Zhamaitsiakcfedd202016-03-18 16:09:50 -0700158 * @return boolean, true if Registered to for network events else false.
Gnaneshwar Gatlacd816ab2019-01-04 15:35:04 -0800159 *
Pavel Zhamaitsiakcfedd202016-03-18 16:09:50 -0700160 * @hide
161 */
Andrei Onea903da372019-02-27 15:45:08 +0000162 @UnsupportedAppUsage
Pavel Zhamaitsiakcfedd202016-03-18 16:09:50 -0700163 boolean getServiceStatus();
164
165 /**
166 * Query the UCE Service for presence Service.
Gnaneshwar Gatlacd816ab2019-01-04 15:35:04 -0800167 *
Pavel Zhamaitsiakcfedd202016-03-18 16:09:50 -0700168 * @return IPresenceService object.
Gnaneshwar Gatlacd816ab2019-01-04 15:35:04 -0800169 *
Pavel Zhamaitsiakcfedd202016-03-18 16:09:50 -0700170 * @hide
Gnaneshwar Gatlacd816ab2019-01-04 15:35:04 -0800171 *
172 * @deprecated use API getPresenceServiceForSubscription()
Pavel Zhamaitsiakcfedd202016-03-18 16:09:50 -0700173 */
Andrei Onea903da372019-02-27 15:45:08 +0000174 @UnsupportedAppUsage
Pavel Zhamaitsiakcfedd202016-03-18 16:09:50 -0700175 IPresenceService getPresenceService();
176
177 /**
Gnaneshwar Gatlacd816ab2019-01-04 15:35:04 -0800178 * 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 Zhamaitsiakcfedd202016-03-18 16:09:50 -0700189 * Query the UCE Service for options service object.
Gnaneshwar Gatlacd816ab2019-01-04 15:35:04 -0800190 *
Pavel Zhamaitsiakcfedd202016-03-18 16:09:50 -0700191 * @return IOptionsService object.
Gnaneshwar Gatlacd816ab2019-01-04 15:35:04 -0800192 *
193 * @deprecated use API getOptionsServiceForSubscription()
194 *
Pavel Zhamaitsiakcfedd202016-03-18 16:09:50 -0700195 * @hide
196 */
Andrei Onea903da372019-02-27 15:45:08 +0000197 @UnsupportedAppUsage
Pavel Zhamaitsiakcfedd202016-03-18 16:09:50 -0700198 IOptionsService getOptionsService();
199
Gnaneshwar Gatlacd816ab2019-01-04 15:35:04 -0800200 /**
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 Zhamaitsiakcfedd202016-03-18 16:09:50 -0700211}