Steve Anton | 57858b3 | 2018-02-15 23:19:50 | [diff] [blame] | 1 | /* |
| 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 Anton | 10542f2 | 2019-01-11 17:11:00 | [diff] [blame] | 11 | #ifndef PC_TEST_MOCK_RTP_SENDER_INTERNAL_H_ |
| 12 | #define PC_TEST_MOCK_RTP_SENDER_INTERNAL_H_ |
Steve Anton | 57858b3 | 2018-02-15 23:19:50 | [diff] [blame] | 13 | |
| 14 | #include <string> |
| 15 | #include <vector> |
| 16 | |
Steve Anton | 10542f2 | 2019-01-11 17:11:00 | [diff] [blame] | 17 | #include "pc/rtp_sender.h" |
Steve Anton | 57858b3 | 2018-02-15 23:19:50 | [diff] [blame] | 18 | #include "test/gmock.h" |
| 19 | |
| 20 | namespace webrtc { |
| 21 | |
| 22 | // The definition of MockRtpSender is copied in to avoid multiple inheritance. |
| 23 | class 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 Alvestrand | 4a7b3ac | 2019-01-17 09:39:40 | [diff] [blame] | 29 | MOCK_CONST_METHOD0(dtls_transport, |
| 30 | rtc::scoped_refptr<DtlsTransportInterface>()); |
Steve Anton | 57858b3 | 2018-02-15 23:19:50 | [diff] [blame] | 31 | 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 Castelli | 892acf0 | 2018-10-01 20:47:20 | [diff] [blame] | 34 | MOCK_CONST_METHOD0(init_send_encodings, std::vector<RtpEncodingParameters>()); |
Harald Alvestrand | 4a7b3ac | 2019-01-17 09:39:40 | [diff] [blame] | 35 | MOCK_METHOD1(set_transport, void(rtc::scoped_refptr<DtlsTransportInterface>)); |
Amit Hilbuch | 2297d33 | 2019-02-19 20:49:22 | [diff] [blame] | 36 | MOCK_CONST_METHOD0(GetParameters, RtpParameters()); |
Amit Hilbuch | 619b294 | 2019-02-26 23:55:19 | [diff] [blame] | 37 | MOCK_CONST_METHOD0(GetParametersInternal, RtpParameters()); |
Steve Anton | 57858b3 | 2018-02-15 23:19:50 | [diff] [blame] | 38 | MOCK_METHOD1(SetParameters, RTCError(const RtpParameters&)); |
Amit Hilbuch | 619b294 | 2019-02-26 23:55:19 | [diff] [blame] | 39 | MOCK_METHOD1(SetParametersInternal, RTCError(const RtpParameters&)); |
Steve Anton | 57858b3 | 2018-02-15 23:19:50 | [diff] [blame] | 40 | MOCK_CONST_METHOD0(GetDtmfSender, rtc::scoped_refptr<DtmfSenderInterface>()); |
Benjamin Wright | d81ac95 | 2018-08-30 00:02:10 | [diff] [blame] | 41 | MOCK_METHOD1(SetFrameEncryptor, |
| 42 | void(rtc::scoped_refptr<FrameEncryptorInterface>)); |
| 43 | MOCK_CONST_METHOD0(GetFrameEncryptor, |
| 44 | rtc::scoped_refptr<FrameEncryptorInterface>()); |
Steve Anton | 57858b3 | 2018-02-15 23:19:50 | [diff] [blame] | 45 | |
| 46 | // RtpSenderInternal methods. |
Amit Hilbuch | dd9390c | 2018-11-14 00:26:05 | [diff] [blame] | 47 | MOCK_METHOD1(SetMediaChannel, void(cricket::MediaChannel*)); |
Steve Anton | 57858b3 | 2018-02-15 23:19:50 | [diff] [blame] | 48 | MOCK_METHOD1(SetSsrc, void(uint32_t)); |
Henrik Andreassson | cc18917 | 2019-05-20 09:01:38 | [diff] [blame] | 49 | MOCK_METHOD1(set_stream_ids, void(const std::vector<std::string>&)); |
Guido Urdaneta | 1ff16c8 | 2019-05-20 17:31:53 | [diff] [blame] | 50 | MOCK_METHOD1(SetStreams, void(const std::vector<std::string>&)); |
Florent Castelli | 892acf0 | 2018-10-01 20:47:20 | [diff] [blame] | 51 | MOCK_METHOD1(set_init_send_encodings, |
| 52 | void(const std::vector<RtpEncodingParameters>&)); |
Steve Anton | 57858b3 | 2018-02-15 23:19:50 | [diff] [blame] | 53 | MOCK_METHOD0(Stop, void()); |
| 54 | MOCK_CONST_METHOD0(AttachmentId, int()); |
Amit Hilbuch | 2297d33 | 2019-02-19 20:49:22 | [diff] [blame] | 55 | MOCK_METHOD1(DisableEncodingLayers, |
| 56 | RTCError(const std::vector<std::string>&)); |
Steve Anton | 57858b3 | 2018-02-15 23:19:50 | [diff] [blame] | 57 | }; |
| 58 | |
| 59 | } // namespace webrtc |
| 60 | |
Steve Anton | 10542f2 | 2019-01-11 17:11:00 | [diff] [blame] | 61 | #endif // PC_TEST_MOCK_RTP_SENDER_INTERNAL_H_ |