* Allow a list of commands to be called on a newly created download

before it is started.

* The "load_*" commands now allow a list of commands to be appended.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@941 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2007-07-20 23:54:31 +00:00
parent 7d0be56c83
commit 465625692f
7 changed files with 49 additions and 21 deletions
+9 -2
View File
@@ -38,6 +38,7 @@
#define RTORRENT_CORE_MANAGER_H
#include <iosfwd>
#include <vector>
#include "download_list.h"
#include "poll_manager.h"
@@ -98,9 +99,15 @@ public:
void handshake_log(const sockaddr* sa, int msg, int err, const torrent::HashString* hash);
static const int create_start = 0x1;
static const int create_tied = 0x2;
static const int create_quiet = 0x4;
typedef std::vector<std::string> command_list_type;
// Temporary, find a better place for this.
void try_create_download(const std::string& uri, bool start, bool printLog = true, bool tied = false);
void try_create_download_expand(const std::string& uri, bool start, bool printLog = true, bool tied = false);
void try_create_download(const std::string& uri, int flags, const command_list_type& commands);
void try_create_download_expand(const std::string& uri, int flags, command_list_type commands = command_list_type());
private:
void create_http(const std::string& uri);