blob: d562eccd83fc1456f3c267ad35911c44122c8a2f [file] [log] [blame]
Wink Savillef8458ff2014-06-25 16:08:02 -07001/*
2 * Copyright (c) 2013 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;
18
19import com.android.ims.ImsStreamMediaProfile;
20import com.android.ims.ImsCallProfile;
21import com.android.ims.ImsReasonInfo;
22import com.android.ims.ImsConferenceState;
23import com.android.ims.internal.IImsCallSession;
Shriram Ganeshddf570e2015-05-31 09:18:48 -070024import com.android.ims.ImsSuppServiceNotification;
Wink Savillef8458ff2014-06-25 16:08:02 -070025
26/**
27 * A listener type for receiving notification on IMS call session events.
28 * When an event is generated for an {@link IImsCallSession}, the application is notified
29 * by having one of the methods called on the {@link IImsCallSessionListener}.
30 * {@hide}
31 */
32interface IImsCallSessionListener {
33 /**
34 * Notifies the result of the basic session operation (setup / terminate).
35 */
36 void callSessionProgressing(in IImsCallSession session, in ImsStreamMediaProfile profile);
37 void callSessionStarted(in IImsCallSession session, in ImsCallProfile profile);
38 void callSessionStartFailed(in IImsCallSession session, in ImsReasonInfo reasonInfo);
39 void callSessionTerminated(in IImsCallSession session, in ImsReasonInfo reasonInfo);
40
41 /**
42 * Notifies the result of the call hold/resume operation.
43 */
44 void callSessionHeld(in IImsCallSession session, in ImsCallProfile profile);
45 void callSessionHoldFailed(in IImsCallSession session, in ImsReasonInfo reasonInfo);
46 void callSessionHoldReceived(in IImsCallSession session, in ImsCallProfile profile);
47 void callSessionResumed(in IImsCallSession session, in ImsCallProfile profile);
48 void callSessionResumeFailed(in IImsCallSession session, in ImsReasonInfo reasonInfo);
49 void callSessionResumeReceived(in IImsCallSession session, in ImsCallProfile profile);
50
51 /**
Tyler Gunnf764e802014-10-24 14:06:40 -070052 * Notifies the result of call merge operation.
Wink Savillef8458ff2014-06-25 16:08:02 -070053 */
Tyler Gunnf764e802014-10-24 14:06:40 -070054 void callSessionMergeStarted(in IImsCallSession session,
Wink Savillef8458ff2014-06-25 16:08:02 -070055 in IImsCallSession newSession, in ImsCallProfile profile);
Tyler Gunnf764e802014-10-24 14:06:40 -070056 void callSessionMergeComplete(in IImsCallSession session);
Wink Savillef8458ff2014-06-25 16:08:02 -070057 void callSessionMergeFailed(in IImsCallSession session,
58 in ImsReasonInfo reasonInfo);
59
60 /**
61 * Notifies the result of call upgrade / downgrade or any other call updates.
62 */
63 void callSessionUpdated(in IImsCallSession session,
64 in ImsCallProfile profile);
65 void callSessionUpdateFailed(in IImsCallSession session,
66 in ImsReasonInfo reasonInfo);
67 void callSessionUpdateReceived(in IImsCallSession session,
68 in ImsCallProfile profile);
69
70 /**
71 * Notifies the result of conference extension.
72 */
73 void callSessionConferenceExtended(in IImsCallSession session,
74 in IImsCallSession newSession, in ImsCallProfile profile);
75 void callSessionConferenceExtendFailed(in IImsCallSession session,
76 in ImsReasonInfo reasonInfo);
77 void callSessionConferenceExtendReceived(in IImsCallSession session,
78 in IImsCallSession newSession, in ImsCallProfile profile);
79
80 /**
81 * Notifies the result of the participant invitation / removal to/from the conference session.
82 */
83 void callSessionInviteParticipantsRequestDelivered(in IImsCallSession session);
84 void callSessionInviteParticipantsRequestFailed(in IImsCallSession session,
85 in ImsReasonInfo reasonInfo);
86 void callSessionRemoveParticipantsRequestDelivered(in IImsCallSession session);
87 void callSessionRemoveParticipantsRequestFailed(in IImsCallSession session,
88 in ImsReasonInfo reasonInfo);
89
90 /**
91 * Notifies the changes of the conference info. in the conference session.
92 */
93 void callSessionConferenceStateUpdated(in IImsCallSession session,
94 in ImsConferenceState state);
95
96 /**
97 * Notifies the incoming USSD message.
98 */
99 void callSessionUssdMessageReceived(in IImsCallSession session,
100 int mode, String ussdMessage);
Shriram Ganeshaf9a6962014-07-21 14:06:53 -0700101
102 /**
103 * Notifies of handover information for this call
104 */
105 void callSessionHandover(in IImsCallSession session,
106 in int srcAccessTech, in int targetAccessTech, in ImsReasonInfo reasonInfo);
107 void callSessionHandoverFailed(in IImsCallSession session,
108 in int srcAccessTech, in int targetAccessTech, in ImsReasonInfo reasonInfo);
Shriram Ganesh69f35c82014-09-11 22:33:03 +0530109
110 /**
111 * Notifies the TTY mode change by remote party.
112 * @param mode one of the following:
113 * - {@link com.android.internal.telephony.Phone#TTY_MODE_OFF}
114 * - {@link com.android.internal.telephony.Phone#TTY_MODE_FULL}
115 * - {@link com.android.internal.telephony.Phone#TTY_MODE_HCO}
116 * - {@link com.android.internal.telephony.Phone#TTY_MODE_VCO}
117 */
118 void callSessionTtyModeReceived(in IImsCallSession session, in int mode);
Tyler Gunn6b91ebf2015-04-01 09:36:19 -0700119
120 /**
121 * Notifies of a change to the multiparty state for this {@code ImsCallSession}.
122 *
123 * @param session The call session.
124 * @param isMultiParty {@code true} if the session became multiparty, {@code false} otherwise.
125 */
126 void callSessionMultipartyStateChanged(in IImsCallSession session, in boolean isMultiParty);
Shriram Ganeshddf570e2015-05-31 09:18:48 -0700127
128 /**
129 * Notifies the supplementary service information for the current session.
130 */
131 void callSessionSuppServiceReceived(in IImsCallSession session,
132 in ImsSuppServiceNotification suppSrvNotification);
Wink Savillef8458ff2014-06-25 16:08:02 -0700133}