diff --git a/interfaces/innerkits/ims/ims_call_types.h b/interfaces/innerkits/ims/ims_call_types.h index 5c108f9643a940bd1c0b82c62dfc7cba945fcad2..cd8d4ff2373029286756520db1ebebc9127ce8f2 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 mode = 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 e8caa0539bcfcede506b060194e1982410a3a53d..ea2a056b61f14a32ca36faba86797ec2c0d87b35 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; - ImsRegTech imsRadioTech; - bool enable; + ImsCapabilityType imsCapabilityType = ImsCapabilityType::CAPABILITY_TYPE_VOICE; + ImsRegTech imsRadioTech = ImsRegTech::IMS_REG_TECH_NONE; + 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 8394444c96dfc054bcf1cf1e9b462e5b1fad17bf..6d9921e0627f900b55599922ff2ec981ee81e7a9 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; - TelCallState state; - bool mpty; - int32_t numberType; - int32_t ton; - char number[kMaxNumberLen]; - bool priorityPresent; - int32_t priority; - bool cliValidityPresent; - CallType callType; // call type: CS、IMS - int32_t videoState; // 0: audio 1:video + int32_t index = 0; + bool mt = false; + bool negStatusPresent = false; + NegStatus negStatus = NegStatus::NEG_INVALID; + char sdpMd[kMaxNumberLen] = { 0 }; + CsMode csMode = CsMode::NO_INFORMATION; + TelCallState state = TelCallState::CALL_STATUS_UNKNOWN; + 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 = CallType::TYPE_CS; // call type: CS、IMS + 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 488cee403f3f07f8bf80ed3f91bba11d39beff12..6b888372bb6e337739272e808fdbda2747aff336 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 {