Pavel Zhamaitsiak | cfedd20 | 2016-03-18 16:09:50 -0700 | [diff] [blame] | 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 | */ |
Andrei Onea | 903da37 | 2019-02-27 15:45:08 +0000 | [diff] [blame] | 39 | @UnsupportedAppUsage |
Pavel Zhamaitsiak | cfedd20 | 2016-03-18 16:09:50 -0700 | [diff] [blame] | 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 | */ |
Andrei Onea | 903da37 | 2019-02-27 15:45:08 +0000 | [diff] [blame] | 47 | @UnsupportedAppUsage |
Pavel Zhamaitsiak | cfedd20 | 2016-03-18 16:09:50 -0700 | [diff] [blame] | 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 | */ |
Andrei Onea | 903da37 | 2019-02-27 15:45:08 +0000 | [diff] [blame] | 55 | @UnsupportedAppUsage |
Pavel Zhamaitsiak | cfedd20 | 2016-03-18 16:09:50 -0700 | [diff] [blame] | 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 | */ |
Andrei Onea | 903da37 | 2019-02-27 15:45:08 +0000 | [diff] [blame] | 63 | @UnsupportedAppUsage |
Pavel Zhamaitsiak | cfedd20 | 2016-03-18 16:09:50 -0700 | [diff] [blame] | 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 | */ |
Andrei Onea | 903da37 | 2019-02-27 15:45:08 +0000 | [diff] [blame] | 70 | @UnsupportedAppUsage |
Pavel Zhamaitsiak | cfedd20 | 2016-03-18 16:09:50 -0700 | [diff] [blame] | 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 | */ |
Andrei Onea | 903da37 | 2019-02-27 15:45:08 +0000 | [diff] [blame] | 78 | @UnsupportedAppUsage |
Pavel Zhamaitsiak | cfedd20 | 2016-03-18 16:09:50 -0700 | [diff] [blame] | 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 | */ |
Andrei Onea | 903da37 | 2019-02-27 15:45:08 +0000 | [diff] [blame] | 87 | @UnsupportedAppUsage |
Pavel Zhamaitsiak | cfedd20 | 2016-03-18 16:09:50 -0700 | [diff] [blame] | 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 | */ |
Andrei Onea | 903da37 | 2019-02-27 15:45:08 +0000 | [diff] [blame] | 97 | @UnsupportedAppUsage |
Pavel Zhamaitsiak | cfedd20 | 2016-03-18 16:09:50 -0700 | [diff] [blame] | 98 | void listCapInfoReceived(in PresRlmiInfo rlmiInfo, |
| 99 | in PresResInfo [] resInfo); |
Abhishek Adappa | 24495644 | 2016-10-28 14:12:00 -0700 | [diff] [blame] | 100 | |
| 101 | /** |
| 102 | * Callback function to be invoked to inform the client when Unpublish message |
| 103 | * is sent to network. |
| 104 | */ |
Andrei Onea | 903da37 | 2019-02-27 15:45:08 +0000 | [diff] [blame] | 105 | @UnsupportedAppUsage |
Abhishek Adappa | 24495644 | 2016-10-28 14:12:00 -0700 | [diff] [blame] | 106 | void unpublishMessageSent(); |
| 107 | |
Pavel Zhamaitsiak | cfedd20 | 2016-03-18 16:09:50 -0700 | [diff] [blame] | 108 | } |