[ekiga] Added the initialization of the presentity in the opal account code
- From: Julien Puydt <jpuydt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ekiga] Added the initialization of the presentity in the opal account code
- Date: Fri, 14 Jan 2011 12:57:03 +0000 (UTC)
commit 3e9925bcf9ae58ae3f7f04a95e425172e9378f02
Author: Snark <jpuydt gnome org>
Date: Thu Dec 23 22:16:11 2010 +0100
Added the initialization of the presentity in the opal account code
That means presence publishing is supposed to work ; of course it doesn't
actually, but where would be the fun if it did at the first try?
lib/engine/components/opal/opal-account.cpp | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/lib/engine/components/opal/opal-account.cpp b/lib/engine/components/opal/opal-account.cpp
index c5ba5f8..f1980c3 100644
--- a/lib/engine/components/opal/opal-account.cpp
+++ b/lib/engine/components/opal/opal-account.cpp
@@ -129,6 +129,11 @@ Opal::Account::Account (Ekiga::ServiceCore & _core,
type = Account::H323;
limited = (name.find ("%limit") != std::string::npos);
+
+
+ boost::shared_ptr<CallManager> manager = core.get<CallManager> ("opal-component");
+ PURL url = PString (get_aor ());
+ presentity = boost::shared_ptr<OpalPresentity> (OpalPresentity::Create (*manager, url));
}
@@ -160,6 +165,10 @@ Opal::Account::Account (Ekiga::ServiceCore & _core,
timeout = _timeout;
type = t;
+ boost::shared_ptr<CallManager> manager = core.get<CallManager> ("opal-component");
+ PURL url = PString (get_aor ());
+ presentity = boost::shared_ptr<OpalPresentity> (OpalPresentity::Create (*manager, url));
+
if (enabled)
enable ();
}
@@ -285,6 +294,7 @@ void Opal::Account::enable ()
boost::shared_ptr<Sip::EndPoint> endpoint = core.get<Sip::EndPoint> ("opal-sip-endpoint");
endpoint->subscribe (*this);
+ presentity->Open ();
updated ();
trigger_saving ();
@@ -298,6 +308,8 @@ void Opal::Account::disable ()
boost::shared_ptr<Sip::EndPoint> endpoint = core.get<Sip::EndPoint> ("opal-sip-endpoint");
endpoint->unsubscribe (*this);
+ presentity->Close ();
+
updated ();
trigger_saving ();
}
@@ -477,6 +489,8 @@ Opal::Account::publish (const Ekiga::PersonalDetails& details)
{
if (presentity && presentity->IsOpen ()) {
+ std::cout << __PRETTY_FUNCTION__ << ": ok" << std::endl;
+
std::string presence = details.get_presence ();
OpalPresenceInfo::State personal_state = OpalPresenceInfo::Unavailable;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]