ekiga r6861 - in trunk: . src/endpoints



Author: dsandras
Date: Sun Sep  7 14:02:22 2008
New Revision: 6861
URL: http://svn.gnome.org/viewvc/ekiga?rev=6861&view=rev

Log:
Added call transfer support.


Modified:
   trunk/ChangeLog
   trunk/src/endpoints/h323-endpoint.cpp
   trunk/src/endpoints/h323-endpoint.h

Modified: trunk/src/endpoints/h323-endpoint.cpp
==============================================================================
--- trunk/src/endpoints/h323-endpoint.cpp	(original)
+++ trunk/src/endpoints/h323-endpoint.cpp	Sun Sep  7 14:02:22 2008
@@ -146,11 +146,15 @@
                                                      Ekiga::MenuBuilder & builder)
 {
   bool populated = false;
-  std::string action = _("Call");
 
   if (uri.find ("h323:") == 0) {
     
-    builder.add_action ("call", action, sigc::bind (sigc::mem_fun (this, &EndPoint::on_dial), uri));
+    if (0 == GetConnectionCount ())
+      builder.add_action ("call", _("Call"),
+                          sigc::bind (sigc::mem_fun (this, &Opal::H323::EndPoint::on_dial), uri));
+    else 
+      builder.add_action ("transfer", _("Transfer"),
+                          sigc::bind (sigc::mem_fun (this, &Opal::H323::EndPoint::on_transfer), uri));
     populated = true;
   }
 
@@ -430,3 +434,12 @@
 {
   manager.dial (uri);
 }
+
+
+void Opal::H323::EndPoint::on_transfer (std::string uri)
+{
+  /* FIXME : we don't handle several calls here */
+  for (PSafePtr<OpalConnection> connection(connectionsActive, PSafeReference); connection != NULL; ++connection)
+    if (!PIsDescendant(&(*connection), OpalPCSSConnection))
+      connection->TransferConnection (uri);
+}

Modified: trunk/src/endpoints/h323-endpoint.h
==============================================================================
--- trunk/src/endpoints/h323-endpoint.h	(original)
+++ trunk/src/endpoints/h323-endpoint.h	Sun Sep  7 14:02:22 2008
@@ -115,10 +115,10 @@
                                  unsigned options,
                                  OpalConnection::StringOptions *str_options);
 
-
-  private:
       void on_dial (std::string uri);
 
+      void on_transfer (std::string uri);
+
       CallManager & manager;
       Ekiga::ServiceCore & core;
       Ekiga::Runtime & runtime;



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