Changeset 1042 for trunk/rtorrent/src/rpc/command_map.h
- Timestamp:
- 03/16/08 09:55:40 (4 years ago)
- Files:
-
- 1 modified
-
trunk/rtorrent/src/rpc/command_map.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/rtorrent/src/rpc/command_map.h
r1041 r1042 73 73 Command::peer_slot m_peerSlot; 74 74 Command::tracker_slot m_trackerSlot; 75 76 Command::download_slot m_downloadPairSlot; 75 77 }; 76 78 … … 109 111 iterator insert(key_type key, Command* variable, int flags, const char* parm, const char* doc); 110 112 113 // Make this a wrapper call to insert without extra fluff. 111 114 template <typename T> 112 115 void insert_type(key_type key, Command* variable, T targetSlot, int flags, const char* parm, const char* doc) { … … 133 136 134 137 inline target_type make_target() { return target_type((int)Command::target_generic, NULL); } 135 inline target_type make_target(core::Download* target) { return target_type((int)Command::target_download, target); }136 inline target_type make_target(torrent::Peer* target) { return target_type((int)Command::target_peer, target); }137 inline target_type make_target(torrent::Tracker* target) { return target_type((int)Command::target_tracker, target); }138 inline target_type make_target(torrent::File* target) { return target_type((int)Command::target_file, target); }139 inline target_type make_target(torrent::FileListIterator* target) { return target_type((int)Command::target_file_itr, target); }140 138 inline target_type make_target(int type, void* target) { return target_type(type, target); } 139 inline target_type make_target(int type, void* target1, void* target2) { return target_type(type, target1, target2); } 140 141 template <typename T> 142 inline target_type make_target(T target) { 143 return target_type((int)target_type_id<T>::value, target); 144 } 141 145 142 146 }
