Le 22/06/14 11:03, Julien Puydt a écrit :
Hi,

let me start by reminding what friend-or-foe is about: when a call (or a message) comes in, the system classifies the event as unknown, foe, neutral or friend. The goal is then to use the classification to reject, ask the user or auto-accept the call.

The current code has:
- a central object which is able to classify, asking delegates ;
- the roster is such a delegate : people in the roster are at least neutral, and if they've been marked as preferred, then they're even friends.

And that's all! The call core doesn't even know about the feature, and we have no blacklist about foes! So what is needed is:
(1) make the call core reject foes ;
(2) add a blacklisting delegate ;
(3) make so the call core, depending on the state (do not disturb or normal) will reject all calls from not-friends (hence foes, unknowns and neutrals), directly accept the calls from friends, ask for friends only or ask for friends and neutrals...
(4) add a blacklist button to the call popup ;
(5) add a blacklist action to the call history items (if they're currently unknown) ;
(6) add some way to edit the blacklist somewhere in the ui.


I started by the easiest thing to do: (1). The problem is that I'm not quite sure what the proper way to reject a call is ; my current patch has the following :
+void
+CallCore::add_call (boost::shared_ptr<Call> call,
+            boost::shared_ptr<CallManager> manager)
 {
+ Ekiga::FriendOrFoe::Identification id = iff->decide ("call", call->get_remote_uri ());
+
+  if (id == Ekiga::FriendOrFoe::Foe) {
+
+    call->hang_up ();
+    return;
+  }
+

does that look sane?

It does, but I am not sure you can "hangup" a call that is not in the "established" phase.

That is something to try.



------------------------------------------------------------------------
Damien SANDRAS

*Ekiga Project*
http://www.ekiga.org
_______________________________________________
ekiga-devel-list mailing list
ekiga-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/ekiga-devel-list

Reply via email to