blob: ba244039af02004993f7dbc7b29d9d8686e3b494 [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_RECEIVER_INTERNAL_H_
12#define PC_TEST_MOCK_RTP_RECEIVER_INTERNAL_H_
Steve Anton57858b32018-02-15 23:19:5013
14#include <string>
15#include <vector>
16
Saurav Das7262fc22019-09-11 23:23:0517#include "absl/types/optional.h"
Steve Anton10542f22019-01-11 17:11:0018#include "pc/rtp_receiver.h"
Steve Anton57858b32018-02-15 23:19:5019#include "test/gmock.h"
20
21namespace webrtc {
22
23// The definition of MockRtpReceiver is copied in to avoid multiple inheritance.
24class MockRtpReceiverInternal : public RtpReceiverInternal {
25 public:
26 // RtpReceiverInterface methods.
Danil Chapovalov3a353122020-05-15 09:16:5327 MOCK_METHOD(rtc::scoped_refptr<MediaStreamTrackInterface>,
28 track,
29 (),
30 (const, override));
31 MOCK_METHOD(rtc::scoped_refptr<DtlsTransportInterface>,
32 dtls_transport,
33 (),
34 (const, override));
35 MOCK_METHOD(std::vector<std::string>, stream_ids, (), (const, override));
36 MOCK_METHOD(std::vector<rtc::scoped_refptr<MediaStreamInterface>>,
37 streams,
38 (),
39 (const, override));
40 MOCK_METHOD(cricket::MediaType, media_type, (), (const, override));
41 MOCK_METHOD(std::string, id, (), (const, override));
42 MOCK_METHOD(RtpParameters, GetParameters, (), (const, override));
43 MOCK_METHOD(void, SetObserver, (RtpReceiverObserverInterface*), (override));
44 MOCK_METHOD(void,
45 SetJitterBufferMinimumDelay,
46 (absl::optional<double>),
47 (override));
48 MOCK_METHOD(std::vector<RtpSource>, GetSources, (), (const, override));
49 MOCK_METHOD(void,
50 SetFrameDecryptor,
51 (rtc::scoped_refptr<FrameDecryptorInterface>),
52 (override));
53 MOCK_METHOD(rtc::scoped_refptr<FrameDecryptorInterface>,
54 GetFrameDecryptor,
55 (),
56 (const, override));
Steve Anton57858b32018-02-15 23:19:5057
58 // RtpReceiverInternal methods.
Danil Chapovalov3a353122020-05-15 09:16:5359 MOCK_METHOD(void, Stop, (), (override));
Harald Alvestrand1ee33252020-09-24 13:31:1560 MOCK_METHOD(void, StopAndEndTrack, (), (override));
Danil Chapovalov3a353122020-05-15 09:16:5361 MOCK_METHOD(void, SetMediaChannel, (cricket::MediaChannel*), (override));
62 MOCK_METHOD(void, SetupMediaChannel, (uint32_t), (override));
63 MOCK_METHOD(void, SetupUnsignaledMediaChannel, (), (override));
64 MOCK_METHOD(uint32_t, ssrc, (), (const, override));
65 MOCK_METHOD(void, NotifyFirstPacketReceived, (), (override));
66 MOCK_METHOD(void, set_stream_ids, (std::vector<std::string>), (override));
67 MOCK_METHOD(void,
68 set_transport,
69 (rtc::scoped_refptr<DtlsTransportInterface>),
70 (override));
71 MOCK_METHOD(void,
72 SetStreams,
73 (const std::vector<rtc::scoped_refptr<MediaStreamInterface>>&),
74 (override));
75 MOCK_METHOD(int, AttachmentId, (), (const, override));
Steve Anton57858b32018-02-15 23:19:5076};
77
78} // namespace webrtc
79
Steve Anton10542f22019-01-11 17:11:0080#endif // PC_TEST_MOCK_RTP_RECEIVER_INTERNAL_H_