blob: 5e7670ebf01f365e9d92082c867cf42d7fa952ef [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.
Danil Chapovalov3a353122020-05-15 09:16:5326 MOCK_METHOD(bool, SetTrack, (MediaStreamTrackInterface*), (override));
27 MOCK_METHOD(rtc::scoped_refptr<MediaStreamTrackInterface>,
28 track,
29 (),
30 (const, override));
31 MOCK_METHOD(uint32_t, ssrc, (), (const, override));
32 MOCK_METHOD(rtc::scoped_refptr<DtlsTransportInterface>,
33 dtls_transport,
34 (),
35 (const, override));
36 MOCK_METHOD(cricket::MediaType, media_type, (), (const, override));
37 MOCK_METHOD(std::string, id, (), (const, override));
38 MOCK_METHOD(std::vector<std::string>, stream_ids, (), (const, override));
39 MOCK_METHOD(std::vector<RtpEncodingParameters>,
40 init_send_encodings,
41 (),
42 (const, override));
43 MOCK_METHOD(void,
44 set_transport,
45 (rtc::scoped_refptr<DtlsTransportInterface>),
46 (override));
47 MOCK_METHOD(RtpParameters, GetParameters, (), (const, override));
48 MOCK_METHOD(RtpParameters, GetParametersInternal, (), (const, override));
49 MOCK_METHOD(RTCError, SetParameters, (const RtpParameters&), (override));
50 MOCK_METHOD(RTCError,
51 SetParametersInternal,
52 (const RtpParameters&),
53 (override));
54 MOCK_METHOD(rtc::scoped_refptr<DtmfSenderInterface>,
55 GetDtmfSender,
56 (),
57 (const, override));
58 MOCK_METHOD(void,
59 SetFrameEncryptor,
60 (rtc::scoped_refptr<FrameEncryptorInterface>),
61 (override));
62 MOCK_METHOD(rtc::scoped_refptr<FrameEncryptorInterface>,
63 GetFrameEncryptor,
64 (),
65 (const, override));
Steve Anton57858b32018-02-15 23:19:5066
67 // RtpSenderInternal methods.
Harald Alvestrand6060df52020-08-11 07:54:0268 MOCK_METHOD1(SetMediaChannel, void(cricket::MediaChannel*));
69 MOCK_METHOD1(SetSsrc, void(uint32_t));
70 MOCK_METHOD1(set_stream_ids, void(const std::vector<std::string>&));
71 MOCK_METHOD1(SetStreams, void(const std::vector<std::string>&));
72 MOCK_METHOD1(set_init_send_encodings,
73 void(const std::vector<RtpEncodingParameters>&));
74 MOCK_METHOD0(Stop, void());
75 MOCK_CONST_METHOD0(AttachmentId, int());
76 MOCK_METHOD1(DisableEncodingLayers,
77 RTCError(const std::vector<std::string>&));
78 MOCK_METHOD0(SetTransceiverAsStopped, void());
Steve Anton57858b32018-02-15 23:19:5079};
80
81} // namespace webrtc
82
Steve Anton10542f22019-01-11 17:11:0083#endif // PC_TEST_MOCK_RTP_SENDER_INTERNAL_H_