mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-20 09:07:52 +01:00
Remove RTC_DISALLOW_COPY_AND_ASSIGN from rtc_base/
Bug: webrtc:13555, webrtc:13082 Change-Id: I406b7f04497562866ea3329e97c5adc96e927b6f Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/245680 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Reviewed-by: Artem Titov <titovartem@webrtc.org> Commit-Queue: (Daniel.L) Byoungchan Lee <daniel.l@hpcnt.com> Cr-Commit-Position: refs/heads/main@{#35691}
This commit is contained in:
parent
ca15fcd37e
commit
14af7622a7
43 changed files with 203 additions and 151 deletions
|
@ -18,7 +18,6 @@
|
||||||
#include "absl/base/attributes.h"
|
#include "absl/base/attributes.h"
|
||||||
#include "api/scoped_refptr.h"
|
#include "api/scoped_refptr.h"
|
||||||
#include "rtc_base/async_invoker_inl.h"
|
#include "rtc_base/async_invoker_inl.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
#include "rtc_base/event.h"
|
#include "rtc_base/event.h"
|
||||||
#include "rtc_base/ref_counted_object.h"
|
#include "rtc_base/ref_counted_object.h"
|
||||||
#include "rtc_base/third_party/sigslot/sigslot.h"
|
#include "rtc_base/third_party/sigslot/sigslot.h"
|
||||||
|
@ -94,6 +93,9 @@ class DEPRECATED_AsyncInvoker : public MessageHandlerAutoCleanup {
|
||||||
DEPRECATED_AsyncInvoker();
|
DEPRECATED_AsyncInvoker();
|
||||||
~DEPRECATED_AsyncInvoker() override;
|
~DEPRECATED_AsyncInvoker() override;
|
||||||
|
|
||||||
|
DEPRECATED_AsyncInvoker(const DEPRECATED_AsyncInvoker&) = delete;
|
||||||
|
DEPRECATED_AsyncInvoker& operator=(const DEPRECATED_AsyncInvoker&) = delete;
|
||||||
|
|
||||||
// Call `functor` asynchronously on `thread`, with no callback upon
|
// Call `functor` asynchronously on `thread`, with no callback upon
|
||||||
// completion. Returns immediately.
|
// completion. Returns immediately.
|
||||||
template <class ReturnT, class FunctorT>
|
template <class ReturnT, class FunctorT>
|
||||||
|
@ -159,8 +161,6 @@ class DEPRECATED_AsyncInvoker : public MessageHandlerAutoCleanup {
|
||||||
std::atomic<bool> destroying_;
|
std::atomic<bool> destroying_;
|
||||||
|
|
||||||
friend class AsyncClosure;
|
friend class AsyncClosure;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(DEPRECATED_AsyncInvoker);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace rtc
|
} // namespace rtc
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
#include "rtc_base/dscp.h"
|
#include "rtc_base/dscp.h"
|
||||||
#include "rtc_base/network/sent_packet.h"
|
#include "rtc_base/network/sent_packet.h"
|
||||||
#include "rtc_base/socket.h"
|
#include "rtc_base/socket.h"
|
||||||
|
@ -69,6 +68,9 @@ class RTC_EXPORT AsyncPacketSocket : public sigslot::has_slots<> {
|
||||||
AsyncPacketSocket();
|
AsyncPacketSocket();
|
||||||
~AsyncPacketSocket() override;
|
~AsyncPacketSocket() override;
|
||||||
|
|
||||||
|
AsyncPacketSocket(const AsyncPacketSocket&) = delete;
|
||||||
|
AsyncPacketSocket& operator=(const AsyncPacketSocket&) = delete;
|
||||||
|
|
||||||
// Returns current local address. Address may be set to null if the
|
// Returns current local address. Address may be set to null if the
|
||||||
// socket is not bound yet (GetState() returns STATE_BINDING).
|
// socket is not bound yet (GetState() returns STATE_BINDING).
|
||||||
virtual SocketAddress GetLocalAddress() const = 0;
|
virtual SocketAddress GetLocalAddress() const = 0;
|
||||||
|
@ -127,9 +129,6 @@ class RTC_EXPORT AsyncPacketSocket : public sigslot::has_slots<> {
|
||||||
// Emitted for client TCP sockets when state is changed from
|
// Emitted for client TCP sockets when state is changed from
|
||||||
// CONNECTED to CLOSED.
|
// CONNECTED to CLOSED.
|
||||||
sigslot::signal2<AsyncPacketSocket*, int> SignalClose;
|
sigslot::signal2<AsyncPacketSocket*, int> SignalClose;
|
||||||
|
|
||||||
private:
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(AsyncPacketSocket);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Listen socket, producing an AsyncPacketSocket when a peer connects.
|
// Listen socket, producing an AsyncPacketSocket when a peer connects.
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
|
|
||||||
#include "rtc_base/async_packet_socket.h"
|
#include "rtc_base/async_packet_socket.h"
|
||||||
#include "rtc_base/buffer.h"
|
#include "rtc_base/buffer.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
#include "rtc_base/socket.h"
|
#include "rtc_base/socket.h"
|
||||||
#include "rtc_base/socket_address.h"
|
#include "rtc_base/socket_address.h"
|
||||||
|
|
||||||
|
@ -31,6 +30,9 @@ class AsyncTCPSocketBase : public AsyncPacketSocket {
|
||||||
AsyncTCPSocketBase(Socket* socket, size_t max_packet_size);
|
AsyncTCPSocketBase(Socket* socket, size_t max_packet_size);
|
||||||
~AsyncTCPSocketBase() override;
|
~AsyncTCPSocketBase() override;
|
||||||
|
|
||||||
|
AsyncTCPSocketBase(const AsyncTCPSocketBase&) = delete;
|
||||||
|
AsyncTCPSocketBase& operator=(const AsyncTCPSocketBase&) = delete;
|
||||||
|
|
||||||
// Pure virtual methods to send and recv data.
|
// Pure virtual methods to send and recv data.
|
||||||
int Send(const void* pv,
|
int Send(const void* pv,
|
||||||
size_t cb,
|
size_t cb,
|
||||||
|
@ -78,8 +80,6 @@ class AsyncTCPSocketBase : public AsyncPacketSocket {
|
||||||
Buffer outbuf_;
|
Buffer outbuf_;
|
||||||
size_t max_insize_;
|
size_t max_insize_;
|
||||||
size_t max_outsize_;
|
size_t max_outsize_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(AsyncTCPSocketBase);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class AsyncTCPSocket : public AsyncTCPSocketBase {
|
class AsyncTCPSocket : public AsyncTCPSocketBase {
|
||||||
|
@ -93,13 +93,13 @@ class AsyncTCPSocket : public AsyncTCPSocketBase {
|
||||||
explicit AsyncTCPSocket(Socket* socket);
|
explicit AsyncTCPSocket(Socket* socket);
|
||||||
~AsyncTCPSocket() override {}
|
~AsyncTCPSocket() override {}
|
||||||
|
|
||||||
|
AsyncTCPSocket(const AsyncTCPSocket&) = delete;
|
||||||
|
AsyncTCPSocket& operator=(const AsyncTCPSocket&) = delete;
|
||||||
|
|
||||||
int Send(const void* pv,
|
int Send(const void* pv,
|
||||||
size_t cb,
|
size_t cb,
|
||||||
const rtc::PacketOptions& options) override;
|
const rtc::PacketOptions& options) override;
|
||||||
void ProcessInput(char* data, size_t* len) override;
|
void ProcessInput(char* data, size_t* len) override;
|
||||||
|
|
||||||
private:
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(AsyncTCPSocket);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class AsyncTcpListenSocket : public AsyncListenSocket {
|
class AsyncTcpListenSocket : public AsyncListenSocket {
|
||||||
|
|
|
@ -14,8 +14,6 @@
|
||||||
#include <stddef.h> // For size_t.
|
#include <stddef.h> // For size_t.
|
||||||
#include <stdint.h> // For integer types.
|
#include <stdint.h> // For integer types.
|
||||||
|
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace rtc {
|
namespace rtc {
|
||||||
|
|
||||||
// A BitBuffer API for write operations. Supports symmetric write APIs to the
|
// A BitBuffer API for write operations. Supports symmetric write APIs to the
|
||||||
|
@ -27,6 +25,9 @@ class BitBufferWriter {
|
||||||
// Constructs a bit buffer for the writable buffer of `bytes`.
|
// Constructs a bit buffer for the writable buffer of `bytes`.
|
||||||
BitBufferWriter(uint8_t* bytes, size_t byte_count);
|
BitBufferWriter(uint8_t* bytes, size_t byte_count);
|
||||||
|
|
||||||
|
BitBufferWriter(const BitBufferWriter&) = delete;
|
||||||
|
BitBufferWriter& operator=(const BitBufferWriter&) = delete;
|
||||||
|
|
||||||
// Gets the current offset, in bytes/bits, from the start of the buffer. The
|
// Gets the current offset, in bytes/bits, from the start of the buffer. The
|
||||||
// bit offset is the offset into the current byte, in the range [0,7].
|
// bit offset is the offset into the current byte, in the range [0,7].
|
||||||
void GetCurrentOffset(size_t* out_byte_offset, size_t* out_bit_offset);
|
void GetCurrentOffset(size_t* out_byte_offset, size_t* out_bit_offset);
|
||||||
|
@ -80,8 +81,6 @@ class BitBufferWriter {
|
||||||
size_t byte_offset_;
|
size_t byte_offset_;
|
||||||
// The current offset, in bits, into the current byte.
|
// The current offset, in bits, into the current byte.
|
||||||
size_t bit_offset_;
|
size_t bit_offset_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(BitBufferWriter);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace rtc
|
} // namespace rtc
|
||||||
|
|
|
@ -19,7 +19,6 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "rtc_base/buffer.h"
|
#include "rtc_base/buffer.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
#include "rtc_base/ssl_certificate.h"
|
#include "rtc_base/ssl_certificate.h"
|
||||||
#include "rtc_base/ssl_identity.h"
|
#include "rtc_base/ssl_identity.h"
|
||||||
|
|
||||||
|
@ -43,6 +42,9 @@ class BoringSSLCertificate final : public SSLCertificate {
|
||||||
|
|
||||||
~BoringSSLCertificate() override;
|
~BoringSSLCertificate() override;
|
||||||
|
|
||||||
|
BoringSSLCertificate(const BoringSSLCertificate&) = delete;
|
||||||
|
BoringSSLCertificate& operator=(const BoringSSLCertificate&) = delete;
|
||||||
|
|
||||||
std::unique_ptr<SSLCertificate> Clone() const override;
|
std::unique_ptr<SSLCertificate> Clone() const override;
|
||||||
|
|
||||||
CRYPTO_BUFFER* cert_buffer() const { return cert_buffer_.get(); }
|
CRYPTO_BUFFER* cert_buffer() const { return cert_buffer_.get(); }
|
||||||
|
@ -72,7 +74,6 @@ class BoringSSLCertificate final : public SSLCertificate {
|
||||||
private:
|
private:
|
||||||
// A handle to the DER encoded certificate data.
|
// A handle to the DER encoded certificate data.
|
||||||
bssl::UniquePtr<CRYPTO_BUFFER> cert_buffer_;
|
bssl::UniquePtr<CRYPTO_BUFFER> cert_buffer_;
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(BoringSSLCertificate);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace rtc
|
} // namespace rtc
|
||||||
|
|
|
@ -18,7 +18,6 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "rtc_base/boringssl_certificate.h"
|
#include "rtc_base/boringssl_certificate.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
#include "rtc_base/openssl_key_pair.h"
|
#include "rtc_base/openssl_key_pair.h"
|
||||||
#include "rtc_base/ssl_certificate.h"
|
#include "rtc_base/ssl_certificate.h"
|
||||||
#include "rtc_base/ssl_identity.h"
|
#include "rtc_base/ssl_identity.h"
|
||||||
|
@ -44,6 +43,9 @@ class BoringSSLIdentity final : public SSLIdentity {
|
||||||
const std::string& certificate_chain);
|
const std::string& certificate_chain);
|
||||||
~BoringSSLIdentity() override;
|
~BoringSSLIdentity() override;
|
||||||
|
|
||||||
|
BoringSSLIdentity(const BoringSSLIdentity&) = delete;
|
||||||
|
BoringSSLIdentity& operator=(const BoringSSLIdentity&) = delete;
|
||||||
|
|
||||||
const BoringSSLCertificate& certificate() const override;
|
const BoringSSLCertificate& certificate() const override;
|
||||||
const SSLCertChain& cert_chain() const override;
|
const SSLCertChain& cert_chain() const override;
|
||||||
|
|
||||||
|
@ -67,8 +69,6 @@ class BoringSSLIdentity final : public SSLIdentity {
|
||||||
|
|
||||||
std::unique_ptr<OpenSSLKeyPair> key_pair_;
|
std::unique_ptr<OpenSSLKeyPair> key_pair_;
|
||||||
std::unique_ptr<SSLCertChain> cert_chain_;
|
std::unique_ptr<SSLCertChain> cert_chain_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(BoringSSLIdentity);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace rtc
|
} // namespace rtc
|
||||||
|
|
|
@ -18,7 +18,6 @@
|
||||||
|
|
||||||
#include "api/sequence_checker.h"
|
#include "api/sequence_checker.h"
|
||||||
#include "rtc_base/buffer.h"
|
#include "rtc_base/buffer.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
#include "rtc_base/system/no_unique_address.h"
|
#include "rtc_base/system/no_unique_address.h"
|
||||||
#include "rtc_base/thread_annotations.h"
|
#include "rtc_base/thread_annotations.h"
|
||||||
|
|
||||||
|
@ -30,6 +29,9 @@ class BufferQueue final {
|
||||||
BufferQueue(size_t capacity, size_t default_size);
|
BufferQueue(size_t capacity, size_t default_size);
|
||||||
~BufferQueue();
|
~BufferQueue();
|
||||||
|
|
||||||
|
BufferQueue(const BufferQueue&) = delete;
|
||||||
|
BufferQueue& operator=(const BufferQueue&) = delete;
|
||||||
|
|
||||||
// Return number of queued buffers.
|
// Return number of queued buffers.
|
||||||
size_t size() const;
|
size_t size() const;
|
||||||
|
|
||||||
|
@ -61,8 +63,6 @@ class BufferQueue final {
|
||||||
const size_t default_size_;
|
const size_t default_size_;
|
||||||
std::deque<Buffer*> queue_ RTC_GUARDED_BY(sequence_checker_);
|
std::deque<Buffer*> queue_ RTC_GUARDED_BY(sequence_checker_);
|
||||||
std::vector<Buffer*> free_list_ RTC_GUARDED_BY(sequence_checker_);
|
std::vector<Buffer*> free_list_ RTC_GUARDED_BY(sequence_checker_);
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(BufferQueue);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace rtc
|
} // namespace rtc
|
||||||
|
|
|
@ -18,7 +18,6 @@
|
||||||
|
|
||||||
#include "rtc_base/buffer.h"
|
#include "rtc_base/buffer.h"
|
||||||
#include "rtc_base/byte_order.h"
|
#include "rtc_base/byte_order.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
// Reads/Writes from/to buffer using network byte order (big endian)
|
// Reads/Writes from/to buffer using network byte order (big endian)
|
||||||
namespace rtc {
|
namespace rtc {
|
||||||
|
@ -29,6 +28,9 @@ class ByteBufferWriterT {
|
||||||
ByteBufferWriterT() { Construct(nullptr, kDefaultCapacity); }
|
ByteBufferWriterT() { Construct(nullptr, kDefaultCapacity); }
|
||||||
ByteBufferWriterT(const char* bytes, size_t len) { Construct(bytes, len); }
|
ByteBufferWriterT(const char* bytes, size_t len) { Construct(bytes, len); }
|
||||||
|
|
||||||
|
ByteBufferWriterT(const ByteBufferWriterT&) = delete;
|
||||||
|
ByteBufferWriterT& operator=(const ByteBufferWriterT&) = delete;
|
||||||
|
|
||||||
const char* Data() const { return buffer_.data(); }
|
const char* Data() const { return buffer_.data(); }
|
||||||
size_t Length() const { return buffer_.size(); }
|
size_t Length() const { return buffer_.size(); }
|
||||||
size_t Capacity() const { return buffer_.capacity(); }
|
size_t Capacity() const { return buffer_.capacity(); }
|
||||||
|
@ -104,7 +106,6 @@ class ByteBufferWriterT {
|
||||||
|
|
||||||
// There are sensible ways to define these, but they aren't needed in our code
|
// There are sensible ways to define these, but they aren't needed in our code
|
||||||
// base.
|
// base.
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(ByteBufferWriterT);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class ByteBufferWriter : public ByteBufferWriterT<BufferT<char>> {
|
class ByteBufferWriter : public ByteBufferWriterT<BufferT<char>> {
|
||||||
|
@ -112,8 +113,8 @@ class ByteBufferWriter : public ByteBufferWriterT<BufferT<char>> {
|
||||||
ByteBufferWriter();
|
ByteBufferWriter();
|
||||||
ByteBufferWriter(const char* bytes, size_t len);
|
ByteBufferWriter(const char* bytes, size_t len);
|
||||||
|
|
||||||
private:
|
ByteBufferWriter(const ByteBufferWriter&) = delete;
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(ByteBufferWriter);
|
ByteBufferWriter& operator=(const ByteBufferWriter&) = delete;
|
||||||
};
|
};
|
||||||
|
|
||||||
// The ByteBufferReader references the passed data, i.e. the pointer must be
|
// The ByteBufferReader references the passed data, i.e. the pointer must be
|
||||||
|
@ -129,6 +130,9 @@ class ByteBufferReader {
|
||||||
|
|
||||||
explicit ByteBufferReader(const ByteBufferWriter& buf);
|
explicit ByteBufferReader(const ByteBufferWriter& buf);
|
||||||
|
|
||||||
|
ByteBufferReader(const ByteBufferReader&) = delete;
|
||||||
|
ByteBufferReader& operator=(const ByteBufferReader&) = delete;
|
||||||
|
|
||||||
// Returns start of unprocessed data.
|
// Returns start of unprocessed data.
|
||||||
const char* Data() const { return bytes_ + start_; }
|
const char* Data() const { return bytes_ + start_; }
|
||||||
// Returns number of unprocessed bytes.
|
// Returns number of unprocessed bytes.
|
||||||
|
@ -161,9 +165,6 @@ class ByteBufferReader {
|
||||||
size_t size_;
|
size_t size_;
|
||||||
size_t start_;
|
size_t start_;
|
||||||
size_t end_;
|
size_t end_;
|
||||||
|
|
||||||
private:
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(ByteBufferReader);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace rtc
|
} // namespace rtc
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
#ifndef RTC_BASE_DEPRECATED_RECURSIVE_CRITICAL_SECTION_H_
|
#ifndef RTC_BASE_DEPRECATED_RECURSIVE_CRITICAL_SECTION_H_
|
||||||
#define RTC_BASE_DEPRECATED_RECURSIVE_CRITICAL_SECTION_H_
|
#define RTC_BASE_DEPRECATED_RECURSIVE_CRITICAL_SECTION_H_
|
||||||
|
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
#include "rtc_base/platform_thread_types.h"
|
#include "rtc_base/platform_thread_types.h"
|
||||||
#include "rtc_base/thread_annotations.h"
|
#include "rtc_base/thread_annotations.h"
|
||||||
|
|
||||||
|
@ -94,9 +93,11 @@ class RTC_SCOPED_LOCKABLE CritScope {
|
||||||
RTC_EXCLUSIVE_LOCK_FUNCTION(cs);
|
RTC_EXCLUSIVE_LOCK_FUNCTION(cs);
|
||||||
~CritScope() RTC_UNLOCK_FUNCTION();
|
~CritScope() RTC_UNLOCK_FUNCTION();
|
||||||
|
|
||||||
|
CritScope(const CritScope&) = delete;
|
||||||
|
CritScope& operator=(const CritScope&) = delete;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const RecursiveCriticalSection* const cs_;
|
const RecursiveCriticalSection* const cs_;
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(CritScope);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace rtc
|
} // namespace rtc
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
#include "rtc_base/system/file_wrapper.h"
|
#include "rtc_base/system/file_wrapper.h"
|
||||||
|
|
||||||
namespace rtc {
|
namespace rtc {
|
||||||
|
@ -37,6 +36,9 @@ class FileRotatingStream {
|
||||||
|
|
||||||
virtual ~FileRotatingStream();
|
virtual ~FileRotatingStream();
|
||||||
|
|
||||||
|
FileRotatingStream(const FileRotatingStream&) = delete;
|
||||||
|
FileRotatingStream& operator=(const FileRotatingStream&) = delete;
|
||||||
|
|
||||||
bool IsOpen() const;
|
bool IsOpen() const;
|
||||||
|
|
||||||
bool Write(const void* data, size_t data_len);
|
bool Write(const void* data, size_t data_len);
|
||||||
|
@ -100,8 +102,6 @@ class FileRotatingStream {
|
||||||
// buffering the file size read from disk might not be accurate.
|
// buffering the file size read from disk might not be accurate.
|
||||||
size_t current_bytes_written_;
|
size_t current_bytes_written_;
|
||||||
bool disable_buffering_;
|
bool disable_buffering_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(FileRotatingStream);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// CallSessionFileRotatingStream is meant to be used in situations where we will
|
// CallSessionFileRotatingStream is meant to be used in situations where we will
|
||||||
|
@ -130,6 +130,10 @@ class CallSessionFileRotatingStream : public FileRotatingStream {
|
||||||
size_t max_total_log_size);
|
size_t max_total_log_size);
|
||||||
~CallSessionFileRotatingStream() override {}
|
~CallSessionFileRotatingStream() override {}
|
||||||
|
|
||||||
|
CallSessionFileRotatingStream(const CallSessionFileRotatingStream&) = delete;
|
||||||
|
CallSessionFileRotatingStream& operator=(
|
||||||
|
const CallSessionFileRotatingStream&) = delete;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void OnRotation() override;
|
void OnRotation() override;
|
||||||
|
|
||||||
|
@ -140,8 +144,6 @@ class CallSessionFileRotatingStream : public FileRotatingStream {
|
||||||
|
|
||||||
const size_t max_total_log_size_;
|
const size_t max_total_log_size_;
|
||||||
size_t num_rotations_;
|
size_t num_rotations_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(CallSessionFileRotatingStream);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// This is a convenience class, to read all files produced by a
|
// This is a convenience class, to read all files produced by a
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
#include "rtc_base/file_rotating_stream.h"
|
#include "rtc_base/file_rotating_stream.h"
|
||||||
#include "rtc_base/logging.h"
|
#include "rtc_base/logging.h"
|
||||||
|
|
||||||
|
@ -34,6 +33,9 @@ class FileRotatingLogSink : public LogSink {
|
||||||
size_t num_log_files);
|
size_t num_log_files);
|
||||||
~FileRotatingLogSink() override;
|
~FileRotatingLogSink() override;
|
||||||
|
|
||||||
|
FileRotatingLogSink(const FileRotatingLogSink&) = delete;
|
||||||
|
FileRotatingLogSink& operator=(const FileRotatingLogSink&) = delete;
|
||||||
|
|
||||||
// Writes the message to the current file. It will spill over to the next
|
// Writes the message to the current file. It will spill over to the next
|
||||||
// file if needed.
|
// file if needed.
|
||||||
void OnLogMessage(const std::string& message) override;
|
void OnLogMessage(const std::string& message) override;
|
||||||
|
@ -52,8 +54,6 @@ class FileRotatingLogSink : public LogSink {
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::unique_ptr<FileRotatingStream> stream_;
|
std::unique_ptr<FileRotatingStream> stream_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(FileRotatingLogSink);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Log sink that uses a CallSessionFileRotatingStream to write to disk.
|
// Log sink that uses a CallSessionFileRotatingStream to write to disk.
|
||||||
|
@ -64,8 +64,10 @@ class CallSessionFileRotatingLogSink : public FileRotatingLogSink {
|
||||||
size_t max_total_log_size);
|
size_t max_total_log_size);
|
||||||
~CallSessionFileRotatingLogSink() override;
|
~CallSessionFileRotatingLogSink() override;
|
||||||
|
|
||||||
private:
|
CallSessionFileRotatingLogSink(const CallSessionFileRotatingLogSink&) =
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(CallSessionFileRotatingLogSink);
|
delete;
|
||||||
|
CallSessionFileRotatingLogSink& operator=(
|
||||||
|
const CallSessionFileRotatingLogSink&) = delete;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace rtc
|
} // namespace rtc
|
||||||
|
|
|
@ -54,7 +54,6 @@
|
||||||
#include "absl/base/attributes.h"
|
#include "absl/base/attributes.h"
|
||||||
#include "absl/meta/type_traits.h"
|
#include "absl/meta/type_traits.h"
|
||||||
#include "absl/strings/string_view.h"
|
#include "absl/strings/string_view.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
#include "rtc_base/strings/string_builder.h"
|
#include "rtc_base/strings/string_builder.h"
|
||||||
#include "rtc_base/system/inline.h"
|
#include "rtc_base/system/inline.h"
|
||||||
|
|
||||||
|
@ -443,6 +442,9 @@ class LogMessage {
|
||||||
const std::string& tag);
|
const std::string& tag);
|
||||||
~LogMessage();
|
~LogMessage();
|
||||||
|
|
||||||
|
LogMessage(const LogMessage&) = delete;
|
||||||
|
LogMessage& operator=(const LogMessage&) = delete;
|
||||||
|
|
||||||
void AddTag(const char* tag);
|
void AddTag(const char* tag);
|
||||||
rtc::StringBuilder& stream();
|
rtc::StringBuilder& stream();
|
||||||
// Returns the time at which this function was called for the first time.
|
// Returns the time at which this function was called for the first time.
|
||||||
|
@ -602,8 +604,6 @@ class LogMessage {
|
||||||
|
|
||||||
// The stringbuilder that buffers the formatted message before output
|
// The stringbuilder that buffers the formatted message before output
|
||||||
rtc::StringBuilder print_stream_;
|
rtc::StringBuilder print_stream_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(LogMessage);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -29,6 +29,10 @@ class FifoBuffer final : public StreamInterface {
|
||||||
// Creates a FIFO buffer with the specified capacity and owner
|
// Creates a FIFO buffer with the specified capacity and owner
|
||||||
FifoBuffer(size_t length, Thread* owner);
|
FifoBuffer(size_t length, Thread* owner);
|
||||||
~FifoBuffer() override;
|
~FifoBuffer() override;
|
||||||
|
|
||||||
|
FifoBuffer(const FifoBuffer&) = delete;
|
||||||
|
FifoBuffer& operator=(const FifoBuffer&) = delete;
|
||||||
|
|
||||||
// Gets the amount of data currently readable from the buffer.
|
// Gets the amount of data currently readable from the buffer.
|
||||||
bool GetBuffered(size_t* data_len) const;
|
bool GetBuffered(size_t* data_len) const;
|
||||||
|
|
||||||
|
@ -110,7 +114,6 @@ class FifoBuffer final : public StreamInterface {
|
||||||
Thread* const owner_;
|
Thread* const owner_;
|
||||||
// object lock
|
// object lock
|
||||||
mutable webrtc::Mutex mutex_;
|
mutable webrtc::Mutex mutex_;
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(FifoBuffer);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace rtc
|
} // namespace rtc
|
||||||
|
|
|
@ -14,7 +14,6 @@
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
#include "api/function_view.h"
|
#include "api/function_view.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
#include "rtc_base/system/rtc_export.h"
|
#include "rtc_base/system/rtc_export.h"
|
||||||
|
|
||||||
namespace rtc {
|
namespace rtc {
|
||||||
|
@ -37,11 +36,12 @@ class RTC_EXPORT MessageHandlerAutoCleanup : public MessageHandler {
|
||||||
public:
|
public:
|
||||||
~MessageHandlerAutoCleanup() override;
|
~MessageHandlerAutoCleanup() override;
|
||||||
|
|
||||||
|
MessageHandlerAutoCleanup(const MessageHandlerAutoCleanup&) = delete;
|
||||||
|
MessageHandlerAutoCleanup& operator=(const MessageHandlerAutoCleanup&) =
|
||||||
|
delete;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
MessageHandlerAutoCleanup();
|
MessageHandlerAutoCleanup();
|
||||||
|
|
||||||
private:
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(MessageHandlerAutoCleanup);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace rtc
|
} // namespace rtc
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
#include <set>
|
#include <set>
|
||||||
|
|
||||||
#include "rtc_base/async_udp_socket.h"
|
#include "rtc_base/async_udp_socket.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
#include "rtc_base/nat_types.h"
|
#include "rtc_base/nat_types.h"
|
||||||
#include "rtc_base/proxy_server.h"
|
#include "rtc_base/proxy_server.h"
|
||||||
#include "rtc_base/socket_address_pair.h"
|
#include "rtc_base/socket_address_pair.h"
|
||||||
|
@ -69,6 +68,9 @@ class NATServer : public sigslot::has_slots<> {
|
||||||
const SocketAddress& external_ip);
|
const SocketAddress& external_ip);
|
||||||
~NATServer() override;
|
~NATServer() override;
|
||||||
|
|
||||||
|
NATServer(const NATServer&) = delete;
|
||||||
|
NATServer& operator=(const NATServer&) = delete;
|
||||||
|
|
||||||
SocketAddress internal_udp_address() const {
|
SocketAddress internal_udp_address() const {
|
||||||
return udp_server_socket_->GetLocalAddress();
|
return udp_server_socket_->GetLocalAddress();
|
||||||
}
|
}
|
||||||
|
@ -122,7 +124,6 @@ class NATServer : public sigslot::has_slots<> {
|
||||||
ProxyServer* tcp_proxy_server_;
|
ProxyServer* tcp_proxy_server_;
|
||||||
InternalMap* int_map_;
|
InternalMap* int_map_;
|
||||||
ExternalMap* ext_map_;
|
ExternalMap* ext_map_;
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(NATServer);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace rtc
|
} // namespace rtc
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <set>
|
#include <set>
|
||||||
|
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
#include "rtc_base/nat_server.h"
|
#include "rtc_base/nat_server.h"
|
||||||
#include "rtc_base/nat_types.h"
|
#include "rtc_base/nat_types.h"
|
||||||
#include "rtc_base/socket.h"
|
#include "rtc_base/socket.h"
|
||||||
|
@ -50,6 +49,9 @@ class NATSocketFactory : public SocketFactory, public NATInternalSocketFactory {
|
||||||
const SocketAddress& nat_udp_addr,
|
const SocketAddress& nat_udp_addr,
|
||||||
const SocketAddress& nat_tcp_addr);
|
const SocketAddress& nat_tcp_addr);
|
||||||
|
|
||||||
|
NATSocketFactory(const NATSocketFactory&) = delete;
|
||||||
|
NATSocketFactory& operator=(const NATSocketFactory&) = delete;
|
||||||
|
|
||||||
// SocketFactory implementation
|
// SocketFactory implementation
|
||||||
Socket* CreateSocket(int family, int type) override;
|
Socket* CreateSocket(int family, int type) override;
|
||||||
|
|
||||||
|
@ -63,7 +65,6 @@ class NATSocketFactory : public SocketFactory, public NATInternalSocketFactory {
|
||||||
SocketFactory* factory_;
|
SocketFactory* factory_;
|
||||||
SocketAddress nat_udp_addr_;
|
SocketAddress nat_udp_addr_;
|
||||||
SocketAddress nat_tcp_addr_;
|
SocketAddress nat_tcp_addr_;
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(NATSocketFactory);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Creates sockets that will send traffic through a NAT depending on what
|
// Creates sockets that will send traffic through a NAT depending on what
|
||||||
|
@ -135,6 +136,9 @@ class NATSocketServer : public SocketServer, public NATInternalSocketFactory {
|
||||||
|
|
||||||
explicit NATSocketServer(SocketServer* ss);
|
explicit NATSocketServer(SocketServer* ss);
|
||||||
|
|
||||||
|
NATSocketServer(const NATSocketServer&) = delete;
|
||||||
|
NATSocketServer& operator=(const NATSocketServer&) = delete;
|
||||||
|
|
||||||
SocketServer* socketserver() { return server_; }
|
SocketServer* socketserver() { return server_; }
|
||||||
Thread* queue() { return msg_queue_; }
|
Thread* queue() { return msg_queue_; }
|
||||||
|
|
||||||
|
@ -161,7 +165,6 @@ class NATSocketServer : public SocketServer, public NATInternalSocketFactory {
|
||||||
SocketServer* server_;
|
SocketServer* server_;
|
||||||
Thread* msg_queue_;
|
Thread* msg_queue_;
|
||||||
TranslatorMap nats_;
|
TranslatorMap nats_;
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(NATSocketServer);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Free-standing NAT helper functions.
|
// Free-standing NAT helper functions.
|
||||||
|
|
|
@ -19,7 +19,6 @@
|
||||||
|
|
||||||
#include "absl/types/optional.h"
|
#include "absl/types/optional.h"
|
||||||
#include "rtc_base/checks.h"
|
#include "rtc_base/checks.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace rtc {
|
namespace rtc {
|
||||||
|
|
||||||
|
@ -34,6 +33,10 @@ template <class T>
|
||||||
class MovingMaxCounter {
|
class MovingMaxCounter {
|
||||||
public:
|
public:
|
||||||
explicit MovingMaxCounter(int64_t window_length_ms);
|
explicit MovingMaxCounter(int64_t window_length_ms);
|
||||||
|
|
||||||
|
MovingMaxCounter(const MovingMaxCounter&) = delete;
|
||||||
|
MovingMaxCounter& operator=(const MovingMaxCounter&) = delete;
|
||||||
|
|
||||||
// Advances the current time, and adds a new sample. The new current time must
|
// Advances the current time, and adds a new sample. The new current time must
|
||||||
// be at least as large as the old current time.
|
// be at least as large as the old current time.
|
||||||
void Add(const T& sample, int64_t current_time_ms);
|
void Add(const T& sample, int64_t current_time_ms);
|
||||||
|
@ -57,7 +60,6 @@ class MovingMaxCounter {
|
||||||
#if RTC_DCHECK_IS_ON
|
#if RTC_DCHECK_IS_ON
|
||||||
int64_t last_call_time_ms_ = std::numeric_limits<int64_t>::min();
|
int64_t last_call_time_ms_ = std::numeric_limits<int64_t>::min();
|
||||||
#endif
|
#endif
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(MovingMaxCounter);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
#include <list>
|
#include <list>
|
||||||
|
|
||||||
#include "rtc_base/checks.h"
|
#include "rtc_base/checks.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
#include "rtc_base/numerics/percentile_filter.h"
|
#include "rtc_base/numerics/percentile_filter.h"
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
@ -30,6 +29,9 @@ class MovingMedianFilter {
|
||||||
// used to take median. `window_size` must be positive.
|
// used to take median. `window_size` must be positive.
|
||||||
explicit MovingMedianFilter(size_t window_size);
|
explicit MovingMedianFilter(size_t window_size);
|
||||||
|
|
||||||
|
MovingMedianFilter(const MovingMedianFilter&) = delete;
|
||||||
|
MovingMedianFilter& operator=(const MovingMedianFilter&) = delete;
|
||||||
|
|
||||||
// Insert a new sample.
|
// Insert a new sample.
|
||||||
void Insert(const T& value);
|
void Insert(const T& value);
|
||||||
|
|
||||||
|
@ -47,8 +49,6 @@ class MovingMedianFilter {
|
||||||
std::list<T> samples_;
|
std::list<T> samples_;
|
||||||
size_t samples_stored_;
|
size_t samples_stored_;
|
||||||
const size_t window_size_;
|
const size_t window_size_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(MovingMedianFilter);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
|
|
|
@ -18,7 +18,6 @@
|
||||||
#include <random>
|
#include <random>
|
||||||
|
|
||||||
#include "absl/algorithm/container.h"
|
#include "absl/algorithm/container.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
#include "test/gtest.h"
|
#include "test/gtest.h"
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
@ -30,11 +29,11 @@ class PercentileFilterTest : public ::testing::TestWithParam<float> {
|
||||||
srand(42);
|
srand(42);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PercentileFilterTest(const PercentileFilterTest&) = delete;
|
||||||
|
PercentileFilterTest& operator=(const PercentileFilterTest&) = delete;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
PercentileFilter<int64_t> filter_;
|
PercentileFilter<int64_t> filter_;
|
||||||
|
|
||||||
private:
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(PercentileFilterTest);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
INSTANTIATE_TEST_SUITE_P(PercentileFilterTests,
|
INSTANTIATE_TEST_SUITE_P(PercentileFilterTests,
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "rtc_base/checks.h"
|
#include "rtc_base/checks.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
#include "rtc_base/ssl_identity.h"
|
#include "rtc_base/ssl_identity.h"
|
||||||
|
|
||||||
namespace rtc {
|
namespace rtc {
|
||||||
|
@ -39,6 +38,9 @@ class OpenSSLKeyPair final {
|
||||||
|
|
||||||
~OpenSSLKeyPair();
|
~OpenSSLKeyPair();
|
||||||
|
|
||||||
|
OpenSSLKeyPair(const OpenSSLKeyPair&) = delete;
|
||||||
|
OpenSSLKeyPair& operator=(const OpenSSLKeyPair&) = delete;
|
||||||
|
|
||||||
std::unique_ptr<OpenSSLKeyPair> Clone();
|
std::unique_ptr<OpenSSLKeyPair> Clone();
|
||||||
|
|
||||||
EVP_PKEY* pkey() const { return pkey_; }
|
EVP_PKEY* pkey() const { return pkey_; }
|
||||||
|
@ -51,8 +53,6 @@ class OpenSSLKeyPair final {
|
||||||
void AddReference();
|
void AddReference();
|
||||||
|
|
||||||
EVP_PKEY* pkey_;
|
EVP_PKEY* pkey_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(OpenSSLKeyPair);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace rtc
|
} // namespace rtc
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
#include "rtc_base/ssl_stream_adapter.h"
|
#include "rtc_base/ssl_stream_adapter.h"
|
||||||
|
|
||||||
#ifndef OPENSSL_IS_BORINGSSL
|
#ifndef OPENSSL_IS_BORINGSSL
|
||||||
|
@ -36,6 +35,10 @@ class OpenSSLSessionCache final {
|
||||||
OpenSSLSessionCache(SSLMode ssl_mode, SSL_CTX* ssl_ctx);
|
OpenSSLSessionCache(SSLMode ssl_mode, SSL_CTX* ssl_ctx);
|
||||||
// Frees the cached SSL_SESSIONS and then frees the SSL_CTX.
|
// Frees the cached SSL_SESSIONS and then frees the SSL_CTX.
|
||||||
~OpenSSLSessionCache();
|
~OpenSSLSessionCache();
|
||||||
|
|
||||||
|
OpenSSLSessionCache(const OpenSSLSessionCache&) = delete;
|
||||||
|
OpenSSLSessionCache& operator=(const OpenSSLSessionCache&) = delete;
|
||||||
|
|
||||||
// Looks up a session by hostname. The returned SSL_SESSION is not up_refed.
|
// Looks up a session by hostname. The returned SSL_SESSION is not up_refed.
|
||||||
SSL_SESSION* LookupSession(const std::string& hostname) const;
|
SSL_SESSION* LookupSession(const std::string& hostname) const;
|
||||||
// Adds a session to the cache, and up_refs it. Any existing session with the
|
// Adds a session to the cache, and up_refs it. Any existing session with the
|
||||||
|
@ -60,7 +63,6 @@ class OpenSSLSessionCache final {
|
||||||
// TODO(juberti): Add LRU eviction to keep the cache from growing forever.
|
// TODO(juberti): Add LRU eviction to keep the cache from growing forever.
|
||||||
std::map<std::string, SSL_SESSION*> sessions_;
|
std::map<std::string, SSL_SESSION*> sessions_;
|
||||||
// The cache should never be copied or assigned directly.
|
// The cache should never be copied or assigned directly.
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(OpenSSLSessionCache);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace rtc
|
} // namespace rtc
|
||||||
|
|
|
@ -23,7 +23,6 @@
|
||||||
#include "api/scoped_refptr.h"
|
#include "api/scoped_refptr.h"
|
||||||
#include "api/sequence_checker.h"
|
#include "api/sequence_checker.h"
|
||||||
#include "rtc_base/checks.h"
|
#include "rtc_base/checks.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
#include "rtc_base/ref_count.h"
|
#include "rtc_base/ref_count.h"
|
||||||
#include "rtc_base/ref_counted_object.h"
|
#include "rtc_base/ref_counted_object.h"
|
||||||
#include "rtc_base/system/no_unique_address.h"
|
#include "rtc_base/system/no_unique_address.h"
|
||||||
|
@ -119,6 +118,9 @@ class OperationsChain final : public RefCountedNonVirtual<OperationsChain> {
|
||||||
static scoped_refptr<OperationsChain> Create();
|
static scoped_refptr<OperationsChain> Create();
|
||||||
~OperationsChain();
|
~OperationsChain();
|
||||||
|
|
||||||
|
OperationsChain(const OperationsChain&) = delete;
|
||||||
|
OperationsChain& operator=(const OperationsChain&) = delete;
|
||||||
|
|
||||||
void SetOnChainEmptyCallback(std::function<void()> on_chain_empty_callback);
|
void SetOnChainEmptyCallback(std::function<void()> on_chain_empty_callback);
|
||||||
bool IsEmpty() const;
|
bool IsEmpty() const;
|
||||||
|
|
||||||
|
@ -169,6 +171,9 @@ class OperationsChain final : public RefCountedNonVirtual<OperationsChain> {
|
||||||
explicit CallbackHandle(scoped_refptr<OperationsChain> operations_chain);
|
explicit CallbackHandle(scoped_refptr<OperationsChain> operations_chain);
|
||||||
~CallbackHandle();
|
~CallbackHandle();
|
||||||
|
|
||||||
|
CallbackHandle(const CallbackHandle&) = delete;
|
||||||
|
CallbackHandle& operator=(const CallbackHandle&) = delete;
|
||||||
|
|
||||||
void OnOperationComplete();
|
void OnOperationComplete();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -176,8 +181,6 @@ class OperationsChain final : public RefCountedNonVirtual<OperationsChain> {
|
||||||
#if RTC_DCHECK_IS_ON
|
#if RTC_DCHECK_IS_ON
|
||||||
bool has_run_ = false;
|
bool has_run_ = false;
|
||||||
#endif // RTC_DCHECK_IS_ON
|
#endif // RTC_DCHECK_IS_ON
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(CallbackHandle);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
OperationsChain();
|
OperationsChain();
|
||||||
|
@ -193,8 +196,6 @@ class OperationsChain final : public RefCountedNonVirtual<OperationsChain> {
|
||||||
chained_operations_ RTC_GUARDED_BY(sequence_checker_);
|
chained_operations_ RTC_GUARDED_BY(sequence_checker_);
|
||||||
absl::optional<std::function<void()>> on_chain_empty_callback_
|
absl::optional<std::function<void()>> on_chain_empty_callback_
|
||||||
RTC_GUARDED_BY(sequence_checker_);
|
RTC_GUARDED_BY(sequence_checker_);
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(OperationsChain);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace rtc
|
} // namespace rtc
|
||||||
|
|
|
@ -219,6 +219,9 @@ class SignalOnDestruction final {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SignalOnDestruction(const SignalOnDestruction&) = delete;
|
||||||
|
SignalOnDestruction& operator=(const SignalOnDestruction&) = delete;
|
||||||
|
|
||||||
// Move operators.
|
// Move operators.
|
||||||
SignalOnDestruction(SignalOnDestruction&& other)
|
SignalOnDestruction(SignalOnDestruction&& other)
|
||||||
: SignalOnDestruction(other.destructor_called_) {
|
: SignalOnDestruction(other.destructor_called_) {
|
||||||
|
@ -232,8 +235,6 @@ class SignalOnDestruction final {
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool* destructor_called_;
|
bool* destructor_called_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(SignalOnDestruction);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
TEST(OperationsChainTest, SynchronousOperation) {
|
TEST(OperationsChainTest, SynchronousOperation) {
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "absl/memory/memory.h"
|
#include "absl/memory/memory.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
#include "rtc_base/memory/fifo_buffer.h"
|
#include "rtc_base/memory/fifo_buffer.h"
|
||||||
#include "rtc_base/server_socket_adapters.h"
|
#include "rtc_base/server_socket_adapters.h"
|
||||||
#include "rtc_base/socket.h"
|
#include "rtc_base/socket.h"
|
||||||
|
@ -36,6 +35,10 @@ class ProxyBinding : public sigslot::has_slots<> {
|
||||||
public:
|
public:
|
||||||
ProxyBinding(AsyncProxyServerSocket* in_socket, Socket* out_socket);
|
ProxyBinding(AsyncProxyServerSocket* in_socket, Socket* out_socket);
|
||||||
~ProxyBinding() override;
|
~ProxyBinding() override;
|
||||||
|
|
||||||
|
ProxyBinding(const ProxyBinding&) = delete;
|
||||||
|
ProxyBinding& operator=(const ProxyBinding&) = delete;
|
||||||
|
|
||||||
sigslot::signal1<ProxyBinding*> SignalDestroyed;
|
sigslot::signal1<ProxyBinding*> SignalDestroyed;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -59,7 +62,6 @@ class ProxyBinding : public sigslot::has_slots<> {
|
||||||
bool connected_;
|
bool connected_;
|
||||||
FifoBuffer out_buffer_;
|
FifoBuffer out_buffer_;
|
||||||
FifoBuffer in_buffer_;
|
FifoBuffer in_buffer_;
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(ProxyBinding);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class ProxyServer : public sigslot::has_slots<> {
|
class ProxyServer : public sigslot::has_slots<> {
|
||||||
|
@ -70,6 +72,9 @@ class ProxyServer : public sigslot::has_slots<> {
|
||||||
const SocketAddress& ext_ip);
|
const SocketAddress& ext_ip);
|
||||||
~ProxyServer() override;
|
~ProxyServer() override;
|
||||||
|
|
||||||
|
ProxyServer(const ProxyServer&) = delete;
|
||||||
|
ProxyServer& operator=(const ProxyServer&) = delete;
|
||||||
|
|
||||||
// Returns the address to which the proxy server is bound
|
// Returns the address to which the proxy server is bound
|
||||||
SocketAddress GetServerAddress();
|
SocketAddress GetServerAddress();
|
||||||
|
|
||||||
|
@ -82,7 +87,6 @@ class ProxyServer : public sigslot::has_slots<> {
|
||||||
SocketAddress ext_ip_;
|
SocketAddress ext_ip_;
|
||||||
std::unique_ptr<Socket> server_socket_;
|
std::unique_ptr<Socket> server_socket_;
|
||||||
std::vector<std::unique_ptr<ProxyBinding>> bindings_;
|
std::vector<std::unique_ptr<ProxyBinding>> bindings_;
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(ProxyServer);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// SocksProxyServer is a simple extension of ProxyServer to implement SOCKS.
|
// SocksProxyServer is a simple extension of ProxyServer to implement SOCKS.
|
||||||
|
@ -94,9 +98,11 @@ class SocksProxyServer : public ProxyServer {
|
||||||
const SocketAddress& ext_ip)
|
const SocketAddress& ext_ip)
|
||||||
: ProxyServer(int_factory, int_addr, ext_factory, ext_ip) {}
|
: ProxyServer(int_factory, int_addr, ext_factory, ext_ip) {}
|
||||||
|
|
||||||
|
SocksProxyServer(const SocksProxyServer&) = delete;
|
||||||
|
SocksProxyServer& operator=(const SocksProxyServer&) = delete;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
AsyncProxyServerSocket* WrapSocket(Socket* socket) override;
|
AsyncProxyServerSocket* WrapSocket(Socket* socket) override;
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(SocksProxyServer);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace rtc
|
} // namespace rtc
|
||||||
|
|
|
@ -14,7 +14,6 @@
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
#include "api/scoped_refptr.h"
|
#include "api/scoped_refptr.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
#include "rtc_base/ref_count.h"
|
#include "rtc_base/ref_count.h"
|
||||||
#include "rtc_base/ref_counter.h"
|
#include "rtc_base/ref_counter.h"
|
||||||
|
|
||||||
|
@ -42,6 +41,9 @@ class RefCountedObject : public T {
|
||||||
public:
|
public:
|
||||||
RefCountedObject() {}
|
RefCountedObject() {}
|
||||||
|
|
||||||
|
RefCountedObject(const RefCountedObject&) = delete;
|
||||||
|
RefCountedObject& operator=(const RefCountedObject&) = delete;
|
||||||
|
|
||||||
template <class P0>
|
template <class P0>
|
||||||
explicit RefCountedObject(P0&& p0) : T(std::forward<P0>(p0)) {}
|
explicit RefCountedObject(P0&& p0) : T(std::forward<P0>(p0)) {}
|
||||||
|
|
||||||
|
@ -73,8 +75,6 @@ class RefCountedObject : public T {
|
||||||
~RefCountedObject() override {}
|
~RefCountedObject() override {}
|
||||||
|
|
||||||
mutable webrtc::webrtc_impl::RefCounter ref_count_{0};
|
mutable webrtc::webrtc_impl::RefCounter ref_count_{0};
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(RefCountedObject);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
|
|
|
@ -27,8 +27,8 @@ class A {
|
||||||
public:
|
public:
|
||||||
A() {}
|
A() {}
|
||||||
|
|
||||||
private:
|
A(const A&) = delete;
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(A);
|
A& operator=(const A&) = delete;
|
||||||
};
|
};
|
||||||
|
|
||||||
class RefClass : public RefCountInterface {
|
class RefClass : public RefCountInterface {
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "rtc_base/checks.h"
|
#include "rtc_base/checks.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
#include "rtc_base/numerics/running_statistics.h"
|
#include "rtc_base/numerics/running_statistics.h"
|
||||||
|
|
||||||
namespace rtc {
|
namespace rtc {
|
||||||
|
@ -35,6 +34,9 @@ class RollingAccumulator {
|
||||||
}
|
}
|
||||||
~RollingAccumulator() {}
|
~RollingAccumulator() {}
|
||||||
|
|
||||||
|
RollingAccumulator(const RollingAccumulator&) = delete;
|
||||||
|
RollingAccumulator& operator=(const RollingAccumulator&) = delete;
|
||||||
|
|
||||||
size_t max_count() const { return samples_.size(); }
|
size_t max_count() const { return samples_.size(); }
|
||||||
|
|
||||||
size_t count() const { return static_cast<size_t>(stats_.Size()); }
|
size_t count() const { return static_cast<size_t>(stats_.Size()); }
|
||||||
|
@ -136,8 +138,6 @@ class RollingAccumulator {
|
||||||
mutable T min_;
|
mutable T min_;
|
||||||
mutable bool min_stale_;
|
mutable bool min_stale_;
|
||||||
std::vector<T> samples_;
|
std::vector<T> samples_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(RollingAccumulator);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace rtc
|
} // namespace rtc
|
||||||
|
|
|
@ -31,9 +31,11 @@ class AsyncSSLServerSocket : public BufferedReadAdapter {
|
||||||
public:
|
public:
|
||||||
explicit AsyncSSLServerSocket(Socket* socket);
|
explicit AsyncSSLServerSocket(Socket* socket);
|
||||||
|
|
||||||
|
AsyncSSLServerSocket(const AsyncSSLServerSocket&) = delete;
|
||||||
|
AsyncSSLServerSocket& operator=(const AsyncSSLServerSocket&) = delete;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void ProcessInput(char* data, size_t* len) override;
|
void ProcessInput(char* data, size_t* len) override;
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(AsyncSSLServerSocket);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Implements a proxy server socket for the SOCKS protocol.
|
// Implements a proxy server socket for the SOCKS protocol.
|
||||||
|
@ -41,6 +43,10 @@ class AsyncSocksProxyServerSocket : public AsyncProxyServerSocket {
|
||||||
public:
|
public:
|
||||||
explicit AsyncSocksProxyServerSocket(Socket* socket);
|
explicit AsyncSocksProxyServerSocket(Socket* socket);
|
||||||
|
|
||||||
|
AsyncSocksProxyServerSocket(const AsyncSocksProxyServerSocket&) = delete;
|
||||||
|
AsyncSocksProxyServerSocket& operator=(const AsyncSocksProxyServerSocket&) =
|
||||||
|
delete;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void ProcessInput(char* data, size_t* len) override;
|
void ProcessInput(char* data, size_t* len) override;
|
||||||
void DirectSend(const ByteBufferWriter& buf);
|
void DirectSend(const ByteBufferWriter& buf);
|
||||||
|
@ -64,7 +70,6 @@ class AsyncSocksProxyServerSocket : public AsyncProxyServerSocket {
|
||||||
SS_ERROR
|
SS_ERROR
|
||||||
};
|
};
|
||||||
State state_;
|
State state_;
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(AsyncSocksProxyServerSocket);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace rtc
|
} // namespace rtc
|
||||||
|
|
|
@ -38,7 +38,6 @@
|
||||||
// EXPECT_EQ("hello", capture);
|
// EXPECT_EQ("hello", capture);
|
||||||
// /* See unit-tests for more examples */
|
// /* See unit-tests for more examples */
|
||||||
|
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
#include "rtc_base/third_party/sigslot/sigslot.h"
|
#include "rtc_base/third_party/sigslot/sigslot.h"
|
||||||
|
|
||||||
namespace rtc {
|
namespace rtc {
|
||||||
|
@ -50,13 +49,14 @@ class SigslotTester0 : public sigslot::has_slots<> {
|
||||||
signal->connect(this, &SigslotTester0::OnSignalCallback);
|
signal->connect(this, &SigslotTester0::OnSignalCallback);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SigslotTester0(const SigslotTester0&) = delete;
|
||||||
|
SigslotTester0& operator=(const SigslotTester0&) = delete;
|
||||||
|
|
||||||
int callback_count() const { return callback_count_; }
|
int callback_count() const { return callback_count_; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void OnSignalCallback() { callback_count_++; }
|
void OnSignalCallback() { callback_count_++; }
|
||||||
int callback_count_;
|
int callback_count_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(SigslotTester0);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Versions below are for testing signals that pass arguments. For all the
|
// Versions below are for testing signals that pass arguments. For all the
|
||||||
|
@ -74,6 +74,9 @@ class SigslotTester1 : public sigslot::has_slots<> {
|
||||||
signal->connect(this, &SigslotTester1::OnSignalCallback);
|
signal->connect(this, &SigslotTester1::OnSignalCallback);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SigslotTester1(const SigslotTester1&) = delete;
|
||||||
|
SigslotTester1& operator=(const SigslotTester1&) = delete;
|
||||||
|
|
||||||
int callback_count() const { return callback_count_; }
|
int callback_count() const { return callback_count_; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -84,8 +87,6 @@ class SigslotTester1 : public sigslot::has_slots<> {
|
||||||
|
|
||||||
int callback_count_;
|
int callback_count_;
|
||||||
C1* capture1_;
|
C1* capture1_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(SigslotTester1);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class A1, class A2, class C1, class C2>
|
template <class A1, class A2, class C1, class C2>
|
||||||
|
@ -96,6 +97,9 @@ class SigslotTester2 : public sigslot::has_slots<> {
|
||||||
signal->connect(this, &SigslotTester2::OnSignalCallback);
|
signal->connect(this, &SigslotTester2::OnSignalCallback);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SigslotTester2(const SigslotTester2&) = delete;
|
||||||
|
SigslotTester2& operator=(const SigslotTester2&) = delete;
|
||||||
|
|
||||||
int callback_count() const { return callback_count_; }
|
int callback_count() const { return callback_count_; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -108,8 +112,6 @@ class SigslotTester2 : public sigslot::has_slots<> {
|
||||||
int callback_count_;
|
int callback_count_;
|
||||||
C1* capture1_;
|
C1* capture1_;
|
||||||
C2* capture2_;
|
C2* capture2_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(SigslotTester2);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class A1, class A2, class A3, class C1, class C2, class C3>
|
template <class A1, class A2, class A3, class C1, class C2, class C3>
|
||||||
|
@ -126,6 +128,9 @@ class SigslotTester3 : public sigslot::has_slots<> {
|
||||||
signal->connect(this, &SigslotTester3::OnSignalCallback);
|
signal->connect(this, &SigslotTester3::OnSignalCallback);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SigslotTester3(const SigslotTester3&) = delete;
|
||||||
|
SigslotTester3& operator=(const SigslotTester3&) = delete;
|
||||||
|
|
||||||
int callback_count() const { return callback_count_; }
|
int callback_count() const { return callback_count_; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -140,8 +145,6 @@ class SigslotTester3 : public sigslot::has_slots<> {
|
||||||
C1* capture1_;
|
C1* capture1_;
|
||||||
C2* capture2_;
|
C2* capture2_;
|
||||||
C3* capture3_;
|
C3* capture3_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(SigslotTester3);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class A1,
|
template <class A1,
|
||||||
|
@ -167,6 +170,9 @@ class SigslotTester4 : public sigslot::has_slots<> {
|
||||||
signal->connect(this, &SigslotTester4::OnSignalCallback);
|
signal->connect(this, &SigslotTester4::OnSignalCallback);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SigslotTester4(const SigslotTester4&) = delete;
|
||||||
|
SigslotTester4& operator=(const SigslotTester4&) = delete;
|
||||||
|
|
||||||
int callback_count() const { return callback_count_; }
|
int callback_count() const { return callback_count_; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -183,8 +189,6 @@ class SigslotTester4 : public sigslot::has_slots<> {
|
||||||
C2* capture2_;
|
C2* capture2_;
|
||||||
C3* capture3_;
|
C3* capture3_;
|
||||||
C4* capture4_;
|
C4* capture4_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(SigslotTester4);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class A1,
|
template <class A1,
|
||||||
|
@ -214,6 +218,9 @@ class SigslotTester5 : public sigslot::has_slots<> {
|
||||||
signal->connect(this, &SigslotTester5::OnSignalCallback);
|
signal->connect(this, &SigslotTester5::OnSignalCallback);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SigslotTester5(const SigslotTester5&) = delete;
|
||||||
|
SigslotTester5& operator=(const SigslotTester5&) = delete;
|
||||||
|
|
||||||
int callback_count() const { return callback_count_; }
|
int callback_count() const { return callback_count_; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -232,8 +239,6 @@ class SigslotTester5 : public sigslot::has_slots<> {
|
||||||
C3* capture3_;
|
C3* capture3_;
|
||||||
C4* capture4_;
|
C4* capture4_;
|
||||||
C5* capture5_;
|
C5* capture5_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(SigslotTester5);
|
|
||||||
};
|
};
|
||||||
} // namespace rtc
|
} // namespace rtc
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,6 @@
|
||||||
#include "rtc_base/win32.h"
|
#include "rtc_base/win32.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
#include "rtc_base/socket_address.h"
|
#include "rtc_base/socket_address.h"
|
||||||
#include "rtc_base/third_party/sigslot/sigslot.h"
|
#include "rtc_base/third_party/sigslot/sigslot.h"
|
||||||
|
|
||||||
|
@ -83,6 +82,9 @@ class Socket {
|
||||||
public:
|
public:
|
||||||
virtual ~Socket() {}
|
virtual ~Socket() {}
|
||||||
|
|
||||||
|
Socket(const Socket&) = delete;
|
||||||
|
Socket& operator=(const Socket&) = delete;
|
||||||
|
|
||||||
// Returns the address to which the socket is bound. If the socket is not
|
// Returns the address to which the socket is bound. If the socket is not
|
||||||
// bound, then the any-address is returned.
|
// bound, then the any-address is returned.
|
||||||
virtual SocketAddress GetLocalAddress() const = 0;
|
virtual SocketAddress GetLocalAddress() const = 0;
|
||||||
|
@ -138,9 +140,6 @@ class Socket {
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Socket() {}
|
Socket() {}
|
||||||
|
|
||||||
private:
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(Socket);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace rtc
|
} // namespace rtc
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
|
|
||||||
#include "api/array_view.h"
|
#include "api/array_view.h"
|
||||||
#include "rtc_base/async_socket.h"
|
#include "rtc_base/async_socket.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
#include "rtc_base/crypt_string.h"
|
#include "rtc_base/crypt_string.h"
|
||||||
|
|
||||||
namespace rtc {
|
namespace rtc {
|
||||||
|
@ -34,6 +33,9 @@ class BufferedReadAdapter : public AsyncSocketAdapter {
|
||||||
BufferedReadAdapter(Socket* socket, size_t buffer_size);
|
BufferedReadAdapter(Socket* socket, size_t buffer_size);
|
||||||
~BufferedReadAdapter() override;
|
~BufferedReadAdapter() override;
|
||||||
|
|
||||||
|
BufferedReadAdapter(const BufferedReadAdapter&) = delete;
|
||||||
|
BufferedReadAdapter& operator=(const BufferedReadAdapter&) = delete;
|
||||||
|
|
||||||
int Send(const void* pv, size_t cb) override;
|
int Send(const void* pv, size_t cb) override;
|
||||||
int Recv(void* pv, size_t cb, int64_t* timestamp) override;
|
int Recv(void* pv, size_t cb, int64_t* timestamp) override;
|
||||||
|
|
||||||
|
@ -51,7 +53,6 @@ class BufferedReadAdapter : public AsyncSocketAdapter {
|
||||||
char* buffer_;
|
char* buffer_;
|
||||||
size_t buffer_size_, data_len_;
|
size_t buffer_size_, data_len_;
|
||||||
bool buffering_;
|
bool buffering_;
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(BufferedReadAdapter);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -65,12 +66,14 @@ class AsyncSSLSocket : public BufferedReadAdapter {
|
||||||
|
|
||||||
explicit AsyncSSLSocket(Socket* socket);
|
explicit AsyncSSLSocket(Socket* socket);
|
||||||
|
|
||||||
|
AsyncSSLSocket(const AsyncSSLSocket&) = delete;
|
||||||
|
AsyncSSLSocket& operator=(const AsyncSSLSocket&) = delete;
|
||||||
|
|
||||||
int Connect(const SocketAddress& addr) override;
|
int Connect(const SocketAddress& addr) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void OnConnectEvent(Socket* socket) override;
|
void OnConnectEvent(Socket* socket) override;
|
||||||
void ProcessInput(char* data, size_t* len) override;
|
void ProcessInput(char* data, size_t* len) override;
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(AsyncSSLSocket);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -85,6 +88,9 @@ class AsyncHttpsProxySocket : public BufferedReadAdapter {
|
||||||
const CryptString& password);
|
const CryptString& password);
|
||||||
~AsyncHttpsProxySocket() override;
|
~AsyncHttpsProxySocket() override;
|
||||||
|
|
||||||
|
AsyncHttpsProxySocket(const AsyncHttpsProxySocket&) = delete;
|
||||||
|
AsyncHttpsProxySocket& operator=(const AsyncHttpsProxySocket&) = delete;
|
||||||
|
|
||||||
// If connect is forced, the adapter will always issue an HTTP CONNECT to the
|
// If connect is forced, the adapter will always issue an HTTP CONNECT to the
|
||||||
// target address. Otherwise, it will connect only if the destination port
|
// target address. Otherwise, it will connect only if the destination port
|
||||||
// is not port 80.
|
// is not port 80.
|
||||||
|
@ -128,7 +134,6 @@ class AsyncHttpsProxySocket : public BufferedReadAdapter {
|
||||||
} state_;
|
} state_;
|
||||||
HttpAuthContext* context_;
|
HttpAuthContext* context_;
|
||||||
std::string unknown_mechanisms_;
|
std::string unknown_mechanisms_;
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(AsyncHttpsProxySocket);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -142,6 +147,9 @@ class AsyncSocksProxySocket : public BufferedReadAdapter {
|
||||||
const CryptString& password);
|
const CryptString& password);
|
||||||
~AsyncSocksProxySocket() override;
|
~AsyncSocksProxySocket() override;
|
||||||
|
|
||||||
|
AsyncSocksProxySocket(const AsyncSocksProxySocket&) = delete;
|
||||||
|
AsyncSocksProxySocket& operator=(const AsyncSocksProxySocket&) = delete;
|
||||||
|
|
||||||
int Connect(const SocketAddress& addr) override;
|
int Connect(const SocketAddress& addr) override;
|
||||||
SocketAddress GetRemoteAddress() const override;
|
SocketAddress GetRemoteAddress() const override;
|
||||||
int Close() override;
|
int Close() override;
|
||||||
|
@ -162,7 +170,6 @@ class AsyncSocksProxySocket : public BufferedReadAdapter {
|
||||||
SocketAddress proxy_, dest_;
|
SocketAddress proxy_, dest_;
|
||||||
std::string user_;
|
std::string user_;
|
||||||
CryptString pass_;
|
CryptString pass_;
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(AsyncSocksProxySocket);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace rtc
|
} // namespace rtc
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
#include "rtc_base/socket.h"
|
#include "rtc_base/socket.h"
|
||||||
#include "rtc_base/stream.h"
|
#include "rtc_base/stream.h"
|
||||||
#include "rtc_base/third_party/sigslot/sigslot.h"
|
#include "rtc_base/third_party/sigslot/sigslot.h"
|
||||||
|
@ -27,6 +26,9 @@ class SocketStream : public StreamInterface, public sigslot::has_slots<> {
|
||||||
explicit SocketStream(Socket* socket);
|
explicit SocketStream(Socket* socket);
|
||||||
~SocketStream() override;
|
~SocketStream() override;
|
||||||
|
|
||||||
|
SocketStream(const SocketStream&) = delete;
|
||||||
|
SocketStream& operator=(const SocketStream&) = delete;
|
||||||
|
|
||||||
void Attach(Socket* socket);
|
void Attach(Socket* socket);
|
||||||
Socket* Detach();
|
Socket* Detach();
|
||||||
|
|
||||||
|
@ -53,8 +55,6 @@ class SocketStream : public StreamInterface, public sigslot::has_slots<> {
|
||||||
void OnCloseEvent(Socket* socket, int err);
|
void OnCloseEvent(Socket* socket, int err);
|
||||||
|
|
||||||
Socket* socket_;
|
Socket* socket_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(SocketStream);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -17,12 +17,12 @@
|
||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "rtc_base/buffer.h"
|
#include "rtc_base/buffer.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
#include "rtc_base/system/rtc_export.h"
|
#include "rtc_base/system/rtc_export.h"
|
||||||
|
|
||||||
namespace rtc {
|
namespace rtc {
|
||||||
|
@ -101,6 +101,9 @@ class RTC_EXPORT SSLCertChain final {
|
||||||
|
|
||||||
~SSLCertChain();
|
~SSLCertChain();
|
||||||
|
|
||||||
|
SSLCertChain(const SSLCertChain&) = delete;
|
||||||
|
SSLCertChain& operator=(const SSLCertChain&) = delete;
|
||||||
|
|
||||||
// Vector access methods.
|
// Vector access methods.
|
||||||
size_t GetSize() const { return certs_.size(); }
|
size_t GetSize() const { return certs_.size(); }
|
||||||
|
|
||||||
|
@ -118,8 +121,6 @@ class RTC_EXPORT SSLCertChain final {
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::vector<std::unique_ptr<SSLCertificate>> certs_;
|
std::vector<std::unique_ptr<SSLCertificate>> certs_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(SSLCertChain);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// SSLCertificateVerifier provides a simple interface to allow third parties to
|
// SSLCertificateVerifier provides a simple interface to allow third parties to
|
||||||
|
|
|
@ -14,7 +14,6 @@
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#include "rtc_base/buffer.h"
|
#include "rtc_base/buffer.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
#include "rtc_base/message_handler.h"
|
#include "rtc_base/message_handler.h"
|
||||||
#include "rtc_base/system/rtc_export.h"
|
#include "rtc_base/system/rtc_export.h"
|
||||||
#include "rtc_base/third_party/sigslot/sigslot.h"
|
#include "rtc_base/third_party/sigslot/sigslot.h"
|
||||||
|
@ -52,6 +51,9 @@ class RTC_EXPORT StreamInterface {
|
||||||
public:
|
public:
|
||||||
virtual ~StreamInterface() {}
|
virtual ~StreamInterface() {}
|
||||||
|
|
||||||
|
StreamInterface(const StreamInterface&) = delete;
|
||||||
|
StreamInterface& operator=(const StreamInterface&) = delete;
|
||||||
|
|
||||||
virtual StreamState GetState() const = 0;
|
virtual StreamState GetState() const = 0;
|
||||||
|
|
||||||
// Read attempts to fill buffer of size buffer_len. Write attempts to send
|
// Read attempts to fill buffer of size buffer_len. Write attempts to send
|
||||||
|
@ -110,9 +112,6 @@ class RTC_EXPORT StreamInterface {
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
StreamInterface();
|
StreamInterface();
|
||||||
|
|
||||||
private:
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(StreamInterface);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace rtc
|
} // namespace rtc
|
||||||
|
|
|
@ -20,7 +20,6 @@
|
||||||
#include "api/task_queue/queued_task.h"
|
#include "api/task_queue/queued_task.h"
|
||||||
#include "api/task_queue/task_queue_base.h"
|
#include "api/task_queue/task_queue_base.h"
|
||||||
#include "api/task_queue/task_queue_factory.h"
|
#include "api/task_queue/task_queue_factory.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
#include "rtc_base/system/rtc_export.h"
|
#include "rtc_base/system/rtc_export.h"
|
||||||
#include "rtc_base/task_utils/to_queued_task.h"
|
#include "rtc_base/task_utils/to_queued_task.h"
|
||||||
#include "rtc_base/thread_annotations.h"
|
#include "rtc_base/thread_annotations.h"
|
||||||
|
@ -83,6 +82,9 @@ class RTC_LOCKABLE RTC_EXPORT TaskQueue {
|
||||||
webrtc::TaskQueueDeleter> task_queue);
|
webrtc::TaskQueueDeleter> task_queue);
|
||||||
~TaskQueue();
|
~TaskQueue();
|
||||||
|
|
||||||
|
TaskQueue(const TaskQueue&) = delete;
|
||||||
|
TaskQueue& operator=(const TaskQueue&) = delete;
|
||||||
|
|
||||||
// Used for DCHECKing the current queue.
|
// Used for DCHECKing the current queue.
|
||||||
bool IsCurrent() const;
|
bool IsCurrent() const;
|
||||||
|
|
||||||
|
@ -125,8 +127,6 @@ class RTC_LOCKABLE RTC_EXPORT TaskQueue {
|
||||||
|
|
||||||
private:
|
private:
|
||||||
webrtc::TaskQueueBase* const impl_;
|
webrtc::TaskQueueBase* const impl_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(TaskQueue);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace rtc
|
} // namespace rtc
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "rtc_base/async_udp_socket.h"
|
#include "rtc_base/async_udp_socket.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
#include "rtc_base/fake_clock.h"
|
#include "rtc_base/fake_clock.h"
|
||||||
#include "rtc_base/synchronization/mutex.h"
|
#include "rtc_base/synchronization/mutex.h"
|
||||||
|
|
||||||
|
@ -53,6 +52,9 @@ class TestClient : public sigslot::has_slots<> {
|
||||||
ThreadProcessingFakeClock* fake_clock);
|
ThreadProcessingFakeClock* fake_clock);
|
||||||
~TestClient() override;
|
~TestClient() override;
|
||||||
|
|
||||||
|
TestClient(const TestClient&) = delete;
|
||||||
|
TestClient& operator=(const TestClient&) = delete;
|
||||||
|
|
||||||
SocketAddress address() const { return socket_->GetLocalAddress(); }
|
SocketAddress address() const { return socket_->GetLocalAddress(); }
|
||||||
SocketAddress remote_address() const { return socket_->GetRemoteAddress(); }
|
SocketAddress remote_address() const { return socket_->GetRemoteAddress(); }
|
||||||
|
|
||||||
|
@ -110,7 +112,6 @@ class TestClient : public sigslot::has_slots<> {
|
||||||
std::vector<std::unique_ptr<Packet>> packets_;
|
std::vector<std::unique_ptr<Packet>> packets_;
|
||||||
int ready_to_send_count_ = 0;
|
int ready_to_send_count_ = 0;
|
||||||
int64_t prev_packet_timestamp_;
|
int64_t prev_packet_timestamp_;
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(TestClient);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace rtc
|
} // namespace rtc
|
||||||
|
|
|
@ -20,7 +20,6 @@
|
||||||
#include "absl/algorithm/container.h"
|
#include "absl/algorithm/container.h"
|
||||||
#include "rtc_base/async_packet_socket.h"
|
#include "rtc_base/async_packet_socket.h"
|
||||||
#include "rtc_base/async_tcp_socket.h"
|
#include "rtc_base/async_tcp_socket.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
#include "rtc_base/socket.h"
|
#include "rtc_base/socket.h"
|
||||||
#include "rtc_base/socket_address.h"
|
#include "rtc_base/socket_address.h"
|
||||||
#include "rtc_base/third_party/sigslot/sigslot.h"
|
#include "rtc_base/third_party/sigslot/sigslot.h"
|
||||||
|
@ -35,6 +34,9 @@ class TestEchoServer : public sigslot::has_slots<> {
|
||||||
TestEchoServer(Thread* thread, const SocketAddress& addr);
|
TestEchoServer(Thread* thread, const SocketAddress& addr);
|
||||||
~TestEchoServer() override;
|
~TestEchoServer() override;
|
||||||
|
|
||||||
|
TestEchoServer(const TestEchoServer&) = delete;
|
||||||
|
TestEchoServer& operator=(const TestEchoServer&) = delete;
|
||||||
|
|
||||||
SocketAddress address() const { return server_socket_->GetLocalAddress(); }
|
SocketAddress address() const { return server_socket_->GetLocalAddress(); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -64,7 +66,6 @@ class TestEchoServer : public sigslot::has_slots<> {
|
||||||
typedef std::list<AsyncTCPSocket*> ClientList;
|
typedef std::list<AsyncTCPSocket*> ClientList;
|
||||||
std::unique_ptr<Socket> server_socket_;
|
std::unique_ptr<Socket> server_socket_;
|
||||||
ClientList client_sockets_;
|
ClientList client_sockets_;
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(TestEchoServer);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace rtc
|
} // namespace rtc
|
||||||
|
|
|
@ -75,6 +75,9 @@ class MessageHandlerWithTask final : public MessageHandler {
|
||||||
public:
|
public:
|
||||||
MessageHandlerWithTask() {}
|
MessageHandlerWithTask() {}
|
||||||
|
|
||||||
|
MessageHandlerWithTask(const MessageHandlerWithTask&) = delete;
|
||||||
|
MessageHandlerWithTask& operator=(const MessageHandlerWithTask&) = delete;
|
||||||
|
|
||||||
void OnMessage(Message* msg) override {
|
void OnMessage(Message* msg) override {
|
||||||
static_cast<rtc_thread_internal::MessageLikeTask*>(msg->pdata)->Run();
|
static_cast<rtc_thread_internal::MessageLikeTask*>(msg->pdata)->Run();
|
||||||
delete msg->pdata;
|
delete msg->pdata;
|
||||||
|
@ -82,8 +85,6 @@ class MessageHandlerWithTask final : public MessageHandler {
|
||||||
|
|
||||||
private:
|
private:
|
||||||
~MessageHandlerWithTask() override {}
|
~MessageHandlerWithTask() override {}
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(MessageHandlerWithTask);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class RTC_SCOPED_LOCKABLE MarkProcessingCritScope {
|
class RTC_SCOPED_LOCKABLE MarkProcessingCritScope {
|
||||||
|
@ -100,11 +101,12 @@ class RTC_SCOPED_LOCKABLE MarkProcessingCritScope {
|
||||||
cs_->Leave();
|
cs_->Leave();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MarkProcessingCritScope(const MarkProcessingCritScope&) = delete;
|
||||||
|
MarkProcessingCritScope& operator=(const MarkProcessingCritScope&) = delete;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const RecursiveCriticalSection* const cs_;
|
const RecursiveCriticalSection* const cs_;
|
||||||
size_t* processing_;
|
size_t* processing_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(MarkProcessingCritScope);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
|
@ -29,7 +29,6 @@
|
||||||
#include "api/task_queue/queued_task.h"
|
#include "api/task_queue/queued_task.h"
|
||||||
#include "api/task_queue/task_queue_base.h"
|
#include "api/task_queue/task_queue_base.h"
|
||||||
#include "rtc_base/checks.h"
|
#include "rtc_base/checks.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
#include "rtc_base/deprecated/recursive_critical_section.h"
|
#include "rtc_base/deprecated/recursive_critical_section.h"
|
||||||
#include "rtc_base/location.h"
|
#include "rtc_base/location.h"
|
||||||
#include "rtc_base/message_handler.h"
|
#include "rtc_base/message_handler.h"
|
||||||
|
@ -89,14 +88,15 @@ class MessageWithFunctor final : public MessageLikeTask {
|
||||||
explicit MessageWithFunctor(FunctorT&& functor)
|
explicit MessageWithFunctor(FunctorT&& functor)
|
||||||
: functor_(std::forward<FunctorT>(functor)) {}
|
: functor_(std::forward<FunctorT>(functor)) {}
|
||||||
|
|
||||||
|
MessageWithFunctor(const MessageWithFunctor&) = delete;
|
||||||
|
MessageWithFunctor& operator=(const MessageWithFunctor&) = delete;
|
||||||
|
|
||||||
void Run() override { functor_(); }
|
void Run() override { functor_(); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
~MessageWithFunctor() override {}
|
~MessageWithFunctor() override {}
|
||||||
|
|
||||||
typename std::remove_reference<FunctorT>::type functor_;
|
typename std::remove_reference<FunctorT>::type functor_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(MessageWithFunctor);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace rtc_thread_internal
|
} // namespace rtc_thread_internal
|
||||||
|
@ -152,6 +152,9 @@ class RTC_EXPORT ThreadManager {
|
||||||
ThreadManager();
|
ThreadManager();
|
||||||
~ThreadManager();
|
~ThreadManager();
|
||||||
|
|
||||||
|
ThreadManager(const ThreadManager&) = delete;
|
||||||
|
ThreadManager& operator=(const ThreadManager&) = delete;
|
||||||
|
|
||||||
void SetCurrentThreadInternal(Thread* thread);
|
void SetCurrentThreadInternal(Thread* thread);
|
||||||
void AddInternal(Thread* message_queue);
|
void AddInternal(Thread* message_queue);
|
||||||
void RemoveInternal(Thread* message_queue);
|
void RemoveInternal(Thread* message_queue);
|
||||||
|
@ -186,8 +189,6 @@ class RTC_EXPORT ThreadManager {
|
||||||
|
|
||||||
// The thread to potentially autowrap.
|
// The thread to potentially autowrap.
|
||||||
const PlatformThreadRef main_thread_ref_;
|
const PlatformThreadRef main_thread_ref_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(ThreadManager);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// WARNING! SUBCLASSES MUST CALL Stop() IN THEIR DESTRUCTORS! See ~Thread().
|
// WARNING! SUBCLASSES MUST CALL Stop() IN THEIR DESTRUCTORS! See ~Thread().
|
||||||
|
@ -221,6 +222,9 @@ class RTC_LOCKABLE RTC_EXPORT Thread : public webrtc::TaskQueueBase {
|
||||||
// calling Clear on the object from a different thread.
|
// calling Clear on the object from a different thread.
|
||||||
~Thread() override;
|
~Thread() override;
|
||||||
|
|
||||||
|
Thread(const Thread&) = delete;
|
||||||
|
Thread& operator=(const Thread&) = delete;
|
||||||
|
|
||||||
static std::unique_ptr<Thread> CreateWithSocketServer();
|
static std::unique_ptr<Thread> CreateWithSocketServer();
|
||||||
static std::unique_ptr<Thread> Create();
|
static std::unique_ptr<Thread> Create();
|
||||||
static Thread* Current();
|
static Thread* Current();
|
||||||
|
@ -685,8 +689,6 @@ class RTC_LOCKABLE RTC_EXPORT Thread : public webrtc::TaskQueueBase {
|
||||||
friend class ThreadManager;
|
friend class ThreadManager;
|
||||||
|
|
||||||
int dispatch_warning_ms_ RTC_GUARDED_BY(this) = kSlowDispatchLoggingThreshold;
|
int dispatch_warning_ms_ RTC_GUARDED_BY(this) = kSlowDispatchLoggingThreshold;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(Thread);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// AutoThread automatically installs itself at construction
|
// AutoThread automatically installs itself at construction
|
||||||
|
@ -700,8 +702,8 @@ class AutoThread : public Thread {
|
||||||
AutoThread();
|
AutoThread();
|
||||||
~AutoThread() override;
|
~AutoThread() override;
|
||||||
|
|
||||||
private:
|
AutoThread(const AutoThread&) = delete;
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(AutoThread);
|
AutoThread& operator=(const AutoThread&) = delete;
|
||||||
};
|
};
|
||||||
|
|
||||||
// AutoSocketServerThread automatically installs itself at
|
// AutoSocketServerThread automatically installs itself at
|
||||||
|
@ -714,10 +716,11 @@ class AutoSocketServerThread : public Thread {
|
||||||
explicit AutoSocketServerThread(SocketServer* ss);
|
explicit AutoSocketServerThread(SocketServer* ss);
|
||||||
~AutoSocketServerThread() override;
|
~AutoSocketServerThread() override;
|
||||||
|
|
||||||
|
AutoSocketServerThread(const AutoSocketServerThread&) = delete;
|
||||||
|
AutoSocketServerThread& operator=(const AutoSocketServerThread&) = delete;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
rtc::Thread* old_thread_;
|
rtc::Thread* old_thread_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(AutoSocketServerThread);
|
|
||||||
};
|
};
|
||||||
} // namespace rtc
|
} // namespace rtc
|
||||||
|
|
||||||
|
|
|
@ -204,6 +204,10 @@ struct FunctorD {
|
||||||
public:
|
public:
|
||||||
explicit FunctorD(AtomicBool* flag) : flag_(flag) {}
|
explicit FunctorD(AtomicBool* flag) : flag_(flag) {}
|
||||||
FunctorD(FunctorD&&) = default;
|
FunctorD(FunctorD&&) = default;
|
||||||
|
|
||||||
|
FunctorD(const FunctorD&) = delete;
|
||||||
|
FunctorD& operator=(const FunctorD&) = delete;
|
||||||
|
|
||||||
FunctorD& operator=(FunctorD&&) = default;
|
FunctorD& operator=(FunctorD&&) = default;
|
||||||
void operator()() {
|
void operator()() {
|
||||||
if (flag_)
|
if (flag_)
|
||||||
|
@ -212,7 +216,6 @@ struct FunctorD {
|
||||||
|
|
||||||
private:
|
private:
|
||||||
AtomicBool* flag_;
|
AtomicBool* flag_;
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(FunctorD);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// See: https://code.google.com/p/webrtc/issues/detail?id=2409
|
// See: https://code.google.com/p/webrtc/issues/detail?id=2409
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
#include "rtc_base/system/rtc_export.h"
|
#include "rtc_base/system/rtc_export.h"
|
||||||
|
|
||||||
namespace rtc {
|
namespace rtc {
|
||||||
|
@ -35,6 +34,9 @@ class RTC_EXPORT TimestampAligner {
|
||||||
TimestampAligner();
|
TimestampAligner();
|
||||||
~TimestampAligner();
|
~TimestampAligner();
|
||||||
|
|
||||||
|
TimestampAligner(const TimestampAligner&) = delete;
|
||||||
|
TimestampAligner& operator=(const TimestampAligner&) = delete;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// Translates timestamps of a capture system to the same timescale as is used
|
// Translates timestamps of a capture system to the same timescale as is used
|
||||||
// by rtc::TimeMicros(). `capturer_time_us` is assumed to be accurate, but
|
// by rtc::TimeMicros(). `capturer_time_us` is assumed to be accurate, but
|
||||||
|
@ -77,7 +79,6 @@ class RTC_EXPORT TimestampAligner {
|
||||||
// Offset between `prev_translated_time_us_` and the corresponding capturer
|
// Offset between `prev_translated_time_us_` and the corresponding capturer
|
||||||
// time.
|
// time.
|
||||||
int64_t prev_time_offset_us_;
|
int64_t prev_time_offset_us_;
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(TimestampAligner);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace rtc
|
} // namespace rtc
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "rtc_base/checks.h"
|
#include "rtc_base/checks.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
#include "rtc_base/event.h"
|
#include "rtc_base/event.h"
|
||||||
#include "rtc_base/fake_clock.h"
|
#include "rtc_base/fake_clock.h"
|
||||||
#include "rtc_base/message_handler.h"
|
#include "rtc_base/message_handler.h"
|
||||||
|
@ -163,6 +162,9 @@ class VirtualSocketServer : public SocketServer {
|
||||||
explicit VirtualSocketServer(ThreadProcessingFakeClock* fake_clock);
|
explicit VirtualSocketServer(ThreadProcessingFakeClock* fake_clock);
|
||||||
~VirtualSocketServer() override;
|
~VirtualSocketServer() override;
|
||||||
|
|
||||||
|
VirtualSocketServer(const VirtualSocketServer&) = delete;
|
||||||
|
VirtualSocketServer& operator=(const VirtualSocketServer&) = delete;
|
||||||
|
|
||||||
// The default source address specifies which local address to use when a
|
// The default source address specifies which local address to use when a
|
||||||
// socket is bound to the 'any' address, e.g. 0.0.0.0. (If not set, the 'any'
|
// socket is bound to the 'any' address, e.g. 0.0.0.0. (If not set, the 'any'
|
||||||
// address is used as the source address on outgoing virtual packets, exposed
|
// address is used as the source address on outgoing virtual packets, exposed
|
||||||
|
@ -419,7 +421,6 @@ class VirtualSocketServer : public SocketServer {
|
||||||
size_t max_udp_payload_ RTC_GUARDED_BY(mutex_) = 65507;
|
size_t max_udp_payload_ RTC_GUARDED_BY(mutex_) = 65507;
|
||||||
|
|
||||||
bool sending_blocked_ RTC_GUARDED_BY(mutex_) = false;
|
bool sending_blocked_ RTC_GUARDED_BY(mutex_) = false;
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(VirtualSocketServer);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace rtc
|
} // namespace rtc
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
#include <random>
|
#include <random>
|
||||||
|
|
||||||
#include "rtc_base/checks.h"
|
#include "rtc_base/checks.h"
|
||||||
|
#include "rtc_base/constructor_magic.h"
|
||||||
#include "rtc_base/null_socket_server.h"
|
#include "rtc_base/null_socket_server.h"
|
||||||
#include "rtc_base/thread.h"
|
#include "rtc_base/thread.h"
|
||||||
#include "test/gtest.h"
|
#include "test/gtest.h"
|
||||||
|
|
Loading…
Reference in a new issue