mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-09 07:39:21 +00:00
* Moving some API headers torrent/data and torrent/peer.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@803 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
+8
-3
@@ -104,12 +104,12 @@ public:
|
||||
// Helper functions for calling functions in download_type
|
||||
// through sigc++.
|
||||
template <typename Ret, Ret (download_type::*func)()>
|
||||
void call() { (m_download.*func)(); }
|
||||
void call() { (m_download.*func)(); }
|
||||
|
||||
template <typename Ret, typename Arg1, Ret (download_type::*func)(Arg1)>
|
||||
void call(Arg1 a1) { (m_download.*func)(a1); }
|
||||
void call(Arg1 a1) { (m_download.*func)(a1); }
|
||||
|
||||
bool operator == (const std::string& str) { return str == m_download.info_hash(); }
|
||||
bool operator == (const std::string& str) const;
|
||||
|
||||
void set_connection_type(const std::string& t) { m_download.set_connection_type(string_to_connection_type(t)); }
|
||||
|
||||
@@ -152,6 +152,11 @@ private:
|
||||
sigc::connection m_connStorageError;
|
||||
};
|
||||
|
||||
inline bool
|
||||
Download::operator == (const std::string& str) const {
|
||||
return str.size() == torrent::HashString::size_data && *torrent::HashString::cast_from(str) == m_download.info_hash();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user