[folks] Ensure all methods that should be async are, to get API breaking out of the way.



commit be70e85f8732a88d7247eda6ddc7fa3612c1c4d8
Author: Travis Reitter <travis reitter collabora co uk>
Date:   Tue Jul 27 08:59:28 2010 +0200

    Ensure all methods that should be async are, to get API breaking out of the way.

 backends/telepathy/tpf-persona.vala |    2 +-
 folks/groups.vala                   |    5 +++--
 folks/individual.vala               |    6 +++---
 3 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/backends/telepathy/tpf-persona.vala b/backends/telepathy/tpf-persona.vala
index 427e700..01eb2ab 100644
--- a/backends/telepathy/tpf-persona.vala
+++ b/backends/telepathy/tpf-persona.vala
@@ -128,7 +128,7 @@ public class Tpf.Persona : Folks.Persona,
   /**
    * { inheritDoc}
    */
-  public void change_group (string group, bool is_member)
+  public async void change_group (string group, bool is_member)
     {
       if (_change_group (group, is_member))
         {
diff --git a/folks/groups.vala b/folks/groups.vala
index 82fc6e7..74b9b09 100644
--- a/folks/groups.vala
+++ b/folks/groups.vala
@@ -105,7 +105,8 @@ public interface Folks.Groups : Object
    * @param group a freeform group identifier
    * @param is_member whether the contact should be a member of the group
    */
-  public abstract void change_group (string group, bool is_member);
+  public async abstract void change_group (string group, bool is_member)
+    throws GLib.Error;
 
   /**
    * Emitted when the contact's membership status changes for a group.
@@ -116,5 +117,5 @@ public interface Folks.Groups : Object
    * @param group a freeform group identifier for the group being left or joined
    * @param is_member whether the contact is joining or leaving the group
    */
-  public signal void group_changed (string group, bool is_member);
+  public async signal void group_changed (string group, bool is_member);
 }
diff --git a/folks/individual.vala b/folks/individual.vala
index ecba3fe..ed073cf 100644
--- a/folks/individual.vala
+++ b/folks/individual.vala
@@ -238,7 +238,7 @@ public class Folks.Individual : Object,
 
   private void persona_group_changed_cb (string group, bool is_member)
     {
-      this.change_group (group, is_member);
+      this.change_group.begin (group, is_member);
       this.update_groups ();
     }
 
@@ -254,12 +254,12 @@ public class Folks.Individual : Object,
    * @param group a freeform group identifier
    * @param is_member whether the Individual should be a member of the group
    */
-  public void change_group (string group, bool is_member)
+  public async void change_group (string group, bool is_member)
     {
       this._personas.foreach ((p) =>
         {
           if (p is Groups)
-            ((Groups) p).change_group (group, is_member);
+            ((Groups) p).change_group.begin (group, is_member);
         });
 
       /* don't notify, since it hasn't happened in the persona backing stores



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