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



Author: dsandras
Date: Sun May 18 19:18:00 2008
New Revision: 6273
URL: http://svn.gnome.org/viewvc/ekiga?rev=6273&view=rev

Log:
More work on the CallProtocolManager, mainly on the SIP implementation
of the CallProtocolManager. Added methods to get a CallProtocolManager
from a CallManager following the protocol name. STUN support
temporarily hardcoded.


Modified:
   trunk/ChangeLog
   trunk/ekiga.schemas.in.in
   trunk/lib/engine/protocol/skel/Makefile.am
   trunk/lib/engine/protocol/skel/call-manager.h
   trunk/lib/engine/protocol/skel/call-protocol-manager.h
   trunk/src/endpoints/accountshandler.cpp
   trunk/src/endpoints/h323.cpp
   trunk/src/endpoints/h323.h
   trunk/src/endpoints/manager.cpp
   trunk/src/endpoints/manager.h
   trunk/src/endpoints/opal-gmconf-bridge.cpp
   trunk/src/endpoints/opal-main.cpp
   trunk/src/endpoints/sip.cpp
   trunk/src/endpoints/sip.h

Modified: trunk/ekiga.schemas.in.in
==============================================================================
--- trunk/ekiga.schemas.in.in	(original)
+++ trunk/ekiga.schemas.in.in	Sun May 18 19:18:00 2008
@@ -599,8 +599,8 @@
       </locale>
     </schema>
     <schema>
-      <key>/schemas/apps/@PACKAGE_NAME@/general/nat/binding_timeout</key>
-      <applyto>/apps/@PACKAGE_NAME@/general/nat/binding_timeout</applyto>
+      <key>/schemas/apps/@PACKAGE_NAME@/protocols/sip/binding_timeout</key>
+      <applyto>/apps/@PACKAGE_NAME@/protocols/sip/binding_timeout</applyto>
       <owner>Ekiga</owner>
       <type>int</type>
       <default>10</default>

Modified: trunk/lib/engine/protocol/skel/Makefile.am
==============================================================================
--- trunk/lib/engine/protocol/skel/Makefile.am	(original)
+++ trunk/lib/engine/protocol/skel/Makefile.am	Sun May 18 19:18:00 2008
@@ -5,16 +5,17 @@
 AM_CPPFLAGS = $(SIGC_CFLAGS) $(GLIB_CFLAGS)
 
 INCLUDES = \
-	-I$(top_srcdir)/lib/engine/include \
+	-I$(top_srcdir)/lib/engine/include 		\
 	-I$(top_srcdir)/lib/engine/framework
 
 libgmprotocol_la_SOURCES = \
-	$(protocol_dir)/call-core.h		\
-	$(protocol_dir)/call-manager.h		\
-	$(protocol_dir)/call.h			\
-	$(protocol_dir)/call-core.cpp		\
-	$(protocol_dir)/call-protocol-manager.h	\
-	$(protocol_dir)/codec-description.h	\
+	$(protocol_dir)/call-core.h			\
+	$(protocol_dir)/call-manager.h			\
+	$(protocol_dir)/call-manager.cpp		\
+	$(protocol_dir)/call.h				\
+	$(protocol_dir)/call-core.cpp			\
+	$(protocol_dir)/call-protocol-manager.h		\
+	$(protocol_dir)/codec-description.h		\
 	$(protocol_dir)/codec-description.cpp
 
 libgmprotocol_la_LDFLAGS = -export-dynamic -no-undefined $(SIGC_LIBS) $(GLIB_LIBS)

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	Sun May 18 19:18:00 2008
@@ -40,6 +40,7 @@
 #define __CALL_MANAGER_H__
 
 #include "call-core.h"
+#include "call-protocol-manager.h"
 #include "codec-description.h"
 
 namespace Ekiga
@@ -54,18 +55,9 @@
     {
 
   public:
-
-      class Interface
-        {
-      public:
-          std::string voip_protocol;
-          std::string protocol;
-          std::string interface;
-          bool publish;
-          unsigned port;
-        };
-      typedef std::list<CallManager::Interface> InterfaceList;
-
+      typedef std::list<CallProtocolManager::Interface> InterfaceList;
+      typedef std::set<CallProtocolManager *>::iterator iterator;
+      typedef std::set<CallProtocolManager *>::const_iterator const_iterator;
 
       /* The constructor
        */
@@ -75,10 +67,38 @@
        */
       ~CallManager () {}
 
+      /** Add a CallProtocolManager to the CallManager.
+       * @param The manager to be added.
+       */
+      void add_protocol_manager (CallProtocolManager &manager);
+
+      /** Return a pointer to a CallProtocolManager of the CallManager.
+       * @param protocol is the protcol name.
+       * @return a pointer to the CallProtocolManager or NULL if none.
+       */
+      CallProtocolManager * const get_protocol_manager (const std::string &protocol) const;
+
+      /** Return iterator to beginning
+       * @return iterator to beginning
+       */
+      iterator begin ();
+      const_iterator begin () const;
+
+      /** Return iterator to end
+       * @return iterator to end 
+       */
+      iterator end ();
+      const_iterator end () const;
+
+      /** This signal is emitted when a Ekiga::CallProtocolManager has been
+       * added to the CallManager.
+       */
+      sigc::signal<void, CallProtocolManager &> manager_added;
+
 
       /*                 
        * CALL MANAGEMENT 
-       */               
+       */              
 
       /** Create a call based on the remote uri given as parameter
        * @param: An uri
@@ -227,6 +247,9 @@
        *         info contains information about the registration status
        */
       sigc::signal<void, std::string, Ekiga::CallCore::RegistrationState, std::string> registration_event;
+
+    private:
+      std::set<CallProtocolManager *> managers;
     };
 
 /**

Modified: trunk/lib/engine/protocol/skel/call-protocol-manager.h
==============================================================================
--- trunk/lib/engine/protocol/skel/call-protocol-manager.h	(original)
+++ trunk/lib/engine/protocol/skel/call-protocol-manager.h	Sun May 18 19:18:00 2008
@@ -27,8 +27,8 @@
 /*
  *                         call-protocol-manager.h  -  description
  *                         ------------------------------------------
- *   begin                : written in 2007 by Damien Sandras 
- *   copyright            : (c) 2007 by Damien Sandras
+ *   begin                : written in 2008 by Damien Sandras 
+ *   copyright            : (c) 2008 by Damien Sandras
  *   description          : Declaration of the interface of a call protocol manager
  *                          implementation backend. A call manager handles calls
  *                          thanks to various call protocol managers.
@@ -36,8 +36,8 @@
  */
 
 
-#ifndef __PROTOCOL_MANAGER_H__
-#define __PROTOCOL_MANAGER_H__
+#ifndef __CALL_PROTOCOL_MANAGER_H__
+#define __CALL_PROTOCOL_MANAGER_H__
 
 #include "call-core.h"
 
@@ -46,7 +46,7 @@
 
 /**
  * @addtogroup calls
- * @{
+ * @{:
  */
 
   class CallProtocolManager
@@ -54,13 +54,24 @@
 
   public:
 
+      class Interface
+        {
+      public:
+          std::string voip_protocol;
+          std::string protocol;
+          std::string interface;
+          bool publish;
+          unsigned port;
+        };
+
+
       /* The constructor
        */
       CallProtocolManager () {};
 
       /* The destructor
        */
-      ~CallProtocolManager () {}
+      ~CallProtocolManager () {};
 
 
       /*                 
@@ -78,7 +89,7 @@
        * PROTOCOL INFORMATION
        */
 
-      /** Return the protcol name
+      /** Return the protocol name
        * @return the protocol name
        */
       virtual const std::string & get_protocol_name () const = 0;
@@ -92,7 +103,7 @@
        * @return the interface on which we are accepting calls. Generally,
        * under the form protocol:IP:port.
        */
-      virtual const Ekiga::CallManager::Interface & get_listen_interface () const = 0;
+      virtual const Interface & get_listen_interface () const = 0;
 
       /** Set the DTMF mode to use to send DTMFs
        * @param mode is the desired DTMF mode

Modified: trunk/src/endpoints/accountshandler.cpp
==============================================================================
--- trunk/src/endpoints/accountshandler.cpp	(original)
+++ trunk/src/endpoints/accountshandler.cpp	Sun May 18 19:18:00 2008
@@ -90,10 +90,6 @@
   stun_support = (gm_conf_get_int (NAT_KEY "method") == 1);
   gnomemeeting_threads_leave ();
   
-  /* Enable STUN if required */
-  if (stun_support && ep.GetSTUN () == NULL) 
-    ep.CreateSTUNClient (FALSE, FALSE, TRUE, NULL);
-  
   /* Register all accounts */
   defined_accounts = gnomemeeting_get_accounts_list ();
   accounts_iter = defined_accounts;
@@ -166,29 +162,29 @@
 void GMAccountsEndpoint::SIPRegister (GmAccount *a)
 {
   std::string aor;
-  GMSIPEndpoint *sipEP = NULL;
-
-  sipEP = ep.GetSIPEndpoint ();
+  GMSIPEndpoint *sip_manager = dynamic_cast<GMSIPEndpoint *> (ep.get_protocol_manager ("sip"));
 
+  // TODO Move this to the engine and drop the dynamic cast
   aor = a->username;
   if (aor.find ("@") == string::npos)
     aor = aor + "@" + a->host;
 
-  sipEP->Register (aor.c_str (), a->auth_username, a->password, a->timeout, !a->enabled);
+  if (sip_manager)
+    sip_manager->Register (aor.c_str (), a->auth_username, a->password, a->timeout, !a->enabled);
 }
 
 
 void GMAccountsEndpoint::H323Register (GmAccount *a)
 {
   std::string aor;
-  GMH323Endpoint *h323EP = NULL;
-
-  h323EP = ep.GetH323Endpoint ();
+  GMH323Endpoint *h323_manager = dynamic_cast<GMH323Endpoint *> (ep.get_protocol_manager ("h323"));
 
+  // TODO Move this to the engine and drop the dynamic cast
   aor = a->username;
   if (aor.find ("@") == string::npos)
     aor = aor + "@" + a->host;
 
-  h323EP->Register (aor.c_str (), a->auth_username, a->password, a->domain, a->timeout, !a->enabled);
+  if (h323_manager)
+    h323_manager->Register (aor.c_str (), a->auth_username, a->password, a->domain, a->timeout, !a->enabled);
 }
 

Modified: trunk/src/endpoints/h323.cpp
==============================================================================
--- trunk/src/endpoints/h323.cpp	(original)
+++ trunk/src/endpoints/h323.cpp	Sun May 18 19:18:00 2008
@@ -80,7 +80,7 @@
 }
 
 
-const Ekiga::CallManager::Interface & GMH323Endpoint::get_interface () const
+const Ekiga::CallProtocolManager::Interface & GMH323Endpoint::get_interface () const
 {
   return interface;
 }
@@ -130,6 +130,7 @@
   return populated;
 }
 
+
 void
 GMH323Endpoint::SetUserInputMode ()
 {

Modified: trunk/src/endpoints/h323.h
==============================================================================
--- trunk/src/endpoints/h323.h	(original)
+++ trunk/src/endpoints/h323.h	Sun May 18 19:18:00 2008
@@ -64,7 +64,7 @@
   /**/
   const std::string & get_protocol_name () const;
 
-  const Ekiga::CallManager::Interface & get_interface () const;
+  const Ekiga::CallProtocolManager::Interface & get_interface () const;
 
   /**/
   bool populate_menu (Ekiga::Contact &contact,
@@ -76,7 +76,7 @@
   bool menu_builder_add_actions (const std::string & fullname,
                                  std::map<std::string, std::string> & uris,
                                  Ekiga::MenuBuilder & builder);
-  
+
   /* DESCRIPTION  :  /
    * BEHAVIOR     :  Adds the User Input Mode following the
    *                 configuration options. String, Tone, and RFC2833 are 
@@ -201,7 +201,7 @@
   unsigned udp_max;
   unsigned listen_port;
 
-  Ekiga::CallManager::Interface interface;
+  Ekiga::CallProtocolManager::Interface interface;
 
   std::string protocol_name;
   std::string uri_prefix;

Modified: trunk/src/endpoints/manager.cpp
==============================================================================
--- trunk/src/endpoints/manager.cpp	(original)
+++ trunk/src/endpoints/manager.cpp	Sun May 18 19:18:00 2008
@@ -45,7 +45,6 @@
 #include "pcss.h"
 
 #include "call-core.h"
-#include "opal-gmconf-bridge.h"
 #include "opal-call.h"
 #include "opal-codec-description.h"
 #include "vidinput-info.h"
@@ -64,6 +63,9 @@
 : core (_core), 
   runtime (*(dynamic_cast<Ekiga::Runtime *> (core.get ("runtime"))))
 {
+  /* STUN */
+  SetSTUNServer ("stun.ekiga.net");
+
   /* Initialise the endpoint paramaters */
   PIPSocket::SetDefaultIpAddressFamilyV4();
   autoStartTransmitVideo = autoStartReceiveVideo = true;
@@ -71,9 +73,7 @@
   manager = NULL;
 
   h323EP = NULL;
-  sipEP = NULL;
   pcssEP = NULL;
-  sc = NULL;
 
   // Create video devices
   PVideoDevice::OpenArgs video = GetVideoOutputDevice();
@@ -92,24 +92,18 @@
   h323EP = new GMH323Endpoint (*this, core);
   AddRouteEntry("pc:.* = h323:<da>");
 	
-  sipEP = new GMSIPEndpoint (*this, core);
-  AddRouteEntry("pc:.* = sip:<da>");
-
   pcssEP = new GMPCSSEndpoint (*this, core);
   pcssEP->SetSoundChannelPlayDevice("EKIGA");
   pcssEP->SetSoundChannelRecordDevice("EKIGA");
   AddRouteEntry("h323:.* = pc:<db>");
   AddRouteEntry("sip:.* = pc:<db>");
   protocols.push_back (h323EP->get_protocol_name ());
-  protocols.push_back (sipEP->get_protocol_name ());
+  protocols.push_back ("sip"); //FIXME
 
   // Media formats
   SetMediaFormatOrder (PStringArray ());
   SetMediaFormatMask (PStringArray ());
 
-  // Config
-  bridge = new Opal::ConfBridge (*this);
-
   //
   call_core = dynamic_cast<Ekiga::CallCore *> (core.get ("call-core"));
 }
@@ -119,9 +113,6 @@
 {
   ClearAllCalls (OpalConnection::EndedByLocalUser, TRUE);
   RemoveAccountsEndpoint ();
-  RemoveSTUNClient ();
-
-  delete bridge;
 }
 
 
@@ -130,10 +121,6 @@
   display_name = name;
 
   SetDefaultDisplayName (display_name);
-
-  sipEP->SetDefaultDisplayName (display_name);
-  h323EP->SetDefaultDisplayName (display_name);
-  h323EP->SetLocalUserName (display_name);
 }
 
 
@@ -384,7 +371,11 @@
 const Ekiga::CallManager::InterfaceList GMManager::get_interfaces () const
 {
   InterfaceList list;
-  list.push_back (sipEP->get_listen_interface ());
+
+  for (CallManager::iterator iter = begin ();
+       iter != end ();
+       iter++)
+    list.push_back ((*iter)->get_listen_interface ());
 
   return list;
 }
@@ -434,18 +425,11 @@
 
 bool GMManager::dial (const std::string & uri)
 {
-  if (uri.find ("sip:") == 0)
-    return sipEP->dial (uri);
-
-  return false;
-}
-
-
-bool GMManager::message (const std::string & _uri, 
-                         const std::string & _message)
-{
-  if (_uri.find ("sip:") == 0 || _uri.find (':') == string::npos)
-    return sipEP->message (_uri, _message);
+  for (CallManager::iterator iter = begin ();
+       iter != end ();
+       iter++)
+    if ((*iter)->dial (uri))
+      return true;
 
   return false;
 }
@@ -578,13 +562,6 @@
 }
 
 
-GMSIPEndpoint *
-GMManager::GetSIPEndpoint ()
-{
-  return sipEP;
-}
-
-
 void
 GMManager::Register (GmAccount *account)
 {
@@ -609,42 +586,6 @@
 }
 
 
-void 
-GMManager::CreateSTUNClient (bool display_progress,
-                             bool display_config_dialog,
-                             bool wait,
-                             GtkWidget *parent)
-{
-  PWaitAndSignal m(sc_mutex);
-
-  if (sc) 
-    delete (sc);
-
-  SetSTUNServer (PString ());
-
-  /* Be a client for the specified STUN Server */
-  sc = new GMStunClient (display_progress, 
-                         display_config_dialog, 
-                         wait,
-                         parent,
-                         *this);
-}
-
-
-void 
-GMManager::RemoveSTUNClient ()
-{
-  PWaitAndSignal m(sc_mutex);
-
-  if (sc) 
-    delete (sc);
-
-  SetSTUNServer (PString ());
-
-  sc = NULL;
-}
-
-
 OpalCall *GMManager::CreateCall ()
 {
   Ekiga::Call *call = NULL;

Modified: trunk/src/endpoints/manager.h
==============================================================================
--- trunk/src/endpoints/manager.h	(original)
+++ trunk/src/endpoints/manager.h	Sun May 18 19:18:00 2008
@@ -64,7 +64,6 @@
 class GMLid;
 class GMH323Gatekeeper;
 class GMH323Endpoint;
-class GMSIPEndpoint;
 class GMPCSSEndpoint;
 
 /**
@@ -81,8 +80,6 @@
 
   friend class GMAccountsEndpoint;
   friend class GMH323Endpoint;
-  friend class GMSIPEndpoint;
-  
   
  public:
 
@@ -138,10 +135,6 @@
 
 
   /**/
-  bool message (const std::string & uri, 
-                const std::string & message);
-
-  /**/
   struct VideoOptions 
   {
     VideoOptions () 
@@ -165,21 +158,11 @@
   /**/ 
   GMH323Endpoint *GetH323Endpoint ();
   
-  GMSIPEndpoint *GetSIPEndpoint ();
-
   void Register (GmAccount * = NULL);
 
  private:
   OpalCall *CreateCall ();
 
-  void CreateSTUNClient (bool,
-			 bool,
-			 bool,
-			 GtkWidget *);
-
-  void RemoveSTUNClient ();
-
-
   void RemoveAccountsEndpoint ();
 
   virtual bool OnOpenMediaStream (OpalConnection &,
@@ -194,22 +177,18 @@
 
   /* The various related endpoints */
   GMH323Endpoint *h323EP;
-  GMSIPEndpoint *sipEP;
   GMPCSSEndpoint *pcssEP;
 
 
   /* The various components of the endpoint */
   GMAccountsEndpoint *manager;
-  GMStunClient *sc;
 
   /* Various mutexes to ensure thread safeness around internal
      variables */
   PMutex manager_access_mutex;
-  PMutex sc_mutex;
 
   Ekiga::ServiceCore & core;
   Ekiga::Runtime & runtime;
-  Ekiga::ConfBridge *bridge;
   Ekiga::CodecList codecs; 
   Ekiga::CallCore *call_core;
 

Modified: trunk/src/endpoints/opal-gmconf-bridge.cpp
==============================================================================
--- trunk/src/endpoints/opal-gmconf-bridge.cpp	(original)
+++ trunk/src/endpoints/opal-gmconf-bridge.cpp	Sun May 18 19:18:00 2008
@@ -71,7 +71,8 @@
   keys.push_back (SIP_KEY "forward_host"); 
   keys.push_back (SIP_KEY "outbound_proxy_host");
   keys.push_back (SIP_KEY "dtmf_mode");
-  keys.push_back (NAT_KEY "binding_timeout");
+  keys.push_back (SIP_KEY "binding_timeout");
+  keys.push_back (SIP_KEY "listen_port");
 
   keys.push_back (PERSONAL_DATA_KEY "full_name");
 
@@ -83,7 +84,6 @@
   keys.push_back (H323_KEY "enable_early_h245");
   keys.push_back (H323_KEY "enable_fast_start");
 
-  keys.push_back (SIP_KEY "listen_port");
   keys.push_back (PORTS_KEY "udp_port_range");
   keys.push_back (PORTS_KEY "tcp_port_range");
 
@@ -222,45 +222,64 @@
   //
   // SIP related keys
   // 
-  else if (key == SIP_KEY "outbound_proxy_host") {
+  else if (key.find (SIP_KEY) != string::npos) {
 
-    const gchar *str = gm_conf_entry_get_string (entry);
-    if (str != NULL)
-      manager.GetSIPEndpoint ()->set_outbound_proxy (str);
-  }
-  else if (key == SIP_KEY "dtmf_mode") {
+    GMSIPEndpoint *sip_manager = dynamic_cast<GMSIPEndpoint *> (manager.get_protocol_manager ("sip"));
+    if (sip_manager) {
 
-    manager.GetSIPEndpoint ()->set_dtmf_mode (gm_conf_entry_get_int (entry));
-  }
-  else if (key == SIP_KEY "forward_host") {
+      if (key == SIP_KEY "outbound_proxy_host") {
 
-    const gchar *str = gm_conf_entry_get_string (entry);
-    manager.GetSIPEndpoint ()->set_forward_uri (str);
+        const gchar *str = gm_conf_entry_get_string (entry);
+        if (str != NULL)
+          sip_manager->set_outbound_proxy (str);
+      }
+      else if (key == SIP_KEY "dtmf_mode") {
+
+        sip_manager->set_dtmf_mode (gm_conf_entry_get_int (entry));
+      }
+      else if (key == SIP_KEY "forward_host") {
+
+        const gchar *str = gm_conf_entry_get_string (entry);
+        sip_manager->set_forward_uri (str);
+      }
+      else if (key == SIP_KEY "binding_timeout") {
+
+        sip_manager->set_nat_binding_delay (gm_conf_entry_get_int (entry));
+      }
+      else if (key == SIP_KEY "listen_port") {
+
+        sip_manager->set_listen_port (gm_conf_entry_get_int (entry));
+      }
+    }
   }
 
   //
   // H.323 keys
   //
-  else if (key == H323_KEY "enable_h245_tunneling") {
+  else if (key.find (SIP_KEY) != string::npos) {
 
-    manager.GetH323Endpoint ()->DisableH245Tunneling (!gm_conf_entry_get_bool (entry));
-  }
-  else if (key == H323_KEY "enable_early_h245") {
+    GMH323Endpoint *h323_manager = dynamic_cast<GMH323Endpoint *> (manager.get_protocol_manager ("h323"));
+    if (h323_manager) {
 
-    manager.GetH323Endpoint ()->DisableH245inSetup (!gm_conf_entry_get_bool (entry));
-  }
-  else if (key == H323_KEY "enable_fast_start") {
+      if (key == H323_KEY "enable_h245_tunneling") {
 
-    manager.GetH323Endpoint ()->DisableFastStart (!gm_conf_entry_get_bool (entry));
-  }
+        h323_manager->DisableH245Tunneling (!gm_conf_entry_get_bool (entry));
+      }
+      else if (key == H323_KEY "enable_early_h245") {
 
-  //
-  // NAT related keys
-  //
-  else if (key == NAT_KEY "binding_timeout") {
+        h323_manager->DisableH245inSetup (!gm_conf_entry_get_bool (entry));
+      }
+      else if (key == H323_KEY "enable_fast_start") {
+
+        h323_manager->DisableFastStart (!gm_conf_entry_get_bool (entry));
+      }
+      else if (key == H323_KEY "listen_port") {
 
-    manager.GetSIPEndpoint ()->set_nat_binding_delay (gm_conf_entry_get_int (entry));
+        h323_manager->set_listen_port (gm_conf_entry_get_int (entry));
+  }
+    }
   }
+  
 
   //
   // Personal Data Key
@@ -293,14 +312,6 @@
   //
   // Ports keys
   //
-  else if (key == H323_KEY "listen_port") {
-
-    manager.GetH323Endpoint ()->set_listen_port (gm_conf_entry_get_int (entry));
-  }
-  else if (key == SIP_KEY "listen_port") {
-
-    manager.GetSIPEndpoint ()->set_listen_port (gm_conf_entry_get_int (entry));
-  }
   else if (key == PORTS_KEY "udp_port_range"
            || key == PORTS_KEY "tcp_port_range") {
 

Modified: trunk/src/endpoints/opal-main.cpp
==============================================================================
--- trunk/src/endpoints/opal-main.cpp	(original)
+++ trunk/src/endpoints/opal-main.cpp	Sun May 18 19:18:00 2008
@@ -40,6 +40,7 @@
 #include "presence-core.h"
 #include "call-core.h"
 #include "display-core.h"
+#include "opal-gmconf-bridge.h"
 
 #include "manager.h"
 #include "ekiga.h"
@@ -69,10 +70,15 @@
   call_core = dynamic_cast<Ekiga::CallCore *> (core.get ("call-core"));
 
   GMManager *manager = new GMManager (core);
-  GMSIPEndpoint *sipEP = manager->GetSIPEndpoint ();
+  GMSIPEndpoint *sipEP = new GMSIPEndpoint (*manager, core);
+
+  manager->AddRouteEntry("pc:.* = sip:<da>");
+  manager->add_protocol_manager (*sipEP);
 
   call_core->add_manager (*manager);
   core.add (*manager); // FIXME temporary
+  new Opal::ConfBridge (*manager);
+  // FIXME Service ?
 
   if (contact_core != NULL) 
     contact_core->add_contact_decorator (*sipEP);

Modified: trunk/src/endpoints/sip.cpp
==============================================================================
--- trunk/src/endpoints/sip.cpp	(original)
+++ trunk/src/endpoints/sip.cpp	Sun May 18 19:18:00 2008
@@ -372,7 +372,7 @@
 }
 
 
-const Ekiga::CallManager::Interface & GMSIPEndpoint::get_listen_interface () const
+const Ekiga::CallProtocolManager::Interface & GMSIPEndpoint::get_listen_interface () const
 {
   return interface;
 }

Modified: trunk/src/endpoints/sip.h
==============================================================================
--- trunk/src/endpoints/sip.h	(original)
+++ trunk/src/endpoints/sip.h	Sun May 18 19:18:00 2008
@@ -97,7 +97,7 @@
   unsigned get_dtmf_mode () const;
 
   bool set_listen_port (unsigned port);
-  const Ekiga::CallManager::Interface & get_listen_interface () const;
+  const Ekiga::CallProtocolManager::Interface & get_listen_interface () const;
 
   /* SIP ProtocolManager */
   void set_nat_binding_delay (unsigned delay);
@@ -166,7 +166,7 @@
   Ekiga::PresenceCore & presence_core;
   Ekiga::Runtime & runtime;
 
-  Ekiga::CallManager::Interface interface;
+  Ekiga::CallProtocolManager::Interface interface;
 
   std::string protocol_name;
   std::string uri_prefix;



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