Commit Graph

30 Commits

Author SHA1 Message Date
rakshasa 48733c84ec Added 'catch' command to allow safely calling commands that might fail with input_error. Note that double-brackets are required as the method needs to be called by the 'catch' command, not the parser.
catch = ((foo.bar,"bad input"))
2012-05-21 16:08:49 +09:00
rakshasa 004862850d Allow command function lists for dynamically created functions. 2012-05-04 22:56:58 +09:00
rakshasa bb75f06c6d Replaced std::placeholders with tr1::placholders. 2012-03-21 01:24:35 +09:00
rakshasa 04acc8a0af Converted std::bind calls to tr1::bind. 2012-03-21 01:22:25 +09:00
Jari Sundell e58f3975f1 Fixed compiler issues with clang. 2011-12-29 18:58:12 +09:00
Jari Sundell 58727fe7fd Fixed compiler issues with gcc-4.6 c++0x. 2011-11-18 17:28:50 +09:00
rakshasa 4d313e6353 Updated copyright information.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1301 e378c898-3ddf-0310-93e7-cc216c733640
2011-10-09 06:30:14 +00:00
rakshasa d0d52cdda1 * Added 'method.const' and 'method.const.enable' for setting the const flag for objects in object_storage.
* Added '<foo_list>.push_back' to all list objects in object_storage.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1242 e378c898-3ddf-0310-93e7-cc216c733640
2011-06-22 06:13:43 +00:00
rakshasa 1e206cb1c4 * Cleanup of command handling.
* Added 'd.timestamp.finished' that is set when a downloading torrent completes. For torrents that only seed it remains '0'.

* Added 'elapsed.{less,greater}' for checking the time elapsed since a time is less/greater, and it also returns false in all cases where the time is '0'.

* Fixed a bug that would cause hash checking to block exessively in some cases.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1233 e378c898-3ddf-0310-93e7-cc216c733640
2011-06-05 07:11:59 +00:00
rakshasa d2f328cc8e * Added 'method.rlookup' and 'method.rlookup.clear' commands for looking up the event handlers holding a specified key.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1231 e378c898-3ddf-0310-93e7-cc216c733640
2011-05-26 03:38:45 +00:00
rakshasa 6f71a8c1b1 * Added 'p.is_unwanted' and 'p.is_preferred' commands.
* Removed std::tr1:: in favor of std:: using namespace.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1202 e378c898-3ddf-0310-93e7-cc216c733640
2011-04-07 08:41:16 +00:00
rakshasa 7b2fae35d5 * Allow inlining functions in commands with parantheses, e.g:
print = (convert.time,(system.time))
  schedule2 = test_print_2,2,2,((print,"current ",((convert.time,((system.time))))))

  Multiple parantheses need to be used in schedule to ensure the command doesn't get evaluated at the time of calling schedule.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1191 e378c898-3ddf-0310-93e7-cc216c733640
2011-02-12 12:20:09 +00:00
rakshasa 49f61eeda3 * Added separate '-I' and '-K' switches, the former is for testing rtorrent code, the latter for webui's.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1178 e378c898-3ddf-0310-93e7-cc216c733640
2010-10-05 23:49:06 +00:00
rakshasa 56e126d8a0 * Fixed more redirects to work properly with old webui's.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1175 e378c898-3ddf-0310-93e7-cc216c733640
2010-10-03 10:47:36 +00:00
rakshasa d9f409b223 * Changed command_base stored in CommandMap from a pointer to an instance.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1169 e378c898-3ddf-0310-93e7-cc216c733640
2010-04-30 12:16:45 +00:00
rakshasa c8fc6402bb * Finished the move over to object_storage, removing command_function.*.
* Added redirects for several commands.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1166 e378c898-3ddf-0310-93e7-cc216c733640
2010-04-29 10:59:41 +00:00
rakshasa b530d35d94 * More work on rpc::object_storage and moving simple functions over to it.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1165 e378c898-3ddf-0310-93e7-cc216c733640
2010-04-28 15:19:18 +00:00
rakshasa 74bae32243 * Fixed more redirected commands.
* Cleaned up the Command stack implementation.

* Added framework for object_storage class that will hold variables and user-defined command lists.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1162 e378c898-3ddf-0310-93e7-cc216c733640
2010-04-11 14:19:27 +00:00
rakshasa 90da65f8a1 * Cleanup of old command code.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1156 e378c898-3ddf-0310-93e7-cc216c733640
2010-04-04 04:44:45 +00:00
rakshasa 4e4540e60f * Removed old Command classes.
* Redirects can now be made efficiently using rpc::CommandMap::create_redirect or "methods.redirect=new_key,dest_key".


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1155 e378c898-3ddf-0310-93e7-cc216c733640
2010-03-28 18:09:09 +00:00
rakshasa bc96dbfa2d * Modified the fallocate configure check so it will fail if 'fallocate' can't be found.
* Changed more commands to the new format.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1153 e378c898-3ddf-0310-93e7-cc216c733640
2010-03-24 20:23:48 +00:00
rakshasa 44e77016a9 * Renamed 'system.method.*' to 'method.*'.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1139 e378c898-3ddf-0310-93e7-cc216c733640
2010-03-03 13:45:34 +00:00
rakshasa 3cae3d37be * Cleaning up command names. The deprecated commands will be redirected.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1131 e378c898-3ddf-0310-93e7-cc216c733640
2010-02-16 17:29:53 +00:00
rakshasa d05e889317 * Fixed a minor buffer-overflow.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1083 e378c898-3ddf-0310-93e7-cc216c733640
2008-11-16 14:51:27 +00:00
rakshasa de8a11c4fd * Added 'system.method.get', 'ui.current_view.set' and 'group.insert'
commands.

* Enabled different ratio settings for different groups of
downloads.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1079 e378c898-3ddf-0310-93e7-cc216c733640
2008-11-10 18:52:36 +00:00
rakshasa 66a2af991a * Added groups and started reworking the ratio handling.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1078 e378c898-3ddf-0310-93e7-cc216c733640
2008-11-09 16:20:57 +00:00
rakshasa ca9d0b1773 * Added string, value and bool types to 'system.method.insert' for
storing variables.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1076 e378c898-3ddf-0310-93e7-cc216c733640
2008-11-07 16:01:18 +00:00
rakshasa 29ba4ff4bc * Enforce an http transfer timeout when libcurl fails to honor
it. Also set a 5-minute timeout for (previously unlimited) torrent
transfers and fixes the argument type for curl_easy_setopt values.

* Allows bandwidth throttles to work without floating point support.

* Adds a d.add_peer=host[:port] command to manually add a peer (not
for torrents marked "private"), port is 6881 by default.

* Allows banning the selected peer with "B". No unbanning is possible
yet.

All the above patches were written by Josef Drexler.

* Differentiate between commands that have no target, and those that
take generic targets, when using XMLRPC.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1073 e378c898-3ddf-0310-93e7-cc216c733640
2008-10-22 13:23:48 +00:00
rakshasa 07b9616ef6 * Use user-modifiable commands instead of slots for the 'on_*' events.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1070 e378c898-3ddf-0310-93e7-cc216c733640
2008-10-01 14:19:51 +00:00
rakshasa d7c2960d1e * Added system.method.{insert,erase} commands that allows
user-specified commands. "system.method.insert=foo,print=Bar"


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1069 e378c898-3ddf-0310-93e7-cc216c733640
2008-09-27 06:28:50 +00:00