if(size > 0)
totalQueuedDownloadSize += size;
}
added = true;
} else if(req instanceof UploadFileRequestStatus && uploads) {
UploadFileRequestStatus upload = (UploadFileRequestStatus)req;
if(upload.hasSucceeded()) {
completedUpload.add(upload);
} else if(upload.hasFinished()) {
failedUpload.add(upload);
} else {
short prio = upload.getPriority();
if(prio < lowestQueuedPrio)
lowestQueuedPrio = prio;
uncompletedUpload.add(upload);
}
long size = upload.getDataSize();
if(size > 0)
totalQueuedUploadSize += size;
added = true;
} else if(req instanceof UploadDirRequestStatus && uploads) {
UploadDirRequestStatus upload = (UploadDirRequestStatus)req;
if(upload.hasSucceeded()) {
completedDirUpload.add(upload);
} else if(upload.hasFinished()) {
failedDirUpload.add(upload);
} else {
short prio = upload.getPriority();
if(prio < lowestQueuedPrio)
lowestQueuedPrio = prio;
uncompletedDirUpload.add(upload);
}
long size = upload.getTotalDataSize();
if(size > 0)
totalQueuedUploadSize += size;
added = true;
}
}