2018-11-13 16:26:05 -08:00
|
|
|
/*
|
|
|
|
|
* Copyright 2018 The WebRTC project authors. All Rights Reserved.
|
|
|
|
|
*
|
|
|
|
|
* Use of this source code is governed by a BSD-style license
|
|
|
|
|
* that can be found in the LICENSE file in the root of the source
|
|
|
|
|
* tree. An additional intellectual property rights grant can be found
|
|
|
|
|
* in the file PATENTS. All contributing project authors may
|
|
|
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
|
|
|
*/
|
|
|
|
|
|
2019-01-11 09:11:00 -08:00
|
|
|
#ifndef PC_TEST_MOCK_CHANNEL_INTERFACE_H_
|
|
|
|
|
#define PC_TEST_MOCK_CHANNEL_INTERFACE_H_
|
2018-11-13 16:26:05 -08:00
|
|
|
|
|
|
|
|
#include <string>
|
2019-01-25 17:13:56 -08:00
|
|
|
#include <vector>
|
2018-11-13 16:26:05 -08:00
|
|
|
|
2019-01-11 09:11:00 -08:00
|
|
|
#include "pc/channel_interface.h"
|
2018-11-13 16:26:05 -08:00
|
|
|
#include "test/gmock.h"
|
|
|
|
|
|
|
|
|
|
namespace cricket {
|
|
|
|
|
|
|
|
|
|
// Mock class for BaseChannel.
|
|
|
|
|
// Use this class in unit tests to avoid dependecy on a specific
|
|
|
|
|
// implementation of BaseChannel.
|
|
|
|
|
class MockChannelInterface : public cricket::ChannelInterface {
|
|
|
|
|
public:
|
2020-05-15 11:16:53 +02:00
|
|
|
MOCK_METHOD(cricket::MediaType, media_type, (), (const, override));
|
|
|
|
|
MOCK_METHOD(MediaChannel*, media_channel, (), (const, override));
|
2022-05-03 13:44:34 +00:00
|
|
|
MOCK_METHOD(VoiceMediaChannel*, voice_media_channel, (), (const, override));
|
|
|
|
|
MOCK_METHOD(VideoMediaChannel*, video_media_channel, (), (const, override));
|
2022-01-03 14:59:12 +00:00
|
|
|
MOCK_METHOD(absl::string_view, transport_name, (), (const, override));
|
2022-01-24 08:45:26 +01:00
|
|
|
MOCK_METHOD(const std::string&, mid, (), (const, override));
|
2021-04-26 10:20:19 +02:00
|
|
|
MOCK_METHOD(void, Enable, (bool), (override));
|
2021-04-27 15:00:00 +02:00
|
|
|
MOCK_METHOD(void,
|
|
|
|
|
SetFirstPacketReceivedCallback,
|
|
|
|
|
(std::function<void()>),
|
2020-05-15 11:16:53 +02:00
|
|
|
(override));
|
|
|
|
|
MOCK_METHOD(bool,
|
|
|
|
|
SetLocalContent,
|
|
|
|
|
(const cricket::MediaContentDescription*,
|
|
|
|
|
webrtc::SdpType,
|
2022-01-05 10:44:26 +00:00
|
|
|
std::string&),
|
2020-05-15 11:16:53 +02:00
|
|
|
(override));
|
|
|
|
|
MOCK_METHOD(bool,
|
|
|
|
|
SetRemoteContent,
|
|
|
|
|
(const cricket::MediaContentDescription*,
|
|
|
|
|
webrtc::SdpType,
|
2022-01-05 10:44:26 +00:00
|
|
|
std::string&),
|
2020-05-15 11:16:53 +02:00
|
|
|
(override));
|
2021-01-25 13:44:55 -08:00
|
|
|
MOCK_METHOD(bool, SetPayloadTypeDemuxingEnabled, (bool), (override));
|
2020-05-15 11:16:53 +02:00
|
|
|
MOCK_METHOD(const std::vector<StreamParams>&,
|
|
|
|
|
local_streams,
|
|
|
|
|
(),
|
|
|
|
|
(const, override));
|
|
|
|
|
MOCK_METHOD(const std::vector<StreamParams>&,
|
|
|
|
|
remote_streams,
|
|
|
|
|
(),
|
|
|
|
|
(const, override));
|
|
|
|
|
MOCK_METHOD(bool,
|
|
|
|
|
SetRtpTransport,
|
|
|
|
|
(webrtc::RtpTransportInternal*),
|
|
|
|
|
(override));
|
2018-11-13 16:26:05 -08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace cricket
|
|
|
|
|
|
2019-01-11 09:11:00 -08:00
|
|
|
#endif // PC_TEST_MOCK_CHANNEL_INTERFACE_H_
|