blob: 65e7fc9756bbce9faaa1934dd33fdb9e5bfe665b [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.presence;
18
19import com.android.ims.internal.uce.common.StatusCode;
20import com.android.ims.internal.uce.presence.PresPublishTriggerType;
21import com.android.ims.internal.uce.presence.PresCmdStatus;
22import com.android.ims.internal.uce.presence.PresCapInfo;
23import com.android.ims.internal.uce.presence.PresSipResponse;
24import com.android.ims.internal.uce.presence.PresTupleInfo;
25import com.android.ims.internal.uce.presence.PresResInstanceInfo;
26import com.android.ims.internal.uce.presence.PresResInfo;
27import com.android.ims.internal.uce.presence.PresRlmiInfo;
28
29
30/**
31 * IPresenceListener
32 * {@hide} */
33interface IPresenceListener
34{
35 /**
36 * Gets the version of the presence listener implementation.
37 * @param version, version information.
38 */
Andrei Onea903da372019-02-27 15:45:08 +000039 @UnsupportedAppUsage
Pavel Zhamaitsiakcfedd202016-03-18 16:09:50 -070040 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 */
Andrei Onea903da372019-02-27 15:45:08 +000047 @UnsupportedAppUsage
Pavel Zhamaitsiakcfedd202016-03-18 16:09:50 -070048 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 */
Andrei Onea903da372019-02-27 15:45:08 +000055 @UnsupportedAppUsage
Pavel Zhamaitsiakcfedd202016-03-18 16:09:50 -070056 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 */
Andrei Onea903da372019-02-27 15:45:08 +000063 @UnsupportedAppUsage
Pavel Zhamaitsiakcfedd202016-03-18 16:09:50 -070064 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 */
Andrei Onea903da372019-02-27 15:45:08 +000070 @UnsupportedAppUsage
Pavel Zhamaitsiakcfedd202016-03-18 16:09:50 -070071 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 */
Andrei Onea903da372019-02-27 15:45:08 +000078 @UnsupportedAppUsage
Pavel Zhamaitsiakcfedd202016-03-18 16:09:50 -070079 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 */
Andrei Onea903da372019-02-27 15:45:08 +000087 @UnsupportedAppUsage
Pavel Zhamaitsiakcfedd202016-03-18 16:09:50 -070088 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 */
Andrei Onea903da372019-02-27 15:45:08 +000097 @UnsupportedAppUsage
Pavel Zhamaitsiakcfedd202016-03-18 16:09:50 -070098 void listCapInfoReceived(in PresRlmiInfo rlmiInfo,
99 in PresResInfo [] resInfo);
Abhishek Adappa244956442016-10-28 14:12:00 -0700100
101 /**
102 * Callback function to be invoked to inform the client when Unpublish message
103 * is sent to network.
104 */
Andrei Onea903da372019-02-27 15:45:08 +0000105 @UnsupportedAppUsage
Abhishek Adappa244956442016-10-28 14:12:00 -0700106 void unpublishMessageSent();
107
Pavel Zhamaitsiakcfedd202016-03-18 16:09:50 -0700108}