delete unused files.

Signed-off-by: dingxiaochen <dingxiaochen@huawei.com>
This commit is contained in:
dingxiaochen 2022-11-15 18:07:36 +08:00
parent 8838ffe49b
commit 79efd61856
9 changed files with 65 additions and 2422 deletions

View File

@ -1,730 +0,0 @@
/*
* Copyright (C) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "hril_call_parcel.h"
#include "hril_modem_parcel.h"
namespace OHOS {
namespace Telephony {
std::shared_ptr<DialInfo> DialInfo::UnMarshalling(Parcel &parcel)
{
std::shared_ptr<DialInfo> param = std::make_shared<DialInfo>();
if (param == nullptr || !param->ReadFromParcel(parcel)) {
param = nullptr;
}
return param;
}
bool DialInfo::ReadFromParcel(Parcel &parcel)
{
if (!Read(parcel, serial)) {
return false;
}
if (!Read(parcel, address)) {
return false;
}
if (!Read(parcel, clir)) {
return false;
}
return true;
}
bool DialInfo::Marshalling(Parcel &parcel) const
{
if (!Write(parcel, serial)) {
return false;
}
if (!Write(parcel, address)) {
return false;
}
if (!Write(parcel, clir)) {
return false;
}
return true;
}
bool CallInfo::ReadFromParcel(Parcel &parcel)
{
if (!Read(parcel, index)) {
return false;
}
if (!Read(parcel, dir)) {
return false;
}
if (!Read(parcel, state)) {
return false;
}
if (!Read(parcel, mode)) {
return false;
}
if (!Read(parcel, mpty)) {
return false;
}
if (!Read(parcel, voiceDomain)) {
return false;
}
if (!Read(parcel, callType)) {
return false;
}
if (!Read(parcel, number)) {
return false;
}
if (!Read(parcel, type)) {
return false;
}
if (!Read(parcel, alpha)) {
return false;
}
return true;
}
bool CallInfo::Marshalling(Parcel &parcel) const
{
if (!Write(parcel, index)) {
return false;
}
if (!Write(parcel, dir)) {
return false;
}
if (!Write(parcel, state)) {
return false;
}
if (!Write(parcel, mode)) {
return false;
}
if (!Write(parcel, mpty)) {
return false;
}
if (!Write(parcel, voiceDomain)) {
return false;
}
if (!Write(parcel, callType)) {
return false;
}
if (!Write(parcel, number)) {
return false;
}
if (!Write(parcel, type)) {
return false;
}
if (!Write(parcel, alpha)) {
return false;
}
return true;
}
std::shared_ptr<CallInfo> CallInfo::UnMarshalling(Parcel &parcel)
{
std::shared_ptr<CallInfo> param = std::make_shared<CallInfo>();
if (param == nullptr || !param->ReadFromParcel(parcel)) {
param = nullptr;
}
return param;
}
void CallInfo::Dump(std::string, int32_t) {}
bool CallInfoList::ReadFromParcel(Parcel &parcel)
{
if (!Read(parcel, callSize)) {
return false;
}
if (!Read(parcel, flag)) {
return false;
}
calls.resize(callSize);
for (int32_t i = 0; i < callSize; i++) {
calls[i].ReadFromParcel(parcel);
}
return true;
}
bool CallInfoList::Marshalling(Parcel &parcel) const
{
if (!Write(parcel, callSize)) {
return false;
}
if (!Write(parcel, flag)) {
return false;
}
for (int32_t i = 0; i < callSize; i++) {
calls[i].Marshalling(parcel);
}
return true;
}
std::shared_ptr<CallInfoList> CallInfoList::UnMarshalling(Parcel &parcel)
{
std::shared_ptr<CallInfoList> param = std::make_shared<CallInfoList>();
if (param == nullptr || !param->ReadFromParcel(parcel)) {
return nullptr;
}
return param;
}
void CallInfoList::Dump(std::string, int32_t) {}
bool EmergencyInfo::ReadFromParcel(Parcel &parcel)
{
if (!Read(parcel, index)) {
return false;
}
if (!Read(parcel, total)) {
return false;
}
if (!Read(parcel, eccNum)) {
return false;
}
if (!Read(parcel, category)) {
return false;
}
if (!Read(parcel, simpresent)) {
return false;
}
if (!Read(parcel, mcc)) {
return false;
}
if (!Read(parcel, abnormalService)) {
return false;
}
return true;
}
bool EmergencyInfo::Marshalling(Parcel &parcel) const
{
if (!Write(parcel, index)) {
return false;
}
if (!Write(parcel, total)) {
return false;
}
if (!Write(parcel, eccNum)) {
return false;
}
if (!Write(parcel, category)) {
return false;
}
if (!Write(parcel, simpresent)) {
return false;
}
if (!Write(parcel, mcc)) {
return false;
}
if (!Write(parcel, abnormalService)) {
return false;
}
return true;
}
std::shared_ptr<EmergencyInfo> EmergencyInfo::UnMarshalling(Parcel &parcel)
{
std::shared_ptr<EmergencyInfo> param = std::make_shared<EmergencyInfo>();
if (param == nullptr || !param->ReadFromParcel(parcel)) {
param = nullptr;
}
return param;
}
void EmergencyInfo::Dump(std::string, int32_t) {}
bool EmergencyInfoList::ReadFromParcel(Parcel &parcel)
{
if (!Read(parcel, callSize)) {
return false;
}
if (!Read(parcel, flag)) {
return false;
}
calls.resize(callSize);
for (int32_t i = 0; i < callSize; i++) {
calls[i].ReadFromParcel(parcel);
}
return true;
}
bool EmergencyInfoList::Marshalling(Parcel &parcel) const
{
if (!Write(parcel, callSize)) {
return false;
}
if (!Write(parcel, flag)) {
return false;
}
for (int32_t i = 0; i < callSize; i++) {
calls[i].Marshalling(parcel);
}
return true;
}
std::shared_ptr<EmergencyInfoList> EmergencyInfoList::UnMarshalling(Parcel &parcel)
{
std::shared_ptr<EmergencyInfoList> param = std::make_shared<EmergencyInfoList>();
if (param == nullptr || !param->ReadFromParcel(parcel)) {
return nullptr;
}
return param;
}
void EmergencyInfoList::Dump(std::string, int32_t) {}
bool CallForwardSetInfo::ReadFromParcel(Parcel &parcel)
{
if (!Read(parcel, serial)) {
return false;
}
if (!Read(parcel, reason)) {
return false;
}
if (!Read(parcel, mode)) {
return false;
}
if (!Read(parcel, number)) {
return false;
}
if (!Read(parcel, classx)) {
return false;
}
return true;
}
bool CallForwardSetInfo::Marshalling(Parcel &parcel) const
{
if (!Write(parcel, serial)) {
return false;
}
if (!Write(parcel, reason)) {
return false;
}
if (!Write(parcel, mode)) {
return false;
}
if (!Write(parcel, number)) {
return false;
}
if (!Write(parcel, classx)) {
return false;
}
return true;
}
std::shared_ptr<CallForwardSetInfo> CallForwardSetInfo::UnMarshalling(Parcel &parcel)
{
std::shared_ptr<CallForwardSetInfo> param = std::make_shared<CallForwardSetInfo>();
if (param == nullptr || !param->ReadFromParcel(parcel)) {
param = nullptr;
}
return param;
}
void CallForwardSetInfo::Dump(std::string, int32_t) {}
bool CallForwardQueryResult::ReadFromParcel(Parcel &parcel)
{
if (!Read(parcel, serial)) {
return false;
}
if (!Read(parcel, result)) {
return false;
}
if (!Read(parcel, status)) {
return false;
}
if (!Read(parcel, classx)) {
return false;
}
if (!Read(parcel, number)) {
return false;
}
if (!Read(parcel, type)) {
return false;
}
if (!Read(parcel, reason)) {
return false;
}
if (!Read(parcel, time)) {
return false;
}
return true;
}
bool CallForwardQueryResult::Marshalling(Parcel &parcel) const
{
if (!Write(parcel, serial)) {
return false;
}
if (!Write(parcel, result)) {
return false;
}
if (!Write(parcel, status)) {
return false;
}
if (!Write(parcel, classx)) {
return false;
}
if (!Write(parcel, number)) {
return false;
}
if (!Write(parcel, type)) {
return false;
}
if (!Write(parcel, reason)) {
return false;
}
if (!Write(parcel, time)) {
return false;
}
return true;
}
std::shared_ptr<CallForwardQueryResult> CallForwardQueryResult::UnMarshalling(Parcel &parcel)
{
std::shared_ptr<CallForwardQueryResult> param = std::make_shared<CallForwardQueryResult>();
if (param == nullptr || !param->ReadFromParcel(parcel)) {
param = nullptr;
}
return param;
}
void CallForwardQueryResult::Dump(std::string, int32_t) {}
bool CallForwardQueryInfoList::ReadFromParcel(Parcel &parcel)
{
if (!Read(parcel, callSize)) {
return false;
}
if (!Read(parcel, flag)) {
return false;
}
calls.resize(callSize);
for (int32_t i = 0; i < callSize; i++) {
calls[i].ReadFromParcel(parcel);
}
return true;
}
bool CallForwardQueryInfoList::Marshalling(Parcel &parcel) const
{
if (!Write(parcel, callSize)) {
return false;
}
if (!Write(parcel, flag)) {
return false;
}
for (int32_t i = 0; i < callSize; i++) {
calls[i].Marshalling(parcel);
}
return true;
}
std::shared_ptr<CallForwardQueryInfoList> CallForwardQueryInfoList::UnMarshalling(Parcel &parcel)
{
std::shared_ptr<CallForwardQueryInfoList> param = std::make_shared<CallForwardQueryInfoList>();
if (param == nullptr || !param->ReadFromParcel(parcel)) {
return nullptr;
}
return param;
}
void CallForwardQueryInfoList::Dump(std::string, int32_t) {}
bool GetClipResult::ReadFromParcel(Parcel &parcel)
{
if (!Read(parcel, result)) {
return false;
}
if (!Read(parcel, action)) {
return false;
}
if (!Read(parcel, clipStat)) {
return false;
}
return true;
}
bool GetClipResult::Marshalling(Parcel &parcel) const
{
if (!Write(parcel, result)) {
return false;
}
if (!Write(parcel, action)) {
return false;
}
if (!Write(parcel, clipStat)) {
return false;
}
return true;
}
std::shared_ptr<GetClipResult> GetClipResult::UnMarshalling(Parcel &parcel)
{
std::shared_ptr<GetClipResult> param = std::make_shared<GetClipResult>();
if (param == nullptr || !param->ReadFromParcel(parcel)) {
param = nullptr;
}
return param;
}
void GetClipResult::Dump(std::string, int32_t) {}
bool GetClirResult::ReadFromParcel(Parcel &parcel)
{
if (!Read(parcel, result)) {
return false;
}
if (!Read(parcel, action)) {
return false;
}
if (!Read(parcel, clirStat)) {
return false;
}
return true;
}
bool GetClirResult::Marshalling(Parcel &parcel) const
{
if (!Write(parcel, result)) {
return false;
}
if (!Write(parcel, action)) {
return false;
}
if (!Write(parcel, clirStat)) {
return false;
}
return true;
}
std::shared_ptr<GetClirResult> GetClirResult::UnMarshalling(Parcel &parcel)
{
std::shared_ptr<GetClirResult> param = std::make_shared<GetClirResult>();
if (param == nullptr || !param->ReadFromParcel(parcel)) {
param = nullptr;
}
return param;
}
void GetClirResult::Dump(std::string, int32_t) {}
bool CallWaitResult::ReadFromParcel(Parcel &parcel)
{
if (!Read(parcel, result)) {
return false;
}
if (!Read(parcel, status)) {
return false;
}
if (!Read(parcel, classCw)) {
return false;
}
return true;
}
bool CallWaitResult::Marshalling(Parcel &parcel) const
{
if (!Write(parcel, result)) {
return false;
}
if (!Write(parcel, status)) {
return false;
}
if (!Write(parcel, classCw)) {
return false;
}
return true;
}
std::shared_ptr<CallWaitResult> CallWaitResult::UnMarshalling(Parcel &parcel)
{
std::shared_ptr<CallWaitResult> param = std::make_shared<CallWaitResult>();
if (param == nullptr || !param->ReadFromParcel(parcel)) {
param = nullptr;
}
return param;
}
void CallWaitResult::Dump(std::string, int32_t) {}
bool CallRestrictionResult::ReadFromParcel(Parcel &parcel)
{
if (!Read(parcel, result)) {
return false;
}
if (!Read(parcel, status)) {
return false;
}
if (!Read(parcel, classCw)) {
return false;
}
return true;
}
bool CallRestrictionResult::Marshalling(Parcel &parcel) const
{
if (!Write(parcel, result)) {
return false;
}
if (!Write(parcel, status)) {
return false;
}
if (!Write(parcel, classCw)) {
return false;
}
return true;
}
std::shared_ptr<CallRestrictionResult> CallRestrictionResult::UnMarshalling(Parcel &parcel)
{
std::shared_ptr<CallRestrictionResult> param = std::make_shared<CallRestrictionResult>();
if (param == nullptr || !param->ReadFromParcel(parcel)) {
param = nullptr;
}
return param;
}
void CallRestrictionResult::Dump(std::string, int32_t) {}
bool UssdNoticeInfo::ReadFromParcel(Parcel &parcel)
{
if (!Read(parcel, m)) {
return false;
}
if (!Read(parcel, str)) {
return false;
}
return true;
}
bool UssdNoticeInfo::Marshalling(Parcel &parcel) const
{
if (!Write(parcel, m)) {
return false;
}
if (!Write(parcel, str)) {
return false;
}
return true;
}
std::shared_ptr<UssdNoticeInfo> UssdNoticeInfo::UnMarshalling(Parcel &parcel)
{
std::shared_ptr<UssdNoticeInfo> param = std::make_shared<UssdNoticeInfo>();
if (param == nullptr || !param->ReadFromParcel(parcel)) {
param = nullptr;
}
return param;
}
void UssdNoticeInfo::Dump(std::string, int32_t) {}
bool SsNoticeInfo::ReadFromParcel(Parcel &parcel)
{
if (!Read(parcel, serviceType)) {
return false;
}
if (!Read(parcel, requestType)) {
return false;
}
if (!Read(parcel, serviceClass)) {
return false;
}
if (!Read(parcel, result)) {
return false;
}
return true;
}
bool SsNoticeInfo::Marshalling(Parcel &parcel) const
{
if (!Write(parcel, serviceType)) {
return false;
}
if (!Write(parcel, requestType)) {
return false;
}
if (!Write(parcel, serviceClass)) {
return false;
}
if (!Write(parcel, result)) {
return false;
}
return true;
}
std::shared_ptr<SsNoticeInfo> SsNoticeInfo::UnMarshalling(Parcel &parcel)
{
std::shared_ptr<SsNoticeInfo> param = std::make_shared<SsNoticeInfo>();
if (param == nullptr || !param->ReadFromParcel(parcel)) {
param = nullptr;
}
return param;
}
void SsNoticeInfo::Dump(std::string, int32_t) {}
bool SrvccStatus::ReadFromParcel(Parcel &parcel)
{
if (!Read(parcel, status)) {
return false;
}
return true;
}
bool SrvccStatus::Marshalling(Parcel &parcel) const
{
if (!Write(parcel, status)) {
return false;
}
return true;
}
std::shared_ptr<SrvccStatus> SrvccStatus::UnMarshalling(Parcel &parcel)
{
std::shared_ptr<SrvccStatus> param = std::make_shared<SrvccStatus>();
if (param == nullptr || !param->ReadFromParcel(parcel)) {
param = nullptr;
}
return param;
}
void SrvccStatus::Dump(std::string, int32_t) {}
bool RingbackVoice::ReadFromParcel(Parcel &parcel)
{
if (!Read(parcel, status)) {
return false;
}
return true;
}
bool RingbackVoice::Marshalling(Parcel &parcel) const
{
if (!Write(parcel, status)) {
return false;
}
return true;
}
std::shared_ptr<RingbackVoice> RingbackVoice::UnMarshalling(Parcel &parcel)
{
std::shared_ptr<RingbackVoice> param = std::make_shared<RingbackVoice>();
if (param == nullptr || !param->ReadFromParcel(parcel)) {
param = nullptr;
}
return param;
}
void RingbackVoice::Dump(std::string, int32_t) {}
} // namespace Telephony
} // namespace OHOS

View File

@ -1,68 +0,0 @@
/*
* Copyright (C) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "hril_modem_parcel.h"
namespace OHOS {
namespace Telephony {
VoiceRadioTechnology::VoiceRadioTechnology(const HRilVoiceRadioInfo &hrilVoiceRadioInfo)
{
*this = hrilVoiceRadioInfo;
}
VoiceRadioTechnology &VoiceRadioTechnology::operator=(const HRilVoiceRadioInfo &hrilVoiceRadioInfo)
{
srvStatus = hrilVoiceRadioInfo.srvStatus;
srvDomain = hrilVoiceRadioInfo.srvDomain;
roamStatus = hrilVoiceRadioInfo.roamStatus;
simStatus = hrilVoiceRadioInfo.simStatus;
lockStatus = hrilVoiceRadioInfo.lockStatus;
sysMode = hrilVoiceRadioInfo.sysMode;
sysModeName = hrilVoiceRadioInfo.sysModeName != nullptr ? hrilVoiceRadioInfo.sysModeName : "";
actType = hrilVoiceRadioInfo.actType;
actName = hrilVoiceRadioInfo.actName != nullptr ? hrilVoiceRadioInfo.actName : "";
return *this;
}
bool VoiceRadioTechnology::ReadFromParcel(Parcel &parcel)
{
return Read(parcel, srvStatus, srvDomain, roamStatus, simStatus,
lockStatus, sysMode, sysModeName, actType, actName);
}
bool VoiceRadioTechnology::Marshalling(Parcel &parcel) const
{
return Write(parcel, srvStatus, srvDomain, roamStatus, simStatus,
lockStatus, sysMode, sysModeName, actType, actName);
}
std::shared_ptr<VoiceRadioTechnology> VoiceRadioTechnology::UnMarshalling(Parcel &parcel)
{
std::shared_ptr<VoiceRadioTechnology> param = std::make_shared<VoiceRadioTechnology>();
if (param == nullptr || !param->ReadFromParcel(parcel)) {
param = nullptr;
}
return param;
}
const char *VoiceRadioTechnology::ToString() const
{
DesensitizeStringStream dss(String(), StringStream());
dss << srvStatus << srvDomain << roamStatus << simStatus << lockStatus << sysMode << sysModeName << actType
<< actName;
return *dss;
}
} // namespace Telephony
} // namespace OHOS

File diff suppressed because it is too large Load Diff

View File

@ -1,56 +0,0 @@
/*
* Copyright (C) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "hril_sms_parcel.h"
#include "hril_modem_parcel.h"
namespace OHOS {
namespace Telephony {
bool SendSmsResultInfo::ReadFromParcel(Parcel &parcel)
{
if (!ReadBaseInt32(parcel, msgRef)) {
return false;
}
if (!ReadBaseString(parcel, pdu)) {
return false;
}
if (!ReadBaseInt32(parcel, errCode)) {
return false;
}
if (!ReadBaseInt64(parcel, flag)) {
return false;
}
return true;
}
bool SendSmsResultInfo::Marshalling(Parcel &parcel) const
{
if (!WriteBaseInt32(parcel, msgRef)) {
return false;
}
if (!WriteBaseString(parcel, pdu)) {
return false;
}
if (!WriteBaseInt32(parcel, errCode)) {
return false;
}
if (!WriteBaseInt64(parcel, flag)) {
return false;
}
return true;
}
} // namespace Telephony
} // namespace OHOS

View File

@ -40,13 +40,7 @@ ohos_shared_library("hril_innerkits") {
"$RIL_ADAPTER/utils:utils_config",
]
sources = [
"$RIL_FRAMEWORKS/hril_base_parcel.cpp",
"$RIL_FRAMEWORKS/hril_call_parcel.cpp",
"$RIL_FRAMEWORKS/hril_modem_parcel.cpp",
"$RIL_FRAMEWORKS/hril_network_parcel.cpp",
"$RIL_FRAMEWORKS/hril_sms_parcel.cpp",
]
sources = [ "$RIL_FRAMEWORKS/hril_base_parcel.cpp" ]
public_configs = [
":hril_config",

View File

@ -21,57 +21,37 @@
namespace OHOS {
namespace Telephony {
/* From 3GPP TS 27.007 V4.3.0 (2001-12) 7.7, AT + ATD */
struct DialInfo : public HrilBaseParcel {
struct DialInfo {
int32_t serial;
std::string address;
int32_t clir; /* Calling Line Identification Restriction. From TS 27.007 V3.4.0 (2000-03) */
bool ReadFromParcel(Parcel &parcel);
virtual bool Marshalling(Parcel &parcel) const override;
std::shared_ptr<DialInfo> UnMarshalling(Parcel &parcel);
void Dump(std::string, int32_t);
};
struct GetClipResult : public HrilBaseParcel {
struct GetClipResult {
int32_t result; /* query results */
int32_t action; /* parameter sets/shows the result code presentation status in the TA */
int32_t clipStat; /* parameter shows the subscriber CLIP service status in the network, <0-4> */
bool ReadFromParcel(Parcel &parcel);
virtual bool Marshalling(Parcel &parcel) const override;
std::shared_ptr<GetClipResult> UnMarshalling(Parcel &parcel);
void Dump(std::string, int32_t);
};
struct GetClirResult : public HrilBaseParcel {
struct GetClirResult {
int32_t result; /* query results */
int32_t action; /* parameter sets/shows the result code presentation status in the TA */
int32_t clirStat; /* parameter shows the subscriber CLIP service status in the network, <0-4> */
bool ReadFromParcel(Parcel &parcel);
virtual bool Marshalling(Parcel &parcel) const override;
std::shared_ptr<GetClirResult> UnMarshalling(Parcel &parcel);
void Dump(std::string, int32_t);
};
struct CallWaitResult : public HrilBaseParcel {
struct CallWaitResult {
int32_t result; /* query results */
int32_t status; /* parameter sets/shows the result code presentation status in the TA */
int32_t classCw; /* parameter shows the subscriber CLIP service status in the network, <0-4> */
bool ReadFromParcel(Parcel &parcel);
virtual bool Marshalling(Parcel &parcel) const override;
std::shared_ptr<CallWaitResult> UnMarshalling(Parcel &parcel);
void Dump(std::string, int32_t);
};
struct CallRestrictionResult : public HrilBaseParcel {
struct CallRestrictionResult {
int32_t result; /* query results */
int32_t status; /* parameter sets/shows the result code presentation status in the TA */
int32_t classCw; /* parameter shows the subscriber CLIP service status in the network, <0-4> */
bool ReadFromParcel(Parcel &parcel);
virtual bool Marshalling(Parcel &parcel) const override;
std::shared_ptr<CallRestrictionResult> UnMarshalling(Parcel &parcel);
void Dump(std::string, int32_t);
};
struct CallInfo : public HrilBaseParcel {
struct CallInfo {
int32_t index;
int32_t dir;
int32_t state;
@ -82,25 +62,15 @@ struct CallInfo : public HrilBaseParcel {
std::string number;
int32_t type;
std::string alpha;
bool ReadFromParcel(Parcel &parcel);
virtual bool Marshalling(Parcel &parcel) const override;
std::shared_ptr<CallInfo> UnMarshalling(Parcel &parcel);
void Dump(std::string, int32_t);
};
struct CallInfoList : public HrilBaseParcel {
struct CallInfoList {
int32_t callSize;
int32_t flag;
std::vector<CallInfo> calls;
bool ReadFromParcel(Parcel &parcel);
virtual bool Marshalling(Parcel &parcel) const override;
std::shared_ptr<CallInfoList> UnMarshalling(Parcel &parcel);
void Dump(std::string, int32_t);
};
struct EmergencyInfo : public HrilBaseParcel {
struct EmergencyInfo {
int32_t index;
int32_t total;
std::string eccNum;
@ -108,38 +78,23 @@ struct EmergencyInfo : public HrilBaseParcel {
int32_t simpresent;
std::string mcc;
int32_t abnormalService;
bool ReadFromParcel(Parcel &parcel);
virtual bool Marshalling(Parcel &parcel) const override;
std::shared_ptr<EmergencyInfo> UnMarshalling(Parcel &parcel);
void Dump(std::string, int32_t);
};
struct EmergencyInfoList : public HrilBaseParcel {
struct EmergencyInfoList {
int32_t callSize;
int32_t flag;
std::vector<EmergencyInfo> calls;
bool ReadFromParcel(Parcel &parcel);
virtual bool Marshalling(Parcel &parcel) const override;
std::shared_ptr<EmergencyInfoList> UnMarshalling(Parcel &parcel);
void Dump(std::string, int32_t);
};
struct CallForwardSetInfo : public HrilBaseParcel {
struct CallForwardSetInfo {
int32_t serial;
int32_t reason;
int32_t mode;
std::string number;
int32_t classx;
bool ReadFromParcel(Parcel &parcel);
virtual bool Marshalling(Parcel &parcel) const override;
std::shared_ptr<CallForwardSetInfo> UnMarshalling(Parcel &parcel);
void Dump(std::string, int32_t);
};
struct CallForwardQueryResult : public HrilBaseParcel {
struct CallForwardQueryResult {
int32_t serial;
int32_t result; /* query results */
int32_t status;
@ -148,25 +103,15 @@ struct CallForwardQueryResult : public HrilBaseParcel {
int32_t type;
int32_t reason;
int32_t time;
bool ReadFromParcel(Parcel &parcel);
virtual bool Marshalling(Parcel &parcel) const override;
std::shared_ptr<CallForwardQueryResult> UnMarshalling(Parcel &parcel);
void Dump(std::string, int32_t);
};
struct CallForwardQueryInfoList : public HrilBaseParcel {
struct CallForwardQueryInfoList {
int32_t callSize;
int32_t flag;
std::vector<CallForwardQueryResult> calls;
bool ReadFromParcel(Parcel &parcel);
virtual bool Marshalling(Parcel &parcel) const override;
std::shared_ptr<CallForwardQueryInfoList> UnMarshalling(Parcel &parcel);
void Dump(std::string, int32_t);
};
struct UssdNoticeInfo : public HrilBaseParcel {
struct UssdNoticeInfo {
int32_t m; /* Integer value.
0: The network does not require a TE reply (USSD-Notify initiated by the network or TE
The network does not need further information after starting operation);
@ -177,30 +122,20 @@ struct UssdNoticeInfo : public HrilBaseParcel {
4: The operation is not supported;
5: The network timed out. */
std::string str; /* USSD string, the maximum length is 160 characters. */
bool ReadFromParcel(Parcel &parcel);
virtual bool Marshalling(Parcel &parcel) const override;
std::shared_ptr<UssdNoticeInfo> UnMarshalling(Parcel &parcel);
void Dump(std::string, int32_t);
};
struct SsNoticeInfo : public HrilBaseParcel {
struct SsNoticeInfo {
int32_t serviceType;
int32_t requestType;
int32_t serviceClass;
int32_t result; /* the result of the SS request */
bool ReadFromParcel(Parcel &parcel);
virtual bool Marshalling(Parcel &parcel) const override;
std::shared_ptr<SsNoticeInfo> UnMarshalling(Parcel &parcel);
void Dump(std::string, int32_t);
};
/*
* Active reporting of SRVCC status is controlled by the +CIREP command.
* This command complies with the 3GPP TS 27.007 protocol.
*/
struct SrvccStatus : public HrilBaseParcel {
struct SrvccStatus {
/*
* SRVCC status.
* 1: SRVCC starts;
@ -209,26 +144,16 @@ struct SrvccStatus : public HrilBaseParcel {
* 4: SRVCC failed.
*/
int32_t status;
bool ReadFromParcel(Parcel &parcel);
virtual bool Marshalling(Parcel &parcel) const override;
std::shared_ptr<SrvccStatus> UnMarshalling(Parcel &parcel);
void Dump(std::string, int32_t);
};
/*
* The ringback voice event reported by the modem during dialing.
* Note: Modem private commands, not a reported field specified by the 3gpp protocol.
*/
struct RingbackVoice : public HrilBaseParcel {
struct RingbackVoice {
/* 0 network alerting; 1 local alerting */
int32_t status;
bool ReadFromParcel(Parcel &parcel);
virtual bool Marshalling(Parcel &parcel) const override;
std::shared_ptr<RingbackVoice> UnMarshalling(Parcel &parcel);
void Dump(std::string, int32_t);
};
} // namespace Telephony
} // namespace OHOS
#endif // OHOS_RIL_CALL_PARCEL_H
#endif // OHOS_RIL_CALL_PARCEL_H

View File

@ -29,7 +29,7 @@ struct UniInfo {
std::string strTmp;
};
struct VoiceRadioTechnology : public HrilBaseParcel {
struct VoiceRadioTechnology {
HRilSrvStatus srvStatus;
HRilSrvDomain srvDomain;
HRilRoamStatus roamStatus;
@ -44,11 +44,6 @@ struct VoiceRadioTechnology : public HrilBaseParcel {
VoiceRadioTechnology() = default;
VoiceRadioTechnology(const HRilVoiceRadioInfo &hrilVoiceRadioInfo);
VoiceRadioTechnology &operator=(const HRilVoiceRadioInfo &hrilVoiceRadioInfo);
bool ReadFromParcel(Parcel &parcel);
virtual bool Marshalling(Parcel &parcel) const override;
std::shared_ptr<VoiceRadioTechnology> UnMarshalling(Parcel &parcel);
void Dump(std::string, int32_t);
virtual const char *ToString() const override;
};
} // namespace Telephony
} // namespace OHOS

View File

@ -20,51 +20,34 @@
namespace OHOS {
namespace Telephony {
struct OperatorInfoResult : public HrilBaseParcel {
struct OperatorInfoResult {
std::string longName;
std::string shortName;
std::string numeric;
bool ReadFromParcel(Parcel &parcel);
virtual bool Marshalling(Parcel &parcel) const override;
std::shared_ptr<OperatorInfoResult> UnMarshalling(Parcel &parcel);
void Dump(std::string, int32_t);
};
struct AvailableNetworkInfo : public HrilBaseParcel {
struct AvailableNetworkInfo {
std::string longName;
std::string shortName;
std::string numeric;
int32_t status;
int32_t rat;
bool ReadFromParcel(Parcel &parcel);
virtual bool Marshalling(Parcel &parcel) const override;
std::shared_ptr<AvailableNetworkInfo> UnMarshalling(Parcel &parcel);
void Dump(std::string, int32_t);
};
struct AvailableNetworkList : public HrilBaseParcel {
struct AvailableNetworkList {
int32_t itemNum;
std::vector<AvailableNetworkInfo> availableNetworkInfo;
int64_t flag;
bool ReadFromParcel(Parcel &parcel);
virtual bool Marshalling(Parcel &parcel) const override;
std::shared_ptr<AvailableNetworkList> UnMarshalling(Parcel &parcel);
void Dump(std::string, int32_t);
};
struct SetNetworkModeInfo : public HrilBaseParcel {
struct SetNetworkModeInfo {
int32_t selectMode;
std::string oper; /* Operator information */
int64_t flag;
bool ReadFromParcel(Parcel &parcel);
virtual bool Marshalling(Parcel &parcel) const override;
std::shared_ptr<SetNetworkModeInfo> UnMarshalling(Parcel &parcel);
void Dump(std::string, int32_t);
};
/* Voice registration status results */
struct CsRegStatusInfo : public HrilBaseParcel {
struct CsRegStatusInfo {
int32_t notifyType; /* The notifyType,Indicate the content of the notification */
HRilRegStatus regStatus; /* The corresponding valid registration states are NOT_REG_MT_NOT_SEARCHING_OP,
* "REG_MT_HOME, NOT_REG_MT_SEARCHING_OP, REG_DENIED, UNKNOWN, REG_ROAMING". */
@ -72,13 +55,9 @@ struct CsRegStatusInfo : public HrilBaseParcel {
int32_t cellId;
HRilRadioTech radioTechnology; /* Available voice radio technology, RMS defined by radio technology */
int64_t flag; /* flag, Used by search network manager in response */
bool ReadFromParcel(Parcel &parcel);
virtual bool Marshalling(Parcel &parcel) const override;
std::shared_ptr<CsRegStatusInfo> UnMarshalling(Parcel &parcel);
void Dump(std::string, int32_t);
};
struct PsRegStatusResultInfo : public HrilBaseParcel {
struct PsRegStatusResultInfo {
int32_t notifyType; /* The notifyType,Indicate the content of the notification */
HRilRegStatus regStatus; /* valid when are is ITE UNKNOWN REG = REG, otherwise it defined in RegStatus */
int32_t lacCode;
@ -88,13 +67,9 @@ struct PsRegStatusResultInfo : public HrilBaseParcel {
bool isEnDcAvailable;
bool isDcNrRestricted;
int64_t flag; /* flag, Used by search network manager in response */
bool ReadFromParcel(Parcel &parcel);
virtual bool Marshalling(Parcel &parcel) const override;
std::shared_ptr<PsRegStatusResultInfo> UnMarshalling(Parcel &parcel);
void Dump(std::string, int32_t);
};
struct PhysicalChannelConfig : public HrilBaseParcel {
struct PhysicalChannelConfig {
HRilCellConnectionStatus cellConnStatus;
HRilRadioTech ratType;
int32_t cellBandwidthDownlinkKhz;
@ -105,20 +80,12 @@ struct PhysicalChannelConfig : public HrilBaseParcel {
int32_t physicalCellId;
int32_t contextIdNum;
std::vector<int32_t> contextIds;
bool ReadFromParcel(Parcel &parcel);
virtual bool Marshalling(Parcel &parcel) const override;
std::shared_ptr<PhysicalChannelConfig> UnMarshalling(Parcel &parcel);
void Dump(std::string, int32_t);
};
struct ChannelConfigInfoList : public HrilBaseParcel {
struct ChannelConfigInfoList {
int32_t itemNum;
std::vector<PhysicalChannelConfig> channelConfigInfos;
int64_t flag; /* flag, Used by search network manager in response */
bool ReadFromParcel(Parcel &parcel);
virtual bool Marshalling(Parcel &parcel) const override;
std::shared_ptr<ChannelConfigInfoList> UnMarshalling(Parcel &parcel);
void Dump(std::string, int32_t);
};
typedef struct {
@ -185,7 +152,7 @@ typedef struct {
int64_t nci;
} CellRatNr;
struct CurrentCellInfo : public HrilBaseParcel {
struct CurrentCellInfo {
int32_t ratType;
int32_t mcc;
int32_t mnc;
@ -198,34 +165,11 @@ struct CurrentCellInfo : public HrilBaseParcel {
CellRatTdscdma tdscdma;
CellRatNr nr;
} ServiceCellParas;
bool ReadRayTypeGsmParcel(Parcel &parcel);
bool ReadRayTypeLteParcel(Parcel &parcel);
bool ReadRayTypeWcdmaParcel(Parcel &parcel);
bool ReadRayTypeCdmaParcel(Parcel &parcel);
bool ReadRayTypeTdscdmaParcel(Parcel &parcel);
bool ReadRayTypeNrParcel(Parcel &parcel);
bool WriteRayTypeGsmParcel(Parcel &parcel) const;
bool WriteRayTypeLteParcel(Parcel &parcel) const;
bool WriteRayTypeWcdmaParcel(Parcel &parcel) const;
bool WriteRayTypeCdmaParcel(Parcel &parcel) const;
bool WriteRayTypeTdscdmaParcel(Parcel &parcel) const;
bool WriteRayTypeNrParcel(Parcel &parcel) const;
bool ReadFromParcel(Parcel &parcel);
virtual bool Marshalling(Parcel &parcel) const override;
std::shared_ptr<CurrentCellInfo> UnMarshalling(Parcel &parcel);
void Dump(std::string, int32_t);
};
struct CellListCurrentInfo : public HrilBaseParcel {
struct CellListCurrentInfo {
int32_t itemNum;
std::vector<CurrentCellInfo> cellCurrentInfo;
bool ReadFromParcel(Parcel &parcel);
virtual bool Marshalling(Parcel &parcel) const override;
std::shared_ptr<CellListCurrentInfo> UnMarshalling(Parcel &parcel);
void Dump(std::string, int32_t);
};
typedef struct {
@ -283,7 +227,7 @@ typedef struct {
int64_t nci;
} CellListRatNr;
struct CellNearbyInfo : public HrilBaseParcel {
struct CellNearbyInfo {
int32_t ratType;
union {
@ -294,43 +238,16 @@ struct CellNearbyInfo : public HrilBaseParcel {
CellListRatTdscdma tdscdma;
CellListRatNr nr;
} ServiceCellParas;
bool ReadRayTypeGsmListParcel(Parcel &parcel);
bool ReadRayTypeLteListParcel(Parcel &parcel);
bool ReadRayTypeWcdmaListParcel(Parcel &parcel);
bool ReadRayTypeCdmaListParcel(Parcel &parcel);
bool ReadRayTypeTdscdmaListParcel(Parcel &parcel);
bool ReadRayTypeNrListParcel(Parcel &parcel);
bool WriteRayTypeGsmListParcel(Parcel &parcel) const;
bool WriteRayTypeLteListParcel(Parcel &parcel) const;
bool WriteRayTypeWcdmaListParcel(Parcel &parcel) const;
bool WriteRayTypeCdmaListParcel(Parcel &parcel) const;
bool WriteRayTypeTdscdmaListParcel(Parcel &parcel) const;
bool WriteRayTypeNrListParcel(Parcel &parcel) const;
bool ReadFromParcel(Parcel &parcel);
virtual bool Marshalling(Parcel &parcel) const override;
std::shared_ptr<CellNearbyInfo> UnMarshalling(Parcel &parcel);
void Dump(std::string, int32_t);
};
struct CellListNearbyInfo : public HrilBaseParcel {
struct CellListNearbyInfo {
int32_t itemNum;
std::vector<CellNearbyInfo> cellNearbyInfo;
bool ReadFromParcel(Parcel &parcel);
virtual bool Marshalling(Parcel &parcel) const override;
std::shared_ptr<CellListNearbyInfo> UnMarshalling(Parcel &parcel);
void Dump(std::string, int32_t);
};
struct PreferredNetworkTypeInfo : public HrilBaseParcel {
struct PreferredNetworkTypeInfo {
int32_t preferredNetworkType;
int64_t flag;
bool ReadFromParcel(Parcel &parcel);
virtual bool Marshalling(Parcel &parcel) const override;
std::shared_ptr<PreferredNetworkTypeInfo> UnMarshalling(Parcel &parcel);
void Dump(std::string, int32_t);
};
} // namespace Telephony
} // namespace OHOS

View File

@ -87,7 +87,6 @@ struct CBConfigReportInfo {
std::string pdu;
};
struct SmsMessageInfo {
int32_t indicationType;
int32_t size;
@ -107,8 +106,39 @@ struct SendSmsResultInfo : public HrilBaseParcel {
std::string pdu; /* Protocol Data Unit */
int32_t errCode;
int64_t flag;
bool ReadFromParcel(Parcel &parcel);
virtual bool Marshalling(Parcel &parcel) const override;
bool ReadFromParcel(Parcel &parcel)
{
if (!ReadBaseInt32(parcel, msgRef)) {
return false;
}
if (!ReadBaseString(parcel, pdu)) {
return false;
}
if (!ReadBaseInt32(parcel, errCode)) {
return false;
}
if (!ReadBaseInt64(parcel, flag)) {
return false;
}
return true;
}
bool Marshalling(Parcel &parcel) const
{
if (!WriteBaseInt32(parcel, msgRef)) {
return false;
}
if (!WriteBaseString(parcel, pdu)) {
return false;
}
if (!WriteBaseInt32(parcel, errCode)) {
return false;
}
if (!WriteBaseInt64(parcel, flag)) {
return false;
}
return true;
}
std::shared_ptr<SendSmsResultInfo> UnMarshalling(Parcel &parcel);
void Dump(std::string, int32_t);
};