blob: e779b69b260244cd00e86773a24a5fad749ccbe1 [file] [log] [blame]
niklase@google.com470e71d2011-07-07 08:21:25 +00001/*
tommi@webrtc.org851becd2012-04-04 14:57:19 +00002 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
niklase@google.com470e71d2011-07-07 08:21:25 +00003 *
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.orgb7edd062013-03-12 22:27:27 +000014#include "webrtc/voice_engine/include/voe_dtmf.h"
15#include "webrtc/voice_engine/shared_data.h"
niklase@google.com470e71d2011-07-07 08:21:25 +000016
17namespace webrtc
18{
19
tommi@webrtc.orga990e122012-04-26 15:28:22 +000020class VoEDtmfImpl : public VoEDtmf
niklase@google.com470e71d2011-07-07 08:21:25 +000021{
22public:
niklase@google.com470e71d2011-07-07 08:21:25 +000023 virtual int SendTelephoneEvent(
24 int channel,
andrew@webrtc.orgf81f9f82011-08-19 22:56:22 +000025 int eventCode,
niklase@google.com470e71d2011-07-07 08:21:25 +000026 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
andrew@webrtc.orgf81f9f82011-08-19 22:56:22 +000041 virtual int PlayDtmfTone(int eventCode,
niklase@google.com470e71d2011-07-07 08:21:25 +000042 int lengthMs = 200,
43 int attenuationDb = 10);
44
andrew@webrtc.orgf81f9f82011-08-19 22:56:22 +000045 virtual int StartPlayingDtmfTone(int eventCode,
niklase@google.com470e71d2011-07-07 08:21:25 +000046 int attenuationDb = 10);
47
48 virtual int StopPlayingDtmfTone();
49
niklase@google.com470e71d2011-07-07 08:21:25 +000050 virtual int SetDtmfPlayoutStatus(int channel, bool enable);
51
52 virtual int GetDtmfPlayoutStatus(int channel, bool& enabled);
53
54protected:
tommi@webrtc.org851becd2012-04-04 14:57:19 +000055 VoEDtmfImpl(voe::SharedData* shared);
niklase@google.com470e71d2011-07-07 08:21:25 +000056 virtual ~VoEDtmfImpl();
57
58private:
59 bool _dtmfFeedback;
60 bool _dtmfDirectFeedback;
tommi@webrtc.org851becd2012-04-04 14:57:19 +000061 voe::SharedData* _shared;
niklase@google.com470e71d2011-07-07 08:21:25 +000062};
63
64} // namespace webrtc
65
66#endif // WEBRTC_VOICE_ENGINE_VOE_DTMF_IMPL_H