1 /* 2 * Copyright (C) 2021-2023 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef I_CALL_STATUS_CALLBACK_H 17 #define I_CALL_STATUS_CALLBACK_H 18 19 #include "iremote_broker.h" 20 #include "call_manager_inner_type.h" 21 #include "voip_call_manager_info.h" 22 23 namespace OHOS { 24 namespace Telephony { 25 class ICallStatusCallback : public IRemoteBroker { 26 public: 27 /** 28 * @brief Destroy the ICallStatusCallback object 29 */ 30 virtual ~ICallStatusCallback() = default; 31 32 /** 33 * @brief update the call details info 34 * 35 * @param info[in] call info, contains phone number, call type, call state, call mode, voice domain, account id .etc 36 * @return Returns 0 on success, others on failure. 37 */ 38 virtual int32_t UpdateCallReportInfo(const CallReportInfo &info) = 0; 39 40 /** 41 * @brief update the call details info list 42 * 43 * @param info[in] calls info, contains slot id and a CallReportInfo vector 44 * @return Returns 0 on success, others on failure. 45 */ 46 virtual int32_t UpdateCallsReportInfo(const CallsReportInfo &info) = 0; 47 48 /** 49 * @brief update the call disconnect reason 50 * 51 * @param details[in], contains DisconnectedReason and the corresponding message 52 * @return Returns 0 on success, others on failure. 53 */ 54 virtual int32_t UpdateDisconnectedCause(const DisconnectedDetails &details) = 0; 55 56 /** 57 * @brief update the event result 58 * 59 * @param info[in], contains RequestResultEventId and CellularCallEventType 60 * @return Returns 0 on success, others on failure. 61 */ 62 virtual int32_t UpdateEventResultInfo(const CellularCallEventInfo &info) = 0; 63 64 /** 65 * @brief update the rbtplay info 66 * 67 * @param info[in], 0: NETWORK_ALERTING, 1: LOCAL_ALERTING 68 * @return Returns 0 on success, others on failure. 69 */ 70 virtual int32_t UpdateRBTPlayInfo(const RBTPlayInfo info) = 0; 71 72 /** 73 * @brief update the response of get call waiting 74 * 75 * @param callWaitResponse[in], contains result, status and calssCw 76 * @return Returns 0 on success, others on failure. 77 */ 78 virtual int32_t UpdateGetWaitingResult(const CallWaitResponse &callWaitResponse) = 0; 79 80 /** 81 * @brief update the response of set call waiting 82 * 83 * @param result[in], 0 means the result is success, others is failure 84 * @return Returns 0 on success, others on failure. 85 */ 86 virtual int32_t UpdateSetWaitingResult(const int32_t result) = 0; 87 88 /** 89 * @brief update the response of Get Restriction 90 * 91 * @param callRestrictionResult[in], contains result, status and calssCw 92 * @return Returns 0 on success, others on failure. 93 */ 94 virtual int32_t UpdateGetRestrictionResult(const CallRestrictionResponse &callRestrictionResult) = 0; 95 96 /** 97 * @brief update the response of Set Restriction 98 * 99 * @param result[in], 0 means the result is success, others is failure 100 * @return Returns 0 on success, others on failure. 101 */ 102 virtual int32_t UpdateSetRestrictionResult(int32_t result) = 0; 103 104 /** 105 * @brief update the response of Set Restriction Password 106 * 107 * @param result[in], 0 means the result is success, others is failure 108 * @return Returns 0 on success, others on failure. 109 */ 110 virtual int32_t UpdateSetRestrictionPasswordResult(int32_t result) = 0; 111 112 /** 113 * @brief update the response of Get Transfer 114 * 115 * @param callTransferResponse[in], contains result, status, calssx, reason, number, time .etc 116 * @return Returns 0 on success, others on failure. 117 */ 118 virtual int32_t UpdateGetTransferResult(const CallTransferResponse &callTransferResponse) = 0; 119 120 /** 121 * @brief update the response of Set Transfer 122 * 123 * @param result[in], 0 means the result is success, others is failure 124 * @return Returns 0 on success, others on failure. 125 */ 126 virtual int32_t UpdateSetTransferResult(const int32_t result) = 0; 127 128 /** 129 * @brief update the response of Get CallClip 130 * 131 * @param clipResponse[in], contains result, action, clipStat 132 * @return Returns 0 on success, others on failure. 133 */ 134 virtual int32_t UpdateGetCallClipResult(const ClipResponse &clipResponse) = 0; 135 136 /** 137 * @brief update the response of Get CallClir 138 * 139 * @param clirResponse[in], contains result, action, clirStat 140 * @return Returns 0 on success, others on failure. 141 */ 142 virtual int32_t UpdateGetCallClirResult(const ClirResponse &clirResponse) = 0; 143 144 /** 145 * @brief update the result of Update Set CallClir 146 * 147 * @param result[in], 0 means the result is success, others is failure 148 * @return Returns 0 on success, others on failure. 149 */ 150 virtual int32_t UpdateSetCallClirResult(const int32_t result) = 0; 151 152 /** 153 * @brief update the result of Start Rtt 154 * 155 * @param result[in], 0 means the result is success, others is failure 156 * @return Returns 0 on success, others on failure. 157 */ 158 virtual int32_t StartRttResult(const int32_t result) = 0; 159 160 /** 161 * @brief update the result of stop rtt 162 * 163 * @param result[in], the Stop Rtt Result, 0 means the result is success, others is failure 164 * @return Returns 0 on success, others on failure. 165 */ 166 virtual int32_t StopRttResult(const int32_t result) = 0; 167 168 /** 169 * @brief update the response of get ims config 170 * 171 * @param response[in], contains result and value 172 * @return Returns 0 on success, others on failure. 173 */ 174 virtual int32_t GetImsConfigResult(const GetImsConfigResponse &response) = 0; 175 176 /** 177 * @brief update the result of SetImsConfig 178 * 179 * @param result[in], 0 means the result is success, others is failure 180 * @return Returns 0 on success, others on failure. 181 */ 182 virtual int32_t SetImsConfigResult(const int32_t result) = 0; 183 184 /** 185 * @brief update the response of GetImsFeatureValue 186 * 187 * @param response[in], contains result and value 188 * @return Returns 0 on success, others on failure. 189 */ 190 virtual int32_t GetImsFeatureValueResult(const GetImsFeatureValueResponse &response) = 0; 191 192 /** 193 * @brief update the result of SetImsFeatureValue 194 * 195 * @param result[in], 0 means the result is success, others is failure 196 * @return Returns 0 on success, others on failure. 197 */ 198 virtual int32_t SetImsFeatureValueResult(const int32_t result) = 0; 199 200 /** 201 * @brief update the result of ReceiveUpdateCallMediaModeRequest 202 * 203 * @param response[in], indicates the Call Media mode response information 204 * @return Returns 0 on success, others on failure. 205 */ 206 virtual int32_t ReceiveUpdateCallMediaModeRequest(const CallModeReportInfo &response) = 0; 207 208 /** 209 * @brief update the result of ReceiveUpdateCallMediaModeResponse 210 * 211 * @param response[in], indicates the Call Media mode response information 212 * @return Returns 0 on success, others on failure. 213 */ 214 virtual int32_t ReceiveUpdateCallMediaModeResponse(const CallModeReportInfo &response) = 0; 215 216 /** 217 * @brief update the result of invite to conference 218 * 219 * @param result[in], 0 means the result is success, others is failure 220 * @return Returns 0 on success, others on failure. 221 */ 222 virtual int32_t InviteToConferenceResult(const int32_t result) = 0; 223 224 /** 225 * @brief update the result of start dtmf 226 * 227 * @param result[in], 0 means the result is success, others is failure 228 * @return Returns 0 on success, others on failure. 229 */ 230 virtual int32_t StartDtmfResult(const int32_t result) = 0; 231 232 /** 233 * @brief update the result of stop dtmf 234 * 235 * @param result[in], 0 means the result is success, others is failure 236 * @return Returns 0 on success, others on failure. 237 */ 238 virtual int32_t StopDtmfResult(const int32_t result) = 0; 239 240 /** 241 * @brief update the result of send ussd 242 * 243 * @param result[in], 0 means the result is success, others is failure 244 * @return Returns 0 on success, others on failure. 245 */ 246 virtual int32_t SendUssdResult(const int32_t result) = 0; 247 248 /** 249 * @brief update the result of GetImsCallData 250 * 251 * @param result[in], 0 means the result is success, others is failure 252 * @return Returns 0 on success, others on failure. 253 */ 254 virtual int32_t GetImsCallDataResult(const int32_t result) = 0; 255 256 /** 257 * @brief update the result of send mmi code 258 * 259 * @param info[in], contains result and message 260 * @return Returns 0 on success, others on failure. 261 */ 262 virtual int32_t SendMmiCodeResult(const MmiCodeInfo &info) = 0; 263 264 /** 265 * @brief update the result of Close UnFinished Ussd 266 * 267 * @param result[in], 0 means the result is success, others is failure 268 * @return Returns 0 on success, others on failure. 269 */ 270 virtual int32_t CloseUnFinishedUssdResult(const int32_t result) = 0; 271 272 virtual int32_t ReportPostDialChar(const std::string &c) = 0; 273 274 virtual int32_t ReportPostDialDelay(const std::string &str) = 0; 275 276 /** 277 * @brief handle call session event changed 278 * 279 * @param eventOptions[in], call session event info 280 * @return Returns 0 on success, others on failure. 281 */ 282 virtual int32_t HandleCallSessionEventChanged(const CallSessionReportInfo &reportInfo) = 0; 283 284 /** 285 * @brief handle peer dimensions changed 286 * 287 * @param dimensionsDetail[in], peer dimensions info 288 * @return Returns 0 on success, others on failure. 289 */ 290 virtual int32_t HandlePeerDimensionsChanged(const PeerDimensionsReportInfo &dimensionsDetail) = 0; 291 292 /** 293 * @brief handle call data usage changed 294 * 295 * @param result[in], data usage info 296 * @return Returns 0 on success, others on failure. 297 */ 298 virtual int32_t HandleCallDataUsageChanged(const int64_t result) = 0; 299 300 /** 301 * @brief handle camera capabilities changed 302 * 303 * @param cameraCapabilities[in], camera capabilities info 304 * @return Returns 0 on success, others on failure. 305 */ 306 virtual int32_t HandleCameraCapabilitiesChanged(const CameraCapabilitiesReportInfo &cameraCapabilities) = 0; 307 308 /** 309 * @brief update the voip call event 310 * 311 * @param info[in], contains voipCallEvent 312 * @return Returns 0 on success, others on failure. 313 */ 314 virtual int32_t UpdateVoipEventInfo(const VoipCallEventInfo &info) = 0; 315 316 public: 317 DECLARE_INTERFACE_DESCRIPTOR(u"OHOS.Telephony.ICallStatusCallback"); 318 }; 319 } // namespace Telephony 320 } // namespace OHOS 321 322 #endif 323