[ekiga] Made the Ekiga::ConfBridge base class stop enforcing some implementation detail it doesn't need, and



commit 54aaac6e591f45618079e4055eae3545c6bc80ab
Author: Julien Puydt <jpuydt free fr>
Date:   Mon Jan 21 10:00:04 2013 +0100

    Made the Ekiga::ConfBridge base class stop enforcing some implementation detail it doesn't need, and made all implementations cope with the change

 lib/engine/audioinput/audioinput-gmconf-bridge.cpp |    9 ++++-----
 lib/engine/audioinput/audioinput-gmconf-bridge.h   |   15 +++++++++++----
 .../audiooutput/audiooutput-gmconf-bridge.cpp      |    9 ++++-----
 lib/engine/audiooutput/audiooutput-gmconf-bridge.h |   15 +++++++++++----
 lib/engine/components/opal/opal-gmconf-bridge.cpp  |    9 ++++-----
 lib/engine/components/opal/opal-gmconf-bridge.h    |   14 ++++++++++----
 lib/engine/framework/gmconf-bridge.h               |    5 ++---
 lib/engine/videoinput/videoinput-gmconf-bridge.cpp |    9 ++++-----
 lib/engine/videoinput/videoinput-gmconf-bridge.h   |   15 ++++++++++-----
 .../videooutput/videooutput-gmconf-bridge.cpp      |    8 ++++----
 lib/engine/videooutput/videooutput-gmconf-bridge.h |   15 ++++++++++-----
 11 files changed, 74 insertions(+), 49 deletions(-)
---
diff --git a/lib/engine/audioinput/audioinput-gmconf-bridge.cpp b/lib/engine/audioinput/audioinput-gmconf-bridge.cpp
index 945e697..ee35078 100644
--- a/lib/engine/audioinput/audioinput-gmconf-bridge.cpp
+++ b/lib/engine/audioinput/audioinput-gmconf-bridge.cpp
@@ -41,8 +41,7 @@
 
 using namespace Ekiga;
 
-AudioInputCoreConfBridge::AudioInputCoreConfBridge (Ekiga::Service & _service)
- : Ekiga::ConfBridge (_service)
+AudioInputCoreConfBridge::AudioInputCoreConfBridge (Ekiga::AudioInputCore& _core): audioinput_core(_core)
 {
   Ekiga::ConfKeys keys;
   property_changed.connect (boost::bind (&AudioInputCoreConfBridge::on_property_changed, this, _1, _2));
@@ -51,10 +50,10 @@ AudioInputCoreConfBridge::AudioInputCoreConfBridge (Ekiga::Service & _service)
   load (keys);
 }
 
-void AudioInputCoreConfBridge::on_property_changed (std::string key, GmConfEntry *entry)
+void
+AudioInputCoreConfBridge::on_property_changed (std::string key,
+					       GmConfEntry *entry)
 {
-  AudioInputCore & audioinput_core = (AudioInputCore &) service;
-
   if (key == AUDIO_DEVICES_KEY "input_device") {
 
     gchar* value = gm_conf_entry_get_string (entry);
diff --git a/lib/engine/audioinput/audioinput-gmconf-bridge.h b/lib/engine/audioinput/audioinput-gmconf-bridge.h
index 9fa97f2..cdfd5a2 100644
--- a/lib/engine/audioinput/audioinput-gmconf-bridge.h
+++ b/lib/engine/audioinput/audioinput-gmconf-bridge.h
@@ -42,14 +42,21 @@
 
 namespace Ekiga
 {
-  class AudioInputCoreConfBridge
-    : public Ekiga::ConfBridge
+  class AudioInputCore;
+
+  class AudioInputCoreConfBridge:
+    public Ekiga::ConfBridge
   {
   public:
 
-    AudioInputCoreConfBridge (Ekiga::Service & service);
+    AudioInputCoreConfBridge (Ekiga::AudioInputCore& _core);
+
+    void on_property_changed (std::string key,
+			      GmConfEntry *value);
+
+  private:
 
-    void on_property_changed (std::string key, GmConfEntry *value);
+    Ekiga::AudioInputCore& audioinput_core;
   };
 
 };
diff --git a/lib/engine/audiooutput/audiooutput-gmconf-bridge.cpp b/lib/engine/audiooutput/audiooutput-gmconf-bridge.cpp
index 76aa868..78a684c 100644
--- a/lib/engine/audiooutput/audiooutput-gmconf-bridge.cpp
+++ b/lib/engine/audiooutput/audiooutput-gmconf-bridge.cpp
@@ -41,8 +41,7 @@
 
 using namespace Ekiga;
 
-AudioOutputCoreConfBridge::AudioOutputCoreConfBridge (Ekiga::Service & _service)
- : Ekiga::ConfBridge (_service)
+AudioOutputCoreConfBridge::AudioOutputCoreConfBridge (Ekiga::AudioOutputCore& _core): audiooutput_core(_core)
 {
   Ekiga::ConfKeys keys;
   property_changed.connect (boost::bind (&AudioOutputCoreConfBridge::on_property_changed, this, _1, _2));
@@ -63,14 +62,14 @@ AudioOutputCoreConfBridge::AudioOutputCoreConfBridge (Ekiga::Service & _service)
   load (keys);
 }
 
-void AudioOutputCoreConfBridge::on_property_changed (std::string key, GmConfEntry *entry)
+void
+AudioOutputCoreConfBridge::on_property_changed (std::string key,
+						GmConfEntry *entry)
 {
   std::string name;
   std::string file_name;
   bool enabled;
 
-  AudioOutputCore & audiooutput_core = (AudioOutputCore &) service;
-
   if (key == AUDIO_DEVICES_KEY "output_device") {
 
     std::vector <AudioOutputDevice> devices;
diff --git a/lib/engine/audiooutput/audiooutput-gmconf-bridge.h b/lib/engine/audiooutput/audiooutput-gmconf-bridge.h
index 7bbbd2f..60dc26f 100644
--- a/lib/engine/audiooutput/audiooutput-gmconf-bridge.h
+++ b/lib/engine/audiooutput/audiooutput-gmconf-bridge.h
@@ -42,14 +42,21 @@
 
 namespace Ekiga
 {
-  class AudioOutputCoreConfBridge
-    : public Ekiga::ConfBridge
+  class AudioOutputCore;
+
+  class AudioOutputCoreConfBridge:
+    public Ekiga::ConfBridge
   {
   public:
 
-    AudioOutputCoreConfBridge (Ekiga::Service & service);
+    AudioOutputCoreConfBridge (Ekiga::AudioOutputCore& _core);
+
+    void on_property_changed (std::string key,
+			      GmConfEntry *value);
+
+  private:
 
-    void on_property_changed (std::string key, GmConfEntry *value);
+    Ekiga::AudioOutputCore& audiooutput_core;
   };
 
 };
diff --git a/lib/engine/components/opal/opal-gmconf-bridge.cpp b/lib/engine/components/opal/opal-gmconf-bridge.cpp
index 48f3e90..9c09f7a 100644
--- a/lib/engine/components/opal/opal-gmconf-bridge.cpp
+++ b/lib/engine/components/opal/opal-gmconf-bridge.cpp
@@ -53,8 +53,7 @@
 
 using namespace Opal;
 
-ConfBridge::ConfBridge (Ekiga::Service & _service)
- : Ekiga::ConfBridge (_service)
+ConfBridge::ConfBridge (Opal::CallManager& _core): manager(_core)
 {
   Ekiga::ConfKeys keys;
   property_changed.connect (boost::bind (&ConfBridge::on_property_changed, this, _1, _2));
@@ -106,10 +105,10 @@ ConfBridge::ConfBridge (Ekiga::Service & _service)
 }
 
 
-void ConfBridge::on_property_changed (std::string key, GmConfEntry *entry)
+void
+ConfBridge::on_property_changed (std::string key,
+				 GmConfEntry *entry)
 {
-  CallManager & manager = (CallManager &) service;
-
   //
   // Video options
   //
diff --git a/lib/engine/components/opal/opal-gmconf-bridge.h b/lib/engine/components/opal/opal-gmconf-bridge.h
index 4f47d3e..e9249f7 100644
--- a/lib/engine/components/opal/opal-gmconf-bridge.h
+++ b/lib/engine/components/opal/opal-gmconf-bridge.h
@@ -43,14 +43,20 @@ class GMManager;
 
 namespace Opal
 {
-  class ConfBridge
-    : public Ekiga::ConfBridge
+  class CallManager;
+
+  class ConfBridge: public Ekiga::ConfBridge
   {
   public:
 
-    ConfBridge (Ekiga::Service & service);
+    ConfBridge (Opal::CallManager& _core);
+
+    void on_property_changed (std::string key,
+			      GmConfEntry *value);
+
+  private:
 
-    void on_property_changed (std::string key, GmConfEntry *value);
+    Opal::CallManager& manager;
   };
 };
 #endif
diff --git a/lib/engine/framework/gmconf-bridge.h b/lib/engine/framework/gmconf-bridge.h
index 50e41ff..94cbdbc 100644
--- a/lib/engine/framework/gmconf-bridge.h
+++ b/lib/engine/framework/gmconf-bridge.h
@@ -79,7 +79,7 @@ namespace Ekiga
       /** The constructor
        * @param _service is the Ekiga::Service the bridge will update
        */
-      ConfBridge (Ekiga::Service & _service) : service (_service) {};
+      ConfBridge () {}
 
       ~ConfBridge ();
 
@@ -97,9 +97,8 @@ namespace Ekiga
        */
       boost::signal2<void, std::string /*key*/, GmConfEntry * /*entry*/> property_changed;
 
-  protected:
+  private:
       std::list<gpointer> notifiers;
-      Ekiga::Service & service;
     };
 };
 #endif
diff --git a/lib/engine/videoinput/videoinput-gmconf-bridge.cpp b/lib/engine/videoinput/videoinput-gmconf-bridge.cpp
index 2485eb1..12b9997 100644
--- a/lib/engine/videoinput/videoinput-gmconf-bridge.cpp
+++ b/lib/engine/videoinput/videoinput-gmconf-bridge.cpp
@@ -41,8 +41,7 @@
 
 using namespace Ekiga;
 
-VideoInputCoreConfBridge::VideoInputCoreConfBridge (Ekiga::Service & _service)
- : Ekiga::ConfBridge (_service)
+VideoInputCoreConfBridge::VideoInputCoreConfBridge (Ekiga::VideoInputCore & _core): videoinput_core (_core)
 {
   Ekiga::ConfKeys keys;
   property_changed.connect (boost::bind (&VideoInputCoreConfBridge::on_property_changed, this, _1, _2));
@@ -57,10 +56,10 @@ VideoInputCoreConfBridge::VideoInputCoreConfBridge (Ekiga::Service & _service)
   load (keys);
 }
 
-void VideoInputCoreConfBridge::on_property_changed (std::string key, GmConfEntry * /*entry*/)
+void
+VideoInputCoreConfBridge::on_property_changed (std::string key,
+					       GmConfEntry * /*entry*/)
 {
-  VideoInputCore & videoinput_core = (VideoInputCore &) service;
-
   if ( (key == VIDEO_DEVICES_KEY "size") ||
        (key == VIDEO_DEVICES_KEY "max_frame_rate") ) {
 
diff --git a/lib/engine/videoinput/videoinput-gmconf-bridge.h b/lib/engine/videoinput/videoinput-gmconf-bridge.h
index fcead25..1fd1303 100644
--- a/lib/engine/videoinput/videoinput-gmconf-bridge.h
+++ b/lib/engine/videoinput/videoinput-gmconf-bridge.h
@@ -37,19 +37,24 @@
 #ifndef __VIDEOINPUT_GMCONF_BRIDGE_H__
 #define __VIDEOINPUT_GMCONF_BRIDGE_H__
 
-#include "services.h"
 #include "gmconf-bridge.h"
 
 namespace Ekiga
 {
-  class VideoInputCoreConfBridge
-    : public Ekiga::ConfBridge
+  class VideoInputCore;
+
+  class VideoInputCoreConfBridge:
+  public Ekiga::ConfBridge
   {
   public:
 
-    VideoInputCoreConfBridge (Ekiga::Service & service);
+    VideoInputCoreConfBridge (Ekiga::VideoInputCore& videoinput_core);
+
+    void on_property_changed (std::string key,
+			      GmConfEntry *value);
 
-    void on_property_changed (std::string key, GmConfEntry *value);
+  private:
+    Ekiga::VideoInputCore& videoinput_core;
   };
 
 };
diff --git a/lib/engine/videooutput/videooutput-gmconf-bridge.cpp b/lib/engine/videooutput/videooutput-gmconf-bridge.cpp
index 89a0ba3..bdea6d6 100644
--- a/lib/engine/videooutput/videooutput-gmconf-bridge.cpp
+++ b/lib/engine/videooutput/videooutput-gmconf-bridge.cpp
@@ -41,8 +41,7 @@
 
 using namespace Ekiga;
 
-VideoOutputCoreConfBridge::VideoOutputCoreConfBridge (Ekiga::Service & _service)
- : Ekiga::ConfBridge (_service)
+VideoOutputCoreConfBridge::VideoOutputCoreConfBridge (Ekiga::VideoOutputCore & _core): display_core (_core)
 {
   Ekiga::ConfKeys keys;
   property_changed.connect (boost::bind (&VideoOutputCoreConfBridge::on_property_changed, this, _1, _2));
@@ -58,9 +57,10 @@ VideoOutputCoreConfBridge::VideoOutputCoreConfBridge (Ekiga::Service & _service)
   load (keys);
 }
 
-void VideoOutputCoreConfBridge::on_property_changed (std::string key, GmConfEntry */*entry*/)
+void
+VideoOutputCoreConfBridge::on_property_changed (std::string key,
+						GmConfEntry */*entry*/)
 {
-  VideoOutputCore & display_core = (VideoOutputCore &) service;
   if (key == VIDEO_DISPLAY_KEY "video_view")  {
 
     DisplayInfo display_info;
diff --git a/lib/engine/videooutput/videooutput-gmconf-bridge.h b/lib/engine/videooutput/videooutput-gmconf-bridge.h
index 14cdc6d..b64254a 100644
--- a/lib/engine/videooutput/videooutput-gmconf-bridge.h
+++ b/lib/engine/videooutput/videooutput-gmconf-bridge.h
@@ -37,19 +37,24 @@
 #ifndef __VIDEOOUTPUT_GMCONF_BRIDGE_H__
 #define __VIDEOOUTPUT_GMCONF_BRIDGE_H__
 
-#include "services.h"
 #include "gmconf-bridge.h"
 
 namespace Ekiga
 {
-  class VideoOutputCoreConfBridge
-    : public Ekiga::ConfBridge
+  class VideoOutputCore;
+
+  class VideoOutputCoreConfBridge:
+    public Ekiga::ConfBridge
   {
   public:
 
-    VideoOutputCoreConfBridge (Ekiga::Service & service);
+    VideoOutputCoreConfBridge (Ekiga::VideoOutputCore& core);
+
+    void on_property_changed (std::string key,
+			      GmConfEntry *value);
 
-    void on_property_changed (std::string key, GmConfEntry *value);
+  private:
+    Ekiga::VideoOutputCore& display_core;
   };
 
 };



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]