• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
11 #ifndef PC_TEST_MOCK_RTP_SENDER_INTERNAL_H_
12 #define PC_TEST_MOCK_RTP_SENDER_INTERNAL_H_
13 
14 #include <string>
15 #include <vector>
16 
17 #include "pc/rtp_sender.h"
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_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));
66 
67   // RtpSenderInternal methods.
68   MOCK_METHOD(void, SetMediaChannel, (cricket::MediaChannel*), (override));
69   MOCK_METHOD(void, SetSsrc, (uint32_t), (override));
70   MOCK_METHOD(void,
71               set_stream_ids,
72               (const std::vector<std::string>&),
73               (override));
74   MOCK_METHOD(void, SetStreams, (const std::vector<std::string>&), (override));
75   MOCK_METHOD(void,
76               set_init_send_encodings,
77               (const std::vector<RtpEncodingParameters>&),
78               (override));
79   MOCK_METHOD(void, Stop, (), (override));
80   MOCK_METHOD(int, AttachmentId, (), (const, override));
81   MOCK_METHOD(RTCError,
82               DisableEncodingLayers,
83               (const std::vector<std::string>&),
84               (override));
85 };
86 
87 }  // namespace webrtc
88 
89 #endif  // PC_TEST_MOCK_RTP_SENDER_INTERNAL_H_
90