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