Add missing RTC_EXPORT for the component build.
Bug: webrtc:9419
Change-Id: I3225259fb4cc55e9820f590928795f4587f1e3cb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/153884
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29479}
diff --git a/rtc_base/BUILD.gn b/rtc_base/BUILD.gn
index 17cf3f5..564989a 100644
--- a/rtc_base/BUILD.gn
+++ b/rtc_base/BUILD.gn
@@ -58,6 +58,7 @@
"../api:array_view",
"../api:scoped_refptr",
"system:arch",
+ "system:rtc_export",
"system:unused",
"third_party/base64",
"//third_party/abseil-cpp/absl/types:optional",
@@ -311,6 +312,7 @@
deps = [
":safe_compare",
"system:inline",
+ "system:rtc_export",
"//third_party/abseil-cpp/absl/meta:type_traits",
"//third_party/abseil-cpp/absl/strings",
]
@@ -390,6 +392,7 @@
":checks",
":safe_conversions",
":stringutils",
+ "system:rtc_export",
]
libs = []
if (is_win) {
@@ -762,6 +765,7 @@
"../api:scoped_refptr",
"network:sent_packet",
"system:file_wrapper",
+ "system:rtc_export",
"third_party/base64",
"third_party/sigslot",
"//third_party/abseil-cpp/absl/algorithm:container",
diff --git a/rtc_base/async_packet_socket.h b/rtc_base/async_packet_socket.h
index 3afff3b..50c07e2 100644
--- a/rtc_base/async_packet_socket.h
+++ b/rtc_base/async_packet_socket.h
@@ -15,6 +15,7 @@
#include "rtc_base/dscp.h"
#include "rtc_base/network/sent_packet.h"
#include "rtc_base/socket.h"
+#include "rtc_base/system/rtc_export.h"
#include "rtc_base/third_party/sigslot/sigslot.h"
#include "rtc_base/time_utils.h"
@@ -36,7 +37,7 @@
// This structure holds meta information for the packet which is about to send
// over network.
-struct PacketOptions {
+struct RTC_EXPORT PacketOptions {
PacketOptions();
explicit PacketOptions(DiffServCodePoint dscp);
PacketOptions(const PacketOptions& other);
@@ -53,7 +54,7 @@
// Provides the ability to receive packets asynchronously. Sends are not
// buffered since it is acceptable to drop packets under high load.
-class AsyncPacketSocket : public sigslot::has_slots<> {
+class RTC_EXPORT AsyncPacketSocket : public sigslot::has_slots<> {
public:
enum State {
STATE_CLOSED,
diff --git a/rtc_base/async_resolver_interface.h b/rtc_base/async_resolver_interface.h
index 0f5e989..0d0bb7c 100644
--- a/rtc_base/async_resolver_interface.h
+++ b/rtc_base/async_resolver_interface.h
@@ -12,12 +12,13 @@
#define RTC_BASE_ASYNC_RESOLVER_INTERFACE_H_
#include "rtc_base/socket_address.h"
+#include "rtc_base/system/rtc_export.h"
#include "rtc_base/third_party/sigslot/sigslot.h"
namespace rtc {
// This interface defines the methods to resolve the address asynchronously.
-class AsyncResolverInterface {
+class RTC_EXPORT AsyncResolverInterface {
public:
AsyncResolverInterface();
virtual ~AsyncResolverInterface();
diff --git a/rtc_base/checks.h b/rtc_base/checks.h
index 4e81d31..17d32cb 100644
--- a/rtc_base/checks.h
+++ b/rtc_base/checks.h
@@ -46,6 +46,7 @@
#include "absl/strings/string_view.h"
#include "rtc_base/numerics/safe_compare.h"
#include "rtc_base/system/inline.h"
+#include "rtc_base/system/rtc_export.h"
// The macros here print a message to stderr and abort under various
// conditions. All will accept additional stream messages. For example:
@@ -108,11 +109,11 @@
kCheckOp,
};
-RTC_NORETURN void FatalLog(const char* file,
- int line,
- const char* message,
- const CheckArgType* fmt,
- ...);
+RTC_NORETURN RTC_EXPORT void FatalLog(const char* file,
+ int line,
+ const char* message,
+ const CheckArgType* fmt,
+ ...);
// Wrapper for log arguments. Only ever make values of this type with the
// MakeVal() functions.
diff --git a/rtc_base/copy_on_write_buffer.h b/rtc_base/copy_on_write_buffer.h
index ea4868f..68c6ad5 100644
--- a/rtc_base/copy_on_write_buffer.h
+++ b/rtc_base/copy_on_write_buffer.h
@@ -23,10 +23,11 @@
#include "rtc_base/buffer.h"
#include "rtc_base/checks.h"
#include "rtc_base/ref_counted_object.h"
+#include "rtc_base/system/rtc_export.h"
namespace rtc {
-class CopyOnWriteBuffer {
+class RTC_EXPORT CopyOnWriteBuffer {
public:
// An empty buffer.
CopyOnWriteBuffer();
diff --git a/rtc_base/data_rate_limiter.h b/rtc_base/data_rate_limiter.h
index d290816..502a2f7 100644
--- a/rtc_base/data_rate_limiter.h
+++ b/rtc_base/data_rate_limiter.h
@@ -13,6 +13,8 @@
#include <stddef.h>
+#include "rtc_base/system/rtc_export.h"
+
namespace rtc {
// Limits the rate of use to a certain maximum quantity per period of
@@ -21,7 +23,7 @@
// It's implemented like a diet plan: You have so many calories per
// day. If you hit the limit, you can't eat any more until the next
// day.
-class DataRateLimiter {
+class RTC_EXPORT DataRateLimiter {
public:
// For example, 100kb per second.
DataRateLimiter(size_t max, double period)
diff --git a/rtc_base/helpers.h b/rtc_base/helpers.h
index 29c4ab0..2fd2fc5 100644
--- a/rtc_base/helpers.h
+++ b/rtc_base/helpers.h
@@ -16,6 +16,8 @@
#include <string>
+#include "rtc_base/system/rtc_export.h"
+
namespace rtc {
// For testing, we can return predictable data.
@@ -27,21 +29,21 @@
// Generates a (cryptographically) random string of the given length.
// We generate base64 values so that they will be printable.
-std::string CreateRandomString(size_t length);
+RTC_EXPORT std::string CreateRandomString(size_t length);
// Generates a (cryptographically) random string of the given length.
// We generate base64 values so that they will be printable.
// Return false if the random number generator failed.
-bool CreateRandomString(size_t length, std::string* str);
+RTC_EXPORT bool CreateRandomString(size_t length, std::string* str);
// Generates a (cryptographically) random string of the given length,
// with characters from the given table. Return false if the random
// number generator failed.
// For ease of implementation, the function requires that the table
// size evenly divide 256; otherwise, it returns false.
-bool CreateRandomString(size_t length,
- const std::string& table,
- std::string* str);
+RTC_EXPORT bool CreateRandomString(size_t length,
+ const std::string& table,
+ std::string* str);
// Generates (cryptographically) random data of the given length.
// Return false if the random number generator failed.
@@ -54,7 +56,7 @@
uint32_t CreateRandomId();
// Generates a 64 bit random id.
-uint64_t CreateRandomId64();
+RTC_EXPORT uint64_t CreateRandomId64();
// Generates a random id > 0.
uint32_t CreateRandomNonZeroId();
diff --git a/rtc_base/ip_address.h b/rtc_base/ip_address.h
index 2a52e1a..3f63a91 100644
--- a/rtc_base/ip_address.h
+++ b/rtc_base/ip_address.h
@@ -29,6 +29,7 @@
#if defined(WEBRTC_WIN)
#include "rtc_base/win32.h"
#endif
+#include "rtc_base/system/rtc_export.h"
namespace rtc {
@@ -46,7 +47,7 @@
};
// Version-agnostic IP address class, wraps a union of in_addr and in6_addr.
-class IPAddress {
+class RTC_EXPORT IPAddress {
public:
IPAddress() : family_(AF_UNSPEC) { ::memset(&u_, 0, sizeof(u_)); }
@@ -123,7 +124,7 @@
// IP class which could represent IPv6 address flags which is only
// meaningful in IPv6 case.
-class InterfaceAddress : public IPAddress {
+class RTC_EXPORT InterfaceAddress : public IPAddress {
public:
InterfaceAddress() : ipv6_flags_(IPV6_ADDRESS_FLAG_NONE) {}
@@ -150,8 +151,10 @@
};
bool IPFromAddrInfo(struct addrinfo* info, IPAddress* out);
-bool IPFromString(const std::string& str, IPAddress* out);
-bool IPFromString(const std::string& str, int flags, InterfaceAddress* out);
+RTC_EXPORT bool IPFromString(const std::string& str, IPAddress* out);
+RTC_EXPORT bool IPFromString(const std::string& str,
+ int flags,
+ InterfaceAddress* out);
bool IPIsAny(const IPAddress& ip);
bool IPIsLoopback(const IPAddress& ip);
bool IPIsLinkLocal(const IPAddress& ip);
@@ -164,14 +167,14 @@
// Identify if an IP is "private", that is a loopback
// or an address belonging to a link-local, a private network or a shared
// network.
-bool IPIsPrivate(const IPAddress& ip);
+RTC_EXPORT bool IPIsPrivate(const IPAddress& ip);
bool IPIsUnspec(const IPAddress& ip);
size_t HashIP(const IPAddress& ip);
// These are only really applicable for IPv6 addresses.
bool IPIs6Bone(const IPAddress& ip);
bool IPIs6To4(const IPAddress& ip);
-bool IPIsMacBased(const IPAddress& ip);
+RTC_EXPORT bool IPIsMacBased(const IPAddress& ip);
bool IPIsSiteLocal(const IPAddress& ip);
bool IPIsTeredo(const IPAddress& ip);
bool IPIsULA(const IPAddress& ip);
@@ -182,7 +185,7 @@
int IPAddressPrecedence(const IPAddress& ip);
// Returns 'ip' truncated to be 'length' bits long.
-IPAddress TruncateIP(const IPAddress& ip, int length);
+RTC_EXPORT IPAddress TruncateIP(const IPAddress& ip, int length);
IPAddress GetLoopbackIP(int family);
IPAddress GetAnyIP(int family);
diff --git a/rtc_base/location.h b/rtc_base/location.h
index 513bc26..7590642 100644
--- a/rtc_base/location.h
+++ b/rtc_base/location.h
@@ -14,6 +14,7 @@
#include <string>
#include "rtc_base/stringize_macros.h"
+#include "rtc_base/system/rtc_export.h"
namespace rtc {
@@ -21,7 +22,7 @@
// significantly brought to life.
// This is a stripped down version of:
// https://code.google.com/p/chromium/codesearch#chromium/src/base/location.h
-class Location {
+class RTC_EXPORT Location {
public:
// Constructor should be called with a long-lived char*, such as __FILE__.
// It assumes the provided value will persist as a global constant, and it
diff --git a/rtc_base/message_handler.h b/rtc_base/message_handler.h
index 015255e..9836594 100644
--- a/rtc_base/message_handler.h
+++ b/rtc_base/message_handler.h
@@ -14,6 +14,7 @@
#include <utility>
#include "rtc_base/constructor_magic.h"
+#include "rtc_base/system/rtc_export.h"
namespace rtc {
@@ -21,7 +22,7 @@
// Messages get dispatched to a MessageHandler
-class MessageHandler {
+class RTC_EXPORT MessageHandler {
public:
virtual ~MessageHandler();
virtual void OnMessage(Message* msg) = 0;
diff --git a/rtc_base/message_queue.h b/rtc_base/message_queue.h
index 5a6bd0a..bb58ebc 100644
--- a/rtc_base/message_queue.h
+++ b/rtc_base/message_queue.h
@@ -25,6 +25,7 @@
#include "rtc_base/location.h"
#include "rtc_base/message_handler.h"
#include "rtc_base/socket_server.h"
+#include "rtc_base/system/rtc_export.h"
#include "rtc_base/third_party/sigslot/sigslot.h"
#include "rtc_base/thread_annotations.h"
@@ -35,7 +36,7 @@
// MessageQueueManager does cleanup of of message queues
-class MessageQueueManager {
+class RTC_EXPORT MessageQueueManager {
public:
static void Add(MessageQueue* message_queue);
static void Remove(MessageQueue* message_queue);
@@ -188,7 +189,7 @@
Message msg_;
};
-class MessageQueue {
+class RTC_EXPORT MessageQueue {
public:
static const int kForever = -1;
diff --git a/rtc_base/net_helpers.h b/rtc_base/net_helpers.h
index 6f75318..1e06940 100644
--- a/rtc_base/net_helpers.h
+++ b/rtc_base/net_helpers.h
@@ -23,12 +23,14 @@
#include "rtc_base/ip_address.h"
#include "rtc_base/signal_thread.h"
#include "rtc_base/socket_address.h"
+#include "rtc_base/system/rtc_export.h"
namespace rtc {
// AsyncResolver will perform async DNS resolution, signaling the result on
// the SignalDone from AsyncResolverInterface when the operation completes.
-class AsyncResolver : public SignalThread, public AsyncResolverInterface {
+class RTC_EXPORT AsyncResolver : public SignalThread,
+ public AsyncResolverInterface {
public:
AsyncResolver();
~AsyncResolver() override;
diff --git a/rtc_base/network.h b/rtc_base/network.h
index d202f6e..a8608d9 100644
--- a/rtc_base/network.h
+++ b/rtc_base/network.h
@@ -23,6 +23,7 @@
#include "rtc_base/mdns_responder_interface.h"
#include "rtc_base/message_handler.h"
#include "rtc_base/network_monitor.h"
+#include "rtc_base/system/rtc_export.h"
#include "rtc_base/third_party/sigslot/sigslot.h"
#if defined(WEBRTC_POSIX)
@@ -52,7 +53,7 @@
// Utility function that attempts to determine an adapter type by an interface
// name (e.g., "wlan0"). Can be used by NetworkManager subclasses when other
// mechanisms fail to determine the type.
-AdapterType GetAdapterTypeFromName(const char* network_name);
+RTC_EXPORT AdapterType GetAdapterTypeFromName(const char* network_name);
class DefaultLocalAddressProvider {
public:
@@ -84,8 +85,8 @@
//
// This allows constructing a NetworkManager subclass on one thread and
// passing it into an object that uses it on a different thread.
-class NetworkManager : public DefaultLocalAddressProvider,
- public MdnsResponderProvider {
+class RTC_EXPORT NetworkManager : public DefaultLocalAddressProvider,
+ public MdnsResponderProvider {
public:
typedef std::vector<Network*> NetworkList;
@@ -157,7 +158,7 @@
};
// Base class for NetworkManager implementations.
-class NetworkManagerBase : public NetworkManager {
+class RTC_EXPORT NetworkManagerBase : public NetworkManager {
public:
NetworkManagerBase();
~NetworkManagerBase() override;
@@ -215,9 +216,9 @@
// Basic implementation of the NetworkManager interface that gets list
// of networks using OS APIs.
-class BasicNetworkManager : public NetworkManagerBase,
- public MessageHandler,
- public sigslot::has_slots<> {
+class RTC_EXPORT BasicNetworkManager : public NetworkManagerBase,
+ public MessageHandler,
+ public sigslot::has_slots<> {
public:
BasicNetworkManager();
~BasicNetworkManager() override;
@@ -290,7 +291,7 @@
};
// Represents a Unix-type network interface, with a name and single address.
-class Network {
+class RTC_EXPORT Network {
public:
Network(const std::string& name,
const std::string& description,
diff --git a/rtc_base/network/BUILD.gn b/rtc_base/network/BUILD.gn
index 0fbdbb1..d396e8c 100644
--- a/rtc_base/network/BUILD.gn
+++ b/rtc_base/network/BUILD.gn
@@ -14,6 +14,7 @@
"sent_packet.h",
]
deps = [
+ "../system:rtc_export",
"//third_party/abseil-cpp/absl/types:optional",
]
}
diff --git a/rtc_base/network/sent_packet.h b/rtc_base/network/sent_packet.h
index 0cad31c..457fb96 100644
--- a/rtc_base/network/sent_packet.h
+++ b/rtc_base/network/sent_packet.h
@@ -15,6 +15,7 @@
#include <stdint.h>
#include "absl/types/optional.h"
+#include "rtc_base/system/rtc_export.h"
namespace rtc {
@@ -35,7 +36,7 @@
kTls,
};
-struct PacketInfo {
+struct RTC_EXPORT PacketInfo {
PacketInfo();
PacketInfo(const PacketInfo& info);
~PacketInfo();
@@ -51,7 +52,7 @@
size_t ip_overhead_bytes = 0;
};
-struct SentPacket {
+struct RTC_EXPORT SentPacket {
SentPacket();
SentPacket(int64_t packet_id, int64_t send_time_ms);
SentPacket(int64_t packet_id,
diff --git a/rtc_base/physical_socket_server.h b/rtc_base/physical_socket_server.h
index b2dfb3f..e85b2b0 100644
--- a/rtc_base/physical_socket_server.h
+++ b/rtc_base/physical_socket_server.h
@@ -23,6 +23,7 @@
#include "rtc_base/critical_section.h"
#include "rtc_base/net_helpers.h"
#include "rtc_base/socket_server.h"
+#include "rtc_base/system/rtc_export.h"
#if defined(WEBRTC_POSIX)
typedef int SOCKET;
@@ -61,7 +62,7 @@
};
// A socket server that provides the real sockets of the underlying OS.
-class PhysicalSocketServer : public SocketServer {
+class RTC_EXPORT PhysicalSocketServer : public SocketServer {
public:
PhysicalSocketServer();
~PhysicalSocketServer() override;
diff --git a/rtc_base/rtc_certificate.h b/rtc_base/rtc_certificate.h
index 0a744c4..102385e 100644
--- a/rtc_base/rtc_certificate.h
+++ b/rtc_base/rtc_certificate.h
@@ -18,6 +18,7 @@
#include "api/scoped_refptr.h"
#include "rtc_base/ref_count.h"
+#include "rtc_base/system/rtc_export.h"
namespace rtc {
@@ -48,7 +49,7 @@
// A thin abstraction layer between "lower level crypto stuff" like
// SSLCertificate and WebRTC usage. Takes ownership of some lower level objects,
// reference counting protects these from premature destruction.
-class RTCCertificate : public RefCountInterface {
+class RTC_EXPORT RTCCertificate : public RefCountInterface {
public:
// Takes ownership of |identity|.
static scoped_refptr<RTCCertificate> Create(
diff --git a/rtc_base/rtc_certificate_generator.h b/rtc_base/rtc_certificate_generator.h
index 8cabca4..7c91163 100644
--- a/rtc_base/rtc_certificate_generator.h
+++ b/rtc_base/rtc_certificate_generator.h
@@ -18,6 +18,7 @@
#include "rtc_base/ref_count.h"
#include "rtc_base/rtc_certificate.h"
#include "rtc_base/ssl_identity.h"
+#include "rtc_base/system/rtc_export.h"
#include "rtc_base/thread.h"
namespace rtc {
@@ -53,7 +54,8 @@
// The static function |GenerateCertificate| generates a certificate on the
// current thread. The |RTCCertificateGenerator| instance generates certificates
// asynchronously on the worker thread with |GenerateCertificateAsync|.
-class RTCCertificateGenerator : public RTCCertificateGeneratorInterface {
+class RTC_EXPORT RTCCertificateGenerator
+ : public RTCCertificateGeneratorInterface {
public:
// Generates a certificate on the current thread. Returns null on failure.
// If |expires_ms| is specified, the certificate will expire in approximately
diff --git a/rtc_base/socket_address.h b/rtc_base/socket_address.h
index 342f5de..6ee3d37 100644
--- a/rtc_base/socket_address.h
+++ b/rtc_base/socket_address.h
@@ -16,6 +16,7 @@
#include <ostream> // no-presubmit-check TODO(webrtc:8982)
#endif // UNIT_TEST
#include "rtc_base/ip_address.h"
+#include "rtc_base/system/rtc_export.h"
#undef SetPort
@@ -25,7 +26,7 @@
namespace rtc {
// Records an IP address and port.
-class SocketAddress {
+class RTC_EXPORT SocketAddress {
public:
// Creates a nil address.
SocketAddress();
@@ -193,8 +194,8 @@
bool literal_; // Indicates that 'hostname_' contains a literal IP string.
};
-bool SocketAddressFromSockAddrStorage(const sockaddr_storage& saddr,
- SocketAddress* out);
+RTC_EXPORT bool SocketAddressFromSockAddrStorage(const sockaddr_storage& saddr,
+ SocketAddress* out);
SocketAddress EmptySocketAddressWithFamily(int family);
} // namespace rtc
diff --git a/rtc_base/ssl_adapter.h b/rtc_base/ssl_adapter.h
index 240899f..e0ed81e 100644
--- a/rtc_base/ssl_adapter.h
+++ b/rtc_base/ssl_adapter.h
@@ -18,6 +18,7 @@
#include "rtc_base/ssl_certificate.h"
#include "rtc_base/ssl_identity.h"
#include "rtc_base/ssl_stream_adapter.h"
+#include "rtc_base/system/rtc_export.h"
namespace rtc {
@@ -96,10 +97,10 @@
// Call this on the main thread, before using SSL.
// Call CleanupSSL when finished with SSL.
-bool InitializeSSL();
+RTC_EXPORT bool InitializeSSL();
// Call to cleanup additional threads, and also the main thread.
-bool CleanupSSL();
+RTC_EXPORT bool CleanupSSL();
} // namespace rtc
diff --git a/rtc_base/ssl_certificate.h b/rtc_base/ssl_certificate.h
index fad1404..3b3f24f 100644
--- a/rtc_base/ssl_certificate.h
+++ b/rtc_base/ssl_certificate.h
@@ -23,10 +23,11 @@
#include "rtc_base/buffer.h"
#include "rtc_base/constructor_magic.h"
+#include "rtc_base/system/rtc_export.h"
namespace rtc {
-struct SSLCertificateStats {
+struct RTC_EXPORT SSLCertificateStats {
SSLCertificateStats(std::string&& fingerprint,
std::string&& fingerprint_algorithm,
std::string&& base64_certificate,
@@ -46,7 +47,7 @@
// The SSLCertificate object is pretty much immutable once created.
// (The OpenSSL implementation only does reference counting and
// possibly caching of intermediate results.)
-class SSLCertificate {
+class RTC_EXPORT SSLCertificate {
public:
// Parses and builds a certificate from a PEM encoded string.
// Returns null on failure.
@@ -90,7 +91,7 @@
// SSLCertChain is a simple wrapper for a vector of SSLCertificates. It serves
// primarily to ensure proper memory management (especially deletion) of the
// SSLCertificate pointers.
-class SSLCertChain final {
+class RTC_EXPORT SSLCertChain final {
public:
explicit SSLCertChain(std::unique_ptr<SSLCertificate> single_cert);
explicit SSLCertChain(std::vector<std::unique_ptr<SSLCertificate>> certs);
diff --git a/rtc_base/ssl_fingerprint.h b/rtc_base/ssl_fingerprint.h
index f4037f7..d65d665 100644
--- a/rtc_base/ssl_fingerprint.h
+++ b/rtc_base/ssl_fingerprint.h
@@ -16,6 +16,7 @@
#include <string>
#include "rtc_base/copy_on_write_buffer.h"
+#include "rtc_base/system/rtc_export.h"
namespace rtc {
@@ -23,7 +24,7 @@
class SSLCertificate;
class SSLIdentity;
-struct SSLFingerprint {
+struct RTC_EXPORT SSLFingerprint {
// TODO(steveanton): Remove once downstream projects have moved off of this.
static SSLFingerprint* Create(const std::string& algorithm,
const rtc::SSLIdentity* identity);
diff --git a/rtc_base/ssl_identity.h b/rtc_base/ssl_identity.h
index c013a89..30e456b 100644
--- a/rtc_base/ssl_identity.h
+++ b/rtc_base/ssl_identity.h
@@ -17,6 +17,8 @@
#include <ctime>
#include <string>
+#include "rtc_base/system/rtc_export.h"
+
namespace rtc {
class SSLCertChain;
@@ -46,7 +48,7 @@
enum ECCurve { EC_NIST_P256, /* EC_FANCY, */ EC_LAST };
-class KeyParams {
+class RTC_EXPORT KeyParams {
public:
// Generate a KeyParams object from a simple KeyType, using default params.
explicit KeyParams(KeyType key_type = KT_DEFAULT);
@@ -95,7 +97,7 @@
// Our identity in an SSL negotiation: a keypair and certificate (both
// with the same public key).
// This too is pretty much immutable once created.
-class SSLIdentity {
+class RTC_EXPORT SSLIdentity {
public:
// Generates an identity (keypair and self-signed certificate). If
// |common_name| is non-empty, it will be used for the certificate's subject
diff --git a/rtc_base/stream.h b/rtc_base/stream.h
index 505ec8e..9147dad 100644
--- a/rtc_base/stream.h
+++ b/rtc_base/stream.h
@@ -18,6 +18,7 @@
#include "rtc_base/critical_section.h"
#include "rtc_base/message_handler.h"
#include "rtc_base/message_queue.h"
+#include "rtc_base/system/rtc_export.h"
#include "rtc_base/third_party/sigslot/sigslot.h"
namespace rtc {
@@ -55,7 +56,7 @@
StreamEventData(int ev, int er) : events(ev), error(er) {}
};
-class StreamInterface : public MessageHandler {
+class RTC_EXPORT StreamInterface : public MessageHandler {
public:
enum { MSG_POST_EVENT = 0xF1F1, MSG_MAX = MSG_POST_EVENT };
diff --git a/rtc_base/synchronization/BUILD.gn b/rtc_base/synchronization/BUILD.gn
index 061d8a2..beee9b6 100644
--- a/rtc_base/synchronization/BUILD.gn
+++ b/rtc_base/synchronization/BUILD.gn
@@ -47,6 +47,7 @@
"..:macromagic",
"..:platform_thread_types",
"../../api/task_queue",
+ "../system:rtc_export",
]
}
diff --git a/rtc_base/synchronization/sequence_checker.h b/rtc_base/synchronization/sequence_checker.h
index 910c99d..fe644fa 100644
--- a/rtc_base/synchronization/sequence_checker.h
+++ b/rtc_base/synchronization/sequence_checker.h
@@ -13,6 +13,7 @@
#include "api/task_queue/task_queue_base.h"
#include "rtc_base/critical_section.h"
#include "rtc_base/platform_thread_types.h"
+#include "rtc_base/system/rtc_export.h"
#include "rtc_base/thread_annotations.h"
namespace webrtc {
@@ -22,7 +23,7 @@
//
// Note: You should almost always use the SequenceChecker class to get the
// right version for your build configuration.
-class SequenceCheckerImpl {
+class RTC_EXPORT SequenceCheckerImpl {
public:
SequenceCheckerImpl();
~SequenceCheckerImpl();
diff --git a/rtc_base/third_party/base64/BUILD.gn b/rtc_base/third_party/base64/BUILD.gn
index dca47e0..022f509 100644
--- a/rtc_base/third_party/base64/BUILD.gn
+++ b/rtc_base/third_party/base64/BUILD.gn
@@ -14,4 +14,7 @@
"base64.cc",
"base64.h",
]
+ deps = [
+ "../../system:rtc_export",
+ ]
}
diff --git a/rtc_base/third_party/base64/base64.h b/rtc_base/third_party/base64/base64.h
index ba26329..7a936f2 100644
--- a/rtc_base/third_party/base64/base64.h
+++ b/rtc_base/third_party/base64/base64.h
@@ -15,6 +15,8 @@
#include <string>
#include <vector>
+#include "rtc_base/system/rtc_export.h"
+
namespace rtc {
class Base64 {
@@ -56,14 +58,14 @@
// encoded characters.
static bool IsBase64Encoded(const std::string& str);
- static void EncodeFromArray(const void* data,
- size_t len,
- std::string* result);
- static bool DecodeFromArray(const char* data,
- size_t len,
- DecodeFlags flags,
- std::string* result,
- size_t* data_used);
+ RTC_EXPORT static void EncodeFromArray(const void* data,
+ size_t len,
+ std::string* result);
+ RTC_EXPORT static bool DecodeFromArray(const char* data,
+ size_t len,
+ DecodeFlags flags,
+ std::string* result,
+ size_t* data_used);
static bool DecodeFromArray(const char* data,
size_t len,
DecodeFlags flags,
diff --git a/rtc_base/thread.h b/rtc_base/thread.h
index 58df253..01a3917 100644
--- a/rtc_base/thread.h
+++ b/rtc_base/thread.h
@@ -27,6 +27,7 @@
#include "rtc_base/message_queue.h"
#include "rtc_base/platform_thread_types.h"
#include "rtc_base/socket_server.h"
+#include "rtc_base/system/rtc_export.h"
#include "rtc_base/thread_annotations.h"
#if defined(WEBRTC_WIN)
@@ -77,7 +78,7 @@
} // namespace rtc_thread_internal
-class ThreadManager {
+class RTC_EXPORT ThreadManager {
public:
static const int kForever = -1;
@@ -132,7 +133,7 @@
// WARNING! SUBCLASSES MUST CALL Stop() IN THEIR DESTRUCTORS! See ~Thread().
-class RTC_LOCKABLE Thread : public MessageQueue {
+class RTC_EXPORT RTC_LOCKABLE Thread : public MessageQueue {
public:
explicit Thread(SocketServer* ss);
explicit Thread(std::unique_ptr<SocketServer> ss);
diff --git a/rtc_base/time_utils.h b/rtc_base/time_utils.h
index 7862959..ef54c35 100644
--- a/rtc_base/time_utils.h
+++ b/rtc_base/time_utils.h
@@ -18,6 +18,7 @@
#include "rtc_base/checks.h"
#include "rtc_base/strings/string_builder.h"
+#include "rtc_base/system/rtc_export.h"
namespace rtc {
@@ -54,10 +55,10 @@
// TODO(deadbeef): Instead of having functions that access this global
// ClockInterface, we may want to pass the ClockInterface into everything
// that uses it, eliminating the need for a global variable and this function.
-ClockInterface* SetClockForTesting(ClockInterface* clock);
+RTC_EXPORT ClockInterface* SetClockForTesting(ClockInterface* clock);
// Returns previously set clock, or nullptr if no custom clock is being used.
-ClockInterface* GetClockForTesting();
+RTC_EXPORT ClockInterface* GetClockForTesting();
#if defined(WINUWP)
// Synchronizes the current clock based upon an NTP server's epoch in
@@ -74,17 +75,17 @@
uint32_t Time32();
// Returns the current time in milliseconds in 64 bits.
-int64_t TimeMillis();
+RTC_EXPORT int64_t TimeMillis();
// Deprecated. Do not use this in any new code.
inline int64_t Time() {
return TimeMillis();
}
// Returns the current time in microseconds.
-int64_t TimeMicros();
+RTC_EXPORT int64_t TimeMicros();
// Returns the current time in nanoseconds.
-int64_t TimeNanos();
+RTC_EXPORT int64_t TimeNanos();
// Returns a future timestamp, 'elapsed' milliseconds from now.
int64_t TimeAfter(int64_t elapsed);
diff --git a/rtc_base/timestamp_aligner.h b/rtc_base/timestamp_aligner.h
index 2146880..151bcdc 100644
--- a/rtc_base/timestamp_aligner.h
+++ b/rtc_base/timestamp_aligner.h
@@ -14,6 +14,7 @@
#include <stdint.h>
#include "rtc_base/constructor_magic.h"
+#include "rtc_base/system/rtc_export.h"
namespace rtc {
@@ -28,7 +29,7 @@
// This class is not thread safe, so all calls to it must be synchronized
// externally.
-class TimestampAligner {
+class RTC_EXPORT TimestampAligner {
public:
TimestampAligner();
~TimestampAligner();