solenberg | 1372508 | 2015-11-25 08:16:52 -0800 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright (c) 2015 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 WEBRTC_VOICE_ENGINE_CHANNEL_PROXY_H_ |
| 12 | #define WEBRTC_VOICE_ENGINE_CHANNEL_PROXY_H_ |
| 13 | |
| 14 | #include "webrtc/voice_engine/channel_manager.h" |
| 15 | |
| 16 | #include <string> |
| 17 | |
| 18 | namespace webrtc { |
| 19 | namespace voe { |
| 20 | |
| 21 | // This class provides the "view" of a voe::Channel that we need to implement |
| 22 | // webrtc::AudioSendStream and webrtc::AudioReceiveStream. It serves two |
| 23 | // purposes: |
| 24 | // 1. Allow mocking just the interfaces used, instead of the entire |
| 25 | // voe::Channel class. |
| 26 | // 2. Provide a refined interface for the stream classes, including assumptions |
| 27 | // on return values and input adaptation. |
| 28 | class ChannelProxy { |
| 29 | public: |
| 30 | ChannelProxy(); |
| 31 | explicit ChannelProxy(const ChannelOwner& channel_owner); |
| 32 | virtual ~ChannelProxy() {} |
| 33 | |
| 34 | virtual void SetRTCPStatus(bool enable); |
| 35 | virtual void SetLocalSSRC(uint32_t ssrc); |
| 36 | virtual void SetRTCP_CNAME(const std::string& c_name); |
| 37 | |
| 38 | private: |
| 39 | ChannelOwner channel_owner_; |
| 40 | }; |
| 41 | } // namespace voe |
| 42 | } // namespace webrtc |
| 43 | |
| 44 | #endif // WEBRTC_VOICE_ENGINE_CHANNEL_PROXY_H_ |