Port IndividualAggregator.individuals_changed to use Set<Individual>
authorPhilip Withnall <philip.withnall@collabora.co.uk>
Thu, 24 Mar 2011 16:40:07 +0000 (16:40 +0000)
committerPhilip Withnall <philip.withnall@collabora.co.uk>
Sat, 23 Apr 2011 21:00:24 +0000 (22:00 +0100)
Helps: bgo#640092

64 files changed:
NEWS
folks/individual-aggregator.vala
tests/key-file/individual-retrieval.vala
tests/libsocialweb/aggregation.vala
tests/libsocialweb/dummy-lsw.vala
tests/telepathy/individual-properties.vala
tests/telepathy/individual-retrieval.vala
tests/tracker/add-contact.vala
tests/tracker/add-persona.vala
tests/tracker/additional-names-updates.vala
tests/tracker/avatar-details-interface.vala
tests/tracker/avatar-updates.vala
tests/tracker/birthday-details-interface.vala
tests/tracker/birthday-updates.vala
tests/tracker/default-contact.vala
tests/tracker/duplicated-emails.vala
tests/tracker/duplicated-phones.vala
tests/tracker/email-details-interface.vala
tests/tracker/emails-updates.vala
tests/tracker/family-name-updates.vala
tests/tracker/favourite-details-interface.vala
tests/tracker/favourite-updates.vala
tests/tracker/fullname-updates.vala
tests/tracker/gender-details-interface.vala
tests/tracker/given-name-updates.vala
tests/tracker/im-details-interface.vala
tests/tracker/imaddresses-updates.vala
tests/tracker/individual-retrieval.vala
tests/tracker/link-personas-via-local-ids.vala
tests/tracker/link-personas.vala
tests/tracker/match-all.vala
tests/tracker/match-email-addresses.vala
tests/tracker/match-im-addresses.vala
tests/tracker/match-known-emails.vala
tests/tracker/match-name.vala
tests/tracker/match-phone-number.vala
tests/tracker/name-details-interface.vala
tests/tracker/nickname-updates.vala
tests/tracker/note-details-interface.vala
tests/tracker/phone-details-interface.vala
tests/tracker/phones-updates.vala
tests/tracker/postal-address-details-interface.vala
tests/tracker/prefix-name-updates.vala
tests/tracker/remove-contact.vala
tests/tracker/remove-persona.vala
tests/tracker/role-details-interface.vala
tests/tracker/set-alias.vala
tests/tracker/set-avatar.vala
tests/tracker/set-birthday.vala
tests/tracker/set-duplicate-email.vala
tests/tracker/set-emails.vala
tests/tracker/set-favourite.vala
tests/tracker/set-full-name.vala
tests/tracker/set-gender.vala
tests/tracker/set-im-addresses.vala
tests/tracker/set-notes.vala
tests/tracker/set-phones.vala
tests/tracker/set-postal-addresses.vala
tests/tracker/set-roles.vala
tests/tracker/set-structured-name.vala
tests/tracker/set-urls.vala
tests/tracker/suffix-name-updates.vala
tests/tracker/url-details-interface.vala
tests/tracker/website-updates.vala

diff --git a/NEWS b/NEWS
index becba5a..d828ae5 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -32,6 +32,8 @@ API changes:
 * Individual.personas now has type Set<Persona>
 * Individual.personas_changed now uses Set<Persona>-typed parameters
 * PersonaStore.personas_changed now uses Set<Persona>-typed parameters
+* IndividualAggregator.individuals_changed now uses
+  Set<Individual>-typed parameters
 
 Overview of changes from libfolks 0.4.0 to libfolks 0.5.0
 =========================================================
index b062561..11b3364 100644 (file)
@@ -130,9 +130,11 @@ public class Folks.IndividualAggregator : Object
    * @param message a string message from the backend, if any
    * @param actor the {@link Persona} who made the change, if known
    * @param reason the reason for the change
+   *
+   * @since UNRELEASED
    */
-  public signal void individuals_changed (GLib.List<Individual>? added,
-      GLib.List<Individual>? removed,
+  public signal void individuals_changed (Set<Individual> added,
+      Set<Individual> removed,
       string? message,
       Persona? actor,
       GroupDetails.ChangeReason reason);
@@ -382,7 +384,7 @@ public class Folks.IndividualAggregator : Object
     }
 
   private void _add_personas (Set<Persona> added,
-      ref GLib.List<Individual> added_individuals,
+      ref HashSet<Individual> added_individuals,
       ref HashMap<Individual, Individual> replaced_individuals,
       ref Individual user)
     {
@@ -585,7 +587,7 @@ public class Folks.IndividualAggregator : Object
         {
           /* Add the new Individual to the aggregator */
           i.removed.connect (this._individual_removed_cb);
-          added_individuals.prepend (i);
+          added_individuals.add (i);
           this.individuals.insert (i.id, i);
         }
     }
@@ -630,8 +632,8 @@ public class Folks.IndividualAggregator : Object
       Persona? actor,
       GroupDetails.ChangeReason reason)
     {
-      var added_individuals = new GLib.List<Individual> ();
-      GLib.List<Individual> removed_individuals = null;
+      var added_individuals = new HashSet<Individual> ();
+      var removed_individuals = new HashSet<Individual> ();
       var replaced_individuals = new HashMap<Individual, Individual> ();
       var relinked_personas = new HashSet<Persona> ();
       var removed_personas = new HashSet<Persona> (direct_hash, direct_equal);
@@ -663,7 +665,7 @@ public class Folks.IndividualAggregator : Object
            * removed will be re-linked into other Individuals). */
           var ind = this._link_map.lookup (persona.iid);
           if (ind != null)
-            removed_individuals.prepend (ind);
+            removed_individuals.add (ind);
 
           /* Remove the Persona's links from the link map */
           this._remove_persona_from_link_map (persona);
@@ -725,7 +727,7 @@ public class Folks.IndividualAggregator : Object
           MapIterator<Individual, Individual> iter =
               replaced_individuals.map_iterator ();
           while (iter.next () == true)
-            removed_individuals.prepend (iter.get_key ());
+            removed_individuals.add (iter.get_key ());
         }
 
       /* Notify of changes to this.user */
@@ -733,7 +735,7 @@ public class Folks.IndividualAggregator : Object
 
       /* Signal the addition of new individuals and removal of old ones to the
        * aggregator */
-      if (added_individuals != null || removed_individuals != null)
+      if (added_individuals.size > 0 || removed_individuals.size > 0)
         {
           this.individuals_changed (added_individuals, removed_individuals,
               null, null, 0);
@@ -778,8 +780,8 @@ public class Folks.IndividualAggregator : Object
       if (this.individuals.lookup (i.id) != i)
         return;
 
-      var i_list = new GLib.List<Individual> ();
-      i_list.append (i);
+      var individuals = new HashSet<Individual> ();
+      individuals.add (i);
 
       if (replacement != null)
         {
@@ -793,7 +795,11 @@ public class Folks.IndividualAggregator : Object
 
       /* If the individual has 0 personas, we've already signaled removal */
       if (i.personas.size > 0)
-        this.individuals_changed (null, i_list, null, null, 0);
+        {
+          this.individuals_changed (new HashSet<Individual> (),
+              individuals, null, null, 0);
+        }
+
       this.individuals.remove (i.id);
     }
 
index a7c7938..f478af4 100644 (file)
@@ -62,7 +62,7 @@ public class IndividualRetrievalTests : Folks.TestCase
                 }
             }
 
-          assert (removed == null);
+          assert (removed.size == 0);
         });
       aggregator.prepare ();
 
@@ -98,11 +98,14 @@ public class IndividualRetrievalTests : Folks.TestCase
         {
           individuals_changed_count++;
 
-          assert (added.length () == 1);
-          assert (removed == null);
+          assert (added.size == 1);
+          assert (removed.size == 0);
 
           /* Check properties */
-          assert (added.data.alias == "Brian Briansson");
+          foreach (var i in added)
+            {
+              assert (i.alias == "Brian Briansson");
+            }
         });
       aggregator.prepare ();
 
index 7d2b4c6..2d109ea 100644 (file)
@@ -207,13 +207,17 @@ public class AggregationTests : Folks.TestCase
       aggregator.individuals_changed.connect ((added, removed, m, a, r) =>
         {
           debug ("individuals_changed after link: added:%u removed:%u",
-              added.length (), removed.length ());
-          assert (added.length () == 1);
-          assert (removed.length () == 2);
-          Individual i = added.nth_data (0);
-          assert (i.personas.size == 3);
-          debug ("individuals_changed: 1 individual containing %u personas",
-              i.personas.size);
+              added.size, removed.size);
+          assert (added.size == 1);
+          assert (removed.size == 2);
+
+          foreach (var i in added)
+            {
+              assert (i.personas.size == 3);
+              debug ("individuals_changed: 1 individual containing %u personas",
+                  i.personas.size);
+            }
+
           main_loop.quit ();
         });
 
index 2b6de39..2269543 100644 (file)
@@ -141,9 +141,9 @@ public class DummyLswTests : Folks.TestCase
           (added, removed, m, a, r) =>
         {
           debug ("Aggregator got some data!");
-          assert (added.length () == 2);
-          assert (removed.length () == 0);
-          foreach (Individual i in added)
+          assert (added.size == 2);
+          assert (removed.size == 0);
+          foreach (var i in added)
             {
               string nickname = ((Folks.NameDetails) i).nickname;
               if (nickname == "Gargantua")
@@ -233,9 +233,9 @@ public class DummyLswTests : Folks.TestCase
           (added, removed, m, a, r) =>
         {
           debug ("Aggregator deleted some data!");
-          assert (added.length () == 0);
-          assert (removed.length () == 2);
-          foreach (Individual i in removed)
+          assert (added.size == 0);
+          assert (removed.size == 2);
+          foreach (var i in removed)
             {
               string nickname = ((Folks.NameDetails) i).nickname;
               debug ("deleted nickname: %s", nickname);
index 87b5202..d7cfa94 100644 (file)
@@ -71,7 +71,7 @@ public class IndividualPropertiesTests : Folks.TestCase
               assert (i.groups.contains ("Francophones") == true);
             }
 
-          assert (removed == null);
+          assert (removed.size == 0);
         });
       aggregator.prepare ();
 
@@ -123,10 +123,10 @@ public class IndividualPropertiesTests : Folks.TestCase
 
               /* the contact list this aggregator is based upon has exactly 1
                * Tpf.Persona per Individual */
-              Persona persona = null;
+              Folks.Persona persona = null;
               foreach (var p in i.personas)
                 {
-                  persona = i;
+                  persona = p;
                   break;
                 }
               assert (persona is Tpf.Persona);
@@ -137,7 +137,7 @@ public class IndividualPropertiesTests : Folks.TestCase
               ((Tpf.Persona) persona).alias = new_alias;
             }
 
-          assert (removed == null);
+          assert (removed.size == 0);
         });
       aggregator.prepare ();
 
@@ -191,10 +191,10 @@ public class IndividualPropertiesTests : Folks.TestCase
 
               /* the contact list this aggregator is based upon has exactly 1
                * Tpf.Persona per Individual */
-              Persona persona = null;
+              Folks.Persona persona = null;
               foreach (var p in i.personas)
                 {
-                  persona = i;
+                  persona = p;
                   break;
                 }
               assert (persona is Tpf.Persona);
@@ -206,7 +206,7 @@ public class IndividualPropertiesTests : Folks.TestCase
               this.tp_backend.connection.manager.set_alias (handle, new_alias);
             }
 
-          assert (removed == null);
+          assert (removed.size == 0);
         });
       aggregator.prepare ();
 
index 48bde9e..3c01685 100644 (file)
@@ -69,7 +69,7 @@ public class IndividualRetrievalTests : Folks.TestCase
           foreach (Individual i in added)
             expected_individuals.remove (i.id);
 
-          assert (removed == null);
+          assert (removed.size == 0);
         });
 
       /* Kill the main loop after a few seconds. If there are still individuals
@@ -139,7 +139,7 @@ public class IndividualRetrievalTests : Folks.TestCase
                 }
             }
 
-          assert (removed == null);
+          assert (removed.size == 0);
         });
 
       /* Kill the main loop after a few seconds. If there are still individuals
index 7ce6c87..3f6040c 100644 (file)
@@ -91,13 +91,13 @@ public class AddContactTests : Folks.TestCase
     }
 
   private void _individuals_changed_cb
-      (GLib.List<Individual>? added,
-       GLib.List<Individual>? removed,
+      (Set<Individual> added,
+       Set<Individual> removed,
        string? message,
        Persona? actor,
        GroupDetails.ChangeReason reason)
     {
-      foreach (unowned Individual i in added)
+      foreach (var i in added)
         {
           string full_name = i.full_name;
           i.notify["full-name"].connect (this._notify_full_name_cb);
@@ -111,7 +111,7 @@ public class AddContactTests : Folks.TestCase
             }
         }
 
-        assert (removed == null);
+        assert (removed.size == 0);
     }
 
   private void _notify_full_name_cb ()
index ac8167a..567ed8a 100644 (file)
@@ -305,13 +305,13 @@ public class AddPersonaTests : Folks.TestCase
     }
 
   private void _individuals_changed_cb
-      (GLib.List<Individual>? added,
-       GLib.List<Individual>? removed,
+      (Set<Individual> added,
+       Set<Individual> removed,
        string? message,
        Persona? actor,
        GroupDetails.ChangeReason reason)
     {
-      foreach (unowned Individual i in added)
+      foreach (var i in added)
         {
           if (i.is_user == false)
             {
@@ -352,7 +352,7 @@ public class AddPersonaTests : Folks.TestCase
             }
         }
 
-      assert (removed == null);
+      assert (removed.size == 0);
     }
 
   private void _notify_cb (Object individual_obj, ParamSpec ps)
index fa28286..2621766 100644 (file)
@@ -110,13 +110,13 @@ public class AdditionalNamesUpdatesTests : Folks.TestCase
     }
 
   private void _individuals_changed_cb
-      (GLib.List<Individual>? added,
-       GLib.List<Individual>? removed,
+      (Set<Individual> added,
+       Set<Individual> removed,
        string? message,
        Persona? actor,
        GroupDetails.ChangeReason reason)
     {
-      foreach (unowned Individual i in added)
+      foreach (var i in added)
         {
           if (this._initial_fullname == i.full_name)
             {
@@ -134,7 +134,7 @@ public class AdditionalNamesUpdatesTests : Folks.TestCase
             }
         }
 
-      assert (removed == null);
+      assert (removed.size == 0);
     }
 
   private void _notify_additional_names_cb (Object sname_obj, ParamSpec ps)
index 5fd0f33..c981f9f 100644 (file)
@@ -97,13 +97,13 @@ public class AvatarDetailsInterfaceTests : Folks.TestCase
     }
 
   private void _individuals_changed_cb
-      (GLib.List<Individual>? added,
-       GLib.List<Individual>? removed,
+      (Set<Individual> added,
+       Set<Individual> removed,
        string? message,
        Persona? actor,
        GroupDetails.ChangeReason reason)
     {
-      foreach (Individual i in added)
+      foreach (var i in added)
         {
           string full_name = ((Folks.NameDetails) i).full_name;
           if (full_name != null)
index 8f77cc4..f2dfce0 100644 (file)
@@ -110,13 +110,13 @@ public class AvatarUpdatesTests : Folks.TestCase
     }
 
   private void _individuals_changed_cb
-      (GLib.List<Individual>? added,
-       GLib.List<Individual>? removed,
+      (Set<Individual> added,
+       Set<Individual> removed,
        string? message,
        Persona? actor,
        GroupDetails.ChangeReason reason)
     {
-      foreach (unowned Individual i in added)
+      foreach (var i in added)
         {
           if (i.full_name == this._initial_fullname)
             {
@@ -145,7 +145,7 @@ public class AvatarUpdatesTests : Folks.TestCase
                 }
             }
 
-          assert (removed == null);
+          assert (removed.size == 0);
         }
     }
 
index b6ab65c..ff45851 100644 (file)
@@ -102,13 +102,13 @@ public class BirthdayDetailsInterfaceTests : Folks.TestCase
     }
 
   private void _individuals_changed_cb
-      (GLib.List<Individual>? added,
-       GLib.List<Individual>? removed,
+      (Set<Individual> added,
+       Set<Individual> removed,
        string? message,
        Persona? actor,
        GroupDetails.ChangeReason reason)
     {
-      foreach (Individual i in added)
+      foreach (var i in added)
         {
           if (i.full_name == this._fullname)
             {
@@ -123,7 +123,7 @@ public class BirthdayDetailsInterfaceTests : Folks.TestCase
                 }
             }
         }
-        assert (removed == null);
+        assert (removed.size == 0);
     }
 
   void _notify_birthday_cb (Object individual_obj, ParamSpec ps)
index 7562970..317ef6c 100644 (file)
@@ -120,13 +120,13 @@ public class BirthdayUpdatesTests : Folks.TestCase
     }
 
   private void _individuals_changed_cb
-      (GLib.List<Individual>? added,
-       GLib.List<Individual>? removed,
+      (Set<Individual> added,
+       Set<Individual> removed,
        string? message,
        Persona? actor,
        GroupDetails.ChangeReason reason)
     {
-      foreach (unowned Individual i in added)
+      foreach (var i in added)
         {
           if (i.full_name == this._initial_fullname)
             {
@@ -141,7 +141,7 @@ public class BirthdayUpdatesTests : Folks.TestCase
                 }
             }
         }
-        assert (removed == null);
+        assert (removed.size == 0);
     }
 
   void _notify_birthday_cb (Object individual_obj, ParamSpec ps)
index bacd4d0..da8a198 100644 (file)
@@ -99,13 +99,13 @@ public class DefaultContactTests : Folks.TestCase
     }
 
   private void _individuals_changed_cb
-      (GLib.List<Individual>? added,
-       GLib.List<Individual>? removed,
+      (Set<Individual> added,
+       Set<Individual> removed,
        string? message,
        Persona? actor,
        GroupDetails.ChangeReason reason)
     {
-      foreach (Individual i in added)
+      foreach (var i in added)
         {
           string full_name = i.full_name;
           if (full_name != null && full_name == this._fullname_persona
@@ -127,7 +127,7 @@ public class DefaultContactTests : Folks.TestCase
             this._found_default_user)
           this._main_loop.quit ();
 
-        assert (removed == null);
+        assert (removed.size == 0);
     }
 }
 
index d7fbeff..ee9d9d7 100644 (file)
@@ -101,13 +101,13 @@ public class DuplicatedEmailsTests : Folks.TestCase
     }
 
   private void _individuals_changed_cb
-      (GLib.List<Individual>? added,
-       GLib.List<Individual>? removed,
+      (Set<Individual> added,
+       Set<Individual> removed,
        string? message,
        Persona? actor,
        GroupDetails.ChangeReason reason)
     {
-      foreach (unowned Individual i in added)
+      foreach (var i in added)
         {
           if (i.full_name == this._persona_fullname_1)
             {
@@ -125,7 +125,7 @@ public class DuplicatedEmailsTests : Folks.TestCase
           this._main_loop.quit ();
         }
 
-      assert (removed == null);
+      assert (removed.size == 0);
     }
 
   private void _notify_pstore_cb (Object _pstore, ParamSpec ps)
index cbecc44..75f5c7e 100644 (file)
@@ -101,13 +101,13 @@ public class DuplicatedPhonesTests : Folks.TestCase
     }
 
   private void _individuals_changed_cb
-      (GLib.List<Individual>? added,
-       GLib.List<Individual>? removed,
+      (Set<Individual> added,
+       Set<Individual> removed,
        string? message,
        Persona? actor,
        GroupDetails.ChangeReason reason)
     {
-      foreach (unowned Individual i in added)
+      foreach (var i in added)
         {
           if (i.full_name == this._persona_fullname_1)
             {
@@ -125,7 +125,7 @@ public class DuplicatedPhonesTests : Folks.TestCase
           this._main_loop.quit ();
         }
 
-      assert (removed == null);
+      assert (removed.size == 0);
     }
 
   private void _notify_pstore_cb (Object _pstore, ParamSpec ps)
index a2f3821..56cbb31 100644 (file)
@@ -101,13 +101,13 @@ public class EmailDetailsInterfaceTests : Folks.TestCase
     }
 
   private void _individuals_changed_cb
-      (GLib.List<Individual>? added,
-       GLib.List<Individual>? removed,
+      (Set<Individual> added,
+       Set<Individual> removed,
        string? message,
        Persona? actor,
        GroupDetails.ChangeReason reason)
     {
-      foreach (Individual i in added)
+      foreach (var i in added)
         {
           string full_name = i.full_name;
           if (full_name != null)
@@ -128,7 +128,7 @@ public class EmailDetailsInterfaceTests : Folks.TestCase
             }
         }
 
-        assert (removed == null);
+        assert (removed.size == 0);
 
         if (this._found_email_1 &&
             this._found_email_2 &&
index 8ff60c9..56188d0 100644 (file)
@@ -125,13 +125,13 @@ public class EmailsUpdatesTests : Folks.TestCase
     }
 
   private void _individuals_changed_cb
-      (GLib.List<Individual>? added,
-       GLib.List<Individual>? removed,
+      (Set<Individual> added,
+       Set<Individual> removed,
        string? message,
        Persona? actor,
        GroupDetails.ChangeReason reason)
     {
-      foreach (unowned Individual i in added)
+      foreach (var i in added)
         {
           if (i.full_name == this._initial_fullname_1)
             {
@@ -172,7 +172,7 @@ public class EmailsUpdatesTests : Folks.TestCase
             }
         }
 
-      assert (removed == null);
+      assert (removed.size == 0);
     }
 
   private void _notify_email_cb (Object individual_obj, ParamSpec ps)
index 9801863..d65fcff 100644 (file)
@@ -109,13 +109,13 @@ public class FamilyNameUpdatesTests : Folks.TestCase
     }
 
   private void _individuals_changed_cb
-      (GLib.List<Individual>? added,
-       GLib.List<Individual>? removed,
+      (Set<Individual> added,
+       Set<Individual> removed,
        string? message,
        Persona? actor,
        GroupDetails.ChangeReason reason)
     {
-      foreach (unowned Individual i in added)
+      foreach (var i in added)
         {
           if (this._initial_fullname == i.full_name)
             {
@@ -131,7 +131,8 @@ public class FamilyNameUpdatesTests : Folks.TestCase
                 }
             }
         }
-      assert (removed == null);
+
+      assert (removed.size == 0);
     }
 
   private void _notify_family_name_cb (Object individual_obj, ParamSpec ps)
index 3994f8e..a87ff1e 100644 (file)
@@ -115,13 +115,13 @@ public class FavouriteDetailsInterfaceTests : Folks.TestCase
     }
 
   private void _individuals_changed_cb
-      (GLib.List<Individual>? added,
-       GLib.List<Individual>? removed,
+      (Set<Individual> added,
+       Set<Individual> removed,
        string? message,
        Persona? actor,
        GroupDetails.ChangeReason reason)
     {
-      foreach (Individual i in added)
+      foreach (var i in added)
         {
           string full_name = i.full_name;
           if (full_name != null)
@@ -144,7 +144,7 @@ public class FavouriteDetailsInterfaceTests : Folks.TestCase
             }
         }
 
-        assert (removed == null);
+        assert (removed.size == 0);
 
         if (this._found_p1 &&
             this._found_p2 &&
index 32fd628..bc01465 100644 (file)
@@ -117,13 +117,13 @@ public class FavouriteUpdatesTests : Folks.TestCase
     }
 
   private void _individuals_changed_cb
-      (GLib.List<Individual>? added,
-       GLib.List<Individual>? removed,
+      (Set<Individual> added,
+       Set<Individual> removed,
        string? message,
        Persona? actor,
        GroupDetails.ChangeReason reason)
     {
-      foreach (unowned Individual i in added)
+      foreach (var i in added)
         {
           if (i.full_name == this._initial_fullname_1)
             {
@@ -148,7 +148,7 @@ public class FavouriteUpdatesTests : Folks.TestCase
             }
         }
 
-        assert (removed == null);
+        assert (removed.size == 0);
     }
 
   private void _notify_favourite_cb (Object individual_obj, ParamSpec ps)
index 30cfd63..589ab27 100644 (file)
@@ -107,13 +107,13 @@ public class FullnameUpdatesTests : Folks.TestCase
     }
 
   private void _individuals_changed_cb
-      (GLib.List<Individual>? added,
-       GLib.List<Individual>? removed,
+      (Set<Individual> added,
+       Set<Individual> removed,
        string? message,
        Persona? actor,
        GroupDetails.ChangeReason reason)
     {
-      foreach (unowned Individual i in added)
+      foreach (var i in added)
         {
           if (i.full_name == this._initial_fullname)
             {
@@ -125,7 +125,7 @@ public class FullnameUpdatesTests : Folks.TestCase
             }
         }
 
-        assert (removed == null);
+        assert (removed.size == 0);
     }
 
   private void _notify_full_name_cb (Object individual_obj, ParamSpec ps)
index 5644277..62ab78b 100644 (file)
@@ -98,13 +98,13 @@ public class GenderDetailsInterfaceTests : Folks.TestCase
     }
 
   private void _individuals_changed_cb
-      (GLib.List<Individual>? added,
-       GLib.List<Individual>? removed,
+      (Set<Individual> added,
+       Set<Individual> removed,
        string? message,
        Persona? actor,
        GroupDetails.ChangeReason reason)
     {
-      foreach (unowned Individual i in added)
+      foreach (var i in added)
         {
           if (i.full_name == this._fullname)
             {
@@ -116,7 +116,7 @@ public class GenderDetailsInterfaceTests : Folks.TestCase
                 }
             }
         }
-      assert (removed == null);
+      assert (removed.size == 0);
     }
 
   void _notify_gender_cb (Object individual_obj, ParamSpec ps)
index 9ed9d27..d9403d2 100644 (file)
@@ -108,13 +108,13 @@ public class GivenNameUpdatesTests : Folks.TestCase
     }
 
   private void _individuals_changed_cb
-      (GLib.List<Individual>? added,
-       GLib.List<Individual>? removed,
+      (Set<Individual> added,
+       Set<Individual> removed,
        string? message,
        Persona? actor,
        GroupDetails.ChangeReason reason)
     {
-      foreach (unowned Individual i in added)
+      foreach (var i in added)
         {
           if (this._initial_fullname == i.full_name)
             {
@@ -131,7 +131,7 @@ public class GivenNameUpdatesTests : Folks.TestCase
             }
         }
 
-      assert (removed == null);
+      assert (removed.size == 0);
     }
 
   private void _notify_given_name_cb (Object individual_obj, ParamSpec ps)
index 58a63ca..f02f727 100644 (file)
@@ -103,13 +103,13 @@ public class ImDetailsInterfaceTests : Folks.TestCase
     }
 
   private void _individuals_changed_cb
-      (GLib.List<Individual>? added,
-       GLib.List<Individual>? removed,
+      (Set<Individual> added,
+       Set<Individual> removed,
        string? message,
        Persona? actor,
        GroupDetails.ChangeReason reason)
     {
-      foreach (Individual i in added)
+      foreach (var i in added)
         {
           string full_name = i.full_name;
           if (full_name == this._fullname)
@@ -138,7 +138,7 @@ public class ImDetailsInterfaceTests : Folks.TestCase
             }
         }
 
-      assert (removed == null);
+      assert (removed.size == 0);
 
       if (this._num_addrs == 2 &&
           this._found_addr_1 == true &&
index 878d7e7..f8e09e9 100644 (file)
@@ -111,13 +111,13 @@ public class IMAddressesUpdatesTests : Folks.TestCase
     }
 
   private void _individuals_changed_cb
-      (GLib.List<Individual>? added,
-       GLib.List<Individual>? removed,
+      (Set<Individual> added,
+       Set<Individual> removed,
        string? message,
        Persona? actor,
        GroupDetails.ChangeReason reason)
     {
-      foreach (unowned Individual i in added)
+      foreach (var i in added)
         {
           if (i.full_name == this._initial_fullname_1)
             {
@@ -136,7 +136,7 @@ public class IMAddressesUpdatesTests : Folks.TestCase
             }
         }
 
-      assert (removed == null);
+      assert (removed.size == 0);
     }
 
   private void _notify_im_cb (Object individual_obj, ParamSpec ps)
index 41f80bf..1745ab4 100644 (file)
@@ -94,13 +94,13 @@ public class IndividualRetrievalTests : Folks.TestCase
     }
 
   private void _individuals_changed_cb
-      (GLib.List<Individual>? added,
-       GLib.List<Individual>? removed,
+      (Set<Individual> added,
+       Set<Individual> removed,
        string? message,
        Persona? actor,
        GroupDetails.ChangeReason reason)
     {
-      foreach (Individual i in added)
+      foreach (var i in added)
         {
           string full_name = ((Folks.NameDetails) i).full_name;
           if (full_name != null)
@@ -121,7 +121,7 @@ public class IndividualRetrievalTests : Folks.TestCase
             this._c2.size == 0)
           this._main_loop.quit ();
 
-        assert (removed == null);
+        assert (removed.size == 0);
     }
 }
 
index 0046f49..b196df5 100644 (file)
@@ -189,13 +189,13 @@ public class LinkPersonasViaLocalIDsTests : Folks.TestCase
     }
 
   private void _individuals_changed_cb
-      (GLib.List<Individual>? added,
-       GLib.List<Individual>? removed,
+      (Set<Individual> added,
+       Set<Individual> removed,
        string? message,
        Persona? actor,
        GroupDetails.ChangeReason reason)
     {
-      foreach (unowned Individual i in added)
+      foreach (var i in added)
         {
           /* Lets listen to notifications from those individuals
            * which aren't the default (Tracker) user */
@@ -207,8 +207,8 @@ public class LinkPersonasViaLocalIDsTests : Folks.TestCase
             }
         }
 
-      if (removed != null)
-        this._removed_individuals += (int) removed.length ();
+      if (removed.size > 0)
+        this._removed_individuals += (int) removed.size;
     }
 
   private void _notify_cb (Object individual_obj, ParamSpec ps)
@@ -229,21 +229,28 @@ public class LinkPersonasViaLocalIDsTests : Folks.TestCase
    */
   private void _check_personas (Individual i)
     {
+      Persona first_persona = null;
+      foreach (var p in i.personas)
+        {
+          first_persona = p;
+          break;
+        }
+
       if (i.full_name == this._persona_fullname_1 &&
           this._persona_uid_1 == "")
         {
-          this._persona_uid_1 = i.personas.nth_data (0).uid;
-          this._personas.prepend (i.personas.nth_data (0));
+          this._persona_uid_1 = first_persona.uid;
+          this._personas.prepend (first_persona);
           this._local_ids.add (this._persona_uid_1);
         }
       else if (i.full_name == this._persona_fullname_2 &&
           this._persona_uid_2 == "")
         {
-          this._persona_uid_2 = i.personas.nth_data (0).uid;
-          this._personas.prepend (i.personas.nth_data (0));
+          this._persona_uid_2 = first_persona.uid;
+          this._personas.prepend (first_persona);
           this._local_ids.add (this._persona_uid_2);
         }
-      else if (i.personas.length () > 1)
+      else if (i.personas.size > 1)
         {
           /* Lets check if it contains all the linking properties */
           foreach (var id in i.local_ids)
index e966a52..f857c8f 100644 (file)
@@ -205,13 +205,13 @@ public class LinkPersonasTests : Folks.TestCase
     }
 
   private void _individuals_changed_cb
-      (GLib.List<Individual>? added,
-       GLib.List<Individual>? removed,
+      (Set<Individual> added,
+       Set<Individual> removed,
        string? message,
        Persona? actor,
        GroupDetails.ChangeReason reason)
     {
-      foreach (unowned Individual i in added)
+      foreach (var i in added)
         {
           /* Lets listen to notifications from those individuals
            * which aren't the default (Tracker) user */
@@ -223,8 +223,8 @@ public class LinkPersonasTests : Folks.TestCase
             }
         }
 
-      if (removed != null)
-        this._removed_individuals += (int) removed.length ();
+      if (removed.size > 0)
+        this._removed_individuals += (int) removed.size;
     }
 
   private void _notify_cb (Object individual_obj, ParamSpec ps)
@@ -245,19 +245,26 @@ public class LinkPersonasTests : Folks.TestCase
    */
   private void _check_personas (Individual i)
     {
+      Persona first_persona = null;
+      foreach (var p in i.personas)
+        {
+          first_persona = p;
+          break;
+        }
+
       if (i.full_name == this._persona_fullname_1 &&
           this._persona_iid_1 == "")
         {
-          this._persona_iid_1 = i.personas.nth_data (0).iid;
-          this._personas.prepend (i.personas.nth_data (0));
+          this._persona_iid_1 = first_persona.iid;
+          this._personas.prepend (first_persona);
         }
       else if (i.full_name == this._persona_fullname_2 &&
           this._persona_iid_2 == "")
         {
-          this._persona_iid_2 = i.personas.nth_data (0).iid;
-          this._personas.prepend (i.personas.nth_data (0));
+          this._persona_iid_2 = first_persona.iid;
+          this._personas.prepend (first_persona);
         }
-      else if (i.personas.length () > 1)
+      else if (i.personas.size > 1)
         {
           /* Lets check if it contains all the linking properties */
           foreach (var proto in i.im_addresses.get_keys ())
index 7c8a4ac..bb56e75 100644 (file)
@@ -127,13 +127,13 @@ public class MatchAllTests : Folks.TestCase
     }
 
   private void _individuals_changed_cb
-      (GLib.List<Individual>? added,
-       GLib.List<Individual>? removed,
+      (Set<Individual> added,
+       Set<Individual> removed,
        string? message,
        Persona? actor,
        GroupDetails.ChangeReason reason)
     {
-      foreach (unowned Individual i in added)
+      foreach (var i in added)
         {
           if (i.full_name == this._persona_fullname_1)
             {
@@ -161,7 +161,7 @@ public class MatchAllTests : Folks.TestCase
           this._try_match_all ();
         }
 
-      assert (removed == null);
+      assert (removed.size == 0);
     }
 
   private void _try_match_all ()
index 528be46..606fe10 100644 (file)
@@ -102,13 +102,13 @@ public class MatchEmailAddressesTests : Folks.TestCase
     }
 
   private void _individuals_changed_cb
-      (GLib.List<Individual>? added,
-       GLib.List<Individual>? removed,
+      (Set<Individual> added,
+       Set<Individual> removed,
        string? message,
        Persona? actor,
        GroupDetails.ChangeReason reason)
     {
-      foreach (unowned Individual i in added)
+      foreach (var i in added)
         {
           if (i.full_name == this._persona_fullname_1)
             {
@@ -126,7 +126,7 @@ public class MatchEmailAddressesTests : Folks.TestCase
           this._try_potential_match ();
         }
 
-      assert (removed == null);
+      assert (removed.size == 0);
     }
 
   private void _try_potential_match ()
index c2b9784..fb38ee0 100644 (file)
@@ -102,13 +102,13 @@ public class MatchIMAddressesTests : Folks.TestCase
     }
 
   private void _individuals_changed_cb
-      (GLib.List<Individual>? added,
-       GLib.List<Individual>? removed,
+      (Set<Individual> added,
+       Set<Individual> removed,
        string? message,
        Persona? actor,
        GroupDetails.ChangeReason reason)
     {
-      foreach (unowned Individual i in added)
+      foreach (var i in added)
         {
           if (i.full_name == this._persona_fullname_1)
             {
@@ -126,7 +126,7 @@ public class MatchIMAddressesTests : Folks.TestCase
           this._try_potential_match ();
         }
 
-      assert (removed == null);
+      assert (removed.size == 0);
     }
 
   private void _try_potential_match ()
index 31a7557..7c75937 100644 (file)
@@ -110,13 +110,13 @@ public class MatchKnownEmailsTests : Folks.TestCase
     }
 
   private void _individuals_changed_cb
-      (GLib.List<Individual>? added,
-       GLib.List<Individual>? removed,
+      (Set<Individual> added,
+       Set<Individual> removed,
        string? message,
        Persona? actor,
        GroupDetails.ChangeReason reason)
     {
-      foreach (unowned Individual i in added)
+      foreach (var i in added)
         {
           if (i.full_name == this._persona_fullname_1)
             {
@@ -134,7 +134,7 @@ public class MatchKnownEmailsTests : Folks.TestCase
           this._try_potential_match ();
         }
 
-      assert (removed == null);
+      assert (removed.size == 0);
     }
 
   private void _try_potential_match ()
index 702488b..7c58a0e 100644 (file)
@@ -165,13 +165,13 @@ public class MatchNameTests : Folks.TestCase
     }
 
   private void _individuals_changed_cb
-      (GLib.List<Individual>? added,
-       GLib.List<Individual>? removed,
+      (Set<Individual> added,
+       Set<Individual> removed,
        string? message,
        Persona? actor,
        GroupDetails.ChangeReason reason)
     {
-      foreach (unowned Individual i in added)
+      foreach (var i in added)
         {
           if (i.full_name == this._persona_fullname_1)
             {
@@ -189,7 +189,7 @@ public class MatchNameTests : Folks.TestCase
           this._try_potential_match ();
         }
 
-      assert (removed == null);
+      assert (removed.size == 0);
     }
 
   private void _try_potential_match ()
index 2bd0d07..907f2c5 100644 (file)
@@ -104,13 +104,13 @@ public class MatchPhoneNumberTests : Folks.TestCase
     }
 
   private void _individuals_changed_cb
-      (GLib.List<Individual>? added,
-       GLib.List<Individual>? removed,
+      (Set<Individual> added,
+       Set<Individual> removed,
        string? message,
        Persona? actor,
        GroupDetails.ChangeReason reason)
     {
-      foreach (unowned Individual i in added)
+      foreach (var i in added)
         {
           if (i.full_name == this._persona_fullname_1)
             {
@@ -128,7 +128,7 @@ public class MatchPhoneNumberTests : Folks.TestCase
           this._try_potential_match ();
         }
 
-      assert (removed == null);
+      assert (removed.size == 0);
     }
 
   private void _try_potential_match ()
index 54d2530..3ab9219 100644 (file)
@@ -102,13 +102,13 @@ public class NameDetailsInterfaceTests : Folks.TestCase
     }
 
   private void _individuals_changed_cb
-      (GLib.List<Individual>? added,
-       GLib.List<Individual>? removed,
+      (Set<Individual> added,
+       Set<Individual> removed,
        string? message,
        Persona? actor,
        GroupDetails.ChangeReason reason)
     {
-      foreach (Individual i in added)
+      foreach (var i in added)
         {
           string full_name = ((Folks.NameDetails) i).full_name;
           if (full_name != null)
@@ -155,7 +155,7 @@ public class NameDetailsInterfaceTests : Folks.TestCase
             }
         }
 
-      assert (removed == null);
+      assert (removed.size == 0);
 
       if (this._c1.size == 0 &&
           this._c2.size == 0)
index deaafa9..7ab2e5d 100644 (file)
@@ -102,13 +102,13 @@ public class NicknameUpdatesTests : Folks.TestCase
     }
 
   private void _individuals_changed_cb
-      (GLib.List<Individual>? added,
-       GLib.List<Individual>? removed,
+      (Set<Individual> added,
+       Set<Individual> removed,
        string? message,
        Persona? actor,
        GroupDetails.ChangeReason reason)
     {
-      foreach (unowned Individual i in added)
+      foreach (var i in added)
         {
           if (i.full_name == this._initial_fullname)
             {
@@ -132,7 +132,7 @@ public class NicknameUpdatesTests : Folks.TestCase
             }
         }
 
-      assert (removed == null);
+      assert (removed.size == 0);
     }
 
   private void _notify_nickname_cb (Object individual_obj, ParamSpec ps)
index da8ec55..8ce0882 100644 (file)
@@ -99,13 +99,13 @@ public class NoteDetailsInterfaceTests : Folks.TestCase
     }
 
   private void _individuals_changed_cb
-      (GLib.List<Individual>? added,
-       GLib.List<Individual>? removed,
+      (Set<Individual> added,
+       Set<Individual> removed,
        string? message,
        Persona? actor,
        GroupDetails.ChangeReason reason)
     {
-      foreach (unowned Individual i in added)
+      foreach (var i in added)
         {
           if (i.full_name == this._fullname)
             {
@@ -121,7 +121,7 @@ public class NoteDetailsInterfaceTests : Folks.TestCase
             }
         }
 
-      assert (removed == null);
+      assert (removed.size == 0);
     }
 
   void _notify_note_cb (Object individual_obj, ParamSpec ps)
index e37cc2c..8f5606d 100644 (file)
@@ -100,13 +100,13 @@ public class PhoneDetailsInterfaceTests : Folks.TestCase
     }
 
   private void _individuals_changed_cb
-      (GLib.List<Individual>? added,
-       GLib.List<Individual>? removed,
+      (Set<Individual> added,
+       Set<Individual> removed,
        string? message,
        Persona? actor,
        GroupDetails.ChangeReason reason)
     {
-      foreach (Individual i in added)
+      foreach (var i in added)
         {
           string full_name = i.full_name;
           if (full_name != null)
@@ -127,7 +127,7 @@ public class PhoneDetailsInterfaceTests : Folks.TestCase
             }
         }
 
-      assert (removed == null);
+      assert (removed.size == 0);
 
       if (this._num_phones == 2 &&
           this._found_phone_1 == true &&
index d1eae86..35679f1 100644 (file)
@@ -111,13 +111,13 @@ public class PhonesUpdatesTests : Folks.TestCase
     }
 
   private void _individuals_changed_cb
-      (GLib.List<Individual>? added,
-       GLib.List<Individual>? removed,
+      (Set<Individual> added,
+       Set<Individual> removed,
        string? message,
        Persona? actor,
        GroupDetails.ChangeReason reason)
     {
-      foreach (unowned Individual i in added)
+      foreach (var i in added)
         {
           if (i.full_name == this._initial_fullname_1)
             {
@@ -136,7 +136,7 @@ public class PhonesUpdatesTests : Folks.TestCase
                 }
             }
         }
-      assert (removed == null);
+      assert (removed.size == 0);
     }
 
   private void _notify_phones_cb (Object individual_obj, ParamSpec ps)
index 8b9d023..dd021c2 100644 (file)
@@ -132,13 +132,13 @@ public class PostalAddressDetailsInterfaceTests : Folks.TestCase
     }
 
   private void _individuals_changed_cb
-      (GLib.List<Individual>? added,
-       GLib.List<Individual>? removed,
+      (Set<Individual> added,
+       Set<Individual> removed,
        string? message,
        Persona? actor,
        GroupDetails.ChangeReason reason)
     {
-      foreach (Individual i in added)
+      foreach (var i in added)
         {
           if (i.full_name == this._fullname)
             {
@@ -159,7 +159,7 @@ public class PostalAddressDetailsInterfaceTests : Folks.TestCase
             }
         }
 
-      assert (removed == null);
+      assert (removed.size == 0);
     }
 }
 
index 82e655a..e890a43 100644 (file)
@@ -108,13 +108,13 @@ public class PrefixNameUpdatesTests : Folks.TestCase
     }
 
   private void _individuals_changed_cb
-      (GLib.List<Individual>? added,
-       GLib.List<Individual>? removed,
+      (Set<Individual> added,
+       Set<Individual> removed,
        string? message,
        Persona? actor,
        GroupDetails.ChangeReason reason)
     {
-      foreach (unowned Individual i in added)
+      foreach (var i in added)
         {
           if (this._initial_fullname == i.full_name)
             {
@@ -130,7 +130,7 @@ public class PrefixNameUpdatesTests : Folks.TestCase
                 }
             }
         }
-      assert (removed == null);
+      assert (removed.size == 0);
     }
 
   private void _notify_prefix_name_cb (Object individual_obj, ParamSpec ps)
index cab9ac9..d91bfbb 100644 (file)
@@ -98,13 +98,13 @@ public class RemoveContactTests : Folks.TestCase
     }
 
   private void _individuals_changed_cb
-      (GLib.List<Individual>? added,
-       GLib.List<Individual>? removed,
+      (Set<Individual> added,
+       Set<Individual> removed,
        string? message,
        Persona? actor,
        GroupDetails.ChangeReason reason)
     {
-      foreach (unowned Individual i in added)
+      foreach (var i in added)
         {
           string full_name = i.full_name;
           if (full_name == this._persona_fullname)
@@ -119,7 +119,7 @@ public class RemoveContactTests : Folks.TestCase
             }
         }
 
-      foreach (unowned Individual i in added)
+      foreach (Individual i in added)
         {
           if (i.id == this._individual_id)
             {
index 5c5ab78..5bc7770 100644 (file)
@@ -155,13 +155,13 @@ public class RemovePersonaTests : Folks.TestCase
     }
 
   private void _individuals_changed_cb
-      (GLib.List<Individual>? added,
-       GLib.List<Individual>? removed,
+      (Set<Individual> added,
+       Set<Individual> removed,
        string? message,
        Persona? actor,
        GroupDetails.ChangeReason reason)
     {
-      foreach (unowned Individual i in added)
+      foreach (var i in added)
         {
           if (i.full_name == this._persona_fullname)
             {
@@ -183,7 +183,7 @@ public class RemovePersonaTests : Folks.TestCase
             }
         }
 
-      foreach (unowned Individual i in removed)
+      foreach (var i in removed)
         {
           if (i.id == this._individual_id)
             {
index ebe9c1a..17e7013 100644 (file)
@@ -99,13 +99,13 @@ public class RoleDetailsInterfaceTests : Folks.TestCase
     }
 
   private void _individuals_changed_cb
-      (GLib.List<Individual>? added,
-       GLib.List<Individual>? removed,
+      (Set<Individual> added,
+       Set<Individual> removed,
        string? message,
        Persona? actor,
        GroupDetails.ChangeReason reason)
     {
-      foreach (Individual i in added)
+      foreach (var i in added)
         {
           if (i.full_name == this._fullname)
             {
@@ -121,7 +121,7 @@ public class RoleDetailsInterfaceTests : Folks.TestCase
             }
         }
 
-      assert (removed == null);
+      assert (removed.size == 0);
     }
 }
 
index 0effd35..fbb7f49 100644 (file)
@@ -108,13 +108,13 @@ public class SetAliasTests : Folks.TestCase
     }
 
  private void _individuals_changed_cb
-      (GLib.List<Individual>? added,
-       GLib.List<Individual>? removed,
+      (Set<Individual> added,
+       Set<Individual> removed,
        string? message,
        Persona? actor,
        GroupDetails.ChangeReason reason)
     {
-      foreach (unowned Individual i in added)
+      foreach (var i in added)
         {
           if (i.full_name == this._persona_fullname)
             {
@@ -146,7 +146,7 @@ public class SetAliasTests : Folks.TestCase
             }
         }
 
-      assert (removed == null);
+      assert (removed.size == 0);
     }
 
   private void _notify_alias_cb (Object persona, ParamSpec ps)
index b03f850..533c2ca 100644 (file)
@@ -98,13 +98,13 @@ public class SetAvatarTests : Folks.TestCase
     }
 
   private void _individuals_changed_cb
-      (GLib.List<Individual>? added,
-       GLib.List<Individual>? removed,
+      (Set<Individual> added,
+       Set<Individual> removed,
        string? message,
        Persona? actor,
        GroupDetails.ChangeReason reason)
     {
-      foreach (unowned Individual i in added)
+      foreach (var i in added)
         {
           if (i.full_name == this._persona_fullname)
             {
@@ -117,7 +117,7 @@ public class SetAvatarTests : Folks.TestCase
             }
         }
 
-      assert (removed == null);
+      assert (removed.size == 0);
     }
 
   private void _notify_avatar_cb (Object individual_obj, ParamSpec ps)
index a3c88e0..3fec54f 100644 (file)
@@ -102,13 +102,13 @@ public class SetBirthdayTests : Folks.TestCase
     }
 
  private void _individuals_changed_cb
-      (GLib.List<Individual>? added,
-       GLib.List<Individual>? removed,
+      (Set<Individual> added,
+       Set<Individual> removed,
        string? message,
        Persona? actor,
        GroupDetails.ChangeReason reason)
     {
-      foreach (unowned Individual i in added)
+      foreach (var i in added)
         {
           if (i.full_name == this._persona_fullname)
             {
@@ -125,7 +125,7 @@ public class SetBirthdayTests : Folks.TestCase
             }
         }
 
-      assert (removed == null);
+      assert (removed.size == 0);
     }
 
   private void _notify_bday_cb (Object individual_obj, ParamSpec ps)
index 4040c3f..b5019fb 100644 (file)
@@ -102,20 +102,20 @@ public class SetDuplicateEmailTests : Folks.TestCase
     }
 
   private void _individuals_changed_cb
-      (GLib.List<Individual>? added,
-       GLib.List<Individual>? removed,
+      (Set<Individual> added,
+       Set<Individual> removed,
        string? message,
        Persona? actor,
        GroupDetails.ChangeReason reason)
     {
-      foreach (unowned Individual i in added)
+      foreach (var i in added)
         {
           if (i.full_name == this._persona_fullname_1)
             {
               this._reset_email_address (i);
             }
         }
-      assert (removed == null);
+      assert (removed.size == 0);
     }
 
   private void _reset_email_address (Individual i)
index 28bf8d3..9e9a483 100644 (file)
@@ -101,13 +101,13 @@ public class SetEmailsTests : Folks.TestCase
     }
 
  private void _individuals_changed_cb
-      (GLib.List<Individual>? added,
-       GLib.List<Individual>? removed,
+      (Set<Individual> added,
+       Set<Individual> removed,
        string? message,
        Persona? actor,
        GroupDetails.ChangeReason reason)
     {
-      foreach (unowned Individual i in added)
+      foreach (var i in added)
         {
           if (i.full_name == this._persona_fullname)
             {
@@ -126,7 +126,7 @@ public class SetEmailsTests : Folks.TestCase
             }
         }
 
-      assert (removed == null);
+      assert (removed.size == 0);
     }
 
   private void _notify_emails_cb (Object individual_obj, ParamSpec ps)
index 00fb317..58897a0 100644 (file)
@@ -115,13 +115,13 @@ public class SetFavouriteTests : Folks.TestCase
     }
 
  private void _individuals_changed_cb
-      (GLib.List<Individual>? added,
-       GLib.List<Individual>? removed,
+      (Set<Individual> added,
+       Set<Individual> removed,
        string? message,
        Persona? actor,
        GroupDetails.ChangeReason reason)
     {
-      foreach (unowned Individual i in added)
+      foreach (var i in added)
         {
           i.notify["is-favourite"].connect (this._notify_favourite_cb);
           if (i.full_name == this._initial_fullname_1)
@@ -150,7 +150,7 @@ public class SetFavouriteTests : Folks.TestCase
             }
         }
 
-      assert (removed == null);
+      assert (removed.size == 0);
     }
 
   private void _notify_favourite_cb (Object individual_obj, ParamSpec ps)
index 73e2fe3..459cafb 100644 (file)
@@ -99,13 +99,13 @@ public class SetFullNameTests : Folks.TestCase
     }
 
  private void _individuals_changed_cb
-      (GLib.List<Individual>? added,
-       GLib.List<Individual>? removed,
+      (Set<Individual> added,
+       Set<Individual> removed,
        string? message,
        Persona? actor,
        GroupDetails.ChangeReason reason)
     {
-      foreach (unowned Individual i in added)
+      foreach (var i in added)
         {
           if (i.full_name == this._persona_fullname)
             {
@@ -119,7 +119,7 @@ public class SetFullNameTests : Folks.TestCase
             }
         }
 
-      assert (removed == null);
+      assert (removed.size == 0);
     }
 
   private void _notify_full_name_cb (Object individual, ParamSpec ps)
index 756946e..9c97119 100644 (file)
@@ -95,13 +95,13 @@ public class SetGenderTests : Folks.TestCase
     }
 
  private void _individuals_changed_cb
-      (GLib.List<Individual>? added,
-       GLib.List<Individual>? removed,
+      (Set<Individual> added,
+       Set<Individual> removed,
        string? message,
        Persona? actor,
        GroupDetails.ChangeReason reason)
     {
-      foreach (unowned Individual i in added)
+      foreach (var i in added)
         {
           if (i.full_name == this._persona_fullname)
             {
@@ -114,7 +114,7 @@ public class SetGenderTests : Folks.TestCase
             }
         }
 
-      assert (removed == null);
+      assert (removed.size == 0);
     }
 
   private void _notify_gender_cb (Object individual_obj, ParamSpec ps)
index 5a38238..1be7730 100644 (file)
@@ -99,13 +99,13 @@ public class SetIMAddressesTests : Folks.TestCase
     }
 
  private void _individuals_changed_cb
-      (GLib.List<Individual>? added,
-       GLib.List<Individual>? removed,
+      (Set<Individual> added,
+       Set<Individual> removed,
        string? message,
        Persona? actor,
        GroupDetails.ChangeReason reason)
     {
-      foreach (unowned Individual i in added)
+      foreach (var i in added)
         {
           if (i.full_name == this._persona_fullname)
             {
@@ -126,7 +126,7 @@ public class SetIMAddressesTests : Folks.TestCase
             }
         }
 
-      assert (removed == null);
+      assert (removed.size == 0);
     }
 
   private void _notify_im_addresses_cb (Object individual_obj, ParamSpec ps)
index 670e271..2d6930c 100644 (file)
@@ -98,13 +98,13 @@ public class SetNotesTests : Folks.TestCase
     }
 
  private void _individuals_changed_cb
-      (GLib.List<Individual>? added,
-       GLib.List<Individual>? removed,
+      (Set<Individual> added,
+       Set<Individual> removed,
        string? message,
        Persona? actor,
        GroupDetails.ChangeReason reason)
     {
-      foreach (unowned Individual i in added)
+      foreach (var i in added)
         {
           if (i.full_name == this._persona_fullname)
             {
@@ -122,7 +122,7 @@ public class SetNotesTests : Folks.TestCase
             }
         }
 
-      assert (removed == null);
+      assert (removed.size == 0);
     }
 
   private void _notify_notes_cb (Object individual_obj, ParamSpec ps)
index 7bb9d62..70d1a53 100644 (file)
@@ -101,13 +101,13 @@ public class SetPhonesTests : Folks.TestCase
     }
 
  private void _individuals_changed_cb
-      (GLib.List<Individual>? added,
-       GLib.List<Individual>? removed,
+      (Set<Individual>? added,
+       Set<Individual>? removed,
        string? message,
        Persona? actor,
        GroupDetails.ChangeReason reason)
     {
-      foreach (unowned Individual i in added)
+      foreach (var i in added)
         {
           if (i.full_name == this._persona_fullname)
             {
@@ -126,7 +126,7 @@ public class SetPhonesTests : Folks.TestCase
             }
         }
 
-      assert (removed == null);
+      assert (removed.size == 0);
     }
 
   private void _notify_phones_cb (Object individual_obj, ParamSpec ps)
index 678af12..ef00a81 100644 (file)
@@ -107,13 +107,13 @@ public class SetPostalAddressesTests : Folks.TestCase
     }
 
  private void _individuals_changed_cb
-      (GLib.List<Individual>? added,
-       GLib.List<Individual>? removed,
+      (Set<Individual> added,
+       Set<Individual> removed,
        string? message,
        Persona? actor,
        GroupDetails.ChangeReason reason)
     {
-      foreach (unowned Individual i in added)
+      foreach (var i in added)
         {
           if (i.full_name == this._persona_fullname)
             {
@@ -140,7 +140,7 @@ public class SetPostalAddressesTests : Folks.TestCase
             }
         }
 
-      assert (removed == null);
+      assert (removed.size == 0);
     }
 
   private void _notify_postal_cb (Object individual_obj, ParamSpec ps)
index 2d8038e..08f3b83 100644 (file)
@@ -98,13 +98,13 @@ public class SetRolesTests : Folks.TestCase
     }
 
  private void _individuals_changed_cb
-      (GLib.List<Individual>? added,
-       GLib.List<Individual>? removed,
+      (Set<Individual> added,
+       Set<Individual> removed,
        string? message,
        Persona? actor,
        GroupDetails.ChangeReason reason)
     {
-      foreach (unowned Individual i in added)
+      foreach (var i in added)
         {
           if (i.full_name == this._persona_fullname)
             {
@@ -122,7 +122,7 @@ public class SetRolesTests : Folks.TestCase
             }
         }
 
-      assert (removed == null);
+      assert (removed.size == 0);
     }
 
   private void _notify_roles_cb (Object individual_obj, ParamSpec ps)
index fa72579..62ee193 100644 (file)
@@ -109,13 +109,13 @@ public class SetStructuredNameTests : Folks.TestCase
     }
 
  private void _individuals_changed_cb
-      (GLib.List<Individual>? added,
-       GLib.List<Individual>? removed,
+      (Set<Individual> added,
+       Set<Individual> removed,
        string? message,
        Persona? actor,
        GroupDetails.ChangeReason reason)
     {
-      foreach (unowned Individual i in added)
+      foreach (var i in added)
         {
           if (i.full_name == this._persona_fullname)
             {
@@ -127,7 +127,7 @@ public class SetStructuredNameTests : Folks.TestCase
             }
         }
 
-      assert (removed == null);
+      assert (removed.size == 0);
     }
 
   private void _notify_sname_cb (Object persona, ParamSpec ps)
index f7d763e..fab096a 100644 (file)
@@ -96,13 +96,13 @@ public class SetURLsTests : Folks.TestCase
     }
 
  private void _individuals_changed_cb
-      (GLib.List<Individual>? added,
-       GLib.List<Individual>? removed,
+      (Set<Individual> added,
+       Set<Individual> removed,
        string? message,
        Persona? actor,
        GroupDetails.ChangeReason reason)
     {
-      foreach (unowned Individual i in added)
+      foreach (var i in added)
         {
           if (i.full_name == this._persona_fullname)
             {
@@ -126,7 +126,7 @@ public class SetURLsTests : Folks.TestCase
             }
         }
 
-      assert (removed == null);
+      assert (removed.size == 0);
     }
 
   private void _notify_urls_cb (Object individual_obj, ParamSpec ps)
index aded7bb..14b7aa9 100644 (file)
@@ -110,13 +110,13 @@ public class SuffixNameUpdatesTests : Folks.TestCase
     }
 
   private void _individuals_changed_cb
-      (GLib.List<Individual>? added,
-       GLib.List<Individual>? removed,
+      (Set<Individual> added,
+       Set<Individual> removed,
        string? message,
        Persona? actor,
        GroupDetails.ChangeReason reason)
     {
-      foreach (unowned Individual i in added)
+      foreach (var i in added)
         {
           if (this._initial_fullname == i.full_name)
             {
@@ -133,7 +133,7 @@ public class SuffixNameUpdatesTests : Folks.TestCase
             }
         }
 
-      assert (removed == null);
+      assert (removed.size == 0);
     }
 
   private void _notify_suffix_name_cb (Object individual_obj, ParamSpec ps)
index 0d17caf..4eb7705 100644 (file)
@@ -104,13 +104,13 @@ public class UrlDetailsInterfaceTests : Folks.TestCase
     }
 
   private void _individuals_changed_cb
-      (GLib.List<Individual>? added,
-       GLib.List<Individual>? removed,
+      (Set<Individual> added,
+       Set<Individual> removed,
        string? message,
        Persona? actor,
        GroupDetails.ChangeReason reason)
     {
-      foreach (Individual i in added)
+      foreach (var i in added)
         {
           string full_name = i.full_name;
           if (full_name != null)
@@ -129,7 +129,7 @@ public class UrlDetailsInterfaceTests : Folks.TestCase
             }
         }
 
-      assert (removed == null);
+      assert (removed.size == 0);
 
       if (this._found_blog &&
           this._found_website)
index ea0f0d1..484de05 100644 (file)
@@ -110,13 +110,13 @@ public class WebsiteUpdatesTests : Folks.TestCase
     }
 
   private void _individuals_changed_cb
-      (GLib.List<Individual>? added,
-       GLib.List<Individual>? removed,
+      (Set<Individual> added,
+       Set<Individual> removed,
        string? message,
        Persona? actor,
        GroupDetails.ChangeReason reason)
     {
-      foreach (unowned Individual i in added)
+      foreach (var i in added)
         {
           if (i.full_name == this._initial_fullname)
             {
@@ -143,7 +143,7 @@ public class WebsiteUpdatesTests : Folks.TestCase
             }
         }
 
-      assert (removed == null);
+      assert (removed.size == 0);
     }
 
   private void _notify_website_cb (Object individual_obj, ParamSpec ps)