Ben Gilad | bb69b0c | 2013-12-12 18:32:02 -0800 | [diff] [blame] | 1 | /* |
Sailesh Nepal | 2a46b90 | 2014-07-04 17:21:07 -0700 | [diff] [blame] | 2 | * Copyright (C) 2014 The Android Open Source Project |
Ben Gilad | bb69b0c | 2013-12-12 18:32:02 -0800 | [diff] [blame] | 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 | |
Tyler Gunn | ef9f6f9 | 2014-09-12 22:16:17 -0700 | [diff] [blame] | 17 | package com.android.internal.telecom; |
Ben Gilad | bb69b0c | 2013-12-12 18:32:02 -0800 | [diff] [blame] | 18 | |
Pooja Jain | d34698d | 2017-12-28 14:15:31 +0530 | [diff] [blame] | 19 | import android.net.Uri; |
Evan Charlton | 74f6bf8 | 2014-03-05 08:21:52 -0800 | [diff] [blame] | 20 | import android.os.Bundle; |
Hall Liu | 57006aa | 2017-02-06 10:49:48 -0800 | [diff] [blame] | 21 | import android.os.ParcelFileDescriptor; |
Yorke Lee | 4af5935 | 2015-05-13 14:14:54 -0700 | [diff] [blame] | 22 | import android.telecom.CallAudioState; |
Tyler Gunn | ef9f6f9 | 2014-09-12 22:16:17 -0700 | [diff] [blame] | 23 | import android.telecom.ConnectionRequest; |
Brad Ebinger | b32d4f8 | 2016-10-24 16:40:49 -0700 | [diff] [blame] | 24 | import android.telecom.Logging.Session; |
Tyler Gunn | ef9f6f9 | 2014-09-12 22:16:17 -0700 | [diff] [blame] | 25 | import android.telecom.PhoneAccountHandle; |
Sailesh Nepal | ab5d282 | 2014-03-08 18:01:06 -0800 | [diff] [blame] | 26 | |
Tyler Gunn | ef9f6f9 | 2014-09-12 22:16:17 -0700 | [diff] [blame] | 27 | import com.android.internal.telecom.IConnectionServiceAdapter; |
Ben Gilad | bb69b0c | 2013-12-12 18:32:02 -0800 | [diff] [blame] | 28 | |
| 29 | /** |
Sailesh Nepal | 2a46b90 | 2014-07-04 17:21:07 -0700 | [diff] [blame] | 30 | * Internal remote interface for connection services. |
Ben Gilad | bb69b0c | 2013-12-12 18:32:02 -0800 | [diff] [blame] | 31 | * |
Tyler Gunn | ef9f6f9 | 2014-09-12 22:16:17 -0700 | [diff] [blame] | 32 | * @see android.telecom.ConnectionService |
Ben Gilad | bb69b0c | 2013-12-12 18:32:02 -0800 | [diff] [blame] | 33 | * |
Ihab Awad | 2f23664 | 2014-03-10 15:33:45 -0700 | [diff] [blame] | 34 | * @hide |
Ben Gilad | bb69b0c | 2013-12-12 18:32:02 -0800 | [diff] [blame] | 35 | */ |
Sailesh Nepal | 2a46b90 | 2014-07-04 17:21:07 -0700 | [diff] [blame] | 36 | oneway interface IConnectionService { |
Brad Ebinger | b32d4f8 | 2016-10-24 16:40:49 -0700 | [diff] [blame] | 37 | void addConnectionServiceAdapter(in IConnectionServiceAdapter adapter, |
| 38 | in Session.Info sessionInfo); |
Ben Gilad | e57944d | 2013-12-16 16:39:52 -0800 | [diff] [blame] | 39 | |
Brad Ebinger | b32d4f8 | 2016-10-24 16:40:49 -0700 | [diff] [blame] | 40 | void removeConnectionServiceAdapter(in IConnectionServiceAdapter adapter, |
| 41 | in Session.Info sessionInfo); |
Ihab Awad | 8aecfed | 2014-08-08 17:06:11 -0700 | [diff] [blame] | 42 | |
Ihab Awad | f8b6988 | 2014-07-25 15:14:01 -0700 | [diff] [blame] | 43 | void createConnection( |
| 44 | in PhoneAccountHandle connectionManagerPhoneAccount, |
Ihab Awad | b19a0bc | 2014-08-07 19:46:01 -0700 | [diff] [blame] | 45 | String callId, |
Ihab Awad | f8b6988 | 2014-07-25 15:14:01 -0700 | [diff] [blame] | 46 | in ConnectionRequest request, |
Yorke Lee | c3cf982 | 2014-10-02 09:38:39 -0700 | [diff] [blame] | 47 | boolean isIncoming, |
Brad Ebinger | b32d4f8 | 2016-10-24 16:40:49 -0700 | [diff] [blame] | 48 | boolean isUnknown, |
| 49 | in Session.Info sessionInfo); |
Ben Gilad | bb69b0c | 2013-12-12 18:32:02 -0800 | [diff] [blame] | 50 | |
Tyler Gunn | 041a1fe | 2017-05-12 10:04:49 -0700 | [diff] [blame] | 51 | void createConnectionComplete(String callId, in Session.Info sessionInfo); |
| 52 | |
Tyler Gunn | 159f35c | 2017-03-02 09:28:37 -0800 | [diff] [blame] | 53 | void createConnectionFailed(in PhoneAccountHandle connectionManagerPhoneAccount, String callId, |
| 54 | in ConnectionRequest request, boolean isIncoming, in Session.Info sessionInfo); |
Tyler Gunn | 3edafc1 | 2017-01-31 10:49:05 -0800 | [diff] [blame] | 55 | |
Brad Ebinger | b32d4f8 | 2016-10-24 16:40:49 -0700 | [diff] [blame] | 56 | void abort(String callId, in Session.Info sessionInfo); |
Santos Cordon | bd63f90 | 2014-02-14 01:59:01 -0800 | [diff] [blame] | 57 | |
Brad Ebinger | b32d4f8 | 2016-10-24 16:40:49 -0700 | [diff] [blame] | 58 | void answerVideo(String callId, int videoState, in Session.Info sessionInfo); |
Tyler Gunn | be74de0 | 2014-08-29 14:51:48 -0700 | [diff] [blame] | 59 | |
Brad Ebinger | b32d4f8 | 2016-10-24 16:40:49 -0700 | [diff] [blame] | 60 | void answer(String callId, in Session.Info sessionInfo); |
Santos Cordon | b340c33 | 2014-02-19 01:59:32 -0800 | [diff] [blame] | 61 | |
Pooja Jain | d34698d | 2017-12-28 14:15:31 +0530 | [diff] [blame] | 62 | void deflect(String callId, in Uri address, in Session.Info sessionInfo); |
| 63 | |
Brad Ebinger | b32d4f8 | 2016-10-24 16:40:49 -0700 | [diff] [blame] | 64 | void reject(String callId, in Session.Info sessionInfo); |
Ben Gilad | 3fadaa9 | 2014-03-04 16:40:58 -0800 | [diff] [blame] | 65 | |
Brad Ebinger | b32d4f8 | 2016-10-24 16:40:49 -0700 | [diff] [blame] | 66 | void rejectWithMessage(String callId, String message, in Session.Info sessionInfo); |
Bryce Lee | 8190168 | 2015-08-28 16:38:02 -0700 | [diff] [blame] | 67 | |
Brad Ebinger | b32d4f8 | 2016-10-24 16:40:49 -0700 | [diff] [blame] | 68 | void disconnect(String callId, in Session.Info sessionInfo); |
Yorke Lee | 81ccaaa | 2014-03-12 18:33:19 -0700 | [diff] [blame] | 69 | |
Brad Ebinger | b32d4f8 | 2016-10-24 16:40:49 -0700 | [diff] [blame] | 70 | void silence(String callId, in Session.Info sessionInfo); |
Bryce Lee | cac5077 | 2015-11-17 15:13:29 -0800 | [diff] [blame] | 71 | |
Brad Ebinger | b32d4f8 | 2016-10-24 16:40:49 -0700 | [diff] [blame] | 72 | void hold(String callId, in Session.Info sessionInfo); |
Yorke Lee | 81ccaaa | 2014-03-12 18:33:19 -0700 | [diff] [blame] | 73 | |
Brad Ebinger | b32d4f8 | 2016-10-24 16:40:49 -0700 | [diff] [blame] | 74 | void unhold(String callId, in Session.Info sessionInfo); |
Sailesh Nepal | 4cff392 | 2014-03-19 10:15:37 -0700 | [diff] [blame] | 75 | |
Brad Ebinger | b32d4f8 | 2016-10-24 16:40:49 -0700 | [diff] [blame] | 76 | void onCallAudioStateChanged(String activeCallId, in CallAudioState callAudioState, |
| 77 | in Session.Info sessionInfo); |
Ihab Awad | 2f23664 | 2014-03-10 15:33:45 -0700 | [diff] [blame] | 78 | |
Brad Ebinger | b32d4f8 | 2016-10-24 16:40:49 -0700 | [diff] [blame] | 79 | void playDtmfTone(String callId, char digit, in Session.Info sessionInfo); |
Ihab Awad | 2f23664 | 2014-03-10 15:33:45 -0700 | [diff] [blame] | 80 | |
Brad Ebinger | b32d4f8 | 2016-10-24 16:40:49 -0700 | [diff] [blame] | 81 | void stopDtmfTone(String callId, in Session.Info sessionInfo); |
Santos Cordon | 980acb9 | 2014-05-31 10:31:19 -0700 | [diff] [blame] | 82 | |
Brad Ebinger | b32d4f8 | 2016-10-24 16:40:49 -0700 | [diff] [blame] | 83 | void conference(String conferenceCallId, String callId, in Session.Info sessionInfo); |
Santos Cordon | 980acb9 | 2014-05-31 10:31:19 -0700 | [diff] [blame] | 84 | |
Brad Ebinger | b32d4f8 | 2016-10-24 16:40:49 -0700 | [diff] [blame] | 85 | void splitFromConference(String callId, in Session.Info sessionInfo); |
Evan Charlton | 6dea4ac | 2014-06-03 14:07:13 -0700 | [diff] [blame] | 86 | |
Brad Ebinger | b32d4f8 | 2016-10-24 16:40:49 -0700 | [diff] [blame] | 87 | void mergeConference(String conferenceCallId, in Session.Info sessionInfo); |
Santos Cordon | a486804 | 2014-09-04 17:39:22 -0700 | [diff] [blame] | 88 | |
Brad Ebinger | b32d4f8 | 2016-10-24 16:40:49 -0700 | [diff] [blame] | 89 | void swapConference(String conferenceCallId, in Session.Info sessionInfo); |
Santos Cordon | a486804 | 2014-09-04 17:39:22 -0700 | [diff] [blame] | 90 | |
Brad Ebinger | b32d4f8 | 2016-10-24 16:40:49 -0700 | [diff] [blame] | 91 | void onPostDialContinue(String callId, boolean proceed, in Session.Info sessionInfo); |
Tyler Gunn | 876dbfb | 2016-03-14 15:18:07 -0700 | [diff] [blame] | 92 | |
Brad Ebinger | b32d4f8 | 2016-10-24 16:40:49 -0700 | [diff] [blame] | 93 | void pullExternalCall(String callId, in Session.Info sessionInfo); |
Tyler Gunn | 876dbfb | 2016-03-14 15:18:07 -0700 | [diff] [blame] | 94 | |
Brad Ebinger | b32d4f8 | 2016-10-24 16:40:49 -0700 | [diff] [blame] | 95 | void sendCallEvent(String callId, String event, in Bundle extras, in Session.Info sessionInfo); |
Tyler Gunn | dee56a8 | 2016-03-23 16:06:34 -0700 | [diff] [blame] | 96 | |
Brad Ebinger | b32d4f8 | 2016-10-24 16:40:49 -0700 | [diff] [blame] | 97 | void onExtrasChanged(String callId, in Bundle extras, in Session.Info sessionInfo); |
Hall Liu | 57006aa | 2017-02-06 10:49:48 -0800 | [diff] [blame] | 98 | |
| 99 | void startRtt(String callId, in ParcelFileDescriptor fromInCall, |
| 100 | in ParcelFileDescriptor toInCall, in Session.Info sessionInfo); |
| 101 | |
| 102 | void stopRtt(String callId, in Session.Info sessionInfo); |
| 103 | |
| 104 | void respondToRttUpgradeRequest(String callId, in ParcelFileDescriptor fromInCall, |
| 105 | in ParcelFileDescriptor toInCall, in Session.Info sessionInfo); |
Pengquan Meng | 731c1a3 | 2017-11-21 18:01:13 -0800 | [diff] [blame] | 106 | |
| 107 | void connectionServiceFocusLost(in Session.Info sessionInfo); |
| 108 | |
| 109 | void connectionServiceFocusGained(in Session.Info sessionInfo); |
Sanket Padawe | 4cc8ed53 | 2017-12-04 16:22:20 -0800 | [diff] [blame] | 110 | |
| 111 | void handoverFailed(String callId, in ConnectionRequest request, |
| 112 | int error, in Session.Info sessionInfo); |
Tyler Gunn | 79bc1ec | 2018-01-22 15:17:54 -0800 | [diff] [blame] | 113 | |
| 114 | void handoverComplete(String callId, in Session.Info sessionInfo); |
Ben Gilad | bb69b0c | 2013-12-12 18:32:02 -0800 | [diff] [blame] | 115 | } |