diff --git a/p2p/base/basic_packet_socket_factory.h b/p2p/base/basic_packet_socket_factory.h index f4282e1ad0..396a8ba4eb 100644 --- a/p2p/base/basic_packet_socket_factory.h +++ b/p2p/base/basic_packet_socket_factory.h @@ -23,12 +23,13 @@ #include "rtc_base/socket.h" #include "rtc_base/socket_address.h" #include "rtc_base/socket_factory.h" +#include "rtc_base/system/rtc_export.h" namespace rtc { class SocketFactory; -class BasicPacketSocketFactory : public PacketSocketFactory { +class RTC_EXPORT BasicPacketSocketFactory : public PacketSocketFactory { public: explicit BasicPacketSocketFactory(SocketFactory* socket_factory); ~BasicPacketSocketFactory() override; diff --git a/p2p/base/connection.h b/p2p/base/connection.h index c0a19b510f..4e6c7d91be 100644 --- a/p2p/base/connection.h +++ b/p2p/base/connection.h @@ -29,6 +29,7 @@ #include "rtc_base/network.h" #include "rtc_base/numerics/event_based_exponential_moving_average.h" #include "rtc_base/rate_tracker.h" +#include "rtc_base/system/rtc_export.h" #include "rtc_base/weak_ptr.h" namespace cricket { @@ -56,7 +57,7 @@ struct CandidatePair final : public CandidatePairInterface { // Represents a communication link between a port on the local client and a // port on the remote client. -class Connection : public CandidatePairInterface { +class RTC_EXPORT Connection : public CandidatePairInterface { public: struct SentPing { SentPing(absl::string_view id, int64_t sent_time, uint32_t nomination) diff --git a/p2p/base/p2p_constants.h b/p2p/base/p2p_constants.h index 07257d5e18..d51ee17a07 100644 --- a/p2p/base/p2p_constants.h +++ b/p2p/base/p2p_constants.h @@ -40,7 +40,7 @@ extern const size_t ICE_PWD_MAX_LENGTH; RTC_EXPORT extern const int ICE_CANDIDATE_COMPONENT_RTP; RTC_EXPORT extern const int ICE_CANDIDATE_COMPONENT_RTCP; -extern const int ICE_CANDIDATE_COMPONENT_DEFAULT; +RTC_EXPORT extern const int ICE_CANDIDATE_COMPONENT_DEFAULT; // RFC 4145, SDP setup attribute values. extern const char CONNECTIONROLE_ACTIVE_STR[]; diff --git a/p2p/base/port.h b/p2p/base/port.h index d746f3de02..31091eb273 100644 --- a/p2p/base/port.h +++ b/p2p/base/port.h @@ -176,7 +176,7 @@ typedef std::set ServerAddresses; // Represents a local communication mechanism that can be used to create // connections to similar mechanisms of the other client. Subclasses of this // one add support for specific mechanisms like local UDP ports. -class Port : public PortInterface, public sigslot::has_slots<> { +class RTC_EXPORT Port : public PortInterface, public sigslot::has_slots<> { public: // INIT: The state when a port is just created. // KEEP_ALIVE_UNTIL_PRUNED: A port should not be destroyed even if no diff --git a/p2p/base/stun_port.h b/p2p/base/stun_port.h index 13970070ed..380dbecd2d 100644 --- a/p2p/base/stun_port.h +++ b/p2p/base/stun_port.h @@ -22,6 +22,7 @@ #include "p2p/base/port.h" #include "p2p/base/stun_request.h" #include "rtc_base/async_packet_socket.h" +#include "rtc_base/system/rtc_export.h" namespace cricket { @@ -31,7 +32,7 @@ static const int INFINITE_LIFETIME = -1; static const int HIGH_COST_PORT_KEEPALIVE_LIFETIME = 2 * 60 * 1000; // Communicates using the address on the outside of a NAT. -class UDPPort : public Port { +class RTC_EXPORT UDPPort : public Port { public: static std::unique_ptr Create( rtc::Thread* thread, diff --git a/rtc_base/BUILD.gn b/rtc_base/BUILD.gn index 4a9a5463ed..7d236bc12c 100644 --- a/rtc_base/BUILD.gn +++ b/rtc_base/BUILD.gn @@ -839,7 +839,7 @@ rtc_library("net_helpers") { "net_helpers.cc", "net_helpers.h", ] - deps = [] + deps = [ "system:rtc_export" ] if (is_android) { deps += [ ":ifaddrs_android" ] } @@ -1389,6 +1389,7 @@ rtc_library("net_helper") { "net_helper.h", ] absl_deps = [ "//third_party/abseil-cpp/absl/strings" ] + deps = [ "system:rtc_export" ] } rtc_library("socket_adapters") { diff --git a/rtc_base/net_helper.h b/rtc_base/net_helper.h index 758c0faad9..2dce91196c 100644 --- a/rtc_base/net_helper.h +++ b/rtc_base/net_helper.h @@ -13,13 +13,14 @@ #include #include "absl/strings/string_view.h" +#include "rtc_base/system/rtc_export.h" // This header contains helper functions and constants used by different types // of transports. namespace cricket { -extern const char UDP_PROTOCOL_NAME[]; -extern const char TCP_PROTOCOL_NAME[]; +RTC_EXPORT extern const char UDP_PROTOCOL_NAME[]; +RTC_EXPORT extern const char TCP_PROTOCOL_NAME[]; extern const char SSLTCP_PROTOCOL_NAME[]; extern const char TLS_PROTOCOL_NAME[]; diff --git a/rtc_base/net_helpers.h b/rtc_base/net_helpers.h index 631c6348a7..478cec3eed 100644 --- a/rtc_base/net_helpers.h +++ b/rtc_base/net_helpers.h @@ -20,6 +20,7 @@ #endif #include "absl/strings/string_view.h" +#include "rtc_base/system/rtc_export.h" namespace rtc { @@ -28,8 +29,8 @@ namespace rtc { const char* inet_ntop(int af, const void* src, char* dst, socklen_t size); int inet_pton(int af, absl::string_view src, void* dst); -bool HasIPv4Enabled(); -bool HasIPv6Enabled(); +RTC_EXPORT bool HasIPv4Enabled(); +RTC_EXPORT bool HasIPv6Enabled(); } // namespace rtc