• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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;
18 
19 import android.compat.annotation.UnsupportedAppUsage;
20 import android.os.Build;
21 import android.os.Handler;
22 import android.os.Message;
23 import android.telephony.ims.ImsCallForwardInfo;
24 import android.telephony.ims.ImsSsInfo;
25 import android.telephony.ims.stub.ImsUtImplBase;
26 
27 /**
28  * Provides APIs for the supplementary service settings using IMS (Ut interface).
29  * It is created from 3GPP TS 24.623 (XCAP(XML Configuration Access Protocol)
30  * over the Ut interface for manipulating supplementary services).
31  *
32  * @hide
33  */
34 public interface ImsUtInterface {
35     /**
36      * Actions
37      * @hide
38      */
39     public static final int ACTION_DEACTIVATION = 0;
40     public static final int ACTION_ACTIVATION = 1;
41     public static final int ACTION_REGISTRATION = 3;
42     public static final int ACTION_ERASURE = 4;
43     public static final int ACTION_INTERROGATION = 5;
44 
45     /**
46      * OIR (Originating Identification Restriction, 3GPP TS 24.607)
47      * OIP (Originating Identification Presentation, 3GPP TS 24.607)
48      * TIR (Terminating Identification Restriction, 3GPP TS 24.608)
49      * TIP (Terminating Identification Presentation, 3GPP TS 24.608)
50      */
51     public static final int OIR_DEFAULT = 0;    // "user subscription default value"
52     public static final int OIR_PRESENTATION_RESTRICTED = 1;
53     public static final int OIR_PRESENTATION_NOT_RESTRICTED = 2;
54 
55     /**
56      * CW (Communication Waiting, 3GPP TS 24.615)
57      */
58 
59     /**
60      * CDIV (Communication Diversion, 3GPP TS 24.604)
61      *     actions: target, no reply timer
62      */
63     public static final int CDIV_CF_UNCONDITIONAL = ImsCallForwardInfo.CDIV_CF_REASON_UNCONDITIONAL;
64     public static final int CDIV_CF_BUSY = ImsCallForwardInfo.CDIV_CF_REASON_BUSY;
65     public static final int CDIV_CF_NO_REPLY = ImsCallForwardInfo.CDIV_CF_REASON_NO_REPLY;
66     public static final int CDIV_CF_NOT_REACHABLE = ImsCallForwardInfo.CDIV_CF_REASON_NOT_REACHABLE;
67     // For CS service code: 002
68     public static final int CDIV_CF_ALL = ImsCallForwardInfo.CDIV_CF_REASON_ALL;
69     // For CS service code: 004
70     public static final int CDIV_CF_ALL_CONDITIONAL =
71             ImsCallForwardInfo.CDIV_CF_REASON_ALL_CONDITIONAL;
72     // It's only supported in the IMS service (CS does not define it).
73     // IR.92 recommends that an UE activates both the CFNRc and the CFNL
74     // (CDIV using condition not-registered) to the same target.
75     public static final int CDIV_CF_NOT_LOGGED_IN = ImsCallForwardInfo.CDIV_CF_REASON_NOT_LOGGED_IN;
76 
77     /**
78      * CB (Communication Barring, 3GPP TS 24.611)
79      */
80     // Barring of All Incoming Calls
81     public static final int CB_BAIC = ImsUtImplBase.CALL_BARRING_ALL_INCOMING;
82     // Barring of All Outgoing Calls
83     public static final int CB_BAOC = ImsUtImplBase.CALL_BARRING_ALL_OUTGOING;
84     // Barring of Outgoing International Calls
85     public static final int CB_BOIC = ImsUtImplBase.CALL_BARRING_OUTGOING_INTL;
86     // Barring of Outgoing International Calls - excluding Home Country
87     public static final int CB_BOIC_EXHC = ImsUtImplBase.CALL_BARRING_OUTGOING_INTL_EXCL_HOME;
88     // Barring of Incoming Calls - when roaming
89     public static final int CB_BIC_WR = ImsUtImplBase.CALL_BLOCKING_INCOMING_WHEN_ROAMING;
90     // Barring of Anonymous Communication Rejection (ACR) - a particular case of ICB service
91     public static final int CB_BIC_ACR = ImsUtImplBase.CALL_BARRING_ANONYMOUS_INCOMING;
92     // Barring of All Calls
93     public static final int CB_BA_ALL = ImsUtImplBase.CALL_BARRING_ALL;
94     // Barring of Outgoing Services (Service Code 333 - 3GPP TS 22.030 Table B-1)
95     public static final int CB_BA_MO = ImsUtImplBase.CALL_BARRING_OUTGOING_ALL_SERVICES;
96     // Barring of Incoming Services (Service Code 353 - 3GPP TS 22.030 Table B-1)
97     public static final int CB_BA_MT = ImsUtImplBase.CALL_BARRING_INCOMING_ALL_SERVICES;
98     // Barring of Specific Incoming calls
99     public static final int CB_BS_MT = ImsUtImplBase.CALL_BARRING_SPECIFIC_INCOMING_CALLS;
100 
101     /**
102      * Invalid result value.
103      */
104     public static final int INVALID = ImsUtImplBase.INVALID_RESULT;
105 
106 
107 
108     /**
109      * Operations for the supplementary service configuration
110      */
111 
112     /**
113      * Retrieves the configuration of the call barring.
114      * The return value of ((AsyncResult)result.obj) is an array of {@link ImsSsInfo}.
115      */
queryCallBarring(int cbType, Message result)116     public void queryCallBarring(int cbType, Message result);
117 
118     /**
119      * Retrieves the configuration of the call barring for specified service class.
120      * The return value of ((AsyncResult)result.obj) is an array of {@link ImsSsInfo}.
121      */
queryCallBarring(int cbType, Message result, int serviceClass)122     public void queryCallBarring(int cbType, Message result, int serviceClass);
123 
124     /**
125      * Retrieves the configuration of the call forward.
126      * The return value of ((AsyncResult)result.obj) is an array of {@link ImsCallForwardInfo}.
127      */
128     @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
queryCallForward(int condition, String number, Message result)129     public void queryCallForward(int condition, String number, Message result);
130 
131     /**
132      * Retrieves the configuration of the call waiting.
133      * The return value of ((AsyncResult)result.obj) is an array of {@link ImsSsInfo}.
134      */
queryCallWaiting(Message result)135     public void queryCallWaiting(Message result);
136 
137     /**
138      * Retrieves the default CLIR setting.
139      */
queryCLIR(Message result)140     public void queryCLIR(Message result);
141 
142     /**
143      * Retrieves the CLIP call setting.
144      */
queryCLIP(Message result)145     public void queryCLIP(Message result);
146 
147     /**
148      * Retrieves the COLR call setting.
149      */
queryCOLR(Message result)150     public void queryCOLR(Message result);
151 
152     /**
153      * Retrieves the COLP call setting.
154      */
queryCOLP(Message result)155     public void queryCOLP(Message result);
156 
157     /**
158      * Modifies the configuration of the call barring.
159      */
updateCallBarring(int cbType, int action, Message result, String[] barrList)160     public void updateCallBarring(int cbType, int action,
161             Message result, String[] barrList);
162 
163     /**
164      * Modifies the configuration of the call barring for specified service class.
165      */
updateCallBarring(int cbType, int action, Message result, String[] barrList, int serviceClass)166     public void updateCallBarring(int cbType, int action, Message result,
167             String[] barrList, int serviceClass);
168 
169     /**
170      * Modifies the configuration of the call barring for specified service class with password.
171      */
updateCallBarring(int cbType, int action, Message result, String[] barrList, int serviceClass, String password)172     public void updateCallBarring(int cbType, int action, Message result,
173             String[] barrList, int serviceClass, String password);
174 
175     /**
176      * Modifies the configuration of the call forward.
177      */
updateCallForward(int action, int condition, String number, int serviceClass, int timeSeconds, Message result)178     public void updateCallForward(int action, int condition, String number,
179             int serviceClass, int timeSeconds, Message result);
180 
181     /**
182      * Modifies the configuration of the call waiting.
183      */
updateCallWaiting(boolean enable, int serviceClass, Message result)184     public void updateCallWaiting(boolean enable, int serviceClass, Message result);
185 
186     /**
187      * Updates the configuration of the CLIR supplementary service.
188      */
updateCLIR(int clirMode, Message result)189     public void updateCLIR(int clirMode, Message result);
190 
191     /**
192      * Updates the configuration of the CLIP supplementary service.
193      */
updateCLIP(boolean enable, Message result)194     public void updateCLIP(boolean enable, Message result);
195 
196     /**
197      * Updates the configuration of the COLR supplementary service.
198      */
updateCOLR(int presentation, Message result)199     public void updateCOLR(int presentation, Message result);
200 
201     /**
202      * Updates the configuration of the COLP supplementary service.
203      */
updateCOLP(boolean enable, Message result)204     public void updateCOLP(boolean enable, Message result);
205 
206     /**
207      * Register for UNSOL_ON_SS indications.
208      * @param handler the {@link Handler} that is notified when there is an ss indication.
209      * @param event  Supplimentary service indication event.
210      * @param Object user object.
211      */
registerForSuppServiceIndication(Handler handler, int event, Object object)212     public void registerForSuppServiceIndication(Handler handler, int event, Object object);
213 
214     /**
215      * Deregister for UNSOL_ON_SS indications.
216      * @param handler the {@link Handler} that is notified when there is an ss indication.
217      */
unregisterForSuppServiceIndication(Handler handler)218     public void unregisterForSuppServiceIndication(Handler handler);
219 }
220