stefan | c1aeaf0 | 2015-10-15 07:26:07 -0700 | [diff] [blame] | 1 | /* |
kjellander | b24317b | 2016-02-10 07:54:43 -0800 | [diff] [blame] | 2 | * Copyright 2015 The WebRTC project authors. All Rights Reserved. |
stefan | c1aeaf0 | 2015-10-15 07:26:07 -0700 | [diff] [blame] | 3 | * |
kjellander | b24317b | 2016-02-10 07:54:43 -0800 | [diff] [blame] | 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. |
stefan | c1aeaf0 | 2015-10-15 07:26:07 -0700 | [diff] [blame] | 9 | */ |
| 10 | |
Henrik Kjellander | 15583c1 | 2016-02-10 10:53:12 +0100 | [diff] [blame] | 11 | #ifndef WEBRTC_API_FAKEMEDIACONTROLLER_H_ |
| 12 | #define WEBRTC_API_FAKEMEDIACONTROLLER_H_ |
stefan | c1aeaf0 | 2015-10-15 07:26:07 -0700 | [diff] [blame] | 13 | |
Henrik Kjellander | 15583c1 | 2016-02-10 10:53:12 +0100 | [diff] [blame] | 14 | #include "webrtc/api/mediacontroller.h" |
stefan | c1aeaf0 | 2015-10-15 07:26:07 -0700 | [diff] [blame] | 15 | #include "webrtc/base/checks.h" |
nisse | 51542be | 2016-02-12 02:27:06 -0800 | [diff] [blame] | 16 | #include "webrtc/media/base/mediachannel.h" |
stefan | c1aeaf0 | 2015-10-15 07:26:07 -0700 | [diff] [blame] | 17 | |
| 18 | namespace cricket { |
| 19 | |
| 20 | class FakeMediaController : public webrtc::MediaControllerInterface { |
| 21 | public: |
| 22 | explicit FakeMediaController(cricket::ChannelManager* channel_manager, |
| 23 | webrtc::Call* call) |
| 24 | : channel_manager_(channel_manager), call_(call) { |
| 25 | RTC_DCHECK(nullptr != channel_manager_); |
| 26 | RTC_DCHECK(nullptr != call_); |
| 27 | } |
| 28 | ~FakeMediaController() override {} |
solenberg | 03d6d57 | 2016-03-01 12:42:03 -0800 | [diff] [blame^] | 29 | void Close() override {} |
stefan | c1aeaf0 | 2015-10-15 07:26:07 -0700 | [diff] [blame] | 30 | webrtc::Call* call_w() override { return call_; } |
| 31 | cricket::ChannelManager* channel_manager() const override { |
| 32 | return channel_manager_; |
| 33 | } |
nisse | 51542be | 2016-02-12 02:27:06 -0800 | [diff] [blame] | 34 | const MediaConfig& config() const override { return media_config_; } |
stefan | c1aeaf0 | 2015-10-15 07:26:07 -0700 | [diff] [blame] | 35 | |
| 36 | private: |
nisse | 51542be | 2016-02-12 02:27:06 -0800 | [diff] [blame] | 37 | const MediaConfig media_config_ = MediaConfig(); |
stefan | c1aeaf0 | 2015-10-15 07:26:07 -0700 | [diff] [blame] | 38 | cricket::ChannelManager* channel_manager_; |
| 39 | webrtc::Call* call_; |
| 40 | }; |
| 41 | } // namespace cricket |
Henrik Kjellander | 15583c1 | 2016-02-10 10:53:12 +0100 | [diff] [blame] | 42 | #endif // WEBRTC_API_FAKEMEDIACONTROLLER_H_ |