hey, i'm not certain the DC plugin API should provide such features; but if the download is shown among other transfers, color me convinced. :)
the impl seems nice. i especially like the idea of going with the "data accessor" name - do you have future goals in mind for that interface? my remarks: 1) we use camelCase naming for functions throughout the code, so if you could stick to it... 2) this is going to explode on large downloads. i think you want a custom output stream that will produce "HOOK_DATAACESSOR_HTTP_FILE_NOTIFICATION" events when it is written to. another possibility would be to react to HttpConnectionListener::Data events, if you have access to them. (i prefer the output stream way.) 3) when doing #2, you might notice the HTTP manager already knows how to handle downloads to files; so it would be better if it did (instead of writing the file at the end). 4) why is the "url" parameter of "HOOK_DATAACESSOR_HTTP_FILE_NOTIFICATION" a data array, and not just a string? 5) document the fact that the "localPath" argument of "get_http_file" can be null, and what it implies on the caller (having to listen for events to handle the output by itself). -- You received this bug notification because you are a member of Dcplusplus-team, which is subscribed to DC++. https://bugs.launchpad.net/bugs/1451223 Title: Support for HTTP file retrieval in DC Plugin Status in DC++: New Bug description: It should be possible to download a file through HTTP with a DC Plugin. To manage notifications about this bug go to: https://bugs.launchpad.net/dcplusplus/+bug/1451223/+subscriptions _______________________________________________ Mailing list: https://launchpad.net/~linuxdcpp-team Post to : linuxdcpp-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~linuxdcpp-team More help : https://help.launchpad.net/ListHelp