diff --git a/ChangeLog b/ChangeLog index 45bc5cc6b..7412717c0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,4 @@ + * consistently use "lt" namespace in examples and documentation * fix Mingw build to use native cryptoAPI 1.2 release diff --git a/examples/client_test.cpp b/examples/client_test.cpp index 88ce002d9..541ebbad5 100644 --- a/examples/client_test.cpp +++ b/examples/client_test.cpp @@ -1201,7 +1201,7 @@ example alert_masks: case 'O': stats_enabled = true; --i; break; #ifdef TORRENT_UTP_LOG_ENABLE case 'q': - libtorrent::set_utp_stream_logging(true); + lt::set_utp_stream_logging(true); break; #endif case 'U': torrent_upload_limit = atoi(arg) * 1000; break; diff --git a/examples/session_view.cpp b/examples/session_view.cpp index 9cb78b9e0..21b5cbeca 100644 --- a/examples/session_view.cpp +++ b/examples/session_view.cpp @@ -37,7 +37,7 @@ POSSIBILITY OF SUCH DAMAGE. #include // for std::max -using libtorrent::span; +using lt::span; session_view::session_view() : m_position(0) diff --git a/include/libtorrent/alert.hpp b/include/libtorrent/alert.hpp index 209ca0964..f8c46e36d 100644 --- a/include/libtorrent/alert.hpp +++ b/include/libtorrent/alert.hpp @@ -304,7 +304,7 @@ namespace libtorrent { template T* alert_cast(alert* a) { static_assert(std::is_base_of::value - , "alert_cast<> can only be used with alert types (deriving from libtorrent::alert)"); + , "alert_cast<> can only be used with alert types (deriving from lt::alert)"); if (a == nullptr) return nullptr; if (a->type() == T::alert_type) return static_cast(a); @@ -313,7 +313,7 @@ template T* alert_cast(alert* a) template T const* alert_cast(alert const* a) { static_assert(std::is_base_of::value - , "alert_cast<> can only be used with alert types (deriving from libtorrent::alert)"); + , "alert_cast<> can only be used with alert types (deriving from lt::alert)"); if (a == nullptr) return nullptr; if (a->type() == T::alert_type) return static_cast(a); return nullptr; diff --git a/include/libtorrent/alert_types.hpp b/include/libtorrent/alert_types.hpp index 090c48c8c..c1e9770a2 100644 --- a/include/libtorrent/alert_types.hpp +++ b/include/libtorrent/alert_types.hpp @@ -1410,19 +1410,19 @@ TORRENT_VERSION_NAMESPACE_2 // internal listen_failed_alert(aux::stack_allocator& alloc, string_view iface - , libtorrent::address const& listen_addr, int listen_port - , operation_t op, error_code const& ec, libtorrent::socket_type_t t); + , lt::address const& listen_addr, int listen_port + , operation_t op, error_code const& ec, lt::socket_type_t t); listen_failed_alert(aux::stack_allocator& alloc, string_view iface , tcp::endpoint const& ep, operation_t op, error_code const& ec - , libtorrent::socket_type_t t); + , lt::socket_type_t t); listen_failed_alert(aux::stack_allocator& alloc, string_view iface , udp::endpoint const& ep, operation_t op, error_code const& ec - , libtorrent::socket_type_t t); + , lt::socket_type_t t); listen_failed_alert(aux::stack_allocator& alloc, string_view iface - , operation_t op, error_code const& ec, libtorrent::socket_type_t t); + , operation_t op, error_code const& ec, lt::socket_type_t t); TORRENT_DEFINE_ALERT_PRIO(listen_failed_alert, 48, alert_priority_critical) @@ -1439,11 +1439,11 @@ TORRENT_VERSION_NAMESPACE_2 operation_t op; // the type of listen socket this alert refers to. - libtorrent::socket_type_t const socket_type; + lt::socket_type_t const socket_type; // the address libtorrent attempted to listen on // see alert documentation for validity of this value - aux::noexcept_movable address; + aux::noexcept_movable address; // the port libtorrent attempted to listen on // see alert documentation for validity of this value @@ -1496,17 +1496,17 @@ TORRENT_VERSION_NAMESPACE_2 // internal listen_succeeded_alert(aux::stack_allocator& alloc - , libtorrent::address const& listen_addr + , lt::address const& listen_addr , int listen_port - , libtorrent::socket_type_t t); + , lt::socket_type_t t); listen_succeeded_alert(aux::stack_allocator& alloc , tcp::endpoint const& ep - , libtorrent::socket_type_t t); + , lt::socket_type_t t); listen_succeeded_alert(aux::stack_allocator& alloc , udp::endpoint const& ep - , libtorrent::socket_type_t t); + , lt::socket_type_t t); TORRENT_DEFINE_ALERT_PRIO(listen_succeeded_alert, 49, alert_priority_critical) @@ -1515,13 +1515,13 @@ TORRENT_VERSION_NAMESPACE_2 // the address libtorrent ended up listening on. This address // refers to the local interface. - aux::noexcept_movable address; + aux::noexcept_movable address; // the port libtorrent ended up listening on. int const port; // the type of listen socket this alert refers to. - libtorrent::socket_type_t const socket_type; + lt::socket_type_t const socket_type; #if TORRENT_ABI_VERSION == 1 // the endpoint libtorrent ended up listening on. The address diff --git a/include/libtorrent/session_handle.hpp b/include/libtorrent/session_handle.hpp index 59d4fe129..85603018f 100644 --- a/include/libtorrent/session_handle.hpp +++ b/include/libtorrent/session_handle.hpp @@ -488,7 +488,7 @@ namespace libtorrent { // .. code:: c++ // // #include - // ses.add_extension(&libtorrent::create_ut_metadata_plugin); + // ses.add_extension(<::create_ut_metadata_plugin); // // uTorrent peer exchange // Exchanges peers between clients. @@ -496,7 +496,7 @@ namespace libtorrent { // .. code:: c++ // // #include - // ses.add_extension(&libtorrent::create_ut_pex_plugin); + // ses.add_extension(<::create_ut_pex_plugin); // // smart ban plugin // A plugin that, with a small overhead, can ban peers @@ -506,7 +506,7 @@ namespace libtorrent { // .. code:: c++ // // #include - // ses.add_extension(&libtorrent::create_smart_ban_plugin); + // ses.add_extension(<::create_smart_ban_plugin); // // // .. _`libtorrent plugins`: libtorrent_plugins.html