Allow functions and lists of functions to be passed to view.event_{added,removed}.

This commit is contained in:
rakshasa
2012-05-04 21:31:12 +09:00
parent 8d0f9b3300
commit fb75510c0f
8 changed files with 77 additions and 69 deletions
+12
View File
@@ -124,6 +124,18 @@ call_command_d_range(const char* key, core::Download* download, torrent::Object:
return commands.call_command_d(key, download, rawArgs);
}
void call_object(const torrent::Object& command, target_type target = make_target());
inline void
call_object_nothrow(const torrent::Object& command, target_type target = make_target()) {
try { call_object(command, target); } catch (torrent::input_error& e) {}
}
inline void
call_object_d_nothrow(const torrent::Object& command, core::Download* download) {
try { call_object(command, make_target(download)); } catch (torrent::input_error& e) {}
}
//
//
//