123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- #ifndef PC_DTLS_TRANSPORT_H_
- #define PC_DTLS_TRANSPORT_H_
- #include <memory>
- #include "api/dtls_transport_interface.h"
- #include "api/ice_transport_interface.h"
- #include "api/scoped_refptr.h"
- #include "p2p/base/dtls_transport.h"
- namespace webrtc {
- class IceTransportWithPointer;
- class DtlsTransport : public DtlsTransportInterface,
- public sigslot::has_slots<> {
- public:
-
-
-
-
-
- explicit DtlsTransport(
- std::unique_ptr<cricket::DtlsTransportInternal> internal);
- rtc::scoped_refptr<IceTransportInterface> ice_transport() override;
- DtlsTransportInformation Information() override;
- void RegisterObserver(DtlsTransportObserverInterface* observer) override;
- void UnregisterObserver() override;
- void Clear();
- cricket::DtlsTransportInternal* internal() {
- rtc::CritScope scope(&lock_);
- return internal_dtls_transport_.get();
- }
- const cricket::DtlsTransportInternal* internal() const {
- rtc::CritScope scope(&lock_);
- return internal_dtls_transport_.get();
- }
- protected:
- ~DtlsTransport();
- private:
- void OnInternalDtlsState(cricket::DtlsTransportInternal* transport,
- cricket::DtlsTransportState state);
- void UpdateInformation();
- DtlsTransportObserverInterface* observer_ = nullptr;
- rtc::Thread* owner_thread_;
- rtc::CriticalSection lock_;
- DtlsTransportInformation info_ RTC_GUARDED_BY(lock_);
- std::unique_ptr<cricket::DtlsTransportInternal> internal_dtls_transport_
- RTC_GUARDED_BY(lock_);
- const rtc::scoped_refptr<IceTransportWithPointer> ice_transport_;
- };
- }
- #endif
|