blob: ad3874bf1865e6f9ece039e8f0390bc2f5365cda [file] [log] [blame]
andrew@webrtc.orga7b57da2012-10-22 18:19:23 +00001/*
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 "voe_dtmf.h"
15
16#include "shared_data.h"
17
18namespace webrtc
19{
20
21class VoEDtmfImpl : public VoEDtmf
22{
23public:
24 virtual int SendTelephoneEvent(
25 int channel,
26 int eventCode,
27 bool outOfBand = true,
28 int lengthMs = 160,
29 int attenuationDb = 10);
30
31 virtual int SetSendTelephoneEventPayloadType(int channel,
32 unsigned char type);
33
34 virtual int GetSendTelephoneEventPayloadType(int channel,
35 unsigned char& type);
36
37 virtual int SetDtmfFeedbackStatus(bool enable,
38 bool directFeedback = false);
39
40 virtual int GetDtmfFeedbackStatus(bool& enabled, bool& directFeedback);
41
42 virtual int PlayDtmfTone(int eventCode,
43 int lengthMs = 200,
44 int attenuationDb = 10);
45
46 virtual int StartPlayingDtmfTone(int eventCode,
47 int attenuationDb = 10);
48
49 virtual int StopPlayingDtmfTone();
50
51 virtual int RegisterTelephoneEventDetection(
52 int channel,
53 TelephoneEventDetectionMethods detectionMethod,
54 VoETelephoneEventObserver& observer);
55
56 virtual int DeRegisterTelephoneEventDetection(int channel);
57
58 virtual int GetTelephoneEventDetectionStatus(
59 int channel,
60 bool& enabled,
61 TelephoneEventDetectionMethods& detectionMethod);
62
63 virtual int SetDtmfPlayoutStatus(int channel, bool enable);
64
65 virtual int GetDtmfPlayoutStatus(int channel, bool& enabled);
66
67protected:
68 VoEDtmfImpl(voe::SharedData* shared);
69 virtual ~VoEDtmfImpl();
70
71private:
72 bool _dtmfFeedback;
73 bool _dtmfDirectFeedback;
74 voe::SharedData* _shared;
75};
76
77} // namespace webrtc
78
79#endif // WEBRTC_VOICE_ENGINE_VOE_DTMF_IMPL_H