[ekiga] Revert "Removed the obsolete OnMessageFailed method in the SIP endpoint code"



commit 7cc3e6e2e14632d020f138f3bda1e95dfc5251c1
Author: Eugen Dedu <Eugen Dedu pu-pm univ-fcomte fr>
Date:   Sat Jan 22 16:28:41 2011 +0100

    Revert "Removed the obsolete OnMessageFailed method in the SIP endpoint code"
    
    This reverts commit e5afd686458c3390356393ee546471baab18b67b.  This
    method is used when there is an error when sending a message in a chat.

 lib/engine/components/opal/sip-endpoint.cpp |   13 +++++++++++++
 lib/engine/components/opal/sip-endpoint.h   |    3 +++
 2 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/lib/engine/components/opal/sip-endpoint.cpp b/lib/engine/components/opal/sip-endpoint.cpp
index 39a0aaf..0aa77b0 100644
--- a/lib/engine/components/opal/sip-endpoint.cpp
+++ b/lib/engine/components/opal/sip-endpoint.cpp
@@ -898,6 +898,19 @@ Opal::Sip::EndPoint::OnReceivedMESSAGE (OpalTransport & transport,
 }
 
 
+void
+Opal::Sip::EndPoint::OnMessageFailed (const SIPURL & messageUrl,
+				      SIP_PDU::StatusCodes /*reason*/)
+{
+  SIPURL to = messageUrl;
+  to.Sanitise (SIPURL::ToURI);
+  std::string uri = (const char *) to.AsString ();
+  std::string display_name = (const char *) to.GetDisplayName ();
+
+  Ekiga::Runtime::run_in_main (boost::bind (&Opal::Sip::EndPoint::push_notice_in_main, this, uri, display_name, _("Could not send message")));
+}
+
+
 SIPURL
 Opal::Sip::EndPoint::GetRegisteredPartyName (const SIPURL & aor,
 					     const OpalTransport & transport)
diff --git a/lib/engine/components/opal/sip-endpoint.h b/lib/engine/components/opal/sip-endpoint.h
index 2113a82..69ddc2b 100644
--- a/lib/engine/components/opal/sip-endpoint.h
+++ b/lib/engine/components/opal/sip-endpoint.h
@@ -169,6 +169,9 @@ namespace Opal {
       bool OnReceivedMESSAGE (OpalTransport & transport,
                               SIP_PDU & pdu);
 
+      void OnMessageFailed (const SIPURL & messageUrl,
+                            SIP_PDU::StatusCodes reason);
+
       SIPURL GetRegisteredPartyName (const SIPURL & host,
 				     const OpalTransport & transport);
 



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