[ekiga] Opal Process: Fix CallManager creation and destruction.
- From: Damien Sandras <dsandras src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ekiga] Opal Process: Fix CallManager creation and destruction.
- Date: Sat, 24 Jan 2015 14:57:39 +0000 (UTC)
commit d614f4ce76cf7045501448447a26db4545f175d4
Author: Damien Sandras <dsandras seconix com>
Date: Sat Jan 24 15:31:20 2015 +0100
Opal Process: Fix CallManager creation and destruction.
If we add the CallManager to the CallCore after having created it, we
shoud also explicitely remove it when we go away.
lib/engine/components/opal/opal-process.cpp | 3 +++
lib/engine/protocol/call-core.cpp | 7 +++++++
lib/engine/protocol/call-core.h | 10 ++++++++++
3 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/lib/engine/components/opal/opal-process.cpp b/lib/engine/components/opal/opal-process.cpp
index 6a6221f..8fc14c9 100644
--- a/lib/engine/components/opal/opal-process.cpp
+++ b/lib/engine/components/opal/opal-process.cpp
@@ -65,6 +65,9 @@ GnomeMeeting::~GnomeMeeting ()
pcore->remove_cluster (bank);
core.remove (bank);
+
+ boost::shared_ptr<Ekiga::CallCore> ccore = call_core.lock ();
+ ccore->remove_manager (call_manager);
}
GnomeMeeting *
diff --git a/lib/engine/protocol/call-core.cpp b/lib/engine/protocol/call-core.cpp
index 5665940..3c3102b 100644
--- a/lib/engine/protocol/call-core.cpp
+++ b/lib/engine/protocol/call-core.cpp
@@ -60,6 +60,13 @@ void CallCore::add_manager (boost::shared_ptr<CallManager> manager)
}
+void CallCore::remove_manager (boost::shared_ptr<CallManager> manager)
+{
+ manager_removed (manager);
+ managers.erase (manager);
+}
+
+
CallCore::iterator CallCore::begin ()
{
return managers.begin ();
diff --git a/lib/engine/protocol/call-core.h b/lib/engine/protocol/call-core.h
index 7f3df04..fbcccfa 100644
--- a/lib/engine/protocol/call-core.h
+++ b/lib/engine/protocol/call-core.h
@@ -110,6 +110,11 @@ namespace Ekiga
*/
void add_manager (boost::shared_ptr<CallManager> manager);
+ /** Removes the CallManager from the CallCore service.
+ * @param The manager to be removed.
+ */
+ void remove_manager (boost::shared_ptr<CallManager> manager);
+
/** Return iterator to beginning
* @return iterator to beginning
*/
@@ -127,6 +132,11 @@ namespace Ekiga
*/
boost::signals2::signal<void(boost::shared_ptr<CallManager>)> manager_added;
+ /** This signal is emitted when a Ekiga::CallManager has been
+ * removed to the CallCore Service.
+ */
+ boost::signals2::signal<void(boost::shared_ptr<CallManager>)> manager_removed;
+
/*** Call Management ***/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]