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