1 /* 2 * Copyright (C) 2021 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_TYPES_H 17 #define TELEPHONY_IMS_TYPES_H 18 19 #include "call_manager_errors.h" 20 #include "call_manager_inner_type.h" 21 22 namespace OHOS { 23 namespace Telephony { 24 const int32_t kMaxNumberLength = 30; 25 const int32_t TELEPHONY_IMS_SYS_ABILITY_ID = 4014; 26 27 enum SrvccState { 28 SRVCC_NONE = -1, 29 STARTED = 0, 30 COMPLETED = 1, 31 FAILED = 2, 32 CANCELED = 3 33 }; 34 35 enum ImsSrvccAction { 36 ACTION_DIAL, 37 ACTION_HANGUP, 38 ACTION_ANSWER, 39 ACTION_REJECT, 40 ACTION_CONFERENCE, 41 ACTION_SWITCH_CALL, 42 ACTION_SEND_DTMF, 43 ACTION_START_DTMF, 44 ACTION_STOP_DTMF, 45 }; 46 47 struct ImsSrvccActionInfo { 48 CellularCallInfo callInfo; 49 char dtmfCode; 50 }; 51 52 enum TransferState { 53 VT_TRANSFER_TO_WFC = 0, 54 WFC_TRANSFER_TO_VT = 1, 55 }; 56 57 enum ImsErrType { 58 IMS_SUCCESS = 0, 59 IMS_FAILED = 1, 60 }; 61 62 struct ImsResponseInfo { 63 int32_t slotId; 64 ImsErrType error; 65 }; 66 67 struct ImsCallInfo { 68 char phoneNum[kMaxNumberLength]; // call phone number 69 int32_t slotId; 70 int32_t videoState; // 0: audio 1:video 71 int32_t index; // call index 72 }; 73 } // namespace Telephony 74 } // namespace OHOS 75 #endif // TELEPHONY_IMS_TYPES_H 76