ekiga r6218 - in trunk: . src/endpoints



Author: dsandras
Date: Tue Apr 22 21:12:59 2008
New Revision: 6218
URL: http://svn.gnome.org/viewvc/ekiga?rev=6218&view=rev

Log:
Replaced pointers by references.


Modified:
   trunk/ChangeLog
   trunk/src/endpoints/sip.cpp
   trunk/src/endpoints/sip.h

Modified: trunk/src/endpoints/sip.cpp
==============================================================================
--- trunk/src/endpoints/sip.cpp	(original)
+++ trunk/src/endpoints/sip.cpp	Tue Apr 22 21:12:59 2008
@@ -52,6 +52,7 @@
   Ekiga::PresencePublisher (_core), 
   endpoint (ep), 
   core (_core),
+  presence_core (*(dynamic_cast<Ekiga::PresenceCore *> (core.get ("presence-core")))),
   runtime (*(dynamic_cast<Ekiga::Runtime *> (core.get ("runtime"))))
 {
   uri_prefix = "sip:";
@@ -924,18 +925,12 @@
     status = _("Free For Chat");
   }
 
-  Ekiga::PresenceCore *presence_core =
-    dynamic_cast<Ekiga::PresenceCore *>(core.get ("presence-core"));
-
   /**
    * TODO
    * Wouldn't it be convenient to emit the signal and have the presence core listen to it ?
    */
-  if (presence_core) {
-
-    runtime.run_in_main (sigc::bind (presence_core->presence_received.make_slot (), _uri, presence));
-    runtime.run_in_main (sigc::bind (presence_core->status_received.make_slot (), _uri, status));
-  }
+  runtime.run_in_main (sigc::bind (presence_core.presence_received.make_slot (), _uri, presence));
+  runtime.run_in_main (sigc::bind (presence_core.status_received.make_slot (), _uri, status));
 }
 
 

Modified: trunk/src/endpoints/sip.h
==============================================================================
--- trunk/src/endpoints/sip.h	(original)
+++ trunk/src/endpoints/sip.h	Tue Apr 22 21:12:59 2008
@@ -247,6 +247,7 @@
   std::list<std::string> domains; // List of registered domains
   std::list<std::string> aors;     // List of registered aor
   Ekiga::ServiceCore & core;
+  Ekiga::PresenceCore & presence_core;
   Ekiga::Runtime & runtime;
 
   std::string uri_prefix;



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