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.app.PendingIntent;
20 import android.net.Uri;
21 import android.os.Bundle;
22 import android.telecom.ConnectionRequest;
23 import android.telecom.DisconnectCause;
24 import android.telecom.Logging.Session;
25 import android.telecom.ParcelableConnection;
26 import android.telecom.ParcelableConference;
27 import android.telecom.PhoneAccountHandle;
28 import android.telecom.StatusHints;
29 
30 import com.android.internal.telecom.IVideoProvider;
31 import com.android.internal.telecom.RemoteServiceCallback;
32 
33 /**
34  * Internal remote callback interface for connection services.
35  *
36  * @see android.telecom.ConnectionServiceAdapter
37  *
38  * {@hide}
39  */
40 oneway interface IConnectionServiceAdapter {
handleCreateConnectionComplete( String callId, in ConnectionRequest request, in ParcelableConnection connection, in Session.Info sessionInfo)41     void handleCreateConnectionComplete(
42             String callId,
43             in ConnectionRequest request,
44             in ParcelableConnection connection,
45             in Session.Info sessionInfo);
46 
setActive(String callId, in Session.Info sessionInfo)47     void setActive(String callId, in Session.Info sessionInfo);
48 
setRinging(String callId, in Session.Info sessionInfo)49     void setRinging(String callId, in Session.Info sessionInfo);
50 
setDialing(String callId, in Session.Info sessionInfo)51     void setDialing(String callId, in Session.Info sessionInfo);
52 
setPulling(String callId, in Session.Info sessionInfo)53     void setPulling(String callId, in Session.Info sessionInfo);
54 
setDisconnected(String callId, in DisconnectCause disconnectCause, in Session.Info sessionInfo)55     void setDisconnected(String callId, in DisconnectCause disconnectCause,
56     in Session.Info sessionInfo);
57 
setOnHold(String callId, in Session.Info sessionInfo)58     void setOnHold(String callId, in Session.Info sessionInfo);
59 
setRingbackRequested(String callId, boolean ringing, in Session.Info sessionInfo)60     void setRingbackRequested(String callId, boolean ringing, in Session.Info sessionInfo);
61 
setConnectionCapabilities(String callId, int connectionCapabilities, in Session.Info sessionInfo)62     void setConnectionCapabilities(String callId, int connectionCapabilities,
63     in Session.Info sessionInfo);
64 
setConnectionProperties(String callId, int connectionProperties, in Session.Info sessionInfo)65     void setConnectionProperties(String callId, int connectionProperties,
66     in Session.Info sessionInfo);
67 
setIsConferenced(String callId, String conferenceCallId, in Session.Info sessionInfo)68     void setIsConferenced(String callId, String conferenceCallId, in Session.Info sessionInfo);
69 
setConferenceMergeFailed(String callId, in Session.Info sessionInfo)70     void setConferenceMergeFailed(String callId, in Session.Info sessionInfo);
71 
addConferenceCall(String callId, in ParcelableConference conference, in Session.Info sessionInfo)72     void addConferenceCall(String callId, in ParcelableConference conference,
73     in Session.Info sessionInfo);
74 
removeCall(String callId, in Session.Info sessionInfo)75     void removeCall(String callId, in Session.Info sessionInfo);
76 
onPostDialWait(String callId, String remaining, in Session.Info sessionInfo)77     void onPostDialWait(String callId, String remaining, in Session.Info sessionInfo);
78 
onPostDialChar(String callId, char nextChar, in Session.Info sessionInfo)79     void onPostDialChar(String callId, char nextChar, in Session.Info sessionInfo);
80 
queryRemoteConnectionServices(RemoteServiceCallback callback, in Session.Info sessionInfo)81     void queryRemoteConnectionServices(RemoteServiceCallback callback, in Session.Info sessionInfo);
82 
setVideoProvider(String callId, IVideoProvider videoProvider, in Session.Info sessionInfo)83     void setVideoProvider(String callId, IVideoProvider videoProvider, in Session.Info sessionInfo);
84 
setVideoState(String callId, int videoState, in Session.Info sessionInfo)85     void setVideoState(String callId, int videoState, in Session.Info sessionInfo);
86 
setIsVoipAudioMode(String callId, boolean isVoip, in Session.Info sessionInfo)87     void setIsVoipAudioMode(String callId, boolean isVoip, in Session.Info sessionInfo);
88 
setStatusHints(String callId, in StatusHints statusHints, in Session.Info sessionInfo)89     void setStatusHints(String callId, in StatusHints statusHints, in Session.Info sessionInfo);
90 
setAddress(String callId, in Uri address, int presentation, in Session.Info sessionInfo)91     void setAddress(String callId, in Uri address, int presentation, in Session.Info sessionInfo);
92 
setCallerDisplayName(String callId, String callerDisplayName, int presentation, in Session.Info sessionInfo)93     void setCallerDisplayName(String callId, String callerDisplayName, int presentation,
94     in Session.Info sessionInfo);
95 
setConferenceableConnections(String callId, in List<String> conferenceableCallIds, in Session.Info sessionInfo)96     void setConferenceableConnections(String callId, in List<String> conferenceableCallIds,
97     in Session.Info sessionInfo);
98 
addExistingConnection(String callId, in ParcelableConnection connection, in Session.Info sessionInfo)99     void addExistingConnection(String callId, in ParcelableConnection connection,
100     in Session.Info sessionInfo);
101 
putExtras(String callId, in Bundle extras, in Session.Info sessionInfo)102     void putExtras(String callId, in Bundle extras, in Session.Info sessionInfo);
103 
removeExtras(String callId, in List<String> keys, in Session.Info sessionInfo)104     void removeExtras(String callId, in List<String> keys, in Session.Info sessionInfo);
105 
setAudioRoute(String callId, int audioRoute, String bluetoothAddress, in Session.Info sessionInfo)106     void setAudioRoute(String callId, int audioRoute, String bluetoothAddress,
107             in Session.Info sessionInfo);
108 
onConnectionEvent(String callId, String event, in Bundle extras, in Session.Info sessionInfo)109     void onConnectionEvent(String callId, String event, in Bundle extras,
110     in Session.Info sessionInfo);
111 
onRttInitiationSuccess(String callId, in Session.Info sessionInfo)112     void onRttInitiationSuccess(String callId, in Session.Info sessionInfo);
113 
onRttInitiationFailure(String callId, int reason, in Session.Info sessionInfo)114     void onRttInitiationFailure(String callId, int reason, in Session.Info sessionInfo);
115 
onRttSessionRemotelyTerminated(String callId, in Session.Info sessionInfo)116     void onRttSessionRemotelyTerminated(String callId, in Session.Info sessionInfo);
117 
onRemoteRttRequest(String callId, in Session.Info sessionInfo)118     void onRemoteRttRequest(String callId, in Session.Info sessionInfo);
119 
onPhoneAccountChanged(String callId, in PhoneAccountHandle pHandle, in Session.Info sessionInfo)120     void onPhoneAccountChanged(String callId, in PhoneAccountHandle pHandle,
121     in Session.Info sessionInfo);
122 
onConnectionServiceFocusReleased(in Session.Info sessionInfo)123     void onConnectionServiceFocusReleased(in Session.Info sessionInfo);
124 }
125