ekiga r6549 - in trunk: . src src/endpoints src/gui



Author: dsandras
Date: Tue Aug  5 21:21:39 2008
New Revision: 6549
URL: http://svn.gnome.org/viewvc/ekiga?rev=6549&view=rev

Log:
Some renaming. h323.cpp contains more than an H323
CallProtocolManager.


Added:
   trunk/src/endpoints/h323-endpoint.cpp   (contents, props changed)
      - copied, changed from r6547, /trunk/src/endpoints/h323.cpp
   trunk/src/endpoints/h323-endpoint.h   (contents, props changed)
      - copied, changed from r6547, /trunk/src/endpoints/h323.h
Removed:
   trunk/src/endpoints/h323.cpp
   trunk/src/endpoints/h323.h
Modified:
   trunk/ChangeLog
   trunk/src/Makefile.am
   trunk/src/endpoints/opal-gmconf-bridge.cpp
   trunk/src/endpoints/opal-main.cpp
   trunk/src/gui/accounts.cpp
   trunk/src/gui/conf.cpp
   trunk/src/gui/preferences.cpp

Modified: trunk/src/Makefile.am
==============================================================================
--- trunk/src/Makefile.am	(original)
+++ trunk/src/Makefile.am	Tue Aug  5 21:21:39 2008
@@ -93,8 +93,8 @@
 	endpoints/ekiga.cpp			\
 	endpoints/manager.h			\
 	endpoints/manager.cpp			\
-	endpoints/h323.h			\
-	endpoints/h323.cpp			\
+	endpoints/h323-endpoint.h		\
+	endpoints/h323-endpoint.cpp		\
 	endpoints/pcss.h			\
 	endpoints/pcss.cpp			\
 	endpoints/sip-presentity.h		\

Copied: trunk/src/endpoints/h323-endpoint.cpp (from r6547, /trunk/src/endpoints/h323.cpp)
==============================================================================
--- /trunk/src/endpoints/h323.cpp	(original)
+++ trunk/src/endpoints/h323-endpoint.cpp	Tue Aug  5 21:21:39 2008
@@ -38,7 +38,7 @@
 
 #include "config.h"
 
-#include "h323.h"
+#include "h323-endpoint.h"
 
 #include "opal-call.h"
 #include "account-core.h"
@@ -52,12 +52,12 @@
     {
       PCLASSINFO(dialer, PThread);
 
-    public:
+  public:
 
-      dialer (const std::string & uri, Opal::CallManager & ep) 
+      dialer (const std::string & uri, Opal::CallManager & _manager) 
         : PThread (1000, AutoDeleteThread), 
         dial_uri (uri),
-        endpoint (ep) 
+        manager (_manager) 
       {
         this->Resume ();
       };
@@ -65,51 +65,49 @@
       void Main () 
         {
           PString token;
-          endpoint.SetUpCall ("pc:*", dial_uri, token);
+          manager.SetUpCall ("pc:*", dial_uri, token);
         };
 
-    private:
+  private:
       const std::string dial_uri;
-      Opal::CallManager & endpoint;
+      Opal::CallManager & manager;
     };
 
     class subscriber : public PThread
     {
       PCLASSINFO(subscriber, PThread);
 
-    public:
+  public:
 
       subscriber (const Opal::Account & _account,
-                  Opal::H323::CallProtocolManager & ep) 
+                  Opal::H323::EndPoint::EndPoint & _manager) 
         : PThread (1000, AutoDeleteThread),
         account (_account),
-        endpoint (ep) 
+        manager (_manager) 
       {
         this->Resume ();
       };
 
       void Main () 
         {
-          endpoint.Register (account);
+          manager.Register (account);
         };
 
-    private:
+  private:
       const Opal::Account & account;
-      Opal::H323::CallProtocolManager & endpoint;
+      Opal::H323::EndPoint::EndPoint & manager;
     };
   };
 };
 
 
-using namespace Opal::H323;
-
 /* The class */
-CallProtocolManager::CallProtocolManager (Opal::CallManager & ep, Ekiga::ServiceCore & _core, unsigned _listen_port)
-                    : H323EndPoint (ep), 
-                      endpoint (ep),
-                      core (_core),
-                      runtime (*(dynamic_cast<Ekiga::Runtime *> (core.get ("runtime")))),
-                      account_core (*(dynamic_cast<Ekiga::AccountCore *> (core.get ("account-core"))))
+Opal::H323::EndPoint::EndPoint (Opal::CallManager & _manager, Ekiga::ServiceCore & _core, unsigned _listen_port)
+        : H323EndPoint (_manager), 
+          manager (_manager),
+          core (_core),
+          runtime (*(dynamic_cast<Ekiga::Runtime *> (core.get ("runtime")))),
+          account_core (*(dynamic_cast<Ekiga::AccountCore *> (core.get ("account-core"))))
 {
   protocol_name = "h323";
   uri_prefix = "h323:";
@@ -122,35 +120,35 @@
   set_listen_port (listen_port);
 
   /* Ready to take calls */
-  endpoint.AddRouteEntry("h323:.* = pc:<db>");
-  endpoint.AddRouteEntry("pc:.* = h323:<da>");
+  manager.AddRouteEntry("h323:.* = pc:<db>");
+  manager.AddRouteEntry("pc:.* = h323:<da>");
 }
 
 
-bool CallProtocolManager::populate_menu (Ekiga::Contact &contact,
-					 std::string uri,
-                                         Ekiga::MenuBuilder &builder)
+bool Opal::H323::EndPoint::populate_menu (Ekiga::Contact &contact,
+                                          std::string uri,
+                                          Ekiga::MenuBuilder &builder)
 {
   return menu_builder_add_actions (contact.get_name (), uri, builder);
 }
 
 
-bool CallProtocolManager::populate_menu (Ekiga::Presentity& presentity,
-					 const std::string uri,
-                                         Ekiga::MenuBuilder & builder)
+bool Opal::H323::EndPoint::populate_menu (Ekiga::Presentity& presentity,
+                                          const std::string uri,
+                                          Ekiga::MenuBuilder & builder)
 {
   return menu_builder_add_actions (presentity.get_name (), uri, builder);
 }
 
 
-bool CallProtocolManager::menu_builder_add_actions (const std::string & /*fullname*/,
-                                                    const std::string& uri,
-                                                    Ekiga::MenuBuilder & builder)
+bool Opal::H323::EndPoint::menu_builder_add_actions (const std::string & /*fullname*/,
+                                                     const std::string& uri,
+                                                     Ekiga::MenuBuilder & builder)
 {
   bool populated = false;
   std::string action = _("Call");
 
-  builder.add_action ("call", action, sigc::bind (sigc::mem_fun (this, &CallProtocolManager::on_dial), uri));
+  builder.add_action ("call", action, sigc::bind (sigc::mem_fun (this, &EndPoint::on_dial), uri));
 
   populated = true;
 
@@ -158,11 +156,11 @@
 }
 
 
-bool CallProtocolManager::dial (const std::string & uri)
+bool Opal::H323::EndPoint::dial (const std::string & uri)
 {
   if (uri.find ("h323:") == 0) {
 
-    new dialer (uri, endpoint);
+    new dialer (uri, manager);
 
     return true;
   }
@@ -171,13 +169,13 @@
 }
 
 
-const std::string & CallProtocolManager::get_protocol_name () const
+const std::string & Opal::H323::EndPoint::get_protocol_name () const
 {
   return protocol_name;
 }
 
 
-void CallProtocolManager::set_dtmf_mode (unsigned mode)
+void Opal::H323::EndPoint::set_dtmf_mode (unsigned mode)
 {
   switch (mode) 
     {
@@ -199,7 +197,7 @@
 }
 
 
-unsigned CallProtocolManager::get_dtmf_mode () const
+unsigned Opal::H323::EndPoint::get_dtmf_mode () const
 {
   if (GetSendUserInputMode () == OpalConnection::SendUserInputAsString)
     return 0;
@@ -217,7 +215,7 @@
 }
 
 
-bool CallProtocolManager::set_listen_port (unsigned port)
+bool Opal::H323::EndPoint::set_listen_port (unsigned port)
 {
   interface.protocol = "tcp";
   interface.interface = "*";
@@ -239,25 +237,25 @@
 }
 
 
-const Ekiga::CallProtocolManager::Interface & CallProtocolManager::get_listen_interface () const
+const Ekiga::CallProtocolManager::Interface & Opal::H323::EndPoint::get_listen_interface () const
 {
   return interface;
 }
 
 
-void CallProtocolManager::set_forward_uri (const std::string & uri)
+void Opal::H323::EndPoint::set_forward_uri (const std::string & uri)
 {
   forward_uri = uri;
 }
 
 
-const std::string & CallProtocolManager::get_forward_uri () const
+const std::string & Opal::H323::EndPoint::get_forward_uri () const
 {
   return forward_uri;
 }
 
 
-bool CallProtocolManager::subscribe (const Opal::Account & account)
+bool Opal::H323::EndPoint::subscribe (const Opal::Account & account)
 {
   if (account.get_protocol_name () != "H323")
     return false;
@@ -268,7 +266,7 @@
 }
 
 
-bool CallProtocolManager::unsubscribe (const Opal::Account & account)
+bool Opal::H323::EndPoint::unsubscribe (const Opal::Account & account)
 {
   if (account.get_protocol_name () != "H323")
     return false;
@@ -279,7 +277,7 @@
 }
 
 
-void CallProtocolManager::Register (const Opal::Account & account)
+void Opal::H323::EndPoint::Register (const Opal::Account & account)
 {
   PString gatekeeperID;
   std::string info;
@@ -293,7 +291,7 @@
 
     if (!account.get_username ().empty ()) {
       SetLocalUserName (account.get_username ());
-      AddAliasName (endpoint.GetDefaultDisplayName ());
+      AddAliasName (manager.GetDefaultDisplayName ());
     }
 
     SetGatekeeperPassword (account.get_password ());
@@ -359,9 +357,9 @@
 }
 
 
-bool CallProtocolManager::UseGatekeeper (const PString & address,
-                                         const PString & domain,
-                                         const PString & iface)
+bool Opal::H323::EndPoint::UseGatekeeper (const PString & address,
+                                          const PString & domain,
+                                          const PString & iface)
 {
   bool result = 
     H323EndPoint::UseGatekeeper (address, domain, iface);
@@ -374,7 +372,7 @@
 }
 
 
-bool CallProtocolManager::RemoveGatekeeper (const PString & address)
+bool Opal::H323::EndPoint::RemoveGatekeeper (const PString & address)
 {
   if (IsRegisteredWithGatekeeper (address))
     return H323EndPoint::RemoveGatekeeper (0);
@@ -383,7 +381,7 @@
 }
 
 
-bool CallProtocolManager::IsRegisteredWithGatekeeper (const PString & address)
+bool Opal::H323::EndPoint::IsRegisteredWithGatekeeper (const PString & address)
 {
   PWaitAndSignal m(gk_name_mutex);
 
@@ -391,17 +389,17 @@
 }
 
 
-bool CallProtocolManager::OnIncomingConnection (OpalConnection & connection,
-                                                G_GNUC_UNUSED unsigned options,
-                                                G_GNUC_UNUSED OpalConnection::StringOptions *stroptions)
+bool Opal::H323::EndPoint::OnIncomingConnection (OpalConnection & connection,
+                                                 G_GNUC_UNUSED unsigned options,
+                                                 G_GNUC_UNUSED OpalConnection::StringOptions *stroptions)
 {
-  PTRACE (3, "CallProtocolManager\tIncoming connection");
+  PTRACE (3, "EndPoint\tIncoming connection");
 
-  if (!forward_uri.empty () && endpoint.get_unconditional_forward ())
+  if (!forward_uri.empty () && manager.get_unconditional_forward ())
     connection.ForwardCall (forward_uri);
-  else if (endpoint.GetCallsNumber () > 1) { 
+  else if (manager.GetCallsNumber () > 1) { 
 
-    if (!forward_uri.empty () && endpoint.get_forward_on_busy ())
+    if (!forward_uri.empty () && manager.get_forward_on_busy ())
       connection.ForwardCall (forward_uri);
     else {
       connection.ClearCall (OpalConnection::EndedByLocalBusy);
@@ -412,10 +410,10 @@
     Opal::Call *call = dynamic_cast<Opal::Call *> (&connection.GetCall ());
     if (call) {
 
-      if (!forward_uri.empty () && endpoint.get_forward_on_no_answer ()) 
-        call->set_no_answer_forward (endpoint.get_reject_delay (), forward_uri);
+      if (!forward_uri.empty () && manager.get_forward_on_no_answer ()) 
+        call->set_no_answer_forward (manager.get_reject_delay (), forward_uri);
       else
-        call->set_reject_delay (endpoint.get_reject_delay ());
+        call->set_reject_delay (manager.get_reject_delay ());
     }
 
     return H323EndPoint::OnIncomingConnection (connection, options, stroptions);
@@ -425,7 +423,7 @@
 }
 
 
-void CallProtocolManager::on_dial (std::string uri)
+void Opal::H323::EndPoint::on_dial (std::string uri)
 {
-  endpoint.dial (uri);
+  manager.dial (uri);
 }

Copied: trunk/src/endpoints/h323-endpoint.h (from r6547, /trunk/src/endpoints/h323.h)
==============================================================================
--- /trunk/src/endpoints/h323.h	(original)
+++ trunk/src/endpoints/h323-endpoint.h	Tue Aug  5 21:21:39 2008
@@ -17,7 +17,7 @@
  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
  *
  *
- * Ekiga is licensed under the GPL license and as a special exception,
+ * Ekiga is licensed under the GPL license and as a special exc_managertion,
  * you have permission to link or otherwise combine this program with the
  * programs OPAL, OpenH323 and PWLIB, and distribute the combination,
  * without applying the requirements of the GNU GPL to the OPAL, OpenH323
@@ -52,16 +52,16 @@
 
   namespace H323 {
 
-    class CallProtocolManager : public H323EndPoint,
+    class EndPoint : public H323EndPoint,
                                 public Ekiga::CallProtocolManager,
                                 public Ekiga::PresentityDecorator,
                                 public Ekiga::AccountSubscriberImpl<Opal::Account>,
                                 public Ekiga::ContactDecorator
     {
-      PCLASSINFO(CallProtocolManager, H323EndPoint);
+      PCLASSINFO(EndPoint, H323EndPoint);
 
   public:
-      CallProtocolManager (CallManager &ep, Ekiga::ServiceCore & core, unsigned listen_port);
+      EndPoint (CallManager &_manager, Ekiga::ServiceCore & core, unsigned listen_port);
 
 
       /* ContactDecorator and PresentityDecorator */
@@ -119,7 +119,7 @@
   private:
       void on_dial (std::string uri);
 
-      CallManager & endpoint;
+      CallManager & manager;
       Ekiga::ServiceCore & core;
       Ekiga::Runtime & runtime;
       Ekiga::AccountCore & account_core;

Modified: trunk/src/endpoints/opal-gmconf-bridge.cpp
==============================================================================
--- trunk/src/endpoints/opal-gmconf-bridge.cpp	(original)
+++ trunk/src/endpoints/opal-gmconf-bridge.cpp	Tue Aug  5 21:21:39 2008
@@ -42,7 +42,7 @@
 
 #include "manager.h"
 #include "sip-endpoint.h"
-#include "h323.h"
+#include "h323-endpoint.h"
 
 using namespace Opal;
 
@@ -259,7 +259,7 @@
   //
   else if (key.find (SIP_KEY) != string::npos) {
 
-    Opal::H323::CallProtocolManager *h323_manager = dynamic_cast<Opal::H323::CallProtocolManager *> (manager.get_protocol_manager ("h323"));
+    Opal::H323::EndPoint *h323_manager = dynamic_cast<Opal::H323::EndPoint *> (manager.get_protocol_manager ("h323"));
     if (h323_manager) {
 
       if (key == H323_KEY "enable_h245_tunneling") {

Modified: trunk/src/endpoints/opal-main.cpp
==============================================================================
--- trunk/src/endpoints/opal-main.cpp	(original)
+++ trunk/src/endpoints/opal-main.cpp	Tue Aug  5 21:21:39 2008
@@ -48,7 +48,7 @@
 #include "manager.h"
 #include "ekiga.h"
 #include "sip-endpoint.h"
-#include "h323.h"
+#include "h323-endpoint.h"
 
 
 static bool
@@ -93,7 +93,7 @@
 
   CallManager *call_manager = new CallManager (core);
   Sip::EndPoint *sip_manager = new Sip::EndPoint (*call_manager, core, sip_port);
-  H323::CallProtocolManager *h323_manager = new H323::CallProtocolManager (*call_manager, core, h323_port);
+  H323::EndPoint *h323_manager = new H323::EndPoint (*call_manager, core, h323_port);
 
   call_manager->add_protocol_manager (*sip_manager);
   call_manager->add_protocol_manager (*h323_manager);

Modified: trunk/src/gui/accounts.cpp
==============================================================================
--- trunk/src/gui/accounts.cpp	(original)
+++ trunk/src/gui/accounts.cpp	Tue Aug  5 21:21:39 2008
@@ -50,7 +50,7 @@
 
 #include "manager.h"
 #include "sip-endpoint.h"
-#include "h323.h"
+#include "h323-endpoint.h"
 #include "ekiga.h"
 
 #include "gmconf.h"

Modified: trunk/src/gui/conf.cpp
==============================================================================
--- trunk/src/gui/conf.cpp	(original)
+++ trunk/src/gui/conf.cpp	Tue Aug  5 21:21:39 2008
@@ -45,7 +45,7 @@
 
 #include "conf.h"
 
-#include "h323.h"
+#include "h323-endpoint.h"
 #include "sip-endpoint.h"
 #include "manager.h"
 

Modified: trunk/src/gui/preferences.cpp
==============================================================================
--- trunk/src/gui/preferences.cpp	(original)
+++ trunk/src/gui/preferences.cpp	Tue Aug  5 21:21:39 2008
@@ -42,7 +42,7 @@
 #include "preferences.h"
 
 #include "accounts.h"
-#include "h323.h"
+#include "h323-endpoint.h"
 #include "sip-endpoint.h"
 #include "ekiga.h"
 #include "misc.h"



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