IUceService.aidl revision 7ed3044ed1c4777650d38775a5f26cb3396fab09
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
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
69     * @hide
70     */
71    int createOptionsService(IOptionsListener optionsListener,
72                             inout UceLong optionsServiceListenerHdl);
73
74    /**
75     * Destroys a Options service.
76     * @param optionsServiceHandle this is received in serviceCreated() callback
77     *        in IOptionsListener
78     * @hide
79     */
80    void destroyOptionsService(int optionsServiceHandle);
81
82    /**
83     * Creates a presence service.
84     * @param presenceServiceListener IPresenceListener object
85     * @param presenceServiceListenerHdl wrapper for client's listener handle to be stored.
86     *
87     * The service will fill UceLong.mUceLong with presenceListenerHandle allocated and
88     * used to validate callbacks received in IPresenceListener are indeed from the
89     * service the client created.
90     *
91     * @return  presenceServiceHdl
92     * @hide
93     */
94    int createPresenceService(IPresenceListener presenceServiceListener,
95                              inout UceLong presenceServiceListenerHdl);
96
97    /**
98     * Destroys a presence service.
99     * @param presenceServiceHdl handle returned during createPresenceService()
100     * @hide
101     */
102    void destroyPresenceService(int presenceServiceHdl);
103
104
105
106    /**
107     * Query the UCE Service for information to know whether the is registered.
108     * @return boolean, true if Registered to for network events else false.
109     * @hide
110     */
111    boolean getServiceStatus();
112
113    /**
114     * Query the UCE Service for presence Service.
115     * @return IPresenceService object.
116     * @hide
117     */
118    IPresenceService getPresenceService();
119
120    /**
121     * Query the UCE Service for options service object.
122     * @return IOptionsService object.
123     * @hide
124     */
125    IOptionsService getOptionsService();
126
127}
128