ekiga r6147 - trunk/src/endpoints



Author: dsandras
Date: Tue Apr  8 19:08:14 2008
New Revision: 6147
URL: http://svn.gnome.org/viewvc/ekiga?rev=6147&view=rev

Log:
Got rid of one more method.


Modified:
   trunk/src/endpoints/h323.cpp
   trunk/src/endpoints/manager.cpp
   trunk/src/endpoints/manager.h
   trunk/src/endpoints/sip.cpp

Modified: trunk/src/endpoints/h323.cpp
==============================================================================
--- trunk/src/endpoints/h323.cpp	(original)
+++ trunk/src/endpoints/h323.cpp	Tue Apr  8 19:08:14 2008
@@ -285,46 +285,23 @@
                                       G_GNUC_UNUSED unsigned options,
                                       G_GNUC_UNUSED OpalConnection::StringOptions *str_options)
 {
-  PSafePtr<OpalConnection> con = NULL;
-  PSafePtr<OpalCall> call = NULL;
-  
-  guint status = CONTACT_ONLINE;
-  gboolean busy_forward = FALSE;
-  gboolean always_forward = FALSE;
-
-  bool res = FALSE;
-
-  unsigned reason = 0;
-  gchar *forward_host = NULL;
-
   PTRACE (3, "GMH323Endpoint\tIncoming connection");
 
-
-  gnomemeeting_threads_enter ();
-  forward_host = gm_conf_get_string (H323_KEY "forward_host");
-  busy_forward = gm_conf_get_bool (CALL_FORWARDING_KEY "forward_on_busy");
-  always_forward = gm_conf_get_bool (CALL_FORWARDING_KEY "always_forward");
-  status = gm_conf_get_int (PERSONAL_DATA_KEY "status");
-  gnomemeeting_threads_leave ();
-  
-  
-  if (forward_host && always_forward)
-    reason = 2; // Forward
-  /* We are in a call */
+  /*
+  if (!forward_uri.empty () && unconditional_forward)
+    connection.ForwardCall (forward_uri);
   else if (endpoint.GetCallsNumber () >= 1) { 
 
-    if (forward_host && busy_forward)
-      reason = 2; // Forward
-    else
-      reason = 1; // Reject
+    if (!forward_uri.empty () && forward_on_busy)
+      connection.ForwardCall (forward_uri);
+    else 
+      connection.ClearCall (OpalConnection::EndedByLocalBusy);
   }
   else
-    reason = 0; // Ask the user
-
-  res = endpoint.OnIncomingConnection (connection, reason, forward_host);
+    return H323EndPoint::OnIncomingConnection (connection, options, stroptions);
+    */ //TODO
 
-  g_free (forward_host);
-  return res;
+  return false;
 }
 
 

Modified: trunk/src/endpoints/manager.cpp
==============================================================================
--- trunk/src/endpoints/manager.cpp	(original)
+++ trunk/src/endpoints/manager.cpp	Tue Apr  8 19:08:14 2008
@@ -897,39 +897,6 @@
 }
 
 
-bool
-GMManager::OnIncomingConnection (OpalConnection &connection,
-                                 unsigned reason,
-                                 const std::string & forward_uri)
-{
-  bool res = FALSE;
-
-  /* Act on the connection */
-  switch (reason) {
-
-  case 1:
-    connection.ClearCall (OpalConnection::EndedByLocalBusy);
-    res = FALSE;
-    break;
-    
-  case 2:
-    connection.ForwardCall (forward_uri);
-    res = FALSE;
-    break;
-    
-  case 4:
-    res = TRUE;
-  default:
-
-  case 0:
-    res = OpalManager::OnIncomingConnection (connection, 0, NULL);
-    break;
-  }
-
-  return res;
-}
-
-
 void 
 GMManager::OnEstablished (OpalConnection &connection)
 {

Modified: trunk/src/endpoints/manager.h
==============================================================================
--- trunk/src/endpoints/manager.h	(original)
+++ trunk/src/endpoints/manager.h	Tue Apr  8 19:08:14 2008
@@ -207,17 +207,6 @@
   OpalCall *CreateCall ();
 
   
-  /* DESCRIPTION  :  Called when there is an incoming SIP/H323/PCSS connection.
-   * BEHAVIOR     :  Updates the GUI and forward, reject the connection
-   * 		     if required. If the connection is not forwarded, then
-   * 		     OnShowIncoming will be called on the PCSS Endpoint.
-   * PRE          :  /
-   */
-  bool OnIncomingConnection (OpalConnection &,
-			     unsigned,
-			     const std::string & forward_uri);
-
-  
   /* DESCRIPTION  :  This callback is called when the connection is 
    *                 established and everything is ok.
    * BEHAVIOR     :  Sets the proper values for the current connection 

Modified: trunk/src/endpoints/sip.cpp
==============================================================================
--- trunk/src/endpoints/sip.cpp	(original)
+++ trunk/src/endpoints/sip.cpp	Tue Apr  8 19:08:14 2008
@@ -597,30 +597,24 @@
 
 bool 
 GMSIPEndpoint::OnIncomingConnection (OpalConnection &connection,
-                                     G_GNUC_UNUSED unsigned options,
-                                     G_GNUC_UNUSED OpalConnection::StringOptions * stroptions)
+                                     unsigned options,
+                                     OpalConnection::StringOptions * stroptions)
 {
-  PSafePtr<OpalConnection> con = NULL;
-  PSafePtr<OpalCall> call = NULL;
-
-  unsigned reason = 0;
-
   PTRACE (3, "GMSIPEndpoint\tIncoming connection");
 
-  std::cout << "OnIncomingConnection " << endpoint.GetCallsNumber() << std::endl << std::flush;
   if (!forward_uri.empty () && unconditional_forward)
-    reason = 2; // Forward
+    connection.ForwardCall (forward_uri);
   else if (endpoint.GetCallsNumber () >= 1) { 
 
     if (!forward_uri.empty () && forward_on_busy)
-      reason = 2; // Forward
-    else
-      reason = 1; // Reject
+      connection.ForwardCall (forward_uri);
+    else 
+      connection.ClearCall (OpalConnection::EndedByLocalBusy);
   }
   else
-    reason = 0; // Ask the user
+    return SIPEndPoint::OnIncomingConnection (connection, options, stroptions);
 
-  return endpoint.OnIncomingConnection (connection, reason, forward_uri.c_str ());
+  return false;
 }
 
 



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