consistently use lt namespace in examples and documentation

This commit is contained in:
arvidn 2019-02-12 15:00:23 +01:00 committed by Arvid Norberg
parent aa7f29c17a
commit a24afe8524
6 changed files with 21 additions and 20 deletions

View File

@ -1,3 +1,4 @@
* consistently use "lt" namespace in examples and documentation
* fix Mingw build to use native cryptoAPI
1.2 release

View File

@ -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;

View File

@ -37,7 +37,7 @@ POSSIBILITY OF SUCH DAMAGE.
#include <algorithm> // for std::max
using libtorrent::span;
using lt::span;
session_view::session_view()
: m_position(0)

View File

@ -304,7 +304,7 @@ namespace libtorrent {
template <class T> T* alert_cast(alert* a)
{
static_assert(std::is_base_of<alert, T>::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<T*>(a);
@ -313,7 +313,7 @@ template <class T> T* alert_cast(alert* a)
template <class T> T const* alert_cast(alert const* a)
{
static_assert(std::is_base_of<alert, T>::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<T const*>(a);
return nullptr;

View File

@ -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<libtorrent::address> address;
aux::noexcept_movable<lt::address> 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<libtorrent::address> address;
aux::noexcept_movable<lt::address> 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

View File

@ -488,7 +488,7 @@ namespace libtorrent {
// .. code:: c++
//
// #include <libtorrent/extensions/ut_metadata.hpp>
// ses.add_extension(&libtorrent::create_ut_metadata_plugin);
// ses.add_extension(&lt::create_ut_metadata_plugin);
//
// uTorrent peer exchange
// Exchanges peers between clients.
@ -496,7 +496,7 @@ namespace libtorrent {
// .. code:: c++
//
// #include <libtorrent/extensions/ut_pex.hpp>
// ses.add_extension(&libtorrent::create_ut_pex_plugin);
// ses.add_extension(&lt::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 <libtorrent/extensions/smart_ban.hpp>
// ses.add_extension(&libtorrent::create_smart_ban_plugin);
// ses.add_extension(&lt::create_smart_ban_plugin);
//
//
// .. _`libtorrent plugins`: libtorrent_plugins.html