+ Added a getVideoCallProvider function in IImsCallSession + Added IImsVideoCallProvider aidl. This is used for communication between Telephony and the ImsService. It is redundant with IVideoCallProvider on some level, but see associated bug and comments in the class for more detail. + Added IImsVideoCallCallback. This is used for communicationing callback invocations from ImsService to Telephony. It is redundant with IVideoCallCallback for same reason in bugs/comments. + Some minor formatting changes. Bug: 16886403 Change-Id: I03de12d4432f837e0930bc077307509b645493e0
228 lines
7.9 KiB
Plaintext
228 lines
7.9 KiB
Plaintext
/*
|
|
* 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 com.android.ims.ImsCallProfile;
|
|
import com.android.ims.ImsStreamMediaProfile;
|
|
import com.android.ims.internal.IImsCallSessionListener;
|
|
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 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);
|
|
|
|
/**
|
|
* 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 it succeeds, {@link Listener#callSessionMerged}
|
|
* is called.
|
|
*
|
|
* @see Listener#callSessionMerged, 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 code the DTMF to send. Value 0 to 15 (inclusive) are valid inputs.
|
|
* @param duration the interval in milli-seconds between the DTMFs
|
|
*/
|
|
void sendDtmf(int code, int duration);
|
|
|
|
/**
|
|
* 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();
|
|
}
|