mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-10 04:02:30 +00:00
* Converting various variables to the new command version.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@891 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
noinst_LIBRARIES = libsub_utils.a
|
||||
|
||||
libsub_utils_a_SOURCES = \
|
||||
command_slot.cc \
|
||||
command_slot.h \
|
||||
command_variable.cc \
|
||||
command_variable.h \
|
||||
directory.cc \
|
||||
|
||||
@@ -291,19 +291,6 @@ VariableDownloadStringSlot::set_d(core::Download* download, const torrent::Objec
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
VariableListSlot::set(const torrent::Object& arg) {
|
||||
switch (arg.type()) {
|
||||
// case torrent::Object::TYPE_STRING:
|
||||
// break;
|
||||
case torrent::Object::TYPE_LIST:
|
||||
m_slotSet(arg.as_list());
|
||||
break;
|
||||
default:
|
||||
throw torrent::input_error("Not a list.");
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
VariableDownloadListSlot::set_d(core::Download* download, const torrent::Object& arg) {
|
||||
switch (arg.type()) {
|
||||
|
||||
@@ -295,21 +295,6 @@ private:
|
||||
torrent::Object m_cache;
|
||||
};
|
||||
|
||||
class VariableListSlot : public Variable {
|
||||
public:
|
||||
typedef rak::function1<void, const list_type&> slot_set_type;
|
||||
|
||||
template <typename SlotSet>
|
||||
VariableListSlot(SlotSet* slotSet) {
|
||||
m_slotSet.set(slotSet);
|
||||
}
|
||||
|
||||
virtual void set(const torrent::Object& arg);
|
||||
|
||||
private:
|
||||
slot_set_type m_slotSet;
|
||||
};
|
||||
|
||||
class VariableDownloadListSlot : public Variable {
|
||||
public:
|
||||
typedef rak::function2<void, core::Download*, const list_type&> slot_set_type;
|
||||
|
||||
Reference in New Issue
Block a user