1 /*
2  * Copyright (C) 2019 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 android.telephony.ims.aidl;
18 
19 import android.net.Uri;
20 import android.telephony.ims.DelegateRequest;
21 import android.telephony.ims.aidl.IImsCapabilityCallback;
22 import android.telephony.ims.aidl.IImsRegistrationCallback;
23 import android.telephony.ims.aidl.IRcsUceControllerCallback;
24 import android.telephony.ims.aidl.IRcsUcePublishStateCallback;
25 import android.telephony.ims.aidl.IRcsUcePublishStateCallback;
26 import android.telephony.ims.aidl.ISipDelegate;
27 import android.telephony.ims.aidl.ISipDelegateMessageCallback;
28 import android.telephony.ims.aidl.ISipDelegateConnectionStateCallback;
29 
30 import com.android.ims.ImsFeatureContainer;
31 import com.android.ims.internal.IImsServiceFeatureCallback;
32 import com.android.internal.telephony.IIntegerConsumer;
33 
34 /**
35  * Interface used to interact with the Telephony IMS.
36  *
37  * {@hide}
38  */
39 interface IImsRcsController {
40     // IMS RCS registration commands
registerImsRegistrationCallback(int subId, IImsRegistrationCallback c)41     void registerImsRegistrationCallback(int subId, IImsRegistrationCallback c);
unregisterImsRegistrationCallback(int subId, IImsRegistrationCallback c)42     void unregisterImsRegistrationCallback(int subId, IImsRegistrationCallback c);
getImsRcsRegistrationState(int subId, IIntegerConsumer consumer)43     void getImsRcsRegistrationState(int subId, IIntegerConsumer consumer);
getImsRcsRegistrationTransportType(int subId, IIntegerConsumer consumer)44     void getImsRcsRegistrationTransportType(int subId, IIntegerConsumer consumer);
45 
46     // IMS RCS capability commands
registerRcsAvailabilityCallback(int subId, IImsCapabilityCallback c)47     void registerRcsAvailabilityCallback(int subId, IImsCapabilityCallback c);
unregisterRcsAvailabilityCallback(int subId, IImsCapabilityCallback c)48     void unregisterRcsAvailabilityCallback(int subId, IImsCapabilityCallback c);
isCapable(int subId, int capability, int radioTech)49     boolean isCapable(int subId, int capability, int radioTech);
isAvailable(int subId, int capability, int radioTech)50     boolean isAvailable(int subId, int capability, int radioTech);
51 
52     // ImsUceAdapter specific
requestCapabilities(int subId, String callingPackage, String callingFeatureId, in List<Uri> contactNumbers, IRcsUceControllerCallback c)53     void requestCapabilities(int subId, String callingPackage, String callingFeatureId,
54             in List<Uri> contactNumbers, IRcsUceControllerCallback c);
requestAvailability(int subId, String callingPackage, String callingFeatureId, in Uri contactNumber, IRcsUceControllerCallback c)55     void requestAvailability(int subId, String callingPackage,
56             String callingFeatureId, in Uri contactNumber,
57             IRcsUceControllerCallback c);
getUcePublishState(int subId)58     int getUcePublishState(int subId);
isUceSettingEnabled(int subId, String callingPackage, String callingFeatureId)59     boolean isUceSettingEnabled(int subId, String callingPackage, String callingFeatureId);
setUceSettingEnabled(int subId, boolean isEnabled)60     void setUceSettingEnabled(int subId, boolean isEnabled);
registerUcePublishStateCallback(int subId, IRcsUcePublishStateCallback c)61     void registerUcePublishStateCallback(int subId, IRcsUcePublishStateCallback c);
unregisterUcePublishStateCallback(int subId, IRcsUcePublishStateCallback c)62     void unregisterUcePublishStateCallback(int subId, IRcsUcePublishStateCallback c);
63 
64     // SipDelegateManager
isSipDelegateSupported(int subId)65     boolean isSipDelegateSupported(int subId);
createSipDelegate(int subId, in DelegateRequest request, String packageName, ISipDelegateConnectionStateCallback delegateState, ISipDelegateMessageCallback delegateMessage)66     void createSipDelegate(int subId, in DelegateRequest request, String packageName,
67             ISipDelegateConnectionStateCallback delegateState,
68             ISipDelegateMessageCallback delegateMessage);
destroySipDelegate(int subId, ISipDelegate connection, int reason)69     void destroySipDelegate(int subId, ISipDelegate connection, int reason);
triggerNetworkRegistration(int subId, ISipDelegate connection, int sipCode, String sipReason)70     void triggerNetworkRegistration(int subId, ISipDelegate connection, int sipCode,
71             String sipReason);
72 
73     // Internal commands that should not be made public
registerRcsFeatureCallback(int slotId, in IImsServiceFeatureCallback callback)74     void registerRcsFeatureCallback(int slotId, in IImsServiceFeatureCallback callback);
unregisterImsFeatureCallback(in IImsServiceFeatureCallback callback)75     void unregisterImsFeatureCallback(in IImsServiceFeatureCallback callback);
76 }
77