mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-12 21:22:31 +00:00
* Added "working_directory" option that calls chdir.
* Added "session_on_completion" option which saves the session torrent when a download finishes. * Handle SIGTERM gracefully, saving session torrents etc. * Implemented session directory lockfile, use "session_lock" option to disable. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@629 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
@@ -37,55 +37,8 @@
|
||||
#ifndef RTORRENT_OPTION_HANDLER_RULES_H
|
||||
#define RTORRENT_OPTION_HANDLER_RULES_H
|
||||
|
||||
#include <cstdio>
|
||||
#include <string>
|
||||
#include <stdexcept>
|
||||
#include <sigc++/bind.h>
|
||||
|
||||
class Control;
|
||||
|
||||
void initialize_option_handler(Control* c);
|
||||
|
||||
class OptionHandlerInt {
|
||||
public:
|
||||
typedef void (*Apply)(Control*, int);
|
||||
|
||||
OptionHandlerInt(Control* c, Apply a) :
|
||||
m_control(c), m_apply(a) {}
|
||||
|
||||
virtual void process(const std::string& key, const std::string& arg);
|
||||
|
||||
private:
|
||||
Control* m_control;
|
||||
Apply m_apply;
|
||||
};
|
||||
|
||||
class OptionHandlerOctal {
|
||||
public:
|
||||
typedef void (*Apply)(Control*, int);
|
||||
|
||||
OptionHandlerOctal(Control* c, Apply a) :
|
||||
m_control(c), m_apply(a) {}
|
||||
|
||||
virtual void process(const std::string& key, const std::string& arg);
|
||||
|
||||
private:
|
||||
Control* m_control;
|
||||
Apply m_apply;
|
||||
};
|
||||
|
||||
class OptionHandlerString {
|
||||
public:
|
||||
typedef void (*Apply)(Control*, const std::string&);
|
||||
|
||||
OptionHandlerString(Control* c, Apply a) :
|
||||
m_control(c), m_apply(a) {}
|
||||
|
||||
virtual void process(const std::string& key, const std::string& arg);
|
||||
|
||||
private:
|
||||
Control* m_control;
|
||||
Apply m_apply;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user