andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2012 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_VOE_DTMF_IMPL_H |
| 12 | #define WEBRTC_VOICE_ENGINE_VOE_DTMF_IMPL_H |
| 13 | |
turaj@webrtc.org | 15a03fd | 2013-03-12 22:27:27 +0000 | [diff] [blame] | 14 | #include "webrtc/voice_engine/include/voe_dtmf.h" |
| 15 | #include "webrtc/voice_engine/shared_data.h" |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 16 | |
| 17 | namespace webrtc |
| 18 | { |
| 19 | |
| 20 | class VoEDtmfImpl : public VoEDtmf |
| 21 | { |
| 22 | public: |
| 23 | virtual int SendTelephoneEvent( |
| 24 | int channel, |
| 25 | int eventCode, |
| 26 | bool outOfBand = true, |
| 27 | int lengthMs = 160, |
| 28 | int attenuationDb = 10); |
| 29 | |
| 30 | virtual int SetSendTelephoneEventPayloadType(int channel, |
| 31 | unsigned char type); |
| 32 | |
| 33 | virtual int GetSendTelephoneEventPayloadType(int channel, |
| 34 | unsigned char& type); |
| 35 | |
| 36 | virtual int SetDtmfFeedbackStatus(bool enable, |
| 37 | bool directFeedback = false); |
| 38 | |
| 39 | virtual int GetDtmfFeedbackStatus(bool& enabled, bool& directFeedback); |
| 40 | |
| 41 | virtual int PlayDtmfTone(int eventCode, |
| 42 | int lengthMs = 200, |
| 43 | int attenuationDb = 10); |
| 44 | |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 45 | virtual int SetDtmfPlayoutStatus(int channel, bool enable); |
| 46 | |
| 47 | virtual int GetDtmfPlayoutStatus(int channel, bool& enabled); |
| 48 | |
| 49 | protected: |
| 50 | VoEDtmfImpl(voe::SharedData* shared); |
| 51 | virtual ~VoEDtmfImpl(); |
| 52 | |
| 53 | private: |
| 54 | bool _dtmfFeedback; |
| 55 | bool _dtmfDirectFeedback; |
| 56 | voe::SharedData* _shared; |
| 57 | }; |
| 58 | |
pbos@webrtc.org | 3b89e10 | 2013-07-03 15:12:26 +0000 | [diff] [blame] | 59 | } // namespace webrtc |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 60 | |
| 61 | #endif // WEBRTC_VOICE_ENGINE_VOE_DTMF_IMPL_H |