Removes parts of the webrtc::VoEDtmf sub API as part of a clean-up operation where the goal is to remove unused APIs.

BUG=3206
R=wu@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/12299005

git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@6146 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/voice_engine/include/voe_dtmf.h b/voice_engine/include/voe_dtmf.h
index 301d73f..4db8cbc 100644
--- a/voice_engine/include/voe_dtmf.h
+++ b/voice_engine/include/voe_dtmf.h
@@ -43,7 +43,7 @@
 class WEBRTC_DLLEXPORT VoEDtmf
 {
 public:
-    
+
     // Factory for the VoEDtmf sub-API. Increases an internal
     // reference counter if successful. Returns NULL if the API is not
     // supported or if construction fails.
@@ -60,13 +60,13 @@
                                    bool outOfBand = true, int lengthMs = 160,
                                    int attenuationDb = 10) = 0;
 
-   
+
     // Sets the dynamic payload |type| that should be used for telephone
     // events.
     virtual int SetSendTelephoneEventPayloadType(int channel,
                                                  unsigned char type) = 0;
 
-  
+
     // Gets the currently set dynamic payload |type| for telephone events.
     virtual int GetSendTelephoneEventPayloadType(int channel,
                                                  unsigned char& type) = 0;
@@ -90,14 +90,10 @@
     virtual int PlayDtmfTone(int eventCode, int lengthMs = 200,
                              int attenuationDb = 10) = 0;
 
-    // Starts playing out a DTMF feedback tone locally.
-    // The tone will be played out until the corresponding stop function
-    // is called.
+    // To be removed. Don't use.
     virtual int StartPlayingDtmfTone(int eventCode,
-                                     int attenuationDb = 10) = 0;
-
-    // Stops playing out a DTMF feedback tone locally.
-    virtual int StopPlayingDtmfTone() = 0;
+        int attenuationDb = 10) { return -1; }
+    virtual int StopPlayingDtmfTone() { return -1; }
 
 protected:
     VoEDtmf() {}
diff --git a/voice_engine/output_mixer.cc b/voice_engine/output_mixer.cc
index 5689c46..7cf98d3 100644
--- a/voice_engine/output_mixer.cc
+++ b/voice_engine/output_mixer.cc
@@ -236,29 +236,6 @@
     return 0;
 }
 
-int OutputMixer::StartPlayingDtmfTone(uint8_t eventCode,
-                                      int attenuationDb)
-{
-    WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId, -1),
-                 "OutputMixer::StartPlayingDtmfTone()");
-    if (_dtmfGenerator.StartTone(eventCode, attenuationDb) != 0)
-    {
-        _engineStatisticsPtr->SetLastError(
-            VE_STILL_PLAYING_PREV_DTMF,
-            kTraceError,
-            "OutputMixer::StartPlayingDtmfTone())");
-        return -1;
-    }
-    return 0;
-}
-
-int OutputMixer::StopPlayingDtmfTone()
-{
-    WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId, -1),
-                 "OutputMixer::StopPlayingDtmfTone()");
-    return (_dtmfGenerator.StopTone());
-}
-
 int32_t
 OutputMixer::SetMixabilityStatus(MixerParticipant& participant,
                                  bool mixable)
diff --git a/voice_engine/output_mixer.h b/voice_engine/output_mixer.h
index 859ce64..e5c65e4 100644
--- a/voice_engine/output_mixer.h
+++ b/voice_engine/output_mixer.h
@@ -54,10 +54,6 @@
     // VoEDtmf
     int PlayDtmfTone(uint8_t eventCode, int lengthMs, int attenuationDb);
 
-    int StartPlayingDtmfTone(uint8_t eventCode, int attenuationDb);
-
-    int StopPlayingDtmfTone();
-
     int32_t MixActiveChannels();
 
     int32_t DoOperationsOnCombinedSignal(bool feed_data_to_apm);
diff --git a/voice_engine/voe_dtmf_impl.cc b/voice_engine/voe_dtmf_impl.cc
index 9065d45..70872c6 100644
--- a/voice_engine/voe_dtmf_impl.cc
+++ b/voice_engine/voe_dtmf_impl.cc
@@ -227,50 +227,6 @@
                                                attenuationDb);
 }
 
-int VoEDtmfImpl::StartPlayingDtmfTone(int eventCode,
-                                      int attenuationDb)
-{
-    WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
-                 "StartPlayingDtmfTone(eventCode=%d, attenuationDb=%d)",
-                 eventCode, attenuationDb);
-
-    if (!_shared->statistics().Initialized())
-    {
-        _shared->SetLastError(VE_NOT_INITED, kTraceError);
-        return -1;
-    }
-    if (!_shared->audio_device()->Playing())
-    {
-        _shared->SetLastError(VE_NOT_PLAYING, kTraceError,
-            "StartPlayingDtmfTone() no channel is playing out");
-        return -1;
-    }
-    if ((eventCode < kMinDtmfEventCode) ||
-        (eventCode > kMaxDtmfEventCode) ||
-        (attenuationDb < kMinTelephoneEventAttenuation) ||
-        (attenuationDb > kMaxTelephoneEventAttenuation))
-    {
-        _shared->SetLastError(VE_INVALID_ARGUMENT, kTraceError,
-            "StartPlayingDtmfTone() invalid tone parameter(s)");
-        return -1;
-    }
-    return _shared->output_mixer()->StartPlayingDtmfTone(eventCode,
-                                                       attenuationDb);
-}
-
-int VoEDtmfImpl::StopPlayingDtmfTone()
-{
-    WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
-                 "StopPlayingDtmfTone()");
-
-    if (!_shared->statistics().Initialized())
-    {
-        _shared->SetLastError(VE_NOT_INITED, kTraceError);
-        return -1;
-    }
-    return _shared->output_mixer()->StopPlayingDtmfTone();
-}
-
 int VoEDtmfImpl::SetDtmfFeedbackStatus(bool enable, bool directFeedback)
 {
     WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
diff --git a/voice_engine/voe_dtmf_impl.h b/voice_engine/voe_dtmf_impl.h
index e879f8d..9216238 100644
--- a/voice_engine/voe_dtmf_impl.h
+++ b/voice_engine/voe_dtmf_impl.h
@@ -42,11 +42,6 @@
                              int lengthMs = 200,
                              int attenuationDb = 10);
 
-    virtual int StartPlayingDtmfTone(int eventCode,
-                                     int attenuationDb = 10);
-
-    virtual int StopPlayingDtmfTone();
-
     virtual int SetDtmfPlayoutStatus(int channel, bool enable);
 
     virtual int GetDtmfPlayoutStatus(int channel, bool& enabled);