MCPcopy Create free account
hub / github.com/amule-project/amule / SetDownloadStatus

Method SetDownloadStatus

src/SearchFile.cpp:308–329  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

306}
307
308void CSearchFile::SetDownloadStatus()
309{
310 bool isPart = theApp->downloadqueue->GetFileByID(m_abyFileHash) != NULL;
311 bool isKnown = theApp->knownfiles->FindKnownFileByID(m_abyFileHash) != NULL;
312 bool isCanceled = theApp->canceledfiles->IsCanceledFile(m_abyFileHash);
313
314 if (isCanceled && isPart) {
315 m_downloadStatus = QUEUEDCANCELED;
316 } else if (isCanceled) {
317 m_downloadStatus = CANCELED;
318 } else if (isPart) {
319 m_downloadStatus = QUEUED;
320 } else if (isKnown) {
321 m_downloadStatus = DOWNLOADED;
322 } else {
323 m_downloadStatus = NEW;
324 }
325 // Update status of children too
326 for (CSearchResultList::iterator it = m_children.begin(); it != m_children.end(); ++it) {
327 Notify_Search_Update_Sources(*it);
328 }
329}
330
331// File_checked_for_headers

Callers 1

Search_Update_SourcesFunction · 0.45

Calls 5

IsCanceledFileMethod · 0.80
GetFileByIDMethod · 0.45
FindKnownFileByIDMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected