1 /* 2 * Copyright (C) 2022 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 TELEPHONY_IMS_CALL_TYPES_H 17 #define TELEPHONY_IMS_CALL_TYPES_H 18 19 #include "ims_core_service_types.h" 20 #include "call_manager_errors.h" 21 #include "call_manager_inner_type.h" 22 23 namespace OHOS { 24 namespace Telephony { 25 const int32_t kMaxNumberLength = 30; 26 27 enum ImsRejectReason { 28 USER_IS_BUSY = 0, 29 USER_DECLINE = 1, 30 }; 31 32 // service class used in IMS Set Call Waiting interface 33 enum ImsServiceClass { 34 SERVICE_CLASS_VOICE = 1, 35 SERVICE_CLASS_VIDEO = 2, 36 }; 37 38 enum SrvccState { 39 SRVCC_NONE = -1, 40 STARTED = 0, 41 COMPLETED = 1, 42 FAILED = 2, 43 CANCELED = 3 44 }; 45 46 enum ImsSrvccAction { 47 ACTION_DIAL, 48 ACTION_HANGUP, 49 ACTION_ANSWER, 50 ACTION_REJECT, 51 ACTION_CONFERENCE, 52 ACTION_SWITCH_CALL, 53 ACTION_SEND_DTMF, 54 ACTION_START_DTMF, 55 ACTION_STOP_DTMF, 56 }; 57 58 enum ImsCallType { 59 TEL_IMS_CALL_TYPE_VOICE, 60 TEL_IMS_CALL_TYPE_VT_TX, 61 TEL_IMS_CALL_TYPE_VT_RX, 62 TEL_IMS_CALL_TYPE_VT, 63 }; 64 65 struct ImsSrvccActionInfo { 66 CellularCallInfo callInfo; 67 char dtmfCode; 68 }; 69 70 enum TransferState { 71 VT_TRANSFER_TO_WFC = 0, 72 WFC_TRANSFER_TO_VT = 1, 73 }; 74 75 struct ImsCallInfo { 76 char phoneNum[kMaxNumberLength]; // call phone number 77 int32_t slotId; 78 int32_t videoState; // 0: audio 1:video 79 int32_t index; // call index 80 }; 81 82 struct ImsCurrentCall { 83 int32_t index; 84 int32_t dir; 85 int32_t state; 86 int32_t mode; 87 int32_t mpty; 88 int32_t voiceDomain; 89 ImsCallType callType; 90 std::string number; 91 int32_t type; 92 std::string alpha; 93 }; 94 95 struct ImsCurrentCallList { 96 int32_t callSize; 97 int32_t flag; 98 std::vector<ImsCurrentCall> calls; 99 }; 100 } // namespace Telephony 101 } // namespace OHOS 102 103 #endif // TELEPHONY_IMS_CALL_TYPES_H 104