blob: 2cf0173bd1cf942ebcd9d07d48e2ca4e660c1023 [file] [log] [blame]
Steve Anton57858b32018-02-15 23:19:501/*
2 * Copyright 2016 The WebRTC project authors. All Rights Reserved.
3 *
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
Steve Anton10542f22019-01-11 17:11:0011#ifndef PC_TEST_MOCK_RTP_SENDER_INTERNAL_H_
12#define PC_TEST_MOCK_RTP_SENDER_INTERNAL_H_
Steve Anton57858b32018-02-15 23:19:5013
14#include <string>
15#include <vector>
16
Steve Anton10542f22019-01-11 17:11:0017#include "pc/rtp_sender.h"
Steve Anton57858b32018-02-15 23:19:5018#include "test/gmock.h"
19
20namespace webrtc {
21
22// The definition of MockRtpSender is copied in to avoid multiple inheritance.
23class MockRtpSenderInternal : public RtpSenderInternal {
24 public:
25 // RtpSenderInterface methods.
26 MOCK_METHOD1(SetTrack, bool(MediaStreamTrackInterface*));
27 MOCK_CONST_METHOD0(track, rtc::scoped_refptr<MediaStreamTrackInterface>());
28 MOCK_CONST_METHOD0(ssrc, uint32_t());
Harald Alvestrand4a7b3ac2019-01-17 09:39:4029 MOCK_CONST_METHOD0(dtls_transport,
30 rtc::scoped_refptr<DtlsTransportInterface>());
Steve Anton57858b32018-02-15 23:19:5031 MOCK_CONST_METHOD0(media_type, cricket::MediaType());
32 MOCK_CONST_METHOD0(id, std::string());
33 MOCK_CONST_METHOD0(stream_ids, std::vector<std::string>());
Florent Castelli892acf02018-10-01 20:47:2034 MOCK_CONST_METHOD0(init_send_encodings, std::vector<RtpEncodingParameters>());
Harald Alvestrand4a7b3ac2019-01-17 09:39:4035 MOCK_METHOD1(set_transport, void(rtc::scoped_refptr<DtlsTransportInterface>));
Amit Hilbuch2297d332019-02-19 20:49:2236 MOCK_CONST_METHOD0(GetParameters, RtpParameters());
Amit Hilbuch619b2942019-02-26 23:55:1937 MOCK_CONST_METHOD0(GetParametersInternal, RtpParameters());
Steve Anton57858b32018-02-15 23:19:5038 MOCK_METHOD1(SetParameters, RTCError(const RtpParameters&));
Amit Hilbuch619b2942019-02-26 23:55:1939 MOCK_METHOD1(SetParametersInternal, RTCError(const RtpParameters&));
Steve Anton57858b32018-02-15 23:19:5040 MOCK_CONST_METHOD0(GetDtmfSender, rtc::scoped_refptr<DtmfSenderInterface>());
Benjamin Wrightd81ac952018-08-30 00:02:1041 MOCK_METHOD1(SetFrameEncryptor,
42 void(rtc::scoped_refptr<FrameEncryptorInterface>));
43 MOCK_CONST_METHOD0(GetFrameEncryptor,
44 rtc::scoped_refptr<FrameEncryptorInterface>());
Steve Anton57858b32018-02-15 23:19:5045
46 // RtpSenderInternal methods.
Amit Hilbuchdd9390c2018-11-14 00:26:0547 MOCK_METHOD1(SetMediaChannel, void(cricket::MediaChannel*));
Steve Anton57858b32018-02-15 23:19:5048 MOCK_METHOD1(SetSsrc, void(uint32_t));
Henrik Andreasssoncc189172019-05-20 09:01:3849 MOCK_METHOD1(set_stream_ids, void(const std::vector<std::string>&));
Guido Urdaneta1ff16c82019-05-20 17:31:5350 MOCK_METHOD1(SetStreams, void(const std::vector<std::string>&));
Florent Castelli892acf02018-10-01 20:47:2051 MOCK_METHOD1(set_init_send_encodings,
52 void(const std::vector<RtpEncodingParameters>&));
Steve Anton57858b32018-02-15 23:19:5053 MOCK_METHOD0(Stop, void());
54 MOCK_CONST_METHOD0(AttachmentId, int());
Amit Hilbuch2297d332019-02-19 20:49:2255 MOCK_METHOD1(DisableEncodingLayers,
56 RTCError(const std::vector<std::string>&));
Steve Anton57858b32018-02-15 23:19:5057};
58
59} // namespace webrtc
60
Steve Anton10542f22019-01-11 17:11:0061#endif // PC_TEST_MOCK_RTP_SENDER_INTERNAL_H_