From f7290027bb067b54d1b8e655d881361da0ed6dcf Mon Sep 17 00:00:00 2001 From: zhujc0606 Date: Thu, 6 Apr 2023 16:48:05 +0800 Subject: [PATCH 1/3] =?UTF-8?q?IssueNo:cellular=5Fcall=20=E7=BB=93?= =?UTF-8?q?=E6=9E=84=E4=BD=93=E6=95=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Description: cellular_call Sig: SIG_Telephony Feature or Bugfix:cellular_call 结构体整改 Binary Source: No Signed-off-by: zhujc0606 Change-Id: I94a0ae7e3e43806a80c4fe250ae1b02429a5e293 --- interfaces/innerkits/ims/ims_call_types.h | 36 +++++------ interfaces/innerkits/ims/ims_feature.h | 6 +- .../include/cellular_call_data_struct.h | 62 +++++++++---------- .../common/include/cellular_call_hisysevent.h | 16 ++--- 4 files changed, 60 insertions(+), 60 deletions(-) diff --git a/interfaces/innerkits/ims/ims_call_types.h b/interfaces/innerkits/ims/ims_call_types.h index 5c108f96..89b43974 100644 --- a/interfaces/innerkits/ims/ims_call_types.h +++ b/interfaces/innerkits/ims/ims_call_types.h @@ -65,7 +65,7 @@ enum ImsCallType { struct ImsSrvccActionInfo { CellularCallInfo callInfo; - char dtmfCode; + char dtmfCode = 0; }; enum TransferState { @@ -74,29 +74,29 @@ enum TransferState { }; struct ImsCallInfo { - char phoneNum[kMaxNumberLength]; // call phone number - int32_t slotId; - int32_t videoState; // 0: audio 1:video - int32_t index; // call index + char phoneNum[kMaxNumberLength] = { 0 }; // call phone number + int32_t slotId = 0; + int32_t videoState = 0; // 0: audio 1:video + int32_t index = 0; // call index }; struct ImsCurrentCall { - int32_t index; - int32_t dir; - int32_t state; - int32_t mode; - int32_t mpty; - int32_t voiceDomain; - ImsCallType callType; - std::string number; - int32_t type; - std::string alpha; + int32_t index = 0; + int32_t dir = 0; + int32_t state = 0; + int32_t modev = 0; + int32_t mpty = 0; + int32_t voiceDomain = 0; + ImsCallType callType = ImsCallType::TEL_IMS_CALL_TYPE_VOICE; + std::string number = ""; + int32_t type = 0; + std::string alpha = ""; }; struct ImsCurrentCallList { - int32_t callSize; - int32_t flag; - std::vector calls; + int32_t callSize = 0; + int32_t flag = 0; + std::vector calls {}; }; } // namespace Telephony } // namespace OHOS diff --git a/interfaces/innerkits/ims/ims_feature.h b/interfaces/innerkits/ims/ims_feature.h index e8caa053..2e219d4c 100644 --- a/interfaces/innerkits/ims/ims_feature.h +++ b/interfaces/innerkits/ims/ims_feature.h @@ -29,13 +29,13 @@ enum ImsCapabilityType { }; struct ImsCapability { - ImsCapabilityType imsCapabilityType; + ImsCapabilityType imsCapabilityType = ImsCapabilityType::CAPABILITY_TYPE_UT; ImsRegTech imsRadioTech; - bool enable; + bool enable = false; }; struct ImsCapabilityList { - std::vector imsCapabilities; + std::vector imsCapabilities {}; }; enum ImsFeatureIntResult { diff --git a/services/common/include/cellular_call_data_struct.h b/services/common/include/cellular_call_data_struct.h index 8394444c..0333aa56 100755 --- a/services/common/include/cellular_call_data_struct.h +++ b/services/common/include/cellular_call_data_struct.h @@ -34,16 +34,16 @@ enum CLIRMode { }; struct DialRequestStruct { - std::string phoneNum; - CLIRMode clirMode; + std::string phoneNum = ""; + CLIRMode clirMode = CLIRMode::DEFAULT; }; // GSM Association Non-confidential Official Document IR.92 - IMS Profile for Voice and SMS struct ImsDialInfoStruct : public DialRequestStruct { - int32_t videoState; // 0: audio 1:video - bool bEmergencyCall; - bool bImsCallFirst; - bool bRoaming; + int32_t videoState = 0; // 0: audio 1:video + bool bEmergencyCall = false; + bool bImsCallFirst = false; + bool bRoaming = false; }; enum MMIHandlerId { @@ -65,18 +65,18 @@ enum MMIHandlerId { * INDICATION: Call progress indications. */ struct MMIData { - std::string fullString; - std::string actionString; - std::string serviceCode; + std::string fullString = ""; + std::string actionString = ""; + std::string serviceCode = ""; // 3GPP TS 22.030 V4.0.0 (2001-03) 6.5.2 Structure of the MMI // This structure consists of the following parts: // Service Code, SC( (2 or 3 digits); // Supplementary Information, SI (variable length). - std::string serviceInfoA; - std::string serviceInfoB; - std::string serviceInfoC; - std::string pwdString; - std::string dialString; + std::string serviceInfoA = ""; + std::string serviceInfoB = ""; + std::string serviceInfoC = ""; + std::string pwdString = ""; + std::string dialString = ""; }; /** @@ -274,27 +274,27 @@ indicating the eMLPP priority level of the call, values specified in 3GPP TS 22. 1 Valid information in parameter */ struct ImsCallInfoResponse { - int32_t index; - bool mt; - bool negStatusPresent; - NegStatus negStatus; - char sdpMd[kMaxNumberLen]; - CsMode csMode; + int32_t index = 0; + bool mt = false; + bool negStatusPresent = false; + NegStatus negStatus = NegStatus::NEG_ACCEPT; + char sdpMd[kMaxNumberLen] = { 0 }; + CsMode csMode = CsMode::MODE_DATA; TelCallState state; - bool mpty; - int32_t numberType; - int32_t ton; - char number[kMaxNumberLen]; - bool priorityPresent; - int32_t priority; - bool cliValidityPresent; + bool mpty = false; + int32_t numberType = 0; + int32_t ton = 0; + char number[kMaxNumberLen] = { 0 }; + bool priorityPresent = false; + int32_t priority = 0; + bool cliValidityPresent = false; CallType callType; // call type: CS、IMS - int32_t videoState; // 0: audio 1:video + int32_t videoState = 0; // 0: audio 1:video }; struct PinPukResponse { - int32_t result; - int32_t remain; // It can be repeated operator N times + int32_t result = 0; + int32_t remain = 0; // It can be repeated operator N times }; enum ImsHandleId { @@ -311,7 +311,7 @@ struct SsRequestCommand { bool enable = false; int32_t clirAction = 0; std::string facility = ""; - char password[kMaxNumberLen + 1]; + char password[kMaxNumberLen + 1] = { 0 }; int32_t classType = 0; int32_t action = 0; int32_t flag = SS_FROM_MMI_CODE; // 0: command come from dialer; 1: command come from JS api which called by setting diff --git a/services/common/include/cellular_call_hisysevent.h b/services/common/include/cellular_call_hisysevent.h index 488cee40..6b888372 100644 --- a/services/common/include/cellular_call_hisysevent.h +++ b/services/common/include/cellular_call_hisysevent.h @@ -50,17 +50,17 @@ enum class CallResponseResult { }; struct CallBehaviorParameterInfo { - int32_t slotId; - int32_t callType; - int32_t videoState; - int32_t incomingCallType; - int32_t incomingVideoState; + int32_t slotId = 0; + int32_t callType = 0; + int32_t videoState = 0; + int32_t incomingCallType = 0; + int32_t incomingVideoState = 0; }; struct CallForwardingInfo { - int32_t slotId; - bool enable; - char number[maxNumberLen + 1]; + int32_t slotId = 0; + bool enable = false; + char number[maxNumberLen + 1] = { 0 }; }; class CellularCallHiSysEvent : public TelephonyHiSysEvent { -- Gitee From 2d508f6ab48cb65ace4fded842a75de6cc6eaa83 Mon Sep 17 00:00:00 2001 From: zjc <10227834+zjianc@user.noreply.gitee.com> Date: Wed, 12 Apr 2023 10:18:21 +0000 Subject: [PATCH 2/3] update interfaces/innerkits/ims/ims_call_types.h. Signed-off-by: zjc <10227834+zjianc@user.noreply.gitee.com> --- interfaces/innerkits/ims/ims_call_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interfaces/innerkits/ims/ims_call_types.h b/interfaces/innerkits/ims/ims_call_types.h index 89b43974..cd8d4ff2 100644 --- a/interfaces/innerkits/ims/ims_call_types.h +++ b/interfaces/innerkits/ims/ims_call_types.h @@ -84,7 +84,7 @@ struct ImsCurrentCall { int32_t index = 0; int32_t dir = 0; int32_t state = 0; - int32_t modev = 0; + int32_t mode = 0; int32_t mpty = 0; int32_t voiceDomain = 0; ImsCallType callType = ImsCallType::TEL_IMS_CALL_TYPE_VOICE; -- Gitee From c5a93d47d1248a8c3ae7591595b480d77fcb2adb Mon Sep 17 00:00:00 2001 From: zhujc0606 Date: Sat, 15 Apr 2023 17:12:28 +0800 Subject: [PATCH 3/3] =?UTF-8?q?IssueNo:cellular=5Fcall=20=E7=BB=93?= =?UTF-8?q?=E6=9E=84=E4=BD=93=E6=95=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Description: cellular_call Sig: SIG_Telephony Feature or Bugfix:cellular_call Binary Source: No Signed-off-by: zhujc0606 Change-Id: I5c7942aee3cb04278a4ab4fb54cb70b1723bec21 --- interfaces/innerkits/ims/ims_feature.h | 4 ++-- services/common/include/cellular_call_data_struct.h | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/interfaces/innerkits/ims/ims_feature.h b/interfaces/innerkits/ims/ims_feature.h index 2e219d4c..ea2a056b 100644 --- a/interfaces/innerkits/ims/ims_feature.h +++ b/interfaces/innerkits/ims/ims_feature.h @@ -29,8 +29,8 @@ enum ImsCapabilityType { }; struct ImsCapability { - ImsCapabilityType imsCapabilityType = ImsCapabilityType::CAPABILITY_TYPE_UT; - ImsRegTech imsRadioTech; + ImsCapabilityType imsCapabilityType = ImsCapabilityType::CAPABILITY_TYPE_VOICE; + ImsRegTech imsRadioTech = ImsRegTech::IMS_REG_TECH_NONE; bool enable = false; }; diff --git a/services/common/include/cellular_call_data_struct.h b/services/common/include/cellular_call_data_struct.h index 0333aa56..6d9921e0 100755 --- a/services/common/include/cellular_call_data_struct.h +++ b/services/common/include/cellular_call_data_struct.h @@ -277,10 +277,10 @@ struct ImsCallInfoResponse { int32_t index = 0; bool mt = false; bool negStatusPresent = false; - NegStatus negStatus = NegStatus::NEG_ACCEPT; + NegStatus negStatus = NegStatus::NEG_INVALID; char sdpMd[kMaxNumberLen] = { 0 }; - CsMode csMode = CsMode::MODE_DATA; - TelCallState state; + CsMode csMode = CsMode::NO_INFORMATION; + TelCallState state = TelCallState::CALL_STATUS_UNKNOWN; bool mpty = false; int32_t numberType = 0; int32_t ton = 0; @@ -288,7 +288,7 @@ struct ImsCallInfoResponse { bool priorityPresent = false; int32_t priority = 0; bool cliValidityPresent = false; - CallType callType; // call type: CS、IMS + CallType callType = CallType::TYPE_CS; // call type: CS、IMS int32_t videoState = 0; // 0: audio 1:video }; -- Gitee