mock_rtp_sender_internal.h 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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. #ifndef PC_TEST_MOCK_RTP_SENDER_INTERNAL_H_
  11. #define PC_TEST_MOCK_RTP_SENDER_INTERNAL_H_
  12. #include <string>
  13. #include <vector>
  14. #include "pc/rtp_sender.h"
  15. #include "test/gmock.h"
  16. namespace webrtc {
  17. // The definition of MockRtpSender is copied in to avoid multiple inheritance.
  18. class MockRtpSenderInternal : public RtpSenderInternal {
  19. public:
  20. // RtpSenderInterface methods.
  21. MOCK_METHOD(bool, SetTrack, (MediaStreamTrackInterface*), (override));
  22. MOCK_METHOD(rtc::scoped_refptr<MediaStreamTrackInterface>,
  23. track,
  24. (),
  25. (const, override));
  26. MOCK_METHOD(uint32_t, ssrc, (), (const, override));
  27. MOCK_METHOD(rtc::scoped_refptr<DtlsTransportInterface>,
  28. dtls_transport,
  29. (),
  30. (const, override));
  31. MOCK_METHOD(cricket::MediaType, media_type, (), (const, override));
  32. MOCK_METHOD(std::string, id, (), (const, override));
  33. MOCK_METHOD(std::vector<std::string>, stream_ids, (), (const, override));
  34. MOCK_METHOD(std::vector<RtpEncodingParameters>,
  35. init_send_encodings,
  36. (),
  37. (const, override));
  38. MOCK_METHOD(void,
  39. set_transport,
  40. (rtc::scoped_refptr<DtlsTransportInterface>),
  41. (override));
  42. MOCK_METHOD(RtpParameters, GetParameters, (), (const, override));
  43. MOCK_METHOD(RtpParameters, GetParametersInternal, (), (const, override));
  44. MOCK_METHOD(RTCError, SetParameters, (const RtpParameters&), (override));
  45. MOCK_METHOD(RTCError,
  46. SetParametersInternal,
  47. (const RtpParameters&),
  48. (override));
  49. MOCK_METHOD(rtc::scoped_refptr<DtmfSenderInterface>,
  50. GetDtmfSender,
  51. (),
  52. (const, override));
  53. MOCK_METHOD(void,
  54. SetFrameEncryptor,
  55. (rtc::scoped_refptr<FrameEncryptorInterface>),
  56. (override));
  57. MOCK_METHOD(rtc::scoped_refptr<FrameEncryptorInterface>,
  58. GetFrameEncryptor,
  59. (),
  60. (const, override));
  61. // RtpSenderInternal methods.
  62. MOCK_METHOD1(SetMediaChannel, void(cricket::MediaChannel*));
  63. MOCK_METHOD1(SetSsrc, void(uint32_t));
  64. MOCK_METHOD1(set_stream_ids, void(const std::vector<std::string>&));
  65. MOCK_METHOD1(SetStreams, void(const std::vector<std::string>&));
  66. MOCK_METHOD1(set_init_send_encodings,
  67. void(const std::vector<RtpEncodingParameters>&));
  68. MOCK_METHOD0(Stop, void());
  69. MOCK_CONST_METHOD0(AttachmentId, int());
  70. MOCK_METHOD1(DisableEncodingLayers,
  71. RTCError(const std::vector<std::string>&));
  72. MOCK_METHOD0(SetTransceiverAsStopped, void());
  73. };
  74. } // namespace webrtc
  75. #endif // PC_TEST_MOCK_RTP_SENDER_INTERNAL_H_