diff --git a/bindings/python/src/utility.cpp b/bindings/python/src/utility.cpp index a8740be5b..b9c00b5fa 100644 --- a/bindings/python/src/utility.cpp +++ b/bindings/python/src/utility.cpp @@ -58,12 +58,13 @@ struct bytes_from_python } }; - +#ifndef TORRENT_NO_DEPRECATE object client_fingerprint_(peer_id const& id) { boost::optional result = client_fingerprint(id); return result ? object(*result) : object(); } +#endif entry bdecode_(bytes const& data) { @@ -85,8 +86,8 @@ void bind_utility() #ifndef TORRENT_NO_DEPRECATE def("identify_client", &libtorrent::identify_client); -#endif def("client_fingerprint", &client_fingerprint_); +#endif def("bdecode", &bdecode_); def("bencode", &bencode_); } diff --git a/include/libtorrent/fingerprint.hpp b/include/libtorrent/fingerprint.hpp index 11ffc8336..f7341243b 100644 --- a/include/libtorrent/fingerprint.hpp +++ b/include/libtorrent/fingerprint.hpp @@ -39,13 +39,14 @@ POSSIBILITY OF SUCH DAMAGE. #include "libtorrent/config.hpp" #include "libtorrent/peer_id.hpp" #include "libtorrent/assert.hpp" +#include "libtorrent/export.hpp" namespace libtorrent { // The fingerprint class represents information about a client and its version. It is used // to encode this information into the client's peer id. - struct fingerprint + struct TORRENT_DEPRECATED_EXPORT fingerprint { // The constructor takes a ``char const*`` that should point to a string constant containing diff --git a/include/libtorrent/identify_client.hpp b/include/libtorrent/identify_client.hpp index c5a8da2a0..9e397f1c5 100644 --- a/include/libtorrent/identify_client.hpp +++ b/include/libtorrent/identify_client.hpp @@ -46,6 +46,7 @@ POSSIBILITY OF SUCH DAMAGE. namespace libtorrent { + // TODO: hide these declarations when deprecaated functions are disabled, and // expose them internally in a header under aux_. @@ -65,6 +66,7 @@ namespace libtorrent TORRENT_DEPRECATED_EXPORT TORRENT_DEPRECATED boost::optional client_fingerprint(peer_id const& p); + } #endif // TORRENT_IDENTIFY_CLIENT_HPP_INCLUDED diff --git a/include/libtorrent/session.hpp b/include/libtorrent/session.hpp index bccac80bb..36fe8a473 100644 --- a/include/libtorrent/session.hpp +++ b/include/libtorrent/session.hpp @@ -44,7 +44,6 @@ POSSIBILITY OF SUCH DAMAGE. #include "libtorrent/config.hpp" #include "libtorrent/version.hpp" -#include "libtorrent/fingerprint.hpp" #include "libtorrent/build_config.hpp" #include "libtorrent/settings_pack.hpp" #include "libtorrent/io_service.hpp" @@ -56,6 +55,7 @@ POSSIBILITY OF SUCH DAMAGE. #ifndef TORRENT_NO_DEPRECATE #include "libtorrent/rss.hpp" +#include "libtorrent/fingerprint.hpp" #endif #ifdef TORRENT_USE_OPENSSL