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 abort(String callId, in Session.Info sessionInfo)56 void abort(String callId, in Session.Info sessionInfo); 57 answerVideo(String callId, int videoState, in Session.Info sessionInfo)58 void answerVideo(String callId, int videoState, in Session.Info sessionInfo); 59 answer(String callId, in Session.Info sessionInfo)60 void answer(String callId, in Session.Info sessionInfo); 61 deflect(String callId, in Uri address, in Session.Info sessionInfo)62 void deflect(String callId, in Uri address, in Session.Info sessionInfo); 63 reject(String callId, in Session.Info sessionInfo)64 void reject(String callId, in Session.Info sessionInfo); 65 rejectWithMessage(String callId, String message, in Session.Info sessionInfo)66 void rejectWithMessage(String callId, String message, in Session.Info sessionInfo); 67 disconnect(String callId, in Session.Info sessionInfo)68 void disconnect(String callId, in Session.Info sessionInfo); 69 silence(String callId, in Session.Info sessionInfo)70 void silence(String callId, in Session.Info sessionInfo); 71 hold(String callId, in Session.Info sessionInfo)72 void hold(String callId, in Session.Info sessionInfo); 73 unhold(String callId, in Session.Info sessionInfo)74 void unhold(String callId, in Session.Info sessionInfo); 75 onCallAudioStateChanged(String activeCallId, in CallAudioState callAudioState, in Session.Info sessionInfo)76 void onCallAudioStateChanged(String activeCallId, in CallAudioState callAudioState, 77 in Session.Info sessionInfo); 78 playDtmfTone(String callId, char digit, in Session.Info sessionInfo)79 void playDtmfTone(String callId, char digit, in Session.Info sessionInfo); 80 stopDtmfTone(String callId, in Session.Info sessionInfo)81 void stopDtmfTone(String callId, in Session.Info sessionInfo); 82 conference(String conferenceCallId, String callId, in Session.Info sessionInfo)83 void conference(String conferenceCallId, String callId, in Session.Info sessionInfo); 84 splitFromConference(String callId, in Session.Info sessionInfo)85 void splitFromConference(String callId, in Session.Info sessionInfo); 86 mergeConference(String conferenceCallId, in Session.Info sessionInfo)87 void mergeConference(String conferenceCallId, in Session.Info sessionInfo); 88 swapConference(String conferenceCallId, in Session.Info sessionInfo)89 void swapConference(String conferenceCallId, in Session.Info sessionInfo); 90 onPostDialContinue(String callId, boolean proceed, in Session.Info sessionInfo)91 void onPostDialContinue(String callId, boolean proceed, in Session.Info sessionInfo); 92 pullExternalCall(String callId, in Session.Info sessionInfo)93 void pullExternalCall(String callId, in Session.Info sessionInfo); 94 sendCallEvent(String callId, String event, in Bundle extras, in Session.Info sessionInfo)95 void sendCallEvent(String callId, String event, in Bundle extras, in Session.Info sessionInfo); 96 onExtrasChanged(String callId, in Bundle extras, in Session.Info sessionInfo)97 void onExtrasChanged(String callId, in Bundle extras, in Session.Info sessionInfo); 98 startRtt(String callId, in ParcelFileDescriptor fromInCall, in ParcelFileDescriptor toInCall, in Session.Info sessionInfo)99 void startRtt(String callId, in ParcelFileDescriptor fromInCall, 100 in ParcelFileDescriptor toInCall, in Session.Info sessionInfo); 101 stopRtt(String callId, in Session.Info sessionInfo)102 void stopRtt(String callId, in Session.Info sessionInfo); 103 respondToRttUpgradeRequest(String callId, in ParcelFileDescriptor fromInCall, in ParcelFileDescriptor toInCall, in Session.Info sessionInfo)104 void respondToRttUpgradeRequest(String callId, in ParcelFileDescriptor fromInCall, 105 in ParcelFileDescriptor toInCall, in Session.Info sessionInfo); 106 connectionServiceFocusLost(in Session.Info sessionInfo)107 void connectionServiceFocusLost(in Session.Info sessionInfo); 108 connectionServiceFocusGained(in Session.Info sessionInfo)109 void connectionServiceFocusGained(in Session.Info sessionInfo); 110 handoverFailed(String callId, in ConnectionRequest request, int error, in Session.Info sessionInfo)111 void handoverFailed(String callId, in ConnectionRequest request, 112 int error, in Session.Info sessionInfo); 113 handoverComplete(String callId, in Session.Info sessionInfo)114 void handoverComplete(String callId, in Session.Info sessionInfo); 115 } 116