Merge pull request !717 from Aurora/master
This commit is contained in:
openharmony_ci 2023-11-27 02:15:32 +00:00 committed by Gitee
commit 368c70345a
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
7 changed files with 36 additions and 35 deletions

View File

@ -44,11 +44,11 @@ void DoSomethingInterestingWithMyAPI(const uint8_t *data, size_t size)
info.simpresent = static_cast<int32_t>(size);
info.mcc = const_cast<char *>(NUMBER);
info.abnormalService = static_cast<int32_t>(size);
HRilManager hrilManger;
std::shared_ptr<HRilCall> hrilCall = std::make_shared<HRilCall>(slotId, hrilManger);
hrilCall->CallEmergencyNotice(HRIL_RESPONSE_NOTICE, error, &info, sizeof(HRilEmergencyInfo));
struct ReportInfo report;
report.error = error;
report.notifyId = HNOTI_CALL_EMERGENCY_NUMBER_REPORT;
report.type = HRIL_NOTIFICATION;
HRilManager::manager_->OnCallReport(slotId, &report, (const uint8_t *)&info, sizeof(HRilEmergencyInfo));
return;
}
} // namespace OHOS

View File

@ -35,14 +35,14 @@ void DoSomethingInterestingWithMyAPI(const uint8_t *data, size_t size)
}
int32_t slotId = static_cast<int32_t>(size % SLOT_NUM);
HRilErrNumber error = static_cast<HRilErrNumber>(size);
HRilUssdNoticeInfo info;
info.m = static_cast<int32_t>(size);
info.str = const_cast<char *>(NUMBER);
HRilManager hrilManger;
std::shared_ptr<HRilCall> hrilCall = std::make_shared<HRilCall>(slotId, hrilManger);
hrilCall->CallUssdNotice(HRIL_RESPONSE_NOTICE, error, &info, sizeof(HRilUssdNoticeInfo));
struct ReportInfo report;
report.error = static_cast<HRilErrNumber>(size);
report.notifyId = HNOTI_CALL_USSD_REPORT;
report.type = HRIL_NOTIFICATION;
HRilManager::manager_->OnCallReport(slotId, &report, (const uint8_t *)&info, sizeof(HRilUssdNoticeInfo));
return;
}
} // namespace OHOS

View File

@ -35,9 +35,7 @@ void DoSomethingInterestingWithMyAPI(const uint8_t *data, size_t size)
OHOS::HDI::Ril::V1_1::SmsMessageIOInfo message;
std::string pdu(reinterpret_cast<const char *>(data), size);
message.pdu = pdu;
HRilManager hrilManager;
std::shared_ptr<HRilSms> hrilSms = std::make_shared<HRilSms>(slotId, hrilManager);
hrilSms->AddCdmaSimMessage(size, message);
HRilManager::manager_->AddCdmaSimMessage(slotId, size, message);
return;
}
} // namespace OHOS

View File

@ -35,17 +35,16 @@ void DoSomethingInterestingWithMyAPI(const uint8_t *data, size_t size)
}
int32_t slotId = static_cast<int32_t>(size % SLOT_NUM);
struct ReportInfo reportInfo;
reportInfo.error = static_cast<HRilErrNumber>(size);
reportInfo.notifyId = HNOTI_SMS_NEW_SMS;
HRilSmsResponse response;
response.msgRef = static_cast<int32_t>(size);
response.pdu = const_cast<char *>(NUMBER);
response.errCode = static_cast<int32_t>(size);
HRilManager hrilManager;
std::shared_ptr<HRilSms> hrilSms = std::make_shared<HRilSms>(slotId, hrilManager);
hrilSms->ProcessNotify<HRilSms>(HRIL_RESPONSE_NOTICE, &reportInfo, &response, size);
struct ReportInfo report;
report.error = static_cast<HRilErrNumber>(size);
report.notifyId = HNOTI_SMS_NEW_SMS;
report.type = HRIL_NOTIFICATION;
HRilManager::manager_->OnSmsReport(slotId, &report, (const uint8_t *)&response, sizeof(HRilSmsResponse));
return;
}
} // namespace OHOS

View File

@ -39,7 +39,6 @@ void DoSomethingInterestingWithMyAPI(const uint8_t *data, size_t size)
}
int32_t slotId = static_cast<int32_t>(size % SLOT_NUM);
HRilErrNumber error = static_cast<HRilErrNumber>(size);
HRilDataCallResponse response;
response.reason = static_cast<int32_t>(size) % REASON_TYPE;
@ -56,16 +55,21 @@ void DoSomethingInterestingWithMyAPI(const uint8_t *data, size_t size)
response.pCscfPrimAddr = const_cast<char *>(NUMBER);
response.pCscfSecAddr = const_cast<char *>(NUMBER);
response.pduSessionId = static_cast<int32_t>(size);
HRilManager hrilManager;
std::shared_ptr<HRilData> hrilData = std::make_shared<HRilData>(slotId, hrilManager);
hrilData->PdpContextListUpdated(HRIL_RESPONSE_NOTICE, error, &response, sizeof(HRilDataCallResponse));
struct ReportInfo report;
report.error = static_cast<HRilErrNumber>(size);
report.notifyId = HNOTI_DATA_PDP_CONTEXT_LIST_UPDATED;
report.type = HRIL_NOTIFICATION;
HRilManager::manager_->OnDataReport(slotId, &report, (const uint8_t *)&response, sizeof(HRilDataCallResponse));
HRilDataLinkCapability linkCapability;
linkCapability.primaryDownlinkKbps = static_cast<int32_t>(size) * KILO_BIT;
linkCapability.primaryUplinkKbps = static_cast<int32_t>(size) * KILO_BIT;
linkCapability.secondaryDownlinkKbps = static_cast<int32_t>(size) * KILO_BIT;
linkCapability.secondaryUplinkKbps = static_cast<int32_t>(size) * KILO_BIT;
hrilData->DataLinkCapabilityUpdated(HRIL_RESPONSE_NOTICE, error, &linkCapability, sizeof(HRilDataLinkCapability));
report.notifyId = HNOTI_DATA_LINK_CAPABILITY_UPDATED;
HRilManager::manager_->OnDataReport(
slotId, &report, (const uint8_t *)&linkCapability, sizeof(HRilDataLinkCapability));
return;
}
} // namespace OHOS

View File

@ -33,12 +33,13 @@ void DoSomethingInterestingWithMyAPI(const uint8_t *data, size_t size)
return;
}
int32_t slotId = static_cast<int32_t>(size % SLOT_NUM);
HRilErrNumber error = static_cast<HRilErrNumber>(size);
const char *plmn = reinterpret_cast<const char *>(data);
HRilManager hrilManger;
std::shared_ptr<HRilNetwork> hrilNetwork = std::make_shared<HRilNetwork>(slotId, hrilManger);
hrilNetwork->ResidentNetworkUpdated(HRIL_RESPONSE_NOTICE, error, plmn, size);
struct ReportInfo report;
report.error = static_cast<HRilErrNumber>(size);
report.notifyId = HNOTI_NETWORK_RESIDENT_NETWORK_UPDATED;
report.type = HRIL_NOTIFICATION;
HRilManager::manager_->OnNetworkReport(slotId, &report, (const uint8_t *)plmn, size);
return;
}
} // namespace OHOS

View File

@ -35,14 +35,13 @@ void DoSomethingInterestingWithMyAPI(const uint8_t *data, size_t size)
}
int32_t slotId = static_cast<HRilErrNumber>(size) % SLOT_NUM;
struct ReportInfo reportInfo;
reportInfo.error = static_cast<HRilErrNumber>(size);
reportInfo.notifyId = HNOTI_SIM_STK_PROACTIVE_NOTIFY;
char *response = const_cast<char *>(NUMBER);
const uint8_t *response = reinterpret_cast<const uint8_t *>(NUMBER);
HRilManager hrilManager;
std::shared_ptr<HRilSim> hrilSim = std::make_shared<HRilSim>(slotId, hrilManager);
hrilSim->ProcessNotify<HRilSim>(HRIL_RESPONSE_NOTICE, &reportInfo, &response, sizeof(char));
struct ReportInfo report;
report.error = static_cast<HRilErrNumber>(size);
report.notifyId = HNOTI_SIM_STK_PROACTIVE_NOTIFY;
report.type = HRIL_NOTIFICATION;
HRilManager::manager_->OnSimReport(slotId, &report, response, sizeof(char));
return;
}
} // namespace OHOS