blob: 1fb8513d410a739199e9154348710be3ff387a36 [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 */
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 Gatlacd816ab2019-01-04 15:35:04 -080069 *
Pavel Zhamaitsiakcfedd202016-03-18 16:09:50 -070070 * @hide
Gnaneshwar Gatlacd816ab2019-01-04 15:35:04 -080071 *
72 * @deprecated This is replaced with new API createOptionsServiceForSubscription()
Pavel Zhamaitsiakcfedd202016-03-18 16:09:50 -070073 */
74 int createOptionsService(IOptionsListener optionsListener,
75 inout UceLong optionsServiceListenerHdl);
Gnaneshwar Gatlacd816ab2019-01-04 15:35:04 -080076 /**
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 Zhamaitsiakcfedd202016-03-18 16:09:50 -070093
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 Gatlacd816ab2019-01-04 15:35:04 -0800112 *
Pavel Zhamaitsiakcfedd202016-03-18 16:09:50 -0700113 * @hide
Gnaneshwar Gatlacd816ab2019-01-04 15:35:04 -0800114 *
115 * @deprecated This is replaced with new API createPresenceServiceForSubscription()
Pavel Zhamaitsiakcfedd202016-03-18 16:09:50 -0700116 */
117 int createPresenceService(IPresenceListener presenceServiceListener,
118 inout UceLong presenceServiceListenerHdl);
Gnaneshwar Gatlacd816ab2019-01-04 15:35:04 -0800119 /**
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 Zhamaitsiakcfedd202016-03-18 16:09:50 -0700136
137 /**
138 * Destroys a presence service.
Gnaneshwar Gatlacd816ab2019-01-04 15:35:04 -0800139 *
Pavel Zhamaitsiakcfedd202016-03-18 16:09:50 -0700140 * @param presenceServiceHdl handle returned during createPresenceService()
Gnaneshwar Gatlacd816ab2019-01-04 15:35:04 -0800141 *
Pavel Zhamaitsiakcfedd202016-03-18 16:09:50 -0700142 * @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 Gatlacd816ab2019-01-04 15:35:04 -0800150 *
Pavel Zhamaitsiakcfedd202016-03-18 16:09:50 -0700151 * @return boolean, true if Registered to for network events else false.
Gnaneshwar Gatlacd816ab2019-01-04 15:35:04 -0800152 *
Pavel Zhamaitsiakcfedd202016-03-18 16:09:50 -0700153 * @hide
154 */
155 boolean getServiceStatus();
156
157 /**
158 * Query the UCE Service for presence Service.
Gnaneshwar Gatlacd816ab2019-01-04 15:35:04 -0800159 *
Pavel Zhamaitsiakcfedd202016-03-18 16:09:50 -0700160 * @return IPresenceService object.
Gnaneshwar Gatlacd816ab2019-01-04 15:35:04 -0800161 *
Pavel Zhamaitsiakcfedd202016-03-18 16:09:50 -0700162 * @hide
Gnaneshwar Gatlacd816ab2019-01-04 15:35:04 -0800163 *
164 * @deprecated use API getPresenceServiceForSubscription()
Pavel Zhamaitsiakcfedd202016-03-18 16:09:50 -0700165 */
166 IPresenceService getPresenceService();
167
168 /**
Gnaneshwar Gatlacd816ab2019-01-04 15:35:04 -0800169 * 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 Zhamaitsiakcfedd202016-03-18 16:09:50 -0700180 * Query the UCE Service for options service object.
Gnaneshwar Gatlacd816ab2019-01-04 15:35:04 -0800181 *
Pavel Zhamaitsiakcfedd202016-03-18 16:09:50 -0700182 * @return IOptionsService object.
Gnaneshwar Gatlacd816ab2019-01-04 15:35:04 -0800183 *
184 * @deprecated use API getOptionsServiceForSubscription()
185 *
Pavel Zhamaitsiakcfedd202016-03-18 16:09:50 -0700186 * @hide
187 */
188 IOptionsService getOptionsService();
189
Gnaneshwar Gatlacd816ab2019-01-04 15:35:04 -0800190 /**
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 Zhamaitsiakcfedd202016-03-18 16:09:50 -0700201}