Home | History | Annotate | Download | only in voice_engine
      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 
     14 #include "webrtc/voice_engine/include/voe_dtmf.h"
     15 #include "webrtc/voice_engine/shared_data.h"
     16 
     17 namespace webrtc {
     18 
     19 class VoEDtmfImpl : public VoEDtmf {
     20  public:
     21   int SendTelephoneEvent(int channel,
     22                          int eventCode,
     23                          bool outOfBand = true,
     24                          int lengthMs = 160,
     25                          int attenuationDb = 10) override;
     26 
     27   int SetSendTelephoneEventPayloadType(int channel,
     28                                        unsigned char type) override;
     29 
     30   int GetSendTelephoneEventPayloadType(int channel,
     31                                        unsigned char& type) override;
     32 
     33   int SetDtmfFeedbackStatus(bool enable, bool directFeedback = false) override;
     34 
     35   int GetDtmfFeedbackStatus(bool& enabled, bool& directFeedback) override;
     36 
     37   int PlayDtmfTone(int eventCode,
     38                    int lengthMs = 200,
     39                    int attenuationDb = 10) override;
     40 
     41  protected:
     42   VoEDtmfImpl(voe::SharedData* shared);
     43   ~VoEDtmfImpl() override;
     44 
     45  private:
     46   bool _dtmfFeedback;
     47   bool _dtmfDirectFeedback;
     48   voe::SharedData* _shared;
     49 };
     50 
     51 }  // namespace webrtc
     52 
     53 #endif  // WEBRTC_VOICE_ENGINE_VOE_DTMF_IMPL_H
     54