From c3f15b8b1ed2b4f4ad25bc98f4e25dab9d8515e0 Mon Sep 17 00:00:00 2001 From: Marcos Pinto Date: Mon, 7 Apr 2008 05:13:36 +0000 Subject: [PATCH] 0.13 final sync --- .../include/libtorrent/broadcast_socket.hpp | 15 ++++++++------- libtorrent/include/libtorrent/entry.hpp | 4 +++- libtorrent/include/libtorrent/enum_net.hpp | 9 +++++---- 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/libtorrent/include/libtorrent/broadcast_socket.hpp b/libtorrent/include/libtorrent/broadcast_socket.hpp index a4c448d82..f7aae342b 100644 --- a/libtorrent/include/libtorrent/broadcast_socket.hpp +++ b/libtorrent/include/libtorrent/broadcast_socket.hpp @@ -33,6 +33,7 @@ POSSIBILITY OF SUCH DAMAGE. #ifndef TORRENT_BROADCAST_SOCKET_HPP_INCLUDED #define TORRENT_BROADCAST_SOCKET_HPP_INCLUDED +#include "libtorrent/config.hpp" #include "libtorrent/socket.hpp" #include #include @@ -41,21 +42,21 @@ POSSIBILITY OF SUCH DAMAGE. namespace libtorrent { - bool is_local(address const& a); - bool is_loopback(address const& addr); - bool is_multicast(address const& addr); - bool is_any(address const& addr); - int cidr_distance(address const& a1, address const& a2); + TORRENT_EXPORT bool is_local(address const& a); + TORRENT_EXPORT bool is_loopback(address const& addr); + TORRENT_EXPORT bool is_multicast(address const& addr); + TORRENT_EXPORT bool is_any(address const& addr); + TORRENT_EXPORT int cidr_distance(address const& a1, address const& a2); int common_bits(unsigned char const* b1 , unsigned char const* b2, int n); - address guess_local_address(asio::io_service&); + TORRENT_EXPORT address guess_local_address(asio::io_service&); typedef boost::function receive_handler_t; - class broadcast_socket + class TORRENT_EXPORT broadcast_socket { public: broadcast_socket(asio::io_service& ios, udp::endpoint const& multicast_endpoint diff --git a/libtorrent/include/libtorrent/entry.hpp b/libtorrent/include/libtorrent/entry.hpp index 1c25cc7c7..7238af37e 100755 --- a/libtorrent/include/libtorrent/entry.hpp +++ b/libtorrent/include/libtorrent/entry.hpp @@ -170,12 +170,14 @@ namespace libtorrent void print(std::ostream& os, int indent = 0) const; - private: + protected: void construct(data_type t); void copy(const entry& e); void destruct(); + private: + data_type m_type; #if defined(_MSC_VER) && _MSC_VER < 1310 diff --git a/libtorrent/include/libtorrent/enum_net.hpp b/libtorrent/include/libtorrent/enum_net.hpp index 4570e30eb..56d89d472 100644 --- a/libtorrent/include/libtorrent/enum_net.hpp +++ b/libtorrent/include/libtorrent/enum_net.hpp @@ -33,6 +33,7 @@ POSSIBILITY OF SUCH DAMAGE. #ifndef TORRENT_ENUM_NET_HPP_INCLUDED #define TORRENT_ENUM_NET_HPP_INCLUDED +#include "libtorrent/config.hpp" #include "libtorrent/socket.hpp" namespace libtorrent @@ -46,18 +47,18 @@ namespace libtorrent // returns a list of the configured IP interfaces // on the machine - std::vector enum_net_interfaces(asio::io_service& ios + TORRENT_EXPORT std::vector enum_net_interfaces(asio::io_service& ios , asio::error_code& ec); // returns true if the specified address is on the same // local network as the specified interface - bool in_subnet(address const& addr, ip_interface const& iface); + TORRENT_EXPORT bool in_subnet(address const& addr, ip_interface const& iface); // returns true if the specified address is on the same // local network as us - bool in_local_network(asio::io_service& ios, address const& addr, asio::error_code& ec); + TORRENT_EXPORT bool in_local_network(asio::io_service& ios, address const& addr, asio::error_code& ec); - address router_for_interface(address const interface, asio::error_code& ec); + TORRENT_EXPORT address router_for_interface(address const interface, asio::error_code& ec); } #endif