Lines Matching refs:request

97     StreamingFilterFd(uint8_t privacyPolicy, int fd, const sp<ReportRequest>& request);
106 const sp<ReportRequest>& request) in StreamingFilterFd() argument
108 mRequest(request) { in StreamingFilterFd()
183 sp<ReportRequest> request = found->second; in addPersistedReport() local
184 request->args.merge(args); in addPersistedReport()
214 for (vector<sp<ReportRequest>>::iterator request = mStreamingRequests.begin(); in forEachStreamingRequest() local
215 request != mStreamingRequests.end(); request++) { in forEachStreamingRequest()
216 func(*request); in forEachStreamingRequest()
229 for (vector<sp<ReportRequest>>::iterator request = mStreamingRequests.begin(); in forEachListener() local
230 request != mStreamingRequests.end(); request++) { in forEachListener()
231 sp<IIncidentReportStatusListener> listener = (*request)->getListener(); in forEachListener()
249 for (vector<sp<ReportRequest>>::iterator request = mStreamingRequests.begin(); in forEachListener() local
250 request != mStreamingRequests.end(); request++) { in forEachListener()
251 if ((*request)->containsSection(sectionId)) { in forEachListener()
252 sp<IIncidentReportStatusListener> listener = (*request)->getListener(); in forEachListener()
276 for (vector<sp<ReportRequest>>::iterator request = mStreamingRequests.begin(); in containsSection() local
277 request != mStreamingRequests.end(); request++) { in containsSection()
278 if ((*request)->containsSection(sectionId)) { in containsSection()
290 for (vector<sp<ReportRequest>>::iterator request = mStreamingRequests.begin(); in transferStreamingRequests() local
291 request != mStreamingRequests.end(); request++) { in transferStreamingRequests()
292 that->mStreamingRequests.push_back(*request); in transferStreamingRequests()
312 for (vector<sp<ReportRequest>>::iterator request = mStreamingRequests.begin(); in getFailedRequests() local
313 request != mStreamingRequests.end(); request++) { in getFailedRequests()
314 if ((*request)->getStatus() != NO_ERROR) { in getFailedRequests()
315 requests->push_back(*request); in getFailedRequests()
320 void ReportBatch::removeRequest(const sp<ReportRequest>& request) { in removeRequest() argument
323 if (it->second == request) { in removeRequest()
330 if (*it == request) { in removeRequest()
459 mBatch->forEachStreamingRequest([&filter, this](const sp<ReportRequest>& request) { in writeSection() argument
460 if (request->ok() in writeSection()
461 && request->args.containsSection(mCurrentSectionId, in writeSection()
463 filter.addFd(new StreamingFilterFd(request->args.getPrivacyPolicy(), in writeSection()
464 request->getFd(), request)); in writeSection()
509 const sp<ReportRequest>& request) { in runReport() argument
510 mPersistedFile->addReport(request->args); in runReport()
511 if (request->args.getPrivacyPolicy() < persistedPrivacyPolicy) { in runReport()
512 persistedPrivacyPolicy = request->args.getPrivacyPolicy(); in runReport()
539 mBatch->forEachPersistedRequest([](const sp<ReportRequest>& request) { in runReport() argument
540 sp<IIncidentReportStatusListener> listener = request->getListener(); in runReport()
566 mBatch->forEachStreamingRequest([](const sp<ReportRequest>& request) { in runReport() argument
567 const vector<vector<uint8_t>>& headers = request->args.headers(); in runReport()
572 write_header_section(request->getFd(), buf->data(), buf->size()); in runReport()
653 mBatch->forEachStreamingRequest([reportId, &metadata](const sp<ReportRequest>& request) { in runReport() argument
656 request->args.getPrivacyPolicy(), request); in runReport()
657 status_t nonFatalErr = write_section(request->getFd(), FIELD_ID_METADATA, in runReport()
666 mBatch->forEachStreamingRequest([](const sp<ReportRequest>& request) { in runReport() argument
667 request->closeFd(); in runReport()
690 mBatch->forEachPersistedRequest([this](const sp<ReportRequest>& request) { in cancel_and_remove_failed_requests() argument
691 sp<IIncidentReportStatusListener> listener = request->getListener(); in cancel_and_remove_failed_requests()
695 mBatch->removeRequest(request); in cancel_and_remove_failed_requests()
707 for (sp<ReportRequest>& request: failed) { in cancel_and_remove_failed_requests()
709 strerror(-request->getStatus())); in cancel_and_remove_failed_requests()
710 sp<IIncidentReportStatusListener> listener = request->getListener(); in cancel_and_remove_failed_requests()
714 request->closeFd(); // Will only close the streaming ones. in cancel_and_remove_failed_requests()
715 mBatch->removeRequest(request); in cancel_and_remove_failed_requests()