webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Public Member Functions | List of all members
webrtc::MockWebRtcSession Class Reference

#include <mock_webrtcsession.h>

Inheritance diagram for webrtc::MockWebRtcSession:
webrtc::WebRtcSession webrtc::WebRtcSession sigslot::has_slots<> webrtc::DataChannelProviderInterface sigslot::has_slots<> webrtc::DataChannelProviderInterface sigslot::has_slots<> webrtc::DataChannelProviderInterface sigslot::has_slots<> webrtc::DataChannelProviderInterface

Public Member Functions

 MockWebRtcSession (MediaControllerInterface *media_controller)
 
 MOCK_METHOD0 (voice_channel, cricket::VoiceChannel *())
 
 MOCK_METHOD0 (video_channel, cricket::VideoChannel *())
 
 MOCK_METHOD2 (GetLocalTrackIdBySsrc, bool(uint32_t, std::string *))
 
 MOCK_METHOD2 (GetRemoteTrackIdBySsrc, bool(uint32_t, std::string *))
 
 MOCK_METHOD1 (GetStats, std::unique_ptr< SessionStats >(const ChannelNamePairs &))
 
 MOCK_METHOD2 (GetLocalCertificate, bool(const std::string &transport_name, rtc::scoped_refptr< rtc::RTCCertificate > *certificate))
 
std::unique_ptr< rtc::SSLCertificateGetRemoteSSLCertificate (const std::string &transport_name)
 
 MOCK_METHOD1 (GetRemoteSSLCertificate_ReturnsRawPointer, rtc::SSLCertificate *(const std::string &transport_name))
 
 MockWebRtcSession (MediaControllerInterface *media_controller)
 
 MOCK_METHOD0 (voice_channel, cricket::VoiceChannel *())
 
 MOCK_METHOD0 (video_channel, cricket::VideoChannel *())
 
 MOCK_METHOD2 (GetLocalTrackIdBySsrc, bool(uint32_t, std::string *))
 
 MOCK_METHOD2 (GetRemoteTrackIdBySsrc, bool(uint32_t, std::string *))
 
 MOCK_METHOD1 (GetStats, std::unique_ptr< SessionStats >(const ChannelNamePairs &))
 
 MOCK_METHOD2 (GetLocalCertificate, bool(const std::string &transport_name, rtc::scoped_refptr< rtc::RTCCertificate > *certificate))
 
std::unique_ptr< rtc::SSLCertificateGetRemoteSSLCertificate (const std::string &transport_name)
 
 MOCK_METHOD1 (GetRemoteSSLCertificate_ReturnsRawPointer, rtc::SSLCertificate *(const std::string &transport_name))
 
- Public Member Functions inherited from webrtc::WebRtcSession
 WebRtcSession (webrtc::MediaControllerInterface *media_controller, rtc::Thread *network_thread, rtc::Thread *worker_thread, rtc::Thread *signaling_thread, cricket::PortAllocator *port_allocator, std::unique_ptr< cricket::TransportController > transport_controller, std::unique_ptr< cricket::SctpTransportInternalFactory > sctp_factory)
 
virtual ~WebRtcSession ()
 
rtc::Threadnetwork_thread () const
 
rtc::Threadworker_thread () const
 
rtc::Threadsignaling_thread () const
 
const std::stringid () const
 
bool Initialize (const PeerConnectionFactoryInterface::Options &options, std::unique_ptr< rtc::RTCCertificateGeneratorInterface > cert_generator, const PeerConnectionInterface::RTCConfiguration &rtc_configuration)
 
void Close ()
 
bool initial_offerer () const
 
State state () const
 
Error error () const
 
const std::stringerror_desc () const
 
void RegisterIceObserver (IceObserver *observer)
 
virtual cricket::VoiceChannelvoice_channel ()
 
virtual cricket::VideoChannelvideo_channel ()
 
virtual cricket::RtpDataChannelrtp_data_channel ()
 
virtual rtc::Optional< std::stringsctp_content_name () const
 
virtual rtc::Optional< std::stringsctp_transport_name () const
 
cricket::BaseChannelGetChannel (const std::string &content_name)
 
cricket::SecurePolicy SdesPolicy () const
 
bool GetSctpSslRole (rtc::SSLRole *role)
 
bool GetSslRole (const std::string &content_name, rtc::SSLRole *role)
 
void CreateOffer (CreateSessionDescriptionObserver *observer, const PeerConnectionInterface::RTCOfferAnswerOptions &options, const cricket::MediaSessionOptions &session_options)
 
void CreateAnswer (CreateSessionDescriptionObserver *observer, const cricket::MediaSessionOptions &session_options)
 
bool SetLocalDescription (SessionDescriptionInterface *desc, std::string *err_desc)
 
bool SetRemoteDescription (SessionDescriptionInterface *desc, std::string *err_desc)
 
bool ProcessIceMessage (const IceCandidateInterface *ice_candidate)
 
bool RemoveRemoteIceCandidates (const std::vector< cricket::Candidate > &candidates)
 
cricket::IceConfig ParseIceConfig (const PeerConnectionInterface::RTCConfiguration &config) const
 
void SetIceConfig (const cricket::IceConfig &ice_config)
 
void MaybeStartGathering ()
 
const SessionDescriptionInterfacelocal_description () const
 
const SessionDescriptionInterfaceremote_description () const
 
const SessionDescriptionInterfacecurrent_local_description () const
 
const SessionDescriptionInterfacecurrent_remote_description () const
 
const SessionDescriptionInterfacepending_local_description () const
 
const SessionDescriptionInterfacepending_remote_description () const
 
virtual bool GetLocalTrackIdBySsrc (uint32_t ssrc, std::string *track_id)
 
virtual bool GetRemoteTrackIdBySsrc (uint32_t ssrc, std::string *track_id)
 
bool SendData (const cricket::SendDataParams &params, const rtc::CopyOnWriteBuffer &payload, cricket::SendDataResult *result) override
 
bool ConnectDataChannel (DataChannel *webrtc_data_channel) override
 
void DisconnectDataChannel (DataChannel *webrtc_data_channel) override
 
void AddSctpDataStream (int sid) override
 
void RemoveSctpDataStream (int sid) override
 
bool ReadyToSendData () const override
 
std::unique_ptr< SessionStatsGetStats_s ()
 
virtual std::unique_ptr< SessionStatsGetStats (const ChannelNamePairs &channel_name_pairs)
 
virtual bool GetLocalCertificate (const std::string &transport_name, rtc::scoped_refptr< rtc::RTCCertificate > *certificate)
 
cricket::DataChannelType data_channel_type () const
 
bool IceRestartPending (const std::string &content_name) const
 
void SetNeedsIceRestartFlag ()
 
bool NeedsIceRestart (const std::string &content_name) const
 
void OnCertificateReady (const rtc::scoped_refptr< rtc::RTCCertificate > &certificate)
 
void OnDtlsSrtpSetupFailure (cricket::BaseChannel *, bool rtcp)
 
bool waiting_for_certificate_for_testing () const
 
const rtc::scoped_refptr< rtc::RTCCertificate > & certificate_for_testing ()
 
void set_metrics_observer (webrtc::MetricsObserverInterface *metrics_observer)
 
 WebRtcSession (webrtc::MediaControllerInterface *media_controller, rtc::Thread *network_thread, rtc::Thread *worker_thread, rtc::Thread *signaling_thread, cricket::PortAllocator *port_allocator, std::unique_ptr< cricket::TransportController > transport_controller, std::unique_ptr< cricket::SctpTransportInternalFactory > sctp_factory)
 
virtual ~WebRtcSession ()
 
rtc::Threadnetwork_thread () const
 
rtc::Threadworker_thread () const
 
rtc::Threadsignaling_thread () const
 
const std::stringid () const
 
bool Initialize (const PeerConnectionFactoryInterface::Options &options, std::unique_ptr< rtc::RTCCertificateGeneratorInterface > cert_generator, const PeerConnectionInterface::RTCConfiguration &rtc_configuration)
 
void Close ()
 
bool initial_offerer () const
 
State state () const
 
Error error () const
 
const std::stringerror_desc () const
 
void RegisterIceObserver (IceObserver *observer)
 
virtual cricket::VoiceChannelvoice_channel ()
 
virtual cricket::VideoChannelvideo_channel ()
 
virtual cricket::RtpDataChannelrtp_data_channel ()
 
virtual rtc::Optional< std::stringsctp_content_name () const
 
virtual rtc::Optional< std::stringsctp_transport_name () const
 
cricket::BaseChannelGetChannel (const std::string &content_name)
 
cricket::SecurePolicy SdesPolicy () const
 
bool GetSctpSslRole (rtc::SSLRole *role)
 
bool GetSslRole (const std::string &content_name, rtc::SSLRole *role)
 
void CreateOffer (CreateSessionDescriptionObserver *observer, const PeerConnectionInterface::RTCOfferAnswerOptions &options, const cricket::MediaSessionOptions &session_options)
 
void CreateAnswer (CreateSessionDescriptionObserver *observer, const cricket::MediaSessionOptions &session_options)
 
bool SetLocalDescription (SessionDescriptionInterface *desc, std::string *err_desc)
 
bool SetRemoteDescription (SessionDescriptionInterface *desc, std::string *err_desc)
 
bool ProcessIceMessage (const IceCandidateInterface *ice_candidate)
 
bool RemoveRemoteIceCandidates (const std::vector< cricket::Candidate > &candidates)
 
cricket::IceConfig ParseIceConfig (const PeerConnectionInterface::RTCConfiguration &config) const
 
void SetIceConfig (const cricket::IceConfig &ice_config)
 
void MaybeStartGathering ()
 
const SessionDescriptionInterfacelocal_description () const
 
const SessionDescriptionInterfaceremote_description () const
 
const SessionDescriptionInterfacecurrent_local_description () const
 
const SessionDescriptionInterfacecurrent_remote_description () const
 
const SessionDescriptionInterfacepending_local_description () const
 
const SessionDescriptionInterfacepending_remote_description () const
 
virtual bool GetLocalTrackIdBySsrc (uint32_t ssrc, std::string *track_id)
 
virtual bool GetRemoteTrackIdBySsrc (uint32_t ssrc, std::string *track_id)
 
bool SendData (const cricket::SendDataParams &params, const rtc::CopyOnWriteBuffer &payload, cricket::SendDataResult *result) override
 
bool ConnectDataChannel (DataChannel *webrtc_data_channel) override
 
void DisconnectDataChannel (DataChannel *webrtc_data_channel) override
 
void AddSctpDataStream (int sid) override
 
void RemoveSctpDataStream (int sid) override
 
bool ReadyToSendData () const override
 
std::unique_ptr< SessionStatsGetStats_s ()
 
virtual std::unique_ptr< SessionStatsGetStats (const ChannelNamePairs &channel_name_pairs)
 
virtual bool GetLocalCertificate (const std::string &transport_name, rtc::scoped_refptr< rtc::RTCCertificate > *certificate)
 
cricket::DataChannelType data_channel_type () const
 
bool IceRestartPending (const std::string &content_name) const
 
void SetNeedsIceRestartFlag ()
 
bool NeedsIceRestart (const std::string &content_name) const
 
void OnCertificateReady (const rtc::scoped_refptr< rtc::RTCCertificate > &certificate)
 
void OnDtlsSrtpSetupFailure (cricket::BaseChannel *, bool rtcp)
 
bool waiting_for_certificate_for_testing () const
 
const rtc::scoped_refptr< rtc::RTCCertificate > & certificate_for_testing ()
 
void set_metrics_observer (webrtc::MetricsObserverInterface *metrics_observer)
 
- Public Member Functions inherited from sigslot::has_slots<>
 has_slots ()
 
 has_slots ()
 
 ~has_slots ()
 
 ~has_slots ()
 
- Public Member Functions inherited from sigslot::has_slots_interface
void signal_connect (_signal_base_interface *sender)
 
void signal_disconnect (_signal_base_interface *sender)
 
void disconnect_all ()
 
void signal_connect (_signal_base_interface *sender)
 
void signal_disconnect (_signal_base_interface *sender)
 
void disconnect_all ()
 

Additional Inherited Members

- Public Types inherited from webrtc::WebRtcSession
enum  State {
  STATE_INIT = 0, STATE_SENTOFFER, STATE_RECEIVEDOFFER, STATE_SENTPRANSWER,
  STATE_RECEIVEDPRANSWER, STATE_INPROGRESS, STATE_CLOSED, STATE_INIT = 0,
  STATE_SENTOFFER, STATE_RECEIVEDOFFER, STATE_SENTPRANSWER, STATE_RECEIVEDPRANSWER,
  STATE_INPROGRESS, STATE_CLOSED
}
 
enum  Error {
  ERROR_NONE = 0, ERROR_CONTENT = 1, ERROR_TRANSPORT = 2, ERROR_NONE = 0,
  ERROR_CONTENT = 1, ERROR_TRANSPORT = 2
}
 
enum  State {
  STATE_INIT = 0, STATE_SENTOFFER, STATE_RECEIVEDOFFER, STATE_SENTPRANSWER,
  STATE_RECEIVEDPRANSWER, STATE_INPROGRESS, STATE_CLOSED, STATE_INIT = 0,
  STATE_SENTOFFER, STATE_RECEIVEDOFFER, STATE_SENTPRANSWER, STATE_RECEIVEDPRANSWER,
  STATE_INPROGRESS, STATE_CLOSED
}
 
enum  Error {
  ERROR_NONE = 0, ERROR_CONTENT = 1, ERROR_TRANSPORT = 2, ERROR_NONE = 0,
  ERROR_CONTENT = 1, ERROR_TRANSPORT = 2
}
 
- Public Attributes inherited from webrtc::WebRtcSession
sigslot::signal2< WebRtcSession *, StateSignalState
 
sigslot::signal0 SignalVoiceChannelCreated
 
sigslot::signal0 SignalVoiceChannelDestroyed
 
sigslot::signal0 SignalVideoChannelCreated
 
sigslot::signal0 SignalVideoChannelDestroyed
 
sigslot::signal0 SignalDataChannelCreated
 
sigslot::signal0 SignalDataChannelDestroyed
 
sigslot::signal2< const std::string &, const InternalDataChannelInit & > SignalDataChannelOpenMessage
 
- Protected Member Functions inherited from webrtc::DataChannelProviderInterface
virtual ~DataChannelProviderInterface ()
 
virtual ~DataChannelProviderInterface ()
 
- Protected Member Functions inherited from sigslot::has_slots_interface
 has_slots_interface (signal_connect_t conn, signal_disconnect_t disc, disconnect_all_t disc_all)
 
virtual ~has_slots_interface ()
 
 has_slots_interface (signal_connect_t conn, signal_disconnect_t disc, disconnect_all_t disc_all)
 
virtual ~has_slots_interface ()
 

Constructor & Destructor Documentation

◆ MockWebRtcSession() [1/2]

webrtc::MockWebRtcSession::MockWebRtcSession ( MediaControllerInterface media_controller)
inlineexplicit

◆ MockWebRtcSession() [2/2]

webrtc::MockWebRtcSession::MockWebRtcSession ( MediaControllerInterface media_controller)
inlineexplicit

Member Function Documentation

◆ GetRemoteSSLCertificate() [1/2]

std::unique_ptr<rtc::SSLCertificate> webrtc::MockWebRtcSession::GetRemoteSSLCertificate ( const std::string transport_name)
inlinevirtual

Reimplemented from webrtc::WebRtcSession.

◆ GetRemoteSSLCertificate() [2/2]

std::unique_ptr<rtc::SSLCertificate> webrtc::MockWebRtcSession::GetRemoteSSLCertificate ( const std::string transport_name)
inlinevirtual

Reimplemented from webrtc::WebRtcSession.

◆ MOCK_METHOD0() [1/4]

webrtc::MockWebRtcSession::MOCK_METHOD0 ( voice_channel  ,
cricket::VoiceChannel () 
)

◆ MOCK_METHOD0() [2/4]

webrtc::MockWebRtcSession::MOCK_METHOD0 ( voice_channel  ,
cricket::VoiceChannel () 
)

◆ MOCK_METHOD0() [3/4]

webrtc::MockWebRtcSession::MOCK_METHOD0 ( video_channel  ,
cricket::VideoChannel () 
)

◆ MOCK_METHOD0() [4/4]

webrtc::MockWebRtcSession::MOCK_METHOD0 ( video_channel  ,
cricket::VideoChannel () 
)

◆ MOCK_METHOD1() [1/4]

webrtc::MockWebRtcSession::MOCK_METHOD1 ( GetStats  ,
std::unique_ptr< SessionStats const ChannelNamePairs & 
)

◆ MOCK_METHOD1() [2/4]

webrtc::MockWebRtcSession::MOCK_METHOD1 ( GetStats  ,
std::unique_ptr< SessionStats const ChannelNamePairs & 
)

◆ MOCK_METHOD1() [3/4]

webrtc::MockWebRtcSession::MOCK_METHOD1 ( GetRemoteSSLCertificate_ReturnsRawPointer  ,
rtc::SSLCertificate const std::string &transport_name 
)

◆ MOCK_METHOD1() [4/4]

webrtc::MockWebRtcSession::MOCK_METHOD1 ( GetRemoteSSLCertificate_ReturnsRawPointer  ,
rtc::SSLCertificate const std::string &transport_name 
)

◆ MOCK_METHOD2() [1/6]

webrtc::MockWebRtcSession::MOCK_METHOD2 ( GetLocalTrackIdBySsrc  ,
bool(uint32_t, std::string *)   
)

◆ MOCK_METHOD2() [2/6]

webrtc::MockWebRtcSession::MOCK_METHOD2 ( GetLocalTrackIdBySsrc  ,
bool(uint32_t, std::string *)   
)

◆ MOCK_METHOD2() [3/6]

webrtc::MockWebRtcSession::MOCK_METHOD2 ( GetRemoteTrackIdBySsrc  ,
bool(uint32_t, std::string *)   
)

◆ MOCK_METHOD2() [4/6]

webrtc::MockWebRtcSession::MOCK_METHOD2 ( GetRemoteTrackIdBySsrc  ,
bool(uint32_t, std::string *)   
)

◆ MOCK_METHOD2() [5/6]

webrtc::MockWebRtcSession::MOCK_METHOD2 ( GetLocalCertificate  ,
bool(const std::string &transport_name, rtc::scoped_refptr< rtc::RTCCertificate > *certificate  
)

◆ MOCK_METHOD2() [6/6]

webrtc::MockWebRtcSession::MOCK_METHOD2 ( GetLocalCertificate  ,
bool(const std::string &transport_name, rtc::scoped_refptr< rtc::RTCCertificate > *certificate  
)

The documentation for this class was generated from the following file: