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.presence;
18 
19 import com.android.ims.internal.uce.common.StatusCode;
20 import com.android.ims.internal.uce.presence.PresPublishTriggerType;
21 import com.android.ims.internal.uce.presence.PresCmdStatus;
22 import com.android.ims.internal.uce.presence.PresCapInfo;
23 import com.android.ims.internal.uce.presence.PresSipResponse;
24 import com.android.ims.internal.uce.presence.PresTupleInfo;
25 import com.android.ims.internal.uce.presence.PresResInstanceInfo;
26 import com.android.ims.internal.uce.presence.PresResInfo;
27 import com.android.ims.internal.uce.presence.PresRlmiInfo;
28 
29 
30 /**
31  * IPresenceListener
32  * {@hide} */
33 interface IPresenceListener
34 {
35     /**
36      * Gets the version of the presence listener implementation.
37      * @param version, version information.
38      */
39     @UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553)
getVersionCb(in String version )40     void getVersionCb(in String version );
41 
42     /**
43      * Callback function to be invoked by the Presence service to notify the listener of service
44      * availability.
45      * @param statusCode, UCE_SUCCESS as service availability.
46      */
47     @UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553)
serviceAvailable(in StatusCode statusCode)48     void serviceAvailable(in StatusCode statusCode);
49 
50     /**
51      * Callback function to be invoked by the Presence service to notify the listener of service
52      * unavailability.
53      * @param statusCode, UCE_SUCCESS as service unAvailability.
54      */
55     @UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553)
serviceUnAvailable(in StatusCode statusCode)56     void serviceUnAvailable(in StatusCode statusCode);
57 
58     /**
59      * Callback function to be invoked by the Presence service to notify the listener to send a
60      * publish request.
61      * @param publishTrigger, Publish trigger for the network being supported.
62      */
63     @UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553)
publishTriggering(in PresPublishTriggerType publishTrigger)64     void publishTriggering(in PresPublishTriggerType publishTrigger);
65 
66     /**
67      * Callback function to be invoked to inform the client of the status of an asynchronous call.
68      * @param cmdStatus, command status of the request placed.
69      */
70     @UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553)
cmdStatus( in PresCmdStatus cmdStatus)71     void cmdStatus( in PresCmdStatus cmdStatus);
72 
73     /**
74      * Callback function to be invoked to inform the client when the response for a SIP message,
75      * such as PUBLISH or SUBSCRIBE, has been received.
76      * @param sipResponse, network response received for the request placed.
77      */
78     @UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553)
sipResponseReceived(in PresSipResponse sipResponse)79     void sipResponseReceived(in PresSipResponse sipResponse);
80 
81     /**
82      * Callback function to be invoked to inform the client when the NOTIFY message carrying a
83      * single contact's capabilities information is received.
84      * @param presentityURI, URI of the remote entity the request was placed.
85      * @param tupleInfo, array of capability information remote entity supports.
86      */
87     @UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553)
capInfoReceived(in String presentityURI, in PresTupleInfo [] tupleInfo)88     void capInfoReceived(in String presentityURI,
89                          in PresTupleInfo [] tupleInfo);
90 
91     /**
92      * Callback function to be invoked to inform the client when the NOTIFY message carrying
93      * contact's capabilities information is received.
94      * @param rlmiInfo, resource infomation received from network.
95      * @param resInfo, array of capabilities received from network for the list of  remore URI.
96      */
97     @UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553)
listCapInfoReceived(in PresRlmiInfo rlmiInfo, in PresResInfo [] resInfo)98     void listCapInfoReceived(in PresRlmiInfo rlmiInfo,
99                              in PresResInfo [] resInfo);
100 
101     /**
102      * Callback function to be invoked to inform the client when Unpublish message
103      * is sent to network.
104      */
105     @UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553)
unpublishMessageSent()106     void unpublishMessageSent();
107 
108 }