From 25dd0d2a3692cae7c80690b6f3f8234bae768a21 Mon Sep 17 00:00:00 2001
From: Tristan Matthews <tristan.matthews@savoirfairelinux.com>
Date: Fri, 26 Aug 2011 19:07:58 -0400
Subject: [PATCH] * #6655: removed more dependencies from managerimpl

---
 daemon/src/iax/iaxcall.cpp        |  6 +-----
 daemon/src/iax/iaxcall.h          |  5 -----
 daemon/src/managerimpl.cpp        |  3 +++
 daemon/src/managerimpl.h          | 25 +++++++++++--------------
 daemon/test/configurationtest.cpp | 10 ----------
 daemon/test/configurationtest.h   |  3 ---
 6 files changed, 15 insertions(+), 37 deletions(-)

diff --git a/daemon/src/iax/iaxcall.cpp b/daemon/src/iax/iaxcall.cpp
index 9c743fc74a..6eddf9b689 100644
--- a/daemon/src/iax/iaxcall.cpp
+++ b/daemon/src/iax/iaxcall.cpp
@@ -30,6 +30,7 @@
  */
 
 #include "iaxcall.h"
+#include "iax2/frame.h"
 #include "account.h"
 #include "manager.h"
 
@@ -37,11 +38,6 @@ IAXCall::IAXCall (const std::string& id, Call::CallType type) : Call (id, type),
 {
 }
 
-IAXCall::~IAXCall()
-{
-    _session = NULL; // just to be sure to don't have unknown pointer, do not delete it!
-}
-
 void
 IAXCall::setFormat (int format)
 {
diff --git a/daemon/src/iax/iaxcall.h b/daemon/src/iax/iaxcall.h
index 432d3588ff..50cb2e430e 100644
--- a/daemon/src/iax/iaxcall.h
+++ b/daemon/src/iax/iaxcall.h
@@ -50,11 +50,6 @@ class IAXCall : public Call
          */
         IAXCall (const std::string& id, Call::CallType type);
 
-        /**
-         * Destructor
-         */
-        ~IAXCall();
-
         /**
          * @return iax_session* The session pointer or NULL
          */
diff --git a/daemon/src/managerimpl.cpp b/daemon/src/managerimpl.cpp
index 5094ff92c2..687f08d9a0 100644
--- a/daemon/src/managerimpl.cpp
+++ b/daemon/src/managerimpl.cpp
@@ -46,10 +46,13 @@
 #include "audio/alsa/alsalayer.h"
 #include "audio/pulseaudio/pulselayer.h"
 #include "audio/sound/tonelist.h"
+#include "audio/sound/audiofile.h"
+#include "audio/sound/dtmf.h"
 #include "history/historymanager.h"
 #include "sip/sipvoiplink.h"
 #include "iax/iaxvoiplink.h"
 #include "manager.h"
+
 #include "dbus/configurationmanager.h"
 
 #include "conference.h"
diff --git a/daemon/src/managerimpl.h b/daemon/src/managerimpl.h
index 97439234f0..7c5ee305e5 100644
--- a/daemon/src/managerimpl.h
+++ b/daemon/src/managerimpl.h
@@ -47,25 +47,27 @@
 #include "call.h"
 #include "conference.h"
 
-#include "audio/sound/tonelist.h"  // for Tone::TONEID declaration
-#include "audio/sound/audiofile.h"
-#include "audio/sound/dtmf.h" // DTMF class contained by value here
+#include "audio/sound/tone.h"  // for Tone::TONEID declaration
 #include "audio/codecs/audiocodecfactory.h" 
 
 #include "audio/mainbuffer.h"
-#include "yamlemitter.h"
-#include "yamlparser.h"
 #include "preferences.h"
 
-#include "im/InstantMessaging.h"
+namespace sfl {
+    class InstantMessaging;
+}
 
+namespace Conf {
+    class YamlParser;
+    class YamlEmitter;
+}
+
+class DTMF;
+class AudioFile;
 class AudioLayer;
-class GuiFramework;
 class TelephoneTone;
 class VoIPLink;
 
-// class Conference;
-
 #ifdef USE_ZEROCONF
 class DNSService;
 #endif
@@ -1160,7 +1162,6 @@ class ManagerImpl
             return _imModule;
         }
 
-
         /**
          * Tell if there is a current call processed
          * @return bool True if there is a current call
@@ -1261,10 +1262,6 @@ class ManagerImpl
         void checkCallConfiguration (const std::string& id, const std::string& to, Call::CallConfiguration *callConfig);
 
         Conf::YamlEmitter *emitter;
-
-        friend class SIPTest;
-        friend class ConfigurationTest;
-        friend class HistoryTest;
 };
 
 #endif // __MANAGER_H__
diff --git a/daemon/test/configurationtest.cpp b/daemon/test/configurationtest.cpp
index 24da34990a..feecb45197 100644
--- a/daemon/test/configurationtest.cpp
+++ b/daemon/test/configurationtest.cpp
@@ -67,16 +67,6 @@ void ConfigurationTest::testDefaultValueSignalisation()
     CPPUNIT_ASSERT (Manager::instance().voipPreferences.getPulseLength() == 250);
 }
 
-void ConfigurationTest::testInitVolume()
-{
-    _debug ("-------------------- ConfigurationTest::testInitVolume --------------------\n");
-
-    Manager::instance().initVolume();
-
-    CPPUNIT_ASSERT (Manager::instance().audioPreference.getVolumespkr() == Manager::instance().getSpkrVolume());
-    CPPUNIT_ASSERT (Manager::instance().audioPreference.getVolumemic() == Manager::instance().getMicVolume());
-}
-
 void ConfigurationTest::testInitAudioDriver()
 {
     _debug ("-------------------- ConfigurationTest::testInitAudioDriver --------------------\n");
diff --git a/daemon/test/configurationtest.h b/daemon/test/configurationtest.h
index fc7f22ade2..aea9a3cf85 100755
--- a/daemon/test/configurationtest.h
+++ b/daemon/test/configurationtest.h
@@ -61,7 +61,6 @@ class ConfigurationTest: public CppUnit::TestFixture {
 	 * Use cppunit library macros to add unit test the factory
 	 */
 CPPUNIT_TEST_SUITE( ConfigurationTest );
-//      CPPUNIT_TEST( testInitVolume );
 //      CPPUNIT_TEST( testDefaultValueAudio );
 //	CPPUNIT_TEST( testDefaultValuePreferences );
 //	CPPUNIT_TEST( testDefaultValueSignalisation );
@@ -94,8 +93,6 @@ public:
 
 	void testUnloadSIPAccount();
 
-	void testInitVolume();
-
 	void testInitAudioDriver();
 
 	void testYamlParser();
-- 
GitLab