[ekiga/ds-opal-refactoring] CallCore: Use a RefLister for CallManagers instead of inheritance.
- From: Damien Sandras <dsandras src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ekiga/ds-opal-refactoring] CallCore: Use a RefLister for CallManagers instead of inheritance.
- Date: Tue, 31 Mar 2015 16:14:50 +0000 (UTC)
commit 56c5769a6bc8511750411051fe75136aae68cb98
Author: Damien Sandras <dsandras seconix com>
Date: Sun Mar 29 11:38:23 2015 +0200
CallCore: Use a RefLister for CallManagers instead of inheritance.
lib/engine/protocol/call-core.cpp | 12 ++++++------
lib/engine/protocol/call-core.h | 25 ++++++++++++++-----------
2 files changed, 20 insertions(+), 17 deletions(-)
---
diff --git a/lib/engine/protocol/call-core.cpp b/lib/engine/protocol/call-core.cpp
index 7480946..b47af45 100644
--- a/lib/engine/protocol/call-core.cpp
+++ b/lib/engine/protocol/call-core.cpp
@@ -61,7 +61,7 @@ CallCore::~CallCore ()
void CallCore::add_manager (boost::shared_ptr<CallManager> manager)
{
- add_object (manager);
+ managers.add_object (manager);
manager_added (manager);
}
@@ -69,31 +69,31 @@ void CallCore::add_manager (boost::shared_ptr<CallManager> manager)
void CallCore::remove_manager (boost::shared_ptr<CallManager> manager)
{
manager_removed (manager);
- remove_object (manager);
+ managers.remove_object (manager);
}
CallCore::iterator CallCore::begin ()
{
- return RefLister<CallManager>::begin ();
+ return managers.begin ();
}
CallCore::const_iterator CallCore::begin () const
{
- return RefLister<CallManager>::begin ();
+ return managers.begin ();
}
CallCore::iterator CallCore::end ()
{
- return RefLister<CallManager>::end ();
+ return managers.end ();
}
CallCore::const_iterator CallCore::end () const
{
- return RefLister<CallManager>::end ();
+ return managers.end ();
}
diff --git a/lib/engine/protocol/call-core.h b/lib/engine/protocol/call-core.h
index c307249..4e634d7 100644
--- a/lib/engine/protocol/call-core.h
+++ b/lib/engine/protocol/call-core.h
@@ -72,15 +72,10 @@ namespace Ekiga
* This is true even in the case of settings which are common to several
* CallManagers.
*/
- class CallCore:
- public Service,
- protected RefLister<CallManager>
+ class CallCore: public Service
{
public:
- typedef RefLister<CallManager>::iterator iterator;
- typedef RefLister<CallManager>::const_iterator const_iterator;
-
/** The constructor
*/
CallCore (boost::shared_ptr<Ekiga::FriendOrFoe> iff,
@@ -124,16 +119,23 @@ namespace Ekiga
*/
void remove_manager (boost::shared_ptr<CallManager> manager);
- /** Return iterator to beginning
- * @return iterator to beginning
+ typedef typename RefLister<CallManager>::const_iterator const_iterator;
+ typedef typename RefLister<CallManager>::iterator iterator;
+
+ /** Returns an iterator to the first Book of the collection
*/
iterator begin ();
- const_iterator begin () const;
- /** Return iterator to end
- * @return iterator to end
+ /** Returns an iterator to the last Book of the collection
*/
iterator end ();
+
+ /** Returns a const iterator to the first Book of the collection
+ */
+ const_iterator begin () const;
+
+ /** Returns a const iterator to the last Book of the collection
+ */
const_iterator end () const;
/** This signal is emitted when a Ekiga::CallManager has been
@@ -201,6 +203,7 @@ namespace Ekiga
boost::weak_ptr<Ekiga::NotificationCore> notification_core;
RefLister<Ekiga::Call> calls;
+ RefLister<Ekiga::CallManager> managers;
};
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]