forked from premiere/premiere-libtorrent
consistently use lt namespace in examples and documentation
This commit is contained in:
parent
aa7f29c17a
commit
a24afe8524
|
@ -1,3 +1,4 @@
|
|||
* consistently use "lt" namespace in examples and documentation
|
||||
* fix Mingw build to use native cryptoAPI
|
||||
|
||||
1.2 release
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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(<::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(<::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(<::create_smart_ban_plugin);
|
||||
//
|
||||
//
|
||||
// .. _`libtorrent plugins`: libtorrent_plugins.html
|
||||
|
|
Loading…
Reference in New Issue