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.os.Bundle;
20 import android.telecom.CallAudioState;
21 import android.telecom.ConnectionRequest;
22 import android.telecom.PhoneAccountHandle;
23 
24 import com.android.internal.telecom.IConnectionServiceAdapter;
25 
26 /**
27  * Internal remote interface for connection services.
28  *
29  * @see android.telecom.ConnectionService
30  *
31  * @hide
32  */
33 oneway interface IConnectionService {
addConnectionServiceAdapter(in IConnectionServiceAdapter adapter)34     void addConnectionServiceAdapter(in IConnectionServiceAdapter adapter);
35 
removeConnectionServiceAdapter(in IConnectionServiceAdapter adapter)36     void removeConnectionServiceAdapter(in IConnectionServiceAdapter adapter);
37 
createConnection( in PhoneAccountHandle connectionManagerPhoneAccount, String callId, in ConnectionRequest request, boolean isIncoming, boolean isUnknown)38     void createConnection(
39             in PhoneAccountHandle connectionManagerPhoneAccount,
40             String callId,
41             in ConnectionRequest request,
42             boolean isIncoming,
43             boolean isUnknown);
44 
abort(String callId)45     void abort(String callId);
46 
answerVideo(String callId, int videoState)47     void answerVideo(String callId, int videoState);
48 
answer(String callId)49     void answer(String callId);
50 
reject(String callId)51     void reject(String callId);
52 
rejectWithMessage(String callId, String message)53     void rejectWithMessage(String callId, String message);
54 
disconnect(String callId)55     void disconnect(String callId);
56 
silence(String callId)57     void silence(String callId);
58 
hold(String callId)59     void hold(String callId);
60 
unhold(String callId)61     void unhold(String callId);
62 
onCallAudioStateChanged(String activeCallId, in CallAudioState callAudioState)63     void onCallAudioStateChanged(String activeCallId, in CallAudioState callAudioState);
64 
playDtmfTone(String callId, char digit)65     void playDtmfTone(String callId, char digit);
66 
stopDtmfTone(String callId)67     void stopDtmfTone(String callId);
68 
conference(String conferenceCallId, String callId)69     void conference(String conferenceCallId, String callId);
70 
splitFromConference(String callId)71     void splitFromConference(String callId);
72 
mergeConference(String conferenceCallId)73     void mergeConference(String conferenceCallId);
74 
swapConference(String conferenceCallId)75     void swapConference(String conferenceCallId);
76 
onPostDialContinue(String callId, boolean proceed)77     void onPostDialContinue(String callId, boolean proceed);
78 
pullExternalCall(String callId)79     void pullExternalCall(String callId);
80 
sendCallEvent(String callId, String event, in Bundle extras)81     void sendCallEvent(String callId, String event, in Bundle extras);
82 
onExtrasChanged(String callId, in Bundle extras)83     void onExtrasChanged(String callId, in Bundle extras);
84 }
85