2011-07-07 10:21:25 +02:00
|
|
|
/*
|
2012-04-04 16:57:19 +02:00
|
|
|
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
|
2011-07-07 10:21:25 +02:00
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef WEBRTC_VOICE_ENGINE_VOE_DTMF_IMPL_H
|
|
|
|
#define WEBRTC_VOICE_ENGINE_VOE_DTMF_IMPL_H
|
|
|
|
|
2013-03-12 23:27:27 +01:00
|
|
|
#include "webrtc/voice_engine/include/voe_dtmf.h"
|
|
|
|
#include "webrtc/voice_engine/shared_data.h"
|
2011-07-07 10:21:25 +02:00
|
|
|
|
|
|
|
namespace webrtc
|
|
|
|
{
|
|
|
|
|
2012-04-26 17:28:22 +02:00
|
|
|
class VoEDtmfImpl : public VoEDtmf
|
2011-07-07 10:21:25 +02:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual int SendTelephoneEvent(
|
|
|
|
int channel,
|
2011-08-20 00:56:22 +02:00
|
|
|
int eventCode,
|
2011-07-07 10:21:25 +02:00
|
|
|
bool outOfBand = true,
|
|
|
|
int lengthMs = 160,
|
|
|
|
int attenuationDb = 10);
|
|
|
|
|
|
|
|
virtual int SetSendTelephoneEventPayloadType(int channel,
|
|
|
|
unsigned char type);
|
|
|
|
|
|
|
|
virtual int GetSendTelephoneEventPayloadType(int channel,
|
|
|
|
unsigned char& type);
|
|
|
|
|
|
|
|
virtual int SetDtmfFeedbackStatus(bool enable,
|
|
|
|
bool directFeedback = false);
|
|
|
|
|
|
|
|
virtual int GetDtmfFeedbackStatus(bool& enabled, bool& directFeedback);
|
|
|
|
|
2011-08-20 00:56:22 +02:00
|
|
|
virtual int PlayDtmfTone(int eventCode,
|
2011-07-07 10:21:25 +02:00
|
|
|
int lengthMs = 200,
|
|
|
|
int attenuationDb = 10);
|
|
|
|
|
|
|
|
protected:
|
2012-04-04 16:57:19 +02:00
|
|
|
VoEDtmfImpl(voe::SharedData* shared);
|
2011-07-07 10:21:25 +02:00
|
|
|
virtual ~VoEDtmfImpl();
|
|
|
|
|
|
|
|
private:
|
|
|
|
bool _dtmfFeedback;
|
|
|
|
bool _dtmfDirectFeedback;
|
2012-04-04 16:57:19 +02:00
|
|
|
voe::SharedData* _shared;
|
2011-07-07 10:21:25 +02:00
|
|
|
};
|
|
|
|
|
2013-07-03 17:12:26 +02:00
|
|
|
} // namespace webrtc
|
2011-07-07 10:21:25 +02:00
|
|
|
|
|
|
|
#endif // WEBRTC_VOICE_ENGINE_VOE_DTMF_IMPL_H
|