ekiga r6219 - in trunk: . lib/engine/protocol/skel



Author: dsandras
Date: Thu Apr 24 21:07:14 2008
New Revision: 6219
URL: http://svn.gnome.org/viewvc/ekiga?rev=6219&view=rev

Log:
Added CallManager iterator and methods to get the protocol and
listener for the CallManager.


Modified:
   trunk/ChangeLog
   trunk/lib/engine/protocol/skel/call-core.cpp
   trunk/lib/engine/protocol/skel/call-core.h
   trunk/lib/engine/protocol/skel/call-manager.h

Modified: trunk/lib/engine/protocol/skel/call-core.cpp
==============================================================================
--- trunk/lib/engine/protocol/skel/call-core.cpp	(original)
+++ trunk/lib/engine/protocol/skel/call-core.cpp	Thu Apr 24 21:07:14 2008
@@ -59,14 +59,15 @@
 }
 
 
-void CallCore::visit_managers (sigc::slot<bool, CallManager &> visitor)
+CallCore::iterator CallCore::begin ()
 {
-  bool go_on = true;
+  return managers.begin ();
+}
 
-  for (std::set<CallManager *>::iterator iter = managers.begin ();
-       iter != managers.end () && go_on;
-       iter++)
-    go_on = visitor (*(*iter));
+
+CallCore::iterator CallCore::end ()
+{
+  return managers.end (); 
 }
 
 

Modified: trunk/lib/engine/protocol/skel/call-core.h
==============================================================================
--- trunk/lib/engine/protocol/skel/call-core.h	(original)
+++ trunk/lib/engine/protocol/skel/call-core.h	Thu Apr 24 21:07:14 2008
@@ -61,6 +61,7 @@
     {
 
   public:
+      typedef std::set<CallManager *>::iterator iterator;
 
       /** The constructor
        */
@@ -98,12 +99,15 @@
        */
       void add_manager (CallManager &manager);
 
-      /** Triggers a callback for all Ekiga::CallManager sources of the
-       * CallCore service.
-       * @param The callback (the return value means "go on" and allows
-       * stopping the visit)
+      /** Return iterator to beginning
+       * @return iterator to beginning
        */
-      void visit_managers (sigc::slot<bool, CallManager &> visitor);
+      iterator begin ();
+
+      /** Return iterator to end
+       * @return iterator to end 
+       */
+      iterator end ();
 
       /** This signal is emitted when a Ekiga::CallManager has been
        * added to the CallCore Service.

Modified: trunk/lib/engine/protocol/skel/call-manager.h
==============================================================================
--- trunk/lib/engine/protocol/skel/call-manager.h	(original)
+++ trunk/lib/engine/protocol/skel/call-manager.h	Thu Apr 24 21:07:14 2008
@@ -76,6 +76,23 @@
 
 
       /*
+       * PROTOCOL INFORMATION
+       */
+
+      /**
+       * @return the protocol name
+       */
+      virtual const std::string & get_protocol_name () const = 0;
+
+
+      /**
+       * @return the interface on which we are accepting calls. Generally,
+       * under the form protocol:IP:port.
+       */
+      virtual const std::string & get_interface () const = 0;
+
+
+      /*
        * Mandatory Settings
        */
 



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