[ekiga] Made the local roster actually answer to the IFF



commit f9d28317e4bede0fba89f96f6cdbd158c6a5e952
Author: Julien Puydt <jpuydt gnome org>
Date:   Thu Jul 2 15:17:44 2009 +0200

    Made the local roster actually answer to the IFF

 lib/engine/components/local-roster/local-heap.cpp |   21 ++++++++++++++++++++-
 1 files changed, 20 insertions(+), 1 deletions(-)
---
diff --git a/lib/engine/components/local-roster/local-heap.cpp b/lib/engine/components/local-roster/local-heap.cpp
index c4fbc6d..4d916a8 100644
--- a/lib/engine/components/local-roster/local-heap.cpp
+++ b/lib/engine/components/local-roster/local-heap.cpp
@@ -459,5 +459,24 @@ Ekiga::FriendOrFoe::Identification
 Local::Heap::decide (const std::string /*domain*/,
 		     const std::string token) const
 {
-  return Ekiga::FriendOrFoe::Unknown;
+  Ekiga::FriendOrFoe::Identification result = Ekiga::FriendOrFoe::Unknown;
+
+  for (const_iterator iter = begin ();
+       iter != end ();
+       ++iter) {
+
+    if ((*iter)->get_uri () == token) {
+
+      if ((*iter)->is_preferred ()) {
+
+	result = Ekiga::FriendOrFoe::Friend;
+      } else {
+
+	result = Ekiga::FriendOrFoe::Neutral;
+      }
+      break;
+    }
+  }
+
+  return result;
 }



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