1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285
|
/*
* Copyright (c) 2013 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.ims.internal;
import android.os.Message;
import android.telephony.ims.aidl.IImsCallSessionListener;
import android.telephony.ims.ImsCallProfile;
import android.telephony.ims.ImsStreamMediaProfile;
import com.android.ims.internal.IImsVideoCallProvider;
/**
* An IMS session that is associated with a SIP dialog which is established from/to
* INVITE request or a mid-call transaction to control the session.
* {@hide}
*/
interface IImsCallSession {
/**
* Closes the object. This object is not usable after being closed.
*/
void close();
/**
* Gets the call ID of the session.
*
* @return the call ID
*/
String getCallId();
/**
* Gets the call profile that this session is associated with
*
* @return the call profile that this session is associated with
*/
ImsCallProfile getCallProfile();
/**
* Gets the local call profile that this session is associated with
*
* @return the local call profile that this session is associated with
*/
ImsCallProfile getLocalCallProfile();
/**
* Gets the remote call profile that this session is associated with
*
* @return the remote call profile that this session is associated with
*/
ImsCallProfile getRemoteCallProfile();
/**
* Gets the value associated with the specified property of this session.
*
* @return the string value associated with the specified property
*/
String getProperty(String name);
/**
* Gets the session state. The value returned must be one of the states in
* {@link ImsCallSession#State}.
*
* @return the session state
*/
int getState();
/**
* Checks if the session is in a call.
*
* @return true if the session is in a call
*/
boolean isInCall();
/**
* Sets the listener to listen to the session events. A {@link IImsCallSession}
* can only hold one listener at a time. Subsequent calls to this method
* override the previous listener.
*
* @param listener to listen to the session events of this object
*/
void setListener(in IImsCallSessionListener listener);
/**
* Mutes or unmutes the mic for the active call.
*
* @param muted true if the call is muted, false otherwise
*/
void setMute(boolean muted);
/**
* Initiates an IMS call with the specified target and call profile.
* The session listener is called back upon defined session events.
* The method is only valid to call when the session state is in
* {@link ImsCallSession#State#IDLE}.
*
* @param callee dialed string to make the call to
* @param profile call profile to make the call with the specified service type,
* call type and media information
* @see Listener#callSessionStarted, Listener#callSessionStartFailed
*/
void start(String callee, in ImsCallProfile profile);
/**
* Initiates an IMS call with the specified participants and call profile.
* The session listener is called back upon defined session events.
* The method is only valid to call when the session state is in
* {@link ImsCallSession#State#IDLE}.
*
* @param participants participant list to initiate an IMS conference call
* @param profile call profile to make the call with the specified service type,
* call type and media information
* @see Listener#callSessionStarted, Listener#callSessionStartFailed
*/
void startConference(in String[] participants, in ImsCallProfile profile);
/**
* Accepts an incoming call or session update.
*
* @param callType call type specified in {@link ImsCallProfile} to be answered
* @param profile stream media profile {@link ImsStreamMediaProfile} to be answered
* @see Listener#callSessionStarted
*/
void accept(int callType, in ImsStreamMediaProfile profile);
/**
* Deflects an incoming call.
*
* @param deflectNumber number to deflect the call
*/
void deflect(String deflectNumber);
/**
* Rejects an incoming call or session update.
*
* @param reason reason code to reject an incoming call
* @see Listener#callSessionStartFailed
*/
void reject(int reason);
/**
* Terminates a call.
*
* @see Listener#callSessionTerminated
*/
void terminate(int reason);
/**
* Puts a call on hold. When it succeeds, {@link Listener#callSessionHeld} is called.
*
* @param profile stream media profile {@link ImsStreamMediaProfile} to hold the call
* @see Listener#callSessionHeld, Listener#callSessionHoldFailed
*/
void hold(in ImsStreamMediaProfile profile);
/**
* Continues a call that's on hold. When it succeeds, {@link Listener#callSessionResumed}
* is called.
*
* @param profile stream media profile {@link ImsStreamMediaProfile} to resume the call
* @see Listener#callSessionResumed, Listener#callSessionResumeFailed
*/
void resume(in ImsStreamMediaProfile profile);
/**
* Merges the active & hold call. When the merge starts,
* {@link Listener#callSessionMergeStarted} is called.
* {@link Listener#callSessionMergeComplete} is called if the merge is successful, and
* {@link Listener#callSessionMergeFailed} is called if the merge fails.
*
* @see Listener#callSessionMergeStarted, Listener#callSessionMergeComplete,
* Listener#callSessionMergeFailed
*/
void merge();
/**
* Updates the current call's properties (ex. call mode change: video upgrade / downgrade).
*
* @param callType call type specified in {@link ImsCallProfile} to be updated
* @param profile stream media profile {@link ImsStreamMediaProfile} to be updated
* @see Listener#callSessionUpdated, Listener#callSessionUpdateFailed
*/
void update(int callType, in ImsStreamMediaProfile profile);
/**
* Extends this call to the conference call with the specified recipients.
*
* @param participants participant list to be invited to the conference call after extending the call
* @see Listener#sessionConferenceExtened, Listener#sessionConferenceExtendFailed
*/
void extendToConference(in String[] participants);
/**
* Requests the conference server to invite an additional participants to the conference.
*
* @param participants participant list to be invited to the conference call
* @see Listener#sessionInviteParticipantsRequestDelivered,
* Listener#sessionInviteParticipantsRequestFailed
*/
void inviteParticipants(in String[] participants);
/**
* Requests the conference server to remove the specified participants from the conference.
*
* @param participants participant list to be removed from the conference call
* @see Listener#sessionRemoveParticipantsRequestDelivered,
* Listener#sessionRemoveParticipantsRequestFailed
*/
void removeParticipants(in String[] participants);
/**
* Sends a DTMF code. According to <a href="http://tools.ietf.org/html/rfc2833">RFC 2833</a>,
* event 0 ~ 9 maps to decimal value 0 ~ 9, '*' to 10, '#' to 11, event 'A' ~ 'D' to 12 ~ 15,
* and event flash to 16. Currently, event flash is not supported.
*
* @param c the DTMF to send. '0' ~ '9', 'A' ~ 'D', '*', '#' are valid inputs.
* @param result.
*/
void sendDtmf(char c, in Message result);
/**
* Start a DTMF code. According to <a href="http://tools.ietf.org/html/rfc2833">RFC 2833</a>,
* event 0 ~ 9 maps to decimal value 0 ~ 9, '*' to 10, '#' to 11, event 'A' ~ 'D' to 12 ~ 15,
* and event flash to 16. Currently, event flash is not supported.
*
* @param c the DTMF to send. '0' ~ '9', 'A' ~ 'D', '*', '#' are valid inputs.
*/
void startDtmf(char c);
/**
* Stop a DTMF code.
*/
void stopDtmf();
/**
* Sends an USSD message.
*
* @param ussdMessage USSD message to send
*/
void sendUssd(String ussdMessage);
/**
* Returns a binder for the video call provider implementation contained within the IMS service
* process. This binder is used by the VideoCallProvider subclass in Telephony which
* intermediates between the propriety implementation and Telecomm/InCall.
*/
IImsVideoCallProvider getVideoCallProvider();
/**
* Determines if the current session is multiparty.
* @return {@code True} if the session is multiparty.
*/
boolean isMultiparty();
/**
* Device issues RTT modify request
* @param toProfile The profile with requested changes made
*/
void sendRttModifyRequest(in ImsCallProfile toProfile);
/*
* Device responds to Remote RTT modify request
* @param status true : Accepted the request
* false : Declined the request
*/
void sendRttModifyResponse(in boolean status);
/*
* Device sends RTT message
* @param rttMessage RTT message to be sent
*/
void sendRttMessage(in String rttMessage);
}
|