mark encryption_handler with TORRENT_EXTRA_EXPORT and minor cleanup (#963)

This commit is contained in:
Alden Torres 2016-07-28 14:57:26 -04:00 committed by Arvid Norberg
parent 83c4a5ed37
commit a88c733f92
6 changed files with 7 additions and 22 deletions

View File

@ -39,8 +39,6 @@ POSSIBILITY OF SUCH DAMAGE.
#include "libtorrent/aux_/disable_warnings_push.hpp" #include "libtorrent/aux_/disable_warnings_push.hpp"
#include <boost/version.hpp>
#if defined TORRENT_WINDOWS || defined TORRENT_CYGWIN #if defined TORRENT_WINDOWS || defined TORRENT_CYGWIN
// asio assumes that the windows error codes are defined already // asio assumes that the windows error codes are defined already
#include <winsock2.h> #include <winsock2.h>
@ -68,5 +66,3 @@ namespace libtorrent
} }
#endif #endif

View File

@ -97,7 +97,7 @@ namespace libtorrent
sha1_hash m_xor_mask; sha1_hash m_xor_mask;
}; };
struct encryption_handler struct TORRENT_EXTRA_EXPORT encryption_handler
{ {
std::tuple<int, span<span<char const>>> std::tuple<int, span<span<char const>>>
encrypt(span<span<char>> iovec); encrypt(span<span<char>> iovec);

View File

@ -38,16 +38,15 @@ POSSIBILITY OF SUCH DAMAGE.
#include <thread> #include <thread>
#include "libtorrent/config.hpp" #include "libtorrent/config.hpp"
#include "libtorrent/version.hpp"
#include "libtorrent/build_config.hpp" #include "libtorrent/build_config.hpp"
#include "libtorrent/io_service.hpp" #include "libtorrent/io_service.hpp"
#include "libtorrent/storage.hpp" #include "libtorrent/storage.hpp"
#include "libtorrent/session_settings.hpp" #include "libtorrent/settings_pack.hpp"
#include "libtorrent/session_handle.hpp" #include "libtorrent/session_handle.hpp"
#ifndef TORRENT_NO_DEPRECATE #ifndef TORRENT_NO_DEPRECATE
#include "libtorrent/settings_pack.hpp" #include "libtorrent/session_settings.hpp"
#include "libtorrent/fingerprint.hpp" #include "libtorrent/fingerprint.hpp"
#include <cstdio> // for snprintf #include <cstdio> // for snprintf
#endif #endif
@ -77,7 +76,7 @@ namespace libtorrent
// list for torrents. It performs multiple smaller reads when it hashes // list for torrents. It performs multiple smaller reads when it hashes
// pieces, instead of reading it all into memory before hashing. // pieces, instead of reading it all into memory before hashing.
// //
// This configuration is inteded to be the starting point for embedded // This configuration is intended to be the starting point for embedded
// devices. It will significantly reduce memory usage. // devices. It will significantly reduce memory usage.
// //
// ``high_performance_seed`` returns settings optimized for a seed box, // ``high_performance_seed`` returns settings optimized for a seed box,
@ -148,7 +147,7 @@ namespace libtorrent
{ {
public: public:
// Constructs the session obects which acts as the container of torrents. // Constructs the session objects which acts as the container of torrents.
// It provides configuration options across torrents (such as rate limits, // It provides configuration options across torrents (such as rate limits,
// disk cache, ip filter etc.). In order to avoid a race condition between // disk cache, ip filter etc.). In order to avoid a race condition between
// starting the session and configuring it, you can pass in a // starting the session and configuring it, you can pass in a
@ -294,4 +293,3 @@ namespace libtorrent
} }
#endif // TORRENT_SESSION_HPP_INCLUDED #endif // TORRENT_SESSION_HPP_INCLUDED

View File

@ -1687,4 +1687,3 @@ namespace libtorrent
} }
#endif #endif

View File

@ -784,4 +784,3 @@ namespace libtorrent
m_bools.clear(); m_bools.clear();
} }
} }

View File

@ -31,13 +31,10 @@ POSSIBILITY OF SUCH DAMAGE.
*/ */
#include "libtorrent/config.hpp" #include "libtorrent/config.hpp"
#include "libtorrent/assert.hpp" // for print_backtrace
#include "libtorrent/socket.hpp" #include "libtorrent/socket.hpp"
#include "libtorrent/udp_socket.hpp" #include "libtorrent/udp_socket.hpp"
#include "libtorrent/socket_io.hpp" #include "libtorrent/socket_io.hpp"
#include "libtorrent/error.hpp" #include "libtorrent/error.hpp"
#include "libtorrent/string_util.hpp" // for allocate_string_copy
#include "libtorrent/broadcast_socket.hpp" // for is_any
#include "libtorrent/settings_pack.hpp" #include "libtorrent/settings_pack.hpp"
#include "libtorrent/error.hpp" #include "libtorrent/error.hpp"
#include "libtorrent/aux_/time.hpp" // for aux::time_now() #include "libtorrent/aux_/time.hpp" // for aux::time_now()
@ -49,6 +46,7 @@ POSSIBILITY OF SUCH DAMAGE.
#include <functional> #include <functional>
#include <array> #include <array>
#include <boost/function/function3.hpp>
#include <boost/system/system_error.hpp> #include <boost/system/system_error.hpp>
#include <boost/system/error_code.hpp> #include <boost/system/error_code.hpp>
#include <boost/asio/read.hpp> #include <boost/asio/read.hpp>
@ -56,10 +54,6 @@ POSSIBILITY OF SUCH DAMAGE.
#include "libtorrent/aux_/disable_warnings_pop.hpp" #include "libtorrent/aux_/disable_warnings_pop.hpp"
#if defined TORRENT_ASIO_DEBUGGING
#include "libtorrent/debug.hpp"
#endif
namespace libtorrent { namespace libtorrent {
using namespace libtorrent::aux; using namespace libtorrent::aux;
@ -70,7 +64,7 @@ using namespace std::placeholders;
// //
// 1. since its asynchronous functions may refer to it after the udp_socket has // 1. since its asynchronous functions may refer to it after the udp_socket has
// been destructed, it needs to be held by a shared_ptr // been destructed, it needs to be held by a shared_ptr
// 2. since using a sokcs proxy is assumed to be a less common case, it makes // 2. since using a socks proxy is assumed to be a less common case, it makes
// the common case cheaper by not allocating this space unconditionally // the common case cheaper by not allocating this space unconditionally
struct socks5 : boost::enable_shared_from_this<socks5> struct socks5 : boost::enable_shared_from_this<socks5>
{ {
@ -762,4 +756,3 @@ void socks5::close()
} }
} }