mirror of
https://github.com/mii443/libdatachannel.git
synced 2025-08-22 23:25:33 +00:00
Move RTC_CPP_EXPORT from log.hpp to include.hpp, remove RTC_CPP_EXPORT from /src classes, and add RTC_CPP_EXPORT to Description.
This commit is contained in:
@ -245,8 +245,8 @@ private:
|
|||||||
|
|
||||||
} // namespace rtc
|
} // namespace rtc
|
||||||
|
|
||||||
std::ostream &operator<<(std::ostream &out, const rtc::Description &description);
|
RTC_CPP_EXPORT std::ostream &operator<<(std::ostream &out, const rtc::Description &description);
|
||||||
std::ostream &operator<<(std::ostream &out, rtc::Description::Type type);
|
RTC_CPP_EXPORT std::ostream &operator<<(std::ostream &out, rtc::Description::Type type);
|
||||||
std::ostream &operator<<(std::ostream &out, rtc::Description::Role role);
|
RTC_CPP_EXPORT std::ostream &operator<<(std::ostream &out, rtc::Description::Role role);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -28,9 +28,12 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
#define RTC_CPP_EXPORT __declspec(dllexport)
|
||||||
#ifndef _WIN32_WINNT
|
#ifndef _WIN32_WINNT
|
||||||
#define _WIN32_WINNT 0x0602 // Windows 8
|
#define _WIN32_WINNT 0x0602 // Windows 8
|
||||||
#endif
|
#endif
|
||||||
|
#else
|
||||||
|
#define RTC_CPP_EXPORT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "log.hpp"
|
#include "log.hpp"
|
||||||
|
@ -35,11 +35,7 @@
|
|||||||
#pragma warning(pop)
|
#pragma warning(pop)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _WIN32
|
#include "include.hpp"
|
||||||
#define RTC_CPP_EXPORT __declspec(dllexport)
|
|
||||||
#else
|
|
||||||
#define RTC_CPP_EXPORT
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace rtc {
|
namespace rtc {
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
namespace rtc {
|
namespace rtc {
|
||||||
|
|
||||||
class RTC_CPP_EXPORT Certificate {
|
class Certificate {
|
||||||
public:
|
public:
|
||||||
Certificate(string crt_pem, string key_pem);
|
Certificate(string crt_pem, string key_pem);
|
||||||
|
|
||||||
@ -53,17 +53,17 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
#if USE_GNUTLS
|
#if USE_GNUTLS
|
||||||
RTC_CPP_EXPORT string make_fingerprint(gnutls_x509_crt_t crt);
|
string make_fingerprint(gnutls_x509_crt_t crt);
|
||||||
#else
|
#else
|
||||||
RTC_CPP_EXPORT string make_fingerprint(X509 *x509);
|
string make_fingerprint(X509 *x509);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
using certificate_ptr = std::shared_ptr<Certificate>;
|
using certificate_ptr = std::shared_ptr<Certificate>;
|
||||||
using future_certificate_ptr = std::shared_future<certificate_ptr>;
|
using future_certificate_ptr = std::shared_future<certificate_ptr>;
|
||||||
|
|
||||||
RTC_CPP_EXPORT future_certificate_ptr make_certificate(string commonName = "libdatachannel"); // cached
|
future_certificate_ptr make_certificate(string commonName = "libdatachannel"); // cached
|
||||||
|
|
||||||
RTC_CPP_EXPORT void CleanupCertificateCache();
|
void CleanupCertificateCache();
|
||||||
|
|
||||||
} // namespace rtc
|
} // namespace rtc
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
|
|
||||||
namespace rtc {
|
namespace rtc {
|
||||||
|
|
||||||
class RTC_CPP_EXPORT DtlsSrtpTransport final : public DtlsTransport {
|
class DtlsSrtpTransport final : public DtlsTransport {
|
||||||
public:
|
public:
|
||||||
static void Init();
|
static void Init();
|
||||||
static void Cleanup();
|
static void Cleanup();
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
|
|
||||||
namespace rtc {
|
namespace rtc {
|
||||||
|
|
||||||
class RTC_CPP_EXPORT IceTransport : public Transport {
|
class IceTransport : public Transport {
|
||||||
public:
|
public:
|
||||||
enum class GatheringState { New = 0, InProgress = 1, Complete = 2 };
|
enum class GatheringState { New = 0, InProgress = 1, Complete = 2 };
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
namespace rtc {
|
namespace rtc {
|
||||||
|
|
||||||
// Processed tasks in order by delegating them to the thread pool
|
// Processed tasks in order by delegating them to the thread pool
|
||||||
class RTC_CPP_EXPORT Processor final {
|
class Processor final {
|
||||||
public:
|
public:
|
||||||
Processor(size_t limit = 0);
|
Processor(size_t limit = 0);
|
||||||
~Processor();
|
~Processor();
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
|
|
||||||
namespace rtc {
|
namespace rtc {
|
||||||
|
|
||||||
class RTC_CPP_EXPORT SctpTransport final : public Transport {
|
class SctpTransport final : public Transport {
|
||||||
public:
|
public:
|
||||||
static void Init();
|
static void Init();
|
||||||
static void Cleanup();
|
static void Cleanup();
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
namespace rtc {
|
namespace rtc {
|
||||||
|
|
||||||
// Utility class to interrupt select()
|
// Utility class to interrupt select()
|
||||||
class RTC_CPP_EXPORT SelectInterrupter {
|
class SelectInterrupter {
|
||||||
public:
|
public:
|
||||||
SelectInterrupter();
|
SelectInterrupter();
|
||||||
~SelectInterrupter();
|
~SelectInterrupter();
|
||||||
@ -51,7 +51,7 @@ private:
|
|||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
class RTC_CPP_EXPORT TcpTransport : public Transport {
|
class TcpTransport : public Transport {
|
||||||
public:
|
public:
|
||||||
TcpTransport(const string &hostname, const string &service, state_callback callback);
|
TcpTransport(const string &hostname, const string &service, state_callback callback);
|
||||||
~TcpTransport();
|
~TcpTransport();
|
||||||
|
@ -37,7 +37,7 @@ namespace rtc {
|
|||||||
template <class F, class... Args>
|
template <class F, class... Args>
|
||||||
using invoke_future_t = std::future<std::invoke_result_t<std::decay_t<F>, std::decay_t<Args>...>>;
|
using invoke_future_t = std::future<std::invoke_result_t<std::decay_t<F>, std::decay_t<Args>...>>;
|
||||||
|
|
||||||
class RTC_CPP_EXPORT ThreadPool final {
|
class ThreadPool final {
|
||||||
public:
|
public:
|
||||||
static ThreadPool &Instance();
|
static ThreadPool &Instance();
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ namespace rtc {
|
|||||||
|
|
||||||
class TcpTransport;
|
class TcpTransport;
|
||||||
|
|
||||||
class RTC_CPP_EXPORT TlsTransport : public Transport {
|
class TlsTransport : public Transport {
|
||||||
public:
|
public:
|
||||||
static void Init();
|
static void Init();
|
||||||
static void Cleanup();
|
static void Cleanup();
|
||||||
|
@ -30,7 +30,7 @@ namespace rtc {
|
|||||||
|
|
||||||
using namespace std::placeholders;
|
using namespace std::placeholders;
|
||||||
|
|
||||||
class RTC_CPP_EXPORT Transport {
|
class Transport {
|
||||||
public:
|
public:
|
||||||
enum class State { Disconnected, Connecting, Connected, Completed, Failed };
|
enum class State { Disconnected, Connecting, Connected, Completed, Failed };
|
||||||
using state_callback = std::function<void(State state)>;
|
using state_callback = std::function<void(State state)>;
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
namespace rtc {
|
namespace rtc {
|
||||||
|
|
||||||
class RTC_CPP_EXPORT VerifiedTlsTransport final : public TlsTransport {
|
class VerifiedTlsTransport final : public TlsTransport {
|
||||||
public:
|
public:
|
||||||
VerifiedTlsTransport(std::shared_ptr<TcpTransport> lower, string host, state_callback callback);
|
VerifiedTlsTransport(std::shared_ptr<TcpTransport> lower, string host, state_callback callback);
|
||||||
~VerifiedTlsTransport();
|
~VerifiedTlsTransport();
|
||||||
|
@ -29,7 +29,7 @@ namespace rtc {
|
|||||||
class TcpTransport;
|
class TcpTransport;
|
||||||
class TlsTransport;
|
class TlsTransport;
|
||||||
|
|
||||||
class RTC_CPP_EXPORT WsTransport : public Transport {
|
class WsTransport : public Transport {
|
||||||
public:
|
public:
|
||||||
WsTransport(std::shared_ptr<Transport> lower, string host, string path,
|
WsTransport(std::shared_ptr<Transport> lower, string host, string path,
|
||||||
message_callback recvCallback, state_callback stateCallback);
|
message_callback recvCallback, state_callback stateCallback);
|
||||||
|
Reference in New Issue
Block a user