Lines Matching defs:indexer
268 void SmsReceiveHandler::CombineMessagePart(const std::shared_ptr<SmsReceiveIndexer> &indexer)
271 if ((indexer == nullptr) || (pdus == nullptr)) {
272 TELEPHONY_LOGE("indexer or pdus is nullptr");
280 if (indexer->IsSingleMsg()) {
281 string pdu = StringUtils::StringToHex(indexer->GetPdu());
284 if (!CombineMultiPageMessage(indexer, pdus, reliabilityHandler)) {
290 if (indexer->GetIsWapPushMsg()) {
292 auto rawWapPushUserData = indexer->GetRawWapPushUserData();
293 if (!smsWapPushHandler_->DecodeWapPushPdu(indexer, rawWapPushUserData)) {
300 reliabilityHandler->SendBroadcast(indexer, pdus);
303 bool SmsReceiveHandler::CombineMultiPageMessage(const std::shared_ptr<SmsReceiveIndexer> &indexer,
307 int msgSeg = static_cast<int>(indexer->GetMsgCount());
311 predicates.EqualTo(SmsSubsection::SENDER_NUMBER, indexer->GetOriginatingAddress())
313 ->EqualTo(SmsSubsection::SMS_SUBSECTION_ID, std::to_string(indexer->GetMsgRefId()))
315 ->EqualTo(SmsSubsection::SIZE, std::to_string(indexer->GetMsgCount()));
322 reliabilityHandler->DeleteMessageFormDb(indexer->GetMsgRefId());
333 UpdateMultiPageMessage(indexer, pdus);
338 const std::shared_ptr<SmsReceiveIndexer> &indexer, std::shared_ptr<std::vector<std::string>> pdus)
340 if ((indexer == nullptr) || (pdus == nullptr) || (pdus->empty())) {
341 TELEPHONY_LOGE("indexer or pdus is null");
357 if (!indexer->GetIsWapPushMsg()) {
368 indexer->SetVisibleMessageBody(messagBody);
369 indexer->SetRawUserData(userDataRaw);
370 if (indexer->GetIsWapPushMsg()) {
371 indexer->SetRawWapPushUserData(rawWapPushUserData);
396 bool SmsReceiveHandler::AddMsgToDB(const std::shared_ptr<SmsReceiveIndexer> indexer)
398 if (indexer == nullptr) {
399 TELEPHONY_LOGE("indexer is nullptr.");
405 bucket.Put(SmsSubsection::RECEIVER_NUMBER, indexer->GetOriginatingAddress());
406 bucket.Put(SmsSubsection::SENDER_NUMBER, indexer->GetOriginatingAddress());
407 bucket.Put(SmsSubsection::START_TIME, std::to_string(indexer->GetTimestamp()));
408 bucket.Put(SmsSubsection::END_TIME, std::to_string(indexer->GetTimestamp()));
409 bucket.Put(SmsSubsection::REW_PUD, StringUtils::StringToHex(indexer->GetPdu()));
411 bucket.Put(SmsSubsection::FORMAT, indexer->GetIsCdma() ? SMS_TYPE_CDMA : SMS_TYPE_GSM);
412 bucket.Put(SmsSubsection::DEST_PORT, indexer->GetDestPort());
413 bucket.Put(SmsSubsection::SMS_SUBSECTION_ID, indexer->GetMsgRefId());
414 bucket.Put(SmsSubsection::SIZE, indexer->GetMsgCount());
415 bucket.Put(SmsSubsection::SUBSECTION_INDEX, indexer->GetMsgSeqId());
418 indexer->SetDataBaseId(dataBaseId);