[ekiga] Small const-correctness patch



commit 2edad9eb6254ac08b25e0f86abf6e98227f0679e
Author: Julien Puydt <jpuydt gnome org>
Date:   Thu Sep 24 14:34:29 2009 +0200

    Small const-correctness patch

 lib/engine/account/account-core.cpp         |    4 ++--
 lib/engine/account/account-core.h           |    2 +-
 lib/engine/account/bank-impl.h              |    4 ++--
 lib/engine/account/bank.h                   |    2 +-
 lib/engine/addressbook/book-impl.h          |    4 ++--
 lib/engine/addressbook/book.h               |    2 +-
 lib/engine/addressbook/contact-core.cpp     |    4 ++--
 lib/engine/addressbook/contact-core.h       |    2 +-
 lib/engine/addressbook/source-impl.h        |    4 ++--
 lib/engine/addressbook/source.h             |    2 +-
 lib/engine/audioinput/audioinput-core.cpp   |    5 ++---
 lib/engine/audioinput/audioinput-core.h     |    2 +-
 lib/engine/audiooutput/audiooutput-core.cpp |    5 ++---
 lib/engine/audiooutput/audiooutput-core.h   |    2 +-
 lib/engine/chat/chat-core.cpp               |    4 ++--
 lib/engine/chat/chat-core.h                 |    2 +-
 lib/engine/chat/dialect-impl.h              |   12 ++++++------
 lib/engine/chat/dialect.h                   |    4 ++--
 lib/engine/framework/reflister.h            |    6 +++---
 lib/engine/hal/hal-core.cpp                 |    4 ++--
 lib/engine/hal/hal-core.h                   |    2 +-
 lib/engine/presence/cluster-impl.h          |    4 ++--
 lib/engine/presence/cluster.h               |    2 +-
 lib/engine/presence/heap-impl.h             |    4 ++--
 lib/engine/presence/heap.h                  |    2 +-
 lib/engine/presence/presence-core.cpp       |    4 ++--
 lib/engine/presence/presence-core.h         |    2 +-
 lib/engine/videoinput/videoinput-core.cpp   |    4 ++--
 lib/engine/videoinput/videoinput-core.h     |    2 +-
 lib/engine/videooutput/videooutput-core.cpp |    4 ++--
 lib/engine/videooutput/videooutput-core.h   |    2 +-
 plugins/resource-list/rl-heap.cpp           |    2 +-
 plugins/resource-list/rl-heap.h             |    2 +-
 plugins/resource-list/rl-list.cpp           |    6 +++---
 plugins/resource-list/rl-list.h             |    2 +-
 35 files changed, 59 insertions(+), 61 deletions(-)
---
diff --git a/lib/engine/account/account-core.cpp b/lib/engine/account/account-core.cpp
index fda3803..fc818a0 100644
--- a/lib/engine/account/account-core.cpp
+++ b/lib/engine/account/account-core.cpp
@@ -82,11 +82,11 @@ Ekiga::AccountCore::add_bank (BankPtr bank)
 
 
 void
-Ekiga::AccountCore::visit_banks (boost::function1<bool, BankPtr> visitor)
+Ekiga::AccountCore::visit_banks (boost::function1<bool, BankPtr> visitor) const
 {
   bool go_on = true;
 
-  for (bank_iterator iter = banks.begin ();
+  for (bank_const_iterator iter = banks.begin ();
        iter != banks.end () && go_on;
        iter++)
     go_on = visitor (*iter);
diff --git a/lib/engine/account/account-core.h b/lib/engine/account/account-core.h
index 90b693e..90bede6 100644
--- a/lib/engine/account/account-core.h
+++ b/lib/engine/account/account-core.h
@@ -101,7 +101,7 @@ namespace Ekiga
      * @param The callback (the return value means "go on" and allows
      *  stopping the visit)
      */
-    void visit_banks (boost::function1<bool, BankPtr> visitor);
+    void visit_banks (boost::function1<bool, BankPtr> visitor) const;
 
 
     /** This signal is emitted when a bank has been added to the core
diff --git a/lib/engine/account/bank-impl.h b/lib/engine/account/bank-impl.h
index b40f1ac..e16848e 100644
--- a/lib/engine/account/bank-impl.h
+++ b/lib/engine/account/bank-impl.h
@@ -95,7 +95,7 @@ namespace Ekiga
      * @param The callback (the return value means "go on" and allows
      *  stopping the visit)
      */
-    void visit_accounts (boost::function1<bool, AccountPtr> visitor);
+    void visit_accounts (boost::function1<bool, AccountPtr> visitor) const;
 
     /** Returns an iterator to the first Account of the collection
      */
@@ -161,7 +161,7 @@ Ekiga::BankImpl<AccountType>::~BankImpl ()
 
 template<typename AccountType>
 void
-Ekiga::BankImpl<AccountType>::visit_accounts (boost::function1<bool, AccountPtr> visitor)
+Ekiga::BankImpl<AccountType>::visit_accounts (boost::function1<bool, AccountPtr> visitor) const
 {
   RefLister<AccountType>::visit_objects (visitor);
 }
diff --git a/lib/engine/account/bank.h b/lib/engine/account/bank.h
index ebc0bf2..a3fa43a 100644
--- a/lib/engine/account/bank.h
+++ b/lib/engine/account/bank.h
@@ -61,7 +61,7 @@ namespace Ekiga
      * @param The callback (the return value means "go on" and allows
      *  stopping the visit)
      */
-    virtual void visit_accounts (boost::function1<bool, AccountPtr> visitor) = 0;
+    virtual void visit_accounts (boost::function1<bool, AccountPtr> visitor) const = 0;
 
 
     /** Create the menu for that Bank and its actions.
diff --git a/lib/engine/addressbook/book-impl.h b/lib/engine/addressbook/book-impl.h
index 16d343e..711d8d9 100644
--- a/lib/engine/addressbook/book-impl.h
+++ b/lib/engine/addressbook/book-impl.h
@@ -94,7 +94,7 @@ namespace Ekiga
      * @param The callback (the return value means "go on" and allows
      *  stopping the visit)
      */
-    void visit_contacts (boost::function1<bool, ContactPtr > visitor);
+    void visit_contacts (boost::function1<bool, ContactPtr > visitor) const;
 
   protected:
 
@@ -161,7 +161,7 @@ Ekiga::BookImpl<ContactType>::~BookImpl ()
 
 template<typename ContactType>
 void
-Ekiga::BookImpl<ContactType>::visit_contacts (boost::function1<bool, ContactPtr > visitor)
+Ekiga::BookImpl<ContactType>::visit_contacts (boost::function1<bool, ContactPtr > visitor) const
 {
   RefLister<ContactType>::visit_objects (visitor);
 }
diff --git a/lib/engine/addressbook/book.h b/lib/engine/addressbook/book.h
index 9e7bae2..a5f3cba 100644
--- a/lib/engine/addressbook/book.h
+++ b/lib/engine/addressbook/book.h
@@ -64,7 +64,7 @@ namespace Ekiga {
      * @param The callback (the return value means "go on" and allows
      *  stopping the visit)
      */
-    virtual void visit_contacts (boost::function1<bool, ContactPtr>) = 0;
+    virtual void visit_contacts (boost::function1<bool, ContactPtr>) const = 0;
 
 
     /** Set the search filter.
diff --git a/lib/engine/addressbook/contact-core.cpp b/lib/engine/addressbook/contact-core.cpp
index d3f56ab..d7a3956 100644
--- a/lib/engine/addressbook/contact-core.cpp
+++ b/lib/engine/addressbook/contact-core.cpp
@@ -87,11 +87,11 @@ Ekiga::ContactCore::add_source (SourcePtr source)
 }
 
 void
-Ekiga::ContactCore::visit_sources (boost::function1<bool, SourcePtr > visitor)
+Ekiga::ContactCore::visit_sources (boost::function1<bool, SourcePtr > visitor) const
 {
   bool go_on = true;
 
-  for (std::list<SourcePtr >::iterator iter = sources.begin ();
+  for (std::list<SourcePtr >::const_iterator iter = sources.begin ();
        iter != sources.end () && go_on;
        ++iter)
     go_on = visitor (*iter);
diff --git a/lib/engine/addressbook/contact-core.h b/lib/engine/addressbook/contact-core.h
index e664b99..3657489 100644
--- a/lib/engine/addressbook/contact-core.h
+++ b/lib/engine/addressbook/contact-core.h
@@ -109,7 +109,7 @@ namespace Ekiga
      * @param The callback (the return value means "go on" and allows
      *  stopping the visit)
      */
-    void visit_sources (boost::function1<bool, SourcePtr > visitor);
+    void visit_sources (boost::function1<bool, SourcePtr > visitor) const;
 
 
     /** This signal is emitted when a Ekiga::Source has been
diff --git a/lib/engine/addressbook/source-impl.h b/lib/engine/addressbook/source-impl.h
index 154de70..a30cd03 100644
--- a/lib/engine/addressbook/source-impl.h
+++ b/lib/engine/addressbook/source-impl.h
@@ -100,7 +100,7 @@ namespace Ekiga
      * @param The callback (the return value means "go on" and allows
      *  stopping the visit)
      */
-    void visit_books (boost::function1<bool, BookPtr > visitor);
+    void visit_books (boost::function1<bool, BookPtr > visitor) const;
 
   protected:
 
@@ -196,7 +196,7 @@ Ekiga::SourceImpl<BookType>::~SourceImpl ()
 
 template<typename BookType>
 void
-Ekiga::SourceImpl<BookType>::visit_books (boost::function1<bool, BookPtr > visitor)
+Ekiga::SourceImpl<BookType>::visit_books (boost::function1<bool, BookPtr > visitor) const
 {
   RefLister<BookType>::visit_objects (visitor);
 }
diff --git a/lib/engine/addressbook/source.h b/lib/engine/addressbook/source.h
index 3997271..35accd6 100644
--- a/lib/engine/addressbook/source.h
+++ b/lib/engine/addressbook/source.h
@@ -58,7 +58,7 @@ namespace Ekiga {
      * @param The callback (the return value means "go on" and allows
      *  stopping the visit)
      */
-    virtual void visit_books (boost::function1<bool, BookPtr >) = 0;
+    virtual void visit_books (boost::function1<bool, BookPtr >) const = 0;
 
 
     /** This signal is emitted when a Book has been added to the Source.
diff --git a/lib/engine/audioinput/audioinput-core.cpp b/lib/engine/audioinput/audioinput-core.cpp
index d1190fe..8bbda31 100644
--- a/lib/engine/audioinput/audioinput-core.cpp
+++ b/lib/engine/audioinput/audioinput-core.cpp
@@ -172,13 +172,12 @@ void AudioInputCore::add_manager (AudioInputManager &manager)
 }
 
 
-void AudioInputCore::visit_managers (boost::function1<bool, AudioInputManager &> visitor)
+void AudioInputCore::visit_managers (boost::function1<bool, AudioInputManager &> visitor) const
 {
-  yield = true;
   PWaitAndSignal m(core_mutex);
   bool go_on = true;
 
-  for (std::set<AudioInputManager *>::iterator iter = managers.begin ();
+  for (std::set<AudioInputManager *>::const_iterator iter = managers.begin ();
        iter != managers.end () && go_on;
        iter++)
       go_on = visitor (*(*iter));
diff --git a/lib/engine/audioinput/audioinput-core.h b/lib/engine/audioinput/audioinput-core.h
index 6c7e27e..2e04aef 100644
--- a/lib/engine/audioinput/audioinput-core.h
+++ b/lib/engine/audioinput/audioinput-core.h
@@ -132,7 +132,7 @@ namespace Ekiga
       /** Triggers a callback for all Ekiga::AudioInputManager sources of the
        * AudioInputCore service.
        */
-      void visit_managers (boost::function1<bool, AudioInputManager &> visitor);
+      void visit_managers (boost::function1<bool, AudioInputManager &> visitor) const;
 
       /** This signal is emitted when a Ekiga::AudioInputManager has been
        * added to the AudioInputCore Service.
diff --git a/lib/engine/audiooutput/audiooutput-core.cpp b/lib/engine/audiooutput/audiooutput-core.cpp
index 785ccc2..49ed03c 100644
--- a/lib/engine/audiooutput/audiooutput-core.cpp
+++ b/lib/engine/audiooutput/audiooutput-core.cpp
@@ -99,14 +99,13 @@ void AudioOutputCore::add_manager (AudioOutputManager &manager)
   manager.device_closed.connect (boost::bind (&AudioOutputCore::on_device_closed, this, _1, _2, &manager));
 }
 
-void AudioOutputCore::visit_managers (boost::function1<bool, AudioOutputManager &> visitor)
+void AudioOutputCore::visit_managers (boost::function1<bool, AudioOutputManager &> visitor) const
 {
-  yield = true;
   PWaitAndSignal m_pri(core_mutex[primary]);
   PWaitAndSignal m_sec(core_mutex[secondary]);
   bool go_on = true;
   
-  for (std::set<AudioOutputManager *>::iterator iter = managers.begin ();
+  for (std::set<AudioOutputManager *>::const_iterator iter = managers.begin ();
        iter != managers.end () && go_on;
        iter++)
       go_on = visitor (*(*iter));
diff --git a/lib/engine/audiooutput/audiooutput-core.h b/lib/engine/audiooutput/audiooutput-core.h
index 6a44b86..e894084 100644
--- a/lib/engine/audiooutput/audiooutput-core.h
+++ b/lib/engine/audiooutput/audiooutput-core.h
@@ -122,7 +122,7 @@ namespace Ekiga
       /** Triggers a callback for all Ekiga::AudioOutputManager sources of the
        * AudioOutputCore service.
        */
-      void visit_managers (boost::function1<bool, AudioOutputManager &> visitor);
+      void visit_managers (boost::function1<bool, AudioOutputManager &> visitor) const;
 
       /** This signal is emitted when a Ekiga::AudioOutputManager has been
        * added to the AudioOutputCore Service.
diff --git a/lib/engine/chat/chat-core.cpp b/lib/engine/chat/chat-core.cpp
index 3e933b6..bb95fe2 100644
--- a/lib/engine/chat/chat-core.cpp
+++ b/lib/engine/chat/chat-core.cpp
@@ -50,11 +50,11 @@ Ekiga::ChatCore::add_dialect (DialectPtr dialect)
 }
 
 void
-Ekiga::ChatCore::visit_dialects (boost::function1<bool, DialectPtr > visitor)
+Ekiga::ChatCore::visit_dialects (boost::function1<bool, DialectPtr > visitor) const
 {
   bool go_on = true;
 
-  for (std::list<DialectPtr >::iterator iter = dialects.begin ();
+  for (std::list<DialectPtr >::const_iterator iter = dialects.begin ();
        iter != dialects.end () && go_on;
        iter++)
     go_on = visitor (*iter);
diff --git a/lib/engine/chat/chat-core.h b/lib/engine/chat/chat-core.h
index c970910..69c8d48 100644
--- a/lib/engine/chat/chat-core.h
+++ b/lib/engine/chat/chat-core.h
@@ -95,7 +95,7 @@ namespace Ekiga
      * @param The callback (the return value means "go on" and allows stopping
      * the visit)
      */
-    void visit_dialects (boost::function1<bool, DialectPtr > visitor);
+    void visit_dialects (boost::function1<bool, DialectPtr > visitor) const;
 
     /** This signal is emitted when an Ekiga::Dialect has been added to
      * the ChatCore service.
diff --git a/lib/engine/chat/dialect-impl.h b/lib/engine/chat/dialect-impl.h
index a698efb..f14b48a 100644
--- a/lib/engine/chat/dialect-impl.h
+++ b/lib/engine/chat/dialect-impl.h
@@ -63,13 +63,13 @@ namespace Ekiga
      * @param: The callback (the return value means "go on" and allows
      * stopping the visit)
      */
-    void visit_simple_chats (boost::function1<bool, SimpleChatPtr > visitor);
+    void visit_simple_chats (boost::function1<bool, SimpleChatPtr > visitor) const;
 
     /** Triggers a callback for all multiple chats of the Dialect.
      * @param: The callback (the return value means "go on" and allows
      * stopping the visit)
      */
-    void visit_multiple_chats (boost::function1<bool, MultipleChatPtr > visitor);
+    void visit_multiple_chats (boost::function1<bool, MultipleChatPtr > visitor) const;
 
   protected:
 
@@ -159,11 +159,11 @@ Ekiga::DialectImpl<SimpleChatType, MultipleChatType>::~DialectImpl ()
 
 template<typename SimpleChatType, typename MultipleChatType>
 void
-Ekiga::DialectImpl<SimpleChatType, MultipleChatType>::visit_simple_chats (boost::function1<bool, SimpleChatPtr > visitor)
+Ekiga::DialectImpl<SimpleChatType, MultipleChatType>::visit_simple_chats (boost::function1<bool, SimpleChatPtr > visitor) const
 {
   bool go_on = true;
 
-  for (typename std::map<boost::shared_ptr<SimpleChatType>,std::list<boost::signals::connection> >::iterator iter = simple_chats.begin ();
+  for (typename std::map<boost::shared_ptr<SimpleChatType>,std::list<boost::signals::connection> >::const_iterator iter = simple_chats.begin ();
        go_on && iter != simple_chats.end ();
        iter++) {
 
@@ -173,11 +173,11 @@ Ekiga::DialectImpl<SimpleChatType, MultipleChatType>::visit_simple_chats (boost:
 
 template<typename SimpleChatType, typename MultipleChatType>
 void
-Ekiga::DialectImpl<SimpleChatType, MultipleChatType>::visit_multiple_chats (boost::function1<bool, MultipleChatPtr > visitor)
+Ekiga::DialectImpl<SimpleChatType, MultipleChatType>::visit_multiple_chats (boost::function1<bool, MultipleChatPtr > visitor) const
 {
   bool go_on = true;
 
-  for (typename std::map<boost::shared_ptr<MultipleChatType>,std::list<boost::signals::connection> >::iterator iter = multiple_chats.begin ();
+  for (typename std::map<boost::shared_ptr<MultipleChatType>,std::list<boost::signals::connection> >::const_iterator iter = multiple_chats.begin ();
        go_on && iter != multiple_chats.end ();
        iter++) {
 
diff --git a/lib/engine/chat/dialect.h b/lib/engine/chat/dialect.h
index 5d26629..032c2bd 100644
--- a/lib/engine/chat/dialect.h
+++ b/lib/engine/chat/dialect.h
@@ -55,13 +55,13 @@ namespace Ekiga
      * @param: The callback (the return value means "go on" and allows
      * stopping the visit)
      */
-    virtual void visit_simple_chats (boost::function1<bool, SimpleChatPtr > visitor) = 0;
+    virtual void visit_simple_chats (boost::function1<bool, SimpleChatPtr > visitor) const = 0;
 
     /** Triggers a callback for all multiple chats of the Dialect.
      * @param: The callback (the return value means "go on" and allows
      * stopping the visit)
      */
-    virtual void visit_multiple_chats (boost::function1<bool, MultipleChatPtr > visitor) = 0;
+    virtual void visit_multiple_chats (boost::function1<bool, MultipleChatPtr > visitor) const = 0;
 
 
     /** Feed possible actions on this Dialect to the given MenuBuilder
diff --git a/lib/engine/framework/reflister.h b/lib/engine/framework/reflister.h
index 5b2ff25..c22175b 100644
--- a/lib/engine/framework/reflister.h
+++ b/lib/engine/framework/reflister.h
@@ -58,7 +58,7 @@ namespace Ekiga
 
     virtual ~RefLister ();
 
-    void visit_objects (boost::function1<bool, boost::shared_ptr<ObjectType> > visitor);
+    void visit_objects (boost::function1<bool, boost::shared_ptr<ObjectType> > visitor) const;
 
     void add_object (boost::shared_ptr<ObjectType> obj);
 
@@ -103,10 +103,10 @@ Ekiga::RefLister<ObjectType>::~RefLister ()
 
 template<typename ObjectType>
 void
-Ekiga::RefLister<ObjectType>::visit_objects (boost::function1<bool, boost::shared_ptr<ObjectType> > visitor)
+Ekiga::RefLister<ObjectType>::visit_objects (boost::function1<bool, boost::shared_ptr<ObjectType> > visitor) const
 {
   bool go_on = true;
-  for (typename container_type::iterator iter = objects.begin ();
+  for (typename container_type::const_iterator iter = objects.begin ();
        go_on && iter != objects.end ();
        ++iter)
     go_on = visitor (iter->first);
diff --git a/lib/engine/hal/hal-core.cpp b/lib/engine/hal/hal-core.cpp
index 96823c6..d8c95bd 100644
--- a/lib/engine/hal/hal-core.cpp
+++ b/lib/engine/hal/hal-core.cpp
@@ -73,11 +73,11 @@ void HalCore::add_manager (HalManager &manager)
 }
 
 
-void HalCore::visit_managers (boost::function1<bool, HalManager &> visitor)
+void HalCore::visit_managers (boost::function1<bool, HalManager &> visitor) const
 {
   bool go_on = true;
 
-  for (std::set<HalManager *>::iterator iter = managers.begin ();
+  for (std::set<HalManager *>::const_iterator iter = managers.begin ();
        iter != managers.end () && go_on;
        iter++)
       go_on = visitor (*(*iter));
diff --git a/lib/engine/hal/hal-core.h b/lib/engine/hal/hal-core.h
index 6fd0f8c..3a66314 100644
--- a/lib/engine/hal/hal-core.h
+++ b/lib/engine/hal/hal-core.h
@@ -109,7 +109,7 @@ namespace Ekiga
        * @param The callback (the return value means "go on" and allows
        *  stopping the visit)
        */
-       void visit_managers (boost::function1<bool, HalManager &> visitor);
+       void visit_managers (boost::function1<bool, HalManager &> visitor) const;
 
       /** This signal is emitted when an Ekiga::HalManager has been
        * added to the HalCore Service.
diff --git a/lib/engine/presence/cluster-impl.h b/lib/engine/presence/cluster-impl.h
index 9c6c1d7..245a7c6 100644
--- a/lib/engine/presence/cluster-impl.h
+++ b/lib/engine/presence/cluster-impl.h
@@ -80,7 +80,7 @@ namespace Ekiga
 
     virtual ~ClusterImpl ();
 
-    void visit_heaps (boost::function1<bool, HeapPtr > visitor);
+    void visit_heaps (boost::function1<bool, HeapPtr > visitor) const;
 
   protected:
 
@@ -130,7 +130,7 @@ Ekiga::ClusterImpl<HeapType>::~ClusterImpl ()
 
 template<typename HeapType>
 void
-Ekiga::ClusterImpl<HeapType>::visit_heaps (boost::function1<bool, HeapPtr > visitor)
+Ekiga::ClusterImpl<HeapType>::visit_heaps (boost::function1<bool, HeapPtr > visitor) const
 {
   RefLister<HeapType>::visit_objects (visitor);
 }
diff --git a/lib/engine/presence/cluster.h b/lib/engine/presence/cluster.h
index dc1fad4..df44410 100644
--- a/lib/engine/presence/cluster.h
+++ b/lib/engine/presence/cluster.h
@@ -60,7 +60,7 @@ namespace Ekiga
     /** Get the list of Heaps by visiting them with a callback.
      * @param The callback used to know about heaps.
      */
-    virtual void visit_heaps (boost::function1<bool, HeapPtr >) = 0;
+    virtual void visit_heaps (boost::function1<bool, HeapPtr >) const = 0;
 
     /** Those signals are emitted whenever a new Heap is added or removed
      * from the Cluster.
diff --git a/lib/engine/presence/heap-impl.h b/lib/engine/presence/heap-impl.h
index 09266be..d63c491 100644
--- a/lib/engine/presence/heap-impl.h
+++ b/lib/engine/presence/heap-impl.h
@@ -78,7 +78,7 @@ namespace Ekiga
 
     ~HeapImpl ();
 
-    void visit_presentities (boost::function1<bool, PresentityPtr > visitor);
+    void visit_presentities (boost::function1<bool, PresentityPtr > visitor) const;
 
     const_iterator begin () const;
 
@@ -121,7 +121,7 @@ Ekiga::HeapImpl<PresentityType>::~HeapImpl ()
 
 template<typename PresentityType>
 void
-Ekiga::HeapImpl<PresentityType>::visit_presentities (boost::function1<bool, PresentityPtr > visitor)
+Ekiga::HeapImpl<PresentityType>::visit_presentities (boost::function1<bool, PresentityPtr > visitor) const
 {
   RefLister<PresentityType>::visit_objects (visitor);
 }
diff --git a/lib/engine/presence/heap.h b/lib/engine/presence/heap.h
index b888723..859168a 100644
--- a/lib/engine/presence/heap.h
+++ b/lib/engine/presence/heap.h
@@ -67,7 +67,7 @@ namespace Ekiga
      * @param The callback user to know about presentities (the return value
      * means "go on" and allows stopping the visit)
      */
-    virtual void visit_presentities (boost::function1<bool, PresentityPtr >) = 0;
+    virtual void visit_presentities (boost::function1<bool, PresentityPtr >) const = 0;
 
     /** Populates a menu with the actions possible on the given group
      * of the Heap.
diff --git a/lib/engine/presence/presence-core.cpp b/lib/engine/presence/presence-core.cpp
index 27756b7..2e7d5a8 100644
--- a/lib/engine/presence/presence-core.cpp
+++ b/lib/engine/presence/presence-core.cpp
@@ -68,10 +68,10 @@ Ekiga::PresenceCore::add_cluster (ClusterPtr cluster)
 }
 
 void
-Ekiga::PresenceCore::visit_clusters (boost::function1<bool, ClusterPtr > visitor)
+Ekiga::PresenceCore::visit_clusters (boost::function1<bool, ClusterPtr > visitor) const
 {
   bool go_on = true;
-  for (std::set<ClusterPtr >::iterator iter = clusters.begin ();
+  for (std::set<ClusterPtr >::const_iterator iter = clusters.begin ();
        iter != clusters.end () && go_on;
        iter++)
     go_on = visitor (*iter);
diff --git a/lib/engine/presence/presence-core.h b/lib/engine/presence/presence-core.h
index c39f64d..326b210 100644
--- a/lib/engine/presence/presence-core.h
+++ b/lib/engine/presence/presence-core.h
@@ -174,7 +174,7 @@ namespace Ekiga
      * @param The callback (the return value means "go on" and allows
      *  stopping the visit)
      */
-    void visit_clusters (boost::function1<bool, ClusterPtr > visitor);
+    void visit_clusters (boost::function1<bool, ClusterPtr > visitor) const;
 
     /** This signal is emitted when an Ekiga::Cluster has been added
      * to the PresenceCore Service.
diff --git a/lib/engine/videoinput/videoinput-core.cpp b/lib/engine/videoinput/videoinput-core.cpp
index ca24b24..cea3675 100644
--- a/lib/engine/videoinput/videoinput-core.cpp
+++ b/lib/engine/videoinput/videoinput-core.cpp
@@ -182,12 +182,12 @@ void VideoInputCore::add_manager (VideoInputManager &manager)
 }
 
 
-void VideoInputCore::visit_managers (boost::function1<bool, VideoInputManager &> visitor)
+void VideoInputCore::visit_managers (boost::function1<bool, VideoInputManager &> visitor) const
 {
   PWaitAndSignal m(core_mutex);
   bool go_on = true;
 
-  for (std::set<VideoInputManager *>::iterator iter = managers.begin ();
+  for (std::set<VideoInputManager *>::const_iterator iter = managers.begin ();
        iter != managers.end () && go_on;
        iter++)
       go_on = visitor (*(*iter));
diff --git a/lib/engine/videoinput/videoinput-core.h b/lib/engine/videoinput/videoinput-core.h
index 6e52c46..33cd200 100644
--- a/lib/engine/videoinput/videoinput-core.h
+++ b/lib/engine/videoinput/videoinput-core.h
@@ -139,7 +139,7 @@ namespace Ekiga
       /** Triggers a callback for all Ekiga::VideoInputManager sources of the
        * VideoInputCore service.
        */
-       void visit_managers (boost::function1<bool, VideoInputManager &> visitor);
+       void visit_managers (boost::function1<bool, VideoInputManager &> visitor) const;
 
       /** This signal is emitted when a Ekiga::VideoInputManager has been
        * added to the VideoInputCore Service.
diff --git a/lib/engine/videooutput/videooutput-core.cpp b/lib/engine/videooutput/videooutput-core.cpp
index 1ef3cc9..44ddf7d 100644
--- a/lib/engine/videooutput/videooutput-core.cpp
+++ b/lib/engine/videooutput/videooutput-core.cpp
@@ -95,11 +95,11 @@ void VideoOutputCore::add_manager (VideoOutputManager &manager)
 }
 
 
-void VideoOutputCore::visit_managers (boost::function1<bool, VideoOutputManager &> visitor)
+void VideoOutputCore::visit_managers (boost::function1<bool, VideoOutputManager &> visitor) const
 {
   bool go_on = true;
 
-  for (std::set<VideoOutputManager *>::iterator iter = managers.begin ();
+  for (std::set<VideoOutputManager *>::const_iterator iter = managers.begin ();
        iter != managers.end () && go_on;
        iter++)
     go_on = visitor (*(*iter));
diff --git a/lib/engine/videooutput/videooutput-core.h b/lib/engine/videooutput/videooutput-core.h
index 0700b37..a5037e1 100644
--- a/lib/engine/videooutput/videooutput-core.h
+++ b/lib/engine/videooutput/videooutput-core.h
@@ -111,7 +111,7 @@ namespace Ekiga
       /** Triggers a callback for all Ekiga::VideoOutputManager sources of the
        * VideoOutputCore service.
        */
-      void visit_managers (boost::function1<bool, VideoOutputManager &> visitor);
+      void visit_managers (boost::function1<bool, VideoOutputManager &> visitor) const;
 
       /** This signal is emitted when a Ekiga::VideoOutputManager has been
        * added to the VideoOutputCore Service.
diff --git a/plugins/resource-list/rl-heap.cpp b/plugins/resource-list/rl-heap.cpp
index 5bc4035..20dc218 100644
--- a/plugins/resource-list/rl-heap.cpp
+++ b/plugins/resource-list/rl-heap.cpp
@@ -181,7 +181,7 @@ RL::Heap::get_name () const
 }
 
 void
-RL::Heap::visit_presentities (boost::function1<bool, Ekiga::PresentityPtr > visitor)
+RL::Heap::visit_presentities (boost::function1<bool, Ekiga::PresentityPtr > visitor) const
 {
   bool go_on = true;
 
diff --git a/plugins/resource-list/rl-heap.h b/plugins/resource-list/rl-heap.h
index 7832578..67f38bd 100644
--- a/plugins/resource-list/rl-heap.h
+++ b/plugins/resource-list/rl-heap.h
@@ -75,7 +75,7 @@ namespace RL {
 
     const std::string get_name () const;
 
-    void visit_presentities (boost::function1<bool, Ekiga::PresentityPtr > visitor);
+    void visit_presentities (boost::function1<bool, Ekiga::PresentityPtr > visitor) const;
 
     bool populate_menu (Ekiga::MenuBuilder& builder);
 
diff --git a/plugins/resource-list/rl-list.cpp b/plugins/resource-list/rl-list.cpp
index f15f49d..ee68a0c 100644
--- a/plugins/resource-list/rl-list.cpp
+++ b/plugins/resource-list/rl-list.cpp
@@ -90,7 +90,7 @@ public: // no need to make anything private
   std::string display_name;
 
   /* make the world know what we have */
-  bool visit_presentities (boost::function1<bool, Ekiga::Presentity&> visitor);
+  bool visit_presentities (boost::function1<bool, Ekiga::Presentity&> visitor) const;
 
   void publish () const;
 
@@ -154,7 +154,7 @@ RL::List::push_status (const std::string uri_,
 }
 
 bool
-RL::List::visit_presentities (boost::function1<bool, Ekiga::Presentity&> visitor)
+RL::List::visit_presentities (boost::function1<bool, Ekiga::Presentity&> visitor) const
 {
   return impl->visit_presentities (visitor);
 }
@@ -389,7 +389,7 @@ RL::ListImpl::push_status (const std::string uri_,
 }
 
 bool
-RL::ListImpl::visit_presentities (boost::function1<bool, Ekiga::Presentity&> visitor)
+RL::ListImpl::visit_presentities (boost::function1<bool, Ekiga::Presentity&> visitor) const
 {
   bool go_on = true;
 
diff --git a/plugins/resource-list/rl-list.h b/plugins/resource-list/rl-list.h
index b3d55ac..77a64d4 100644
--- a/plugins/resource-list/rl-list.h
+++ b/plugins/resource-list/rl-list.h
@@ -70,7 +70,7 @@ namespace RL
 		      const std::string status);
 
     /* make the world know what we have */
-    bool visit_presentities (boost::function1<bool, Ekiga::Presentity&> visitor);
+    bool visit_presentities (boost::function1<bool, Ekiga::Presentity&> visitor) const;
 
     void publish () const;
 



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