1 /*
2  * Copyright (c) 2013 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.ims.internal;
18 
19 import android.app.PendingIntent;
20 
21 import com.android.ims.ImsCallProfile;
22 import com.android.ims.internal.IImsRegistrationListener;
23 import com.android.ims.internal.IImsCallSession;
24 import com.android.ims.internal.IImsCallSessionListener;
25 import com.android.ims.internal.IImsEcbm;
26 import com.android.ims.internal.IImsUt;
27 import com.android.ims.internal.IImsConfig;
28 
29 import android.os.Message;
30 
31 /**
32  * {@hide}
33  */
34 interface IImsService {
open(int phoneId, int serviceClass, in PendingIntent incomingCallIntent, in IImsRegistrationListener listener)35     int open(int phoneId, int serviceClass, in PendingIntent incomingCallIntent,
36             in IImsRegistrationListener listener);
close(int serviceId)37     void close(int serviceId);
isConnected(int serviceId, int serviceType, int callType)38     boolean isConnected(int serviceId, int serviceType, int callType);
isOpened(int serviceId)39     boolean isOpened(int serviceId);
setRegistrationListener(int serviceId, in IImsRegistrationListener listener)40     void setRegistrationListener(int serviceId, in IImsRegistrationListener listener);
41 
createCallProfile(int serviceId, int serviceType, int callType)42     ImsCallProfile createCallProfile(int serviceId, int serviceType, int callType);
43 
createCallSession(int serviceId, in ImsCallProfile profile, in IImsCallSessionListener listener)44     IImsCallSession createCallSession(int serviceId, in ImsCallProfile profile,
45             in IImsCallSessionListener listener);
getPendingCallSession(int serviceId, String callId)46     IImsCallSession getPendingCallSession(int serviceId, String callId);
47 
48     /**
49      * Ut interface for the supplementary service configuration.
50      */
getUtInterface(int serviceId)51     IImsUt getUtInterface(int serviceId);
52 
53     /**
54      * Config interface to get/set IMS service/capability parameters.
55      */
getConfigInterface(int phoneId)56     IImsConfig getConfigInterface(int phoneId);
57 
58     /**
59      * Used for turning on IMS when its in OFF state.
60      */
turnOnIms(int phoneId)61     void turnOnIms(int phoneId);
62 
63     /**
64      * Used for turning off IMS when its in ON state.
65      * When IMS is OFF, device will behave as CSFB'ed.
66      */
turnOffIms(int phoneId)67     void turnOffIms(int phoneId);
68 
69     /**
70      * ECBM interface for Emergency Callback mode mechanism.
71      */
getEcbmInterface(int serviceId)72     IImsEcbm getEcbmInterface(int serviceId);
73 
74    /**
75      * Used to set current TTY Mode.
76      */
setUiTTYMode(int serviceId, int uiTtyMode, in Message onComplete)77     void setUiTTYMode(int serviceId, int uiTtyMode, in Message onComplete);
78 }
79