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