mirror of
https://gitee.com/openharmony/telephony_ril_adapter
synced 2024-11-27 01:41:02 +00:00
commit
368c70345a
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user