Getting full size of a download

Asked by Snehil on 2010-09-09

Hi, I was fiddling around with source to create a appindicator for linuxdcpp, but I wasnt able to get the total size of a running segmented download ( i only get the size of current segment ). I want the information as shown in bottom transfers section. How can i get that ?

Question information

Language:
English Edit question
Status:
Solved
For:
LinuxDC++ Edit question
Assignee:
No assignee Edit question
Solved by:
Razzloss
Solved:
2010-09-09
Last query:
2010-09-09
Last reply:
2010-09-09
Best Razzloss (razzloss) said : #1

See linux/transfers.cc updateParent_gui, getParams_client and updateTransfer_gui. The total size of the file is available in the Transfer object (or not, that might be the segment size. In that case the size is available in QueueManager when the segment starts). The current progress is calculated from the Download position of the parent row (which is updated from QueueManager when each segment starts) plus the position of each individual active child row (getPos of the transfer object).

--RZ

Snehil (snehilbuxy) said : #2

Thanks, that did it. Btw any guidelines for submitting the code ?

Snehil (snehilbuxy) said : #3

Thanks Razzloss, that solved my question.

Razzloss (razzloss) said : #4

Other than the coding conventions and program structure outlined here: http://openfacts.berlios.de/index-en.phtml?title=Ldcpp_Developer_information no (page is old, but still pretty much up to date). For small patches/single features just open a bug report describing what the code does and attach the patch to that report.

--RZ

Steven Sheehy (steven-sheehy) said : #5

Concerning app indicators, please see bug #577327