#ifndef RTC_GLOBAL_H
#define RTC_GLOBAL_H
#include "common.hpp"
#include <chrono>
#include <future>
#include <iostream>
namespace rtc {
enum class LogLevel { None = 0,
Fatal = 1,
Error = 2,
Warning = 3,
Info = 4,
Debug = 5,
Verbose = 6
};
typedef std::function<void(LogLevel level, string message)> LogCallback;
RTC_CPP_EXPORT void InitLogger(LogLevel level, LogCallback callback = nullptr);
RTC_CPP_EXPORT void Preload();
RTC_CPP_EXPORT std::shared_future<void> Cleanup();
struct SctpSettings {
optional<size_t> recvBufferSize; optional<size_t> sendBufferSize; optional<size_t> maxChunksOnQueue; optional<size_t> initialCongestionWindow; optional<size_t> maxBurst; optional<unsigned int> congestionControlModule; optional<std::chrono::milliseconds> delayedSackTime;
optional<std::chrono::milliseconds> minRetransmitTimeout;
optional<std::chrono::milliseconds> maxRetransmitTimeout;
optional<std::chrono::milliseconds> initialRetransmitTimeout;
optional<unsigned int> maxRetransmitAttempts;
optional<std::chrono::milliseconds> heartbeatInterval;
};
RTC_CPP_EXPORT void SetSctpSettings(SctpSettings s);
RTC_CPP_EXPORT std::ostream &operator<<(std::ostream &out, LogLevel level);
}
#endif