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