[ekiga] Got rid of the old presence publishing code



commit 9bd09de7e149ae304e2b20cd78900b335a8c4373
Author: Snark <jpuydt gnome org>
Date:   Thu Dec 23 22:16:41 2010 +0100

    Got rid of the old presence publishing code
    
    Yes, I know the new one doesn't work yet, but I need to see things better

 lib/engine/components/opal/opal-main.cpp    |    1 -
 lib/engine/components/opal/sip-endpoint.cpp |   61 ---------------------------
 lib/engine/components/opal/sip-endpoint.h   |    5 --
 3 files changed, 0 insertions(+), 67 deletions(-)
---
diff --git a/lib/engine/components/opal/opal-main.cpp b/lib/engine/components/opal/opal-main.cpp
index 13a7d21..097b65c 100644
--- a/lib/engine/components/opal/opal-main.cpp
+++ b/lib/engine/components/opal/opal-main.cpp
@@ -131,7 +131,6 @@ struct OPALSpark: public Ekiga::Spark
       contact_core->add_contact_decorator (sip_manager);
       presence_core->add_presentity_decorator (sip_manager);
       presence_core->add_presence_fetcher (sip_manager);
-      presence_core->add_presence_publisher (sip_manager);
 
       boost::shared_ptr<PresenceManager> presence_manager (new PresenceManager (bank));
       presence_core->add_presence_publisher (presence_manager);
diff --git a/lib/engine/components/opal/sip-endpoint.cpp b/lib/engine/components/opal/sip-endpoint.cpp
index c7264b1..41a5026 100644
--- a/lib/engine/components/opal/sip-endpoint.cpp
+++ b/lib/engine/components/opal/sip-endpoint.cpp
@@ -299,67 +299,6 @@ Opal::Sip::EndPoint::unfetch (const std::string uri)
 }
 
 
-void
-Opal::Sip::EndPoint::publish (const Ekiga::PersonalDetails & details)
-{
-  std::map<std::string, PString> to_publish;
-  std::string hostname = (const char *) PIPSocket::GetHostName ();
-  std::string presence = ((Ekiga::PersonalDetails &) (details)).get_presence ();
-  std::string status = ((Ekiga::PersonalDetails &) (details)).get_status ();
-
-  for (PSafePtr<SIPHandler> handler = activeSIPHandlers.GetFirstHandler(); handler != NULL; ++handler) {
-
-    if (handler->GetMethod() == SIP_PDU::Method_REGISTER && handler->GetState () == SIPHandler::Subscribed) {
-
-      PString data;
-      std::string to = handler->GetAddressOfRecord ().AsString ().Mid (4);
-      data += "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n";
-
-      data += "<presence xmlns=\"urn:ietf:params:xml:ns:pidf\" entity=\"pres:";
-      data += to;
-      data += "\">\r\n";
-
-      data += "<tuple id=\"sip:";
-      data += to;
-      data += "_on_";
-      data += hostname;
-      data += "\">\r\n";
-
-      data += "<note>";
-      data += presence.c_str ();
-      if (!status.empty ()) {
-        data += " - ";
-        data += status.c_str ();
-      }
-      data += "</note>\r\n";
-
-      data += "<status>\r\n";
-      data += "<basic>";
-      data += "open";
-      data += "</basic>\r\n";
-      data += "</status>\r\n";
-
-      data += "<contact priority=\"1\">";
-      data += to;
-      data += "</contact>\r\n";
-
-      data += "</tuple>\r\n";
-      data += "</presence>\r\n";
-
-      if (publications[to] != data) {
-        publications[to] = data;
-        to_publish[to] = data;
-      }
-    }
-  }
-
-  for (std::map<std::string, PString>::const_iterator iter = to_publish.begin ();
-       iter != to_publish.end ();
-       ++iter)
-    Publish (iter->first, iter->second, 500); // TODO: allow to change the 500
-}
-
-
 bool
 Opal::Sip::EndPoint::send_message (const std::string & _uri,
 				   const std::string & _message)
diff --git a/lib/engine/components/opal/sip-endpoint.h b/lib/engine/components/opal/sip-endpoint.h
index 133c2ed..686882a 100644
--- a/lib/engine/components/opal/sip-endpoint.h
+++ b/lib/engine/components/opal/sip-endpoint.h
@@ -64,7 +64,6 @@ namespace Opal {
 		     public Ekiga::Service,
 		     public Ekiga::CallProtocolManager,
 		     public Ekiga::PresenceFetcher,
-		     public Ekiga::PresencePublisher,
 		     public Ekiga::PresentityDecorator,
 		     public Ekiga::ContactDecorator
     {
@@ -113,10 +112,6 @@ namespace Opal {
       void unfetch (const std::string uri);
 
 
-      /* PresencePublisher */
-      void publish (const Ekiga::PersonalDetails & details);
-
-
       /* Chat subsystem */
       bool send_message (const std::string & uri,
                          const std::string & message);



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