* 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:
rakshasa
2006-11-08 14:57:30 +00:00
parent 6935c97e8f
commit 1982429b8c
7 changed files with 18 additions and 13 deletions
+8 -3
View File
@@ -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