summaryrefslogtreecommitdiff
path: root/src/OptionHandlerFactory.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2012-03-25 19:25:43 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2012-03-25 19:25:43 +0900
commit8499a47d21b73e78bc1030684b2cd187b05360cc (patch)
treed680f082c3590769fe0845f1ae5017ceae0dae83 /src/OptionHandlerFactory.cc
parent9669bafb7fbc1fdd61dc7fba9068d7b7c605bc25 (diff)
Added --bt-remove-unselected-file option.
Removes the unselected files when download is completed in BitTorrent. To selecting files, use --select-file option. If it is not used, all files are assumed to be selected. Please use this option with care because it will actually remove files from your disk. This option is default to false.
Diffstat (limited to 'src/OptionHandlerFactory.cc')
-rw-r--r--src/OptionHandlerFactory.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/OptionHandlerFactory.cc b/src/OptionHandlerFactory.cc
index dad99665..a31804ae 100644
--- a/src/OptionHandlerFactory.cc
+++ b/src/OptionHandlerFactory.cc
@@ -1647,6 +1647,19 @@ OptionHandlerFactory::createOptionHandlers()
handlers.push_back(op);
}
{
+ SharedHandle<OptionHandler> op(new BooleanOptionHandler
+ (PREF_BT_REMOVE_UNSELECTED_FILE,
+ TEXT_BT_REMOVE_UNSELECTED_FILE,
+ A2_V_FALSE,
+ OptionHandler::OPT_ARG));
+ op->addTag(TAG_BITTORRENT);
+ op->setInitialOption(true);
+ op->setChangeOption(true);
+ op->setChangeGlobalOption(true);
+ op->setChangeOptionForReserved(true);
+ handlers.push_back(op);
+ }
+ {
SharedHandle<OptionHandler> op(new UnitNumberOptionHandler
(PREF_BT_REQUEST_PEER_SPEED_LIMIT,
TEXT_BT_REQUEST_PEER_SPEED_LIMIT,