mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-14 14:12:31 +00:00
* Cleaned up torrent::Rate and moved it to the API. Changed various
parts of the API to return torrent::Rate instead of specific functions for each stat. * Use 600 second time span for peer rates. * Added core::DownloadFactory which allows for an async http get and changing of settings. This will allow the implementation of a configuration screen when pressing "return", while the client is downloading or finished downloading a torrent file. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@491 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
@@ -49,12 +49,13 @@
|
||||
namespace core {
|
||||
|
||||
HttpQueue::iterator
|
||||
HttpQueue::insert(const std::string& url) {
|
||||
HttpQueue::insert(const std::string& url, std::iostream* s) {
|
||||
std::auto_ptr<CurlGet> h(m_slotFactory());
|
||||
std::auto_ptr<std::stringstream> s(new std::stringstream);
|
||||
//std::auto_ptr<std::stringstream> s(new std::stringstream);
|
||||
|
||||
h->set_url(url);
|
||||
h->set_stream(s.get());
|
||||
//h->set_stream(s.get());
|
||||
h->set_stream(s);
|
||||
h->set_user_agent("rtorrent/" VERSION);
|
||||
|
||||
iterator itr = Base::insert(end(), h.get());
|
||||
@@ -65,7 +66,7 @@ HttpQueue::insert(const std::string& url) {
|
||||
(*itr)->start();
|
||||
|
||||
h.release();
|
||||
s.release();
|
||||
//s.release();
|
||||
|
||||
m_signalInsert.emit(*itr);
|
||||
|
||||
@@ -76,7 +77,7 @@ void
|
||||
HttpQueue::erase(iterator itr) {
|
||||
m_signalErase.emit(*itr);
|
||||
|
||||
delete (*itr)->get_stream();
|
||||
//delete (*itr)->get_stream();
|
||||
delete *itr;
|
||||
|
||||
Base::erase(itr);
|
||||
|
||||
Reference in New Issue
Block a user