ekiga r6357 - in trunk: . lib/engine/protocol/skel src/endpoints



Author: dsandras
Date: Wed Jun  4 04:30:33 2008
New Revision: 6357
URL: http://svn.gnome.org/viewvc/ekiga?rev=6357&view=rev

Log:
Moved a few methods from pure virtual methods to implemented methods
in the engine as they obviously do not need any specific treatment.
Added H.323 as supported protocol for the presence core roster.


Modified:
   trunk/ChangeLog
   trunk/lib/engine/protocol/skel/call-manager.cpp
   trunk/lib/engine/protocol/skel/call-manager.h
   trunk/src/endpoints/manager.cpp
   trunk/src/endpoints/manager.h
   trunk/src/endpoints/opal-main.cpp

Modified: trunk/lib/engine/protocol/skel/call-manager.cpp
==============================================================================
--- trunk/lib/engine/protocol/skel/call-manager.cpp	(original)
+++ trunk/lib/engine/protocol/skel/call-manager.cpp	Wed Jun  4 04:30:33 2008
@@ -84,3 +84,30 @@
 {
   return managers.end (); 
 }
+
+
+const std::list<std::string> CallManager::get_protocol_names () const
+{
+  std::list<std::string> protocols;
+
+  for (CallManager::iterator iter = begin ();
+       iter != end ();
+       iter++)
+    protocols.push_back ((*iter)->get_protocol_name ());
+
+  return protocols;
+}
+
+
+const CallManager::InterfaceList CallManager::get_interfaces () const
+{
+  InterfaceList list;
+
+  for (CallManager::iterator iter = begin ();
+       iter != end ();
+       iter++)
+    list.push_back ((*iter)->get_listen_interface ());
+
+  return list;
+}
+

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	Wed Jun  4 04:30:33 2008
@@ -114,13 +114,13 @@
       /**
        * @return the protocol name
        */
-      virtual const std::list<std::string> & get_protocol_names () const = 0;
+      const std::list<std::string> get_protocol_names () const;
 
       /**
        * @return the interface on which we are accepting calls. Generally,
        * under the form protocol:IP:port.
        */
-      virtual const CallManager::InterfaceList get_interfaces () const = 0;
+      const CallManager::InterfaceList get_interfaces () const;
 
 
       /*

Modified: trunk/src/endpoints/manager.cpp
==============================================================================
--- trunk/src/endpoints/manager.cpp	(original)
+++ trunk/src/endpoints/manager.cpp	Wed Jun  4 04:30:33 2008
@@ -133,8 +133,6 @@
   pcssEP = new GMPCSSEndpoint (*this, core);
   pcssEP->SetSoundChannelPlayDevice("EKIGA");
   pcssEP->SetSoundChannelRecordDevice("EKIGA");
-  protocols.push_back ("h323");
-  protocols.push_back ("sip"); //FIXME
 
   // Media formats
   SetMediaFormatOrder (PStringArray ());
@@ -406,25 +404,6 @@
   SetMediaFormatOrder (order);
 }
 
-
-const std::list<std::string> & GMManager::get_protocol_names () const
-{
-  return protocols;
-}
-
-
-const Ekiga::CallManager::InterfaceList GMManager::get_interfaces () const
-{
-  InterfaceList list;
-
-  for (CallManager::iterator iter = begin ();
-       iter != end ();
-       iter++)
-    list.push_back ((*iter)->get_listen_interface ());
-
-  return list;
-}
-
 void GMManager::set_forward_on_no_answer (bool enabled)
 {
   forward_on_no_answer = enabled;

Modified: trunk/src/endpoints/manager.h
==============================================================================
--- trunk/src/endpoints/manager.h	(original)
+++ trunk/src/endpoints/manager.h	Wed Jun  4 04:30:33 2008
@@ -113,9 +113,6 @@
   void set_codecs (Ekiga::CodecList & codecs); 
   const Ekiga::CodecList & get_codecs () const;
 
-  const std::list<std::string> & get_protocol_names () const;
-  const InterfaceList get_interfaces () const;
-
   /* Extended stuff, OPAL CallManager specific */
   void set_forward_on_busy (bool enabled);
   bool get_forward_on_busy ();
@@ -179,8 +176,6 @@
 
   void GetAllowedFormats (OpalMediaFormatList & full_list);
 
-  std::list<std::string> protocols;
-
   /* The various related endpoints */
   GMPCSSEndpoint *pcssEP;
 

Modified: trunk/src/endpoints/opal-main.cpp
==============================================================================
--- trunk/src/endpoints/opal-main.cpp	(original)
+++ trunk/src/endpoints/opal-main.cpp	Wed Jun  4 04:30:33 2008
@@ -49,11 +49,12 @@
 
 
 static bool
-is_sip_address (const std::string uri)
+is_supported_address (const std::string uri)
 {
-  return (uri.find ("sip:") == 0);
+  return (uri.find ("sip:") == 0 || uri.find ("h323:") == 0);
 }
 
+
 using namespace Opal;
 
 bool
@@ -98,7 +99,7 @@
   if (presence_core != NULL) {
 
     presence_core->add_presentity_decorator (*sip_manager);
-    presence_core->add_supported_uri (sigc::ptr_fun (is_sip_address));
+    presence_core->add_supported_uri (sigc::ptr_fun (is_supported_address));
 
     presence_core->add_presence_fetcher (*sip_manager);
     presence_core->add_presence_publisher (*sip_manager);



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