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