1 /* 2 * Copyright (C) 2014 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.internal.telecom; 18 19 import android.net.Uri; 20 import android.os.Bundle; 21 import android.os.ParcelFileDescriptor; 22 import android.telecom.CallAudioState; 23 import android.telecom.Connection; 24 import android.telecom.ConnectionRequest; 25 import android.telecom.Logging.Session; 26 import android.telecom.PhoneAccountHandle; 27 28 import com.android.internal.telecom.IConnectionServiceAdapter; 29 30 /** 31 * Internal remote interface for connection services. 32 * 33 * @see android.telecom.ConnectionService 34 * 35 * @hide 36 */ 37 oneway interface IConnectionService { addConnectionServiceAdapter(in IConnectionServiceAdapter adapter, in Session.Info sessionInfo)38 void addConnectionServiceAdapter(in IConnectionServiceAdapter adapter, 39 in Session.Info sessionInfo); 40 removeConnectionServiceAdapter(in IConnectionServiceAdapter adapter, in Session.Info sessionInfo)41 void removeConnectionServiceAdapter(in IConnectionServiceAdapter adapter, 42 in Session.Info sessionInfo); 43 createConnection( in PhoneAccountHandle connectionManagerPhoneAccount, String callId, in ConnectionRequest request, boolean isIncoming, boolean isUnknown, in Session.Info sessionInfo)44 void createConnection( 45 in PhoneAccountHandle connectionManagerPhoneAccount, 46 String callId, 47 in ConnectionRequest request, 48 boolean isIncoming, 49 boolean isUnknown, 50 in Session.Info sessionInfo); 51 createConnectionComplete(String callId, in Session.Info sessionInfo)52 void createConnectionComplete(String callId, in Session.Info sessionInfo); 53 createConnectionFailed(in PhoneAccountHandle connectionManagerPhoneAccount, String callId, in ConnectionRequest request, boolean isIncoming, in Session.Info sessionInfo)54 void createConnectionFailed(in PhoneAccountHandle connectionManagerPhoneAccount, String callId, 55 in ConnectionRequest request, boolean isIncoming, in Session.Info sessionInfo); 56 createConference( in PhoneAccountHandle connectionManagerPhoneAccount, String callId, in ConnectionRequest request, boolean isIncoming, boolean isUnknown, in Session.Info sessionInfo)57 void createConference( 58 in PhoneAccountHandle connectionManagerPhoneAccount, 59 String callId, 60 in ConnectionRequest request, 61 boolean isIncoming, 62 boolean isUnknown, 63 in Session.Info sessionInfo); 64 createConferenceComplete(String callId, in Session.Info sessionInfo)65 void createConferenceComplete(String callId, in Session.Info sessionInfo); 66 createConferenceFailed(in PhoneAccountHandle connectionManagerPhoneAccount, String callId, in ConnectionRequest request, boolean isIncoming, in Session.Info sessionInfo)67 void createConferenceFailed(in PhoneAccountHandle connectionManagerPhoneAccount, String callId, 68 in ConnectionRequest request, boolean isIncoming, in Session.Info sessionInfo); 69 70 abort(String callId, in Session.Info sessionInfo)71 void abort(String callId, in Session.Info sessionInfo); 72 answerVideo(String callId, int videoState, in Session.Info sessionInfo)73 void answerVideo(String callId, int videoState, in Session.Info sessionInfo); 74 answer(String callId, in Session.Info sessionInfo)75 void answer(String callId, in Session.Info sessionInfo); 76 deflect(String callId, in Uri address, in Session.Info sessionInfo)77 void deflect(String callId, in Uri address, in Session.Info sessionInfo); 78 reject(String callId, in Session.Info sessionInfo)79 void reject(String callId, in Session.Info sessionInfo); 80 rejectWithReason(String callId, int rejectReason, in Session.Info sessionInfo)81 void rejectWithReason(String callId, int rejectReason, in Session.Info sessionInfo); 82 rejectWithMessage(String callId, String message, in Session.Info sessionInfo)83 void rejectWithMessage(String callId, String message, in Session.Info sessionInfo); 84 transfer(String callId, in Uri number, boolean isConfirmationRequired, in Session.Info sessionInfo)85 void transfer(String callId, in Uri number, boolean isConfirmationRequired, 86 in Session.Info sessionInfo); 87 consultativeTransfer(String callId, String otherCallId, in Session.Info sessionInfo)88 void consultativeTransfer(String callId, String otherCallId, in Session.Info sessionInfo); 89 disconnect(String callId, in Session.Info sessionInfo)90 void disconnect(String callId, in Session.Info sessionInfo); 91 silence(String callId, in Session.Info sessionInfo)92 void silence(String callId, in Session.Info sessionInfo); 93 hold(String callId, in Session.Info sessionInfo)94 void hold(String callId, in Session.Info sessionInfo); 95 unhold(String callId, in Session.Info sessionInfo)96 void unhold(String callId, in Session.Info sessionInfo); 97 onCallAudioStateChanged(String activeCallId, in CallAudioState callAudioState, in Session.Info sessionInfo)98 void onCallAudioStateChanged(String activeCallId, in CallAudioState callAudioState, 99 in Session.Info sessionInfo); 100 playDtmfTone(String callId, char digit, in Session.Info sessionInfo)101 void playDtmfTone(String callId, char digit, in Session.Info sessionInfo); 102 stopDtmfTone(String callId, in Session.Info sessionInfo)103 void stopDtmfTone(String callId, in Session.Info sessionInfo); 104 conference(String conferenceCallId, String callId, in Session.Info sessionInfo)105 void conference(String conferenceCallId, String callId, in Session.Info sessionInfo); 106 splitFromConference(String callId, in Session.Info sessionInfo)107 void splitFromConference(String callId, in Session.Info sessionInfo); 108 mergeConference(String conferenceCallId, in Session.Info sessionInfo)109 void mergeConference(String conferenceCallId, in Session.Info sessionInfo); 110 swapConference(String conferenceCallId, in Session.Info sessionInfo)111 void swapConference(String conferenceCallId, in Session.Info sessionInfo); 112 addConferenceParticipants(String CallId, in List<Uri> participants, in Session.Info sessionInfo)113 void addConferenceParticipants(String CallId, in List<Uri> participants, 114 in Session.Info sessionInfo); 115 onPostDialContinue(String callId, boolean proceed, in Session.Info sessionInfo)116 void onPostDialContinue(String callId, boolean proceed, in Session.Info sessionInfo); 117 pullExternalCall(String callId, in Session.Info sessionInfo)118 void pullExternalCall(String callId, in Session.Info sessionInfo); 119 sendCallEvent(String callId, String event, in Bundle extras, in Session.Info sessionInfo)120 void sendCallEvent(String callId, String event, in Bundle extras, in Session.Info sessionInfo); 121 onCallFilteringCompleted(String callId, in Connection.CallFilteringCompletionInfo completionInfo, in Session.Info sessionInfo)122 void onCallFilteringCompleted(String callId, 123 in Connection.CallFilteringCompletionInfo completionInfo, 124 in Session.Info sessionInfo); 125 onExtrasChanged(String callId, in Bundle extras, in Session.Info sessionInfo)126 void onExtrasChanged(String callId, in Bundle extras, in Session.Info sessionInfo); 127 startRtt(String callId, in ParcelFileDescriptor fromInCall, in ParcelFileDescriptor toInCall, in Session.Info sessionInfo)128 void startRtt(String callId, in ParcelFileDescriptor fromInCall, 129 in ParcelFileDescriptor toInCall, in Session.Info sessionInfo); 130 stopRtt(String callId, in Session.Info sessionInfo)131 void stopRtt(String callId, in Session.Info sessionInfo); 132 respondToRttUpgradeRequest(String callId, in ParcelFileDescriptor fromInCall, in ParcelFileDescriptor toInCall, in Session.Info sessionInfo)133 void respondToRttUpgradeRequest(String callId, in ParcelFileDescriptor fromInCall, 134 in ParcelFileDescriptor toInCall, in Session.Info sessionInfo); 135 connectionServiceFocusLost(in Session.Info sessionInfo)136 void connectionServiceFocusLost(in Session.Info sessionInfo); 137 connectionServiceFocusGained(in Session.Info sessionInfo)138 void connectionServiceFocusGained(in Session.Info sessionInfo); 139 handoverFailed(String callId, in ConnectionRequest request, int error, in Session.Info sessionInfo)140 void handoverFailed(String callId, in ConnectionRequest request, 141 int error, in Session.Info sessionInfo); 142 handoverComplete(String callId, in Session.Info sessionInfo)143 void handoverComplete(String callId, in Session.Info sessionInfo); 144 onUsingAlternativeUi(String callId, boolean isUsingAlternativeUi, in Session.Info sessionInfo)145 void onUsingAlternativeUi(String callId, boolean isUsingAlternativeUi, 146 in Session.Info sessionInfo); 147 onTrackedByNonUiService(String callId, boolean isTracked, in Session.Info sessionInfo)148 void onTrackedByNonUiService(String callId, boolean isTracked, in Session.Info sessionInfo); 149 } 150