I need to write a download manager. Nothing outrageous. It does not need (necessarily) to support resumable downloads (the files will be coming from apache 1.3x) but it should show files progress and update a given gridview row when they are complete. It doesn't even need to persist across executions of the application so no local db is needed - though this will likely be nice in the future. I plan on using indy9's http client to download the files and I do have experience with it (though not a huge amount).
Essentially users would be presented with a list of files to download. When each one is clicked it shoudl create a new row in the gridview (I'm just fine with the actual adding) and create a new http client (indy?) to download it. I'm just not sure which technique would be best to update the download manager. Perhaps something like this:?
1. user clicks, triggering download procedure
2. download procedure generates a random id (or other serial number) that is linked to this particular download.
This is where I go wonky. I'm a php guy. In php I would build a multidimensional array of $downloads["id"]["url"] and could access / update information about this download by accessing it's array elements. In delphi I do not know how to do this as the closest thing to an array I've found is the tstringlist and that is one dimensional.
3. on work in each indy client, a procedure would be called, passing the unique id generated in 2 that would update the gridview row's download progress bar, or showing errors / complete status.
There are plenty of holes in my technique and I would love to know how you folks have implemented things like this in the past. I appreciate it folks.