[folks] Rename IMable -> ImDetails



commit 9086a10c502e55ea7e57d9ae795333b81a701f0b
Author: Travis Reitter <travis reitter collabora co uk>
Date:   Thu Mar 10 16:23:55 2011 -0800

    Rename IMable -> ImDetails
    
    Helps bgo#642513 - Folks "Owner" interfaces are awkwardly-named

 NEWS                                    |    1 +
 backends/key-file/kf-persona.vala       |   12 ++++++------
 backends/telepathy/lib/tpf-persona.vala |   12 ++++++------
 folks/Makefile.am                       |    2 +-
 folks/{imable.vala => im-details.vala}  |   20 ++++++++++----------
 folks/individual-aggregator.vala        |    4 ++--
 folks/individual.vala                   |    8 ++++----
 folks/persona.vala                      |    2 +-
 po/POTFILES.in                          |    2 +-
 po/POTFILES.skip                        |    2 +-
 tests/folks/linked-hash-set.vala        |    4 ++--
 11 files changed, 35 insertions(+), 34 deletions(-)
---
diff --git a/NEWS b/NEWS
index 3eea67a..88cea4f 100644
--- a/NEWS
+++ b/NEWS
@@ -33,6 +33,7 @@ API changes:
 * Rename Favouritable -> FavouriteDetails
 * Rename GenderOwner -> GenderDetails
 * Rename Groupable -> GroupDetails
+* Rename IMable -> ImDetails
 
 Overview of changes from libfolks 0.3.5 to libfolks 0.3.6
 =========================================================
diff --git a/backends/key-file/kf-persona.vala b/backends/key-file/kf-persona.vala
index 9588b7e..5bd9177 100644
--- a/backends/key-file/kf-persona.vala
+++ b/backends/key-file/kf-persona.vala
@@ -30,10 +30,10 @@ using Folks.Backends.Kf;
  */
 public class Folks.Backends.Kf.Persona : Folks.Persona,
     AliasDetails,
-    IMable
+    ImDetails
 {
   private unowned GLib.KeyFile _key_file;
-  /* FIXME: As described in the IMable interface, we have to use
+  /* FIXME: As described in the ImDetails interface, we have to use
    * GenericArray<string> here rather than just string[], as null-terminated
    * arrays aren't supported as generic types. */
   private HashTable<string, LinkedHashSet<string>> _im_addresses;
@@ -113,10 +113,10 @@ public class Folks.Backends.Kf.Persona : Folks.Persona,
                   string normalized_address;
                   try
                     {
-                      normalized_address = IMable.normalise_im_address (
+                      normalized_address = ImDetails.normalise_im_address (
                           address, protocol);
                     }
-                  catch (IMableError e)
+                  catch (ImDetailsError e)
                     {
                       /* Somehow an error has crept into the user's
                        * relationships.ini. Warn of it and ignore the IM
@@ -193,10 +193,10 @@ public class Folks.Backends.Kf.Persona : Folks.Persona,
                   string address;
                   try
                     {
-                      address = IMable.normalise_im_address (im_address,
+                      address = ImDetails.normalise_im_address (im_address,
                           protocol);
                     }
-                  catch (IMableError e)
+                  catch (ImDetailsError e)
                     {
                       /* Warn of and ignore any invalid IM addresses */
                       warning (e.message);
diff --git a/backends/telepathy/lib/tpf-persona.vala b/backends/telepathy/lib/tpf-persona.vala
index a419747..6366513 100644
--- a/backends/telepathy/lib/tpf-persona.vala
+++ b/backends/telepathy/lib/tpf-persona.vala
@@ -32,8 +32,8 @@ public class Tpf.Persona : Folks.Persona,
     AvatarDetails,
     FavouriteDetails,
     GroupDetails,
-    PresenceOwner,
-    IMable
+    ImDetails,
+    PresenceOwner
 {
   private HashTable<string, bool> _groups;
   private bool _is_favourite;
@@ -133,7 +133,7 @@ public class Tpf.Persona : Folks.Persona,
   /**
    * A mapping of IM protocol to an ordered set of IM addresses.
    *
-   * See { link Folks.IMable.im_addresses}.
+   * See { link Folks.ImDetails.im_addresses}.
    */
   public HashTable<string, LinkedHashSet<string>> im_addresses
     {
@@ -232,7 +232,7 @@ public class Tpf.Persona : Folks.Persona,
       Object (alias: contact.get_alias (),
               contact: contact,
               display_id: id,
-              /* FIXME: This IID format should be moved out to the IMable
+              /* FIXME: This IID format should be moved out to the ImDetails
                * interface along with the code in
                * Kf.Persona.linkable_property_to_links(), but that depends on
                * bgo#624842 being fixed. */
@@ -258,10 +258,10 @@ public class Tpf.Persona : Folks.Persona,
       LinkedHashSet<string> im_address_set = new LinkedHashSet<string> ();
       try
         {
-          im_address_set.add (IMable.normalise_im_address (id,
+          im_address_set.add (ImDetails.normalise_im_address (id,
               account.get_protocol ()));
         }
-      catch (IMableError e)
+      catch (ImDetailsError e)
         {
           /* This should never happenâ?¦but if it does, warn of it and continue */
           warning (e.message);
diff --git a/folks/Makefile.am b/folks/Makefile.am
index 9576aa4..01e4924 100644
--- a/folks/Makefile.am
+++ b/folks/Makefile.am
@@ -22,8 +22,8 @@ libfolks_la_SOURCES = \
 	field-details.vala \
 	gender-details.vala \
 	group-details.vala \
+	im-details.vala \
 	presence-owner.vala \
-	imable.vala \
 	individual.vala \
 	individual-aggregator.vala \
 	linked-hash-set.vala \
diff --git a/folks/imable.vala b/folks/im-details.vala
similarity index 89%
rename from folks/imable.vala
rename to folks/im-details.vala
index e7ef5cc..5df61ce 100644
--- a/folks/imable.vala
+++ b/folks/im-details.vala
@@ -23,7 +23,7 @@ using GLib;
 /**
  * Errors related to IM addresses and IM address handling.
  */
-public errordomain Folks.IMableError
+public errordomain Folks.ImDetailsError
 {
   /**
    * The specified IM address could not be parsed.
@@ -36,7 +36,7 @@ public errordomain Folks.IMableError
  *
  * @since 0.1.13
  */
-public interface Folks.IMable : Object
+public interface Folks.ImDetails : Object
 {
   /**
    * A mapping of IM protocol to an ordered set of IM addresses.
@@ -50,7 +50,7 @@ public interface Folks.IMable : Object
    * IM address may be present in the sets for different protocols.
    *
    * All the IM addresses must be normalised using
-   * { link IMable.normalise_im_address} before being added to this property.
+   * { link ImDetails.normalise_im_address} before being added to this property.
    *
    * @since 0.3.4
    */
@@ -67,7 +67,7 @@ public interface Folks.IMable : Object
    * of IM addresses to work, the IM addresses must be normalised beforehand.
    *
    * If the provided IM address is invalid,
-   * { link Folks.IMableError.INVALID_IM_ADDRESS} will be thrown. Note that this
+   * { link Folks.ImDetailsError.INVALID_IM_ADDRESS} will be thrown. Note that this
    * isn't guaranteed to be thrown for all invalid addresses, but if it is
    * thrown, the address is guaranteed to be invalid.
    *
@@ -75,10 +75,10 @@ public interface Folks.IMable : Object
    * @param protocol the protocol of this im_address
    *
    * @since 0.2.0
-   * @throws Folks.IMableError if the provided IM address was invalid
+   * @throws Folks.ImDetailsError if the provided IM address was invalid
    */
   public static string normalise_im_address (string im_address, string protocol)
-      throws Folks.IMableError
+      throws Folks.ImDetailsError
     {
       string normalised;
 
@@ -98,7 +98,7 @@ public interface Folks.IMable : Object
 
           if (parts.length < 1)
             {
-              throw new IMableError.INVALID_IM_ADDRESS (
+              throw new ImDetailsError.INVALID_IM_ADDRESS (
                   /* Translators: the parameter is an IM address. */
                   _("The IM address '%s' could not be understood."),
                   im_address);
@@ -112,7 +112,7 @@ public interface Folks.IMable : Object
 
           if (parts.length < 1)
             {
-              throw new IMableError.INVALID_IM_ADDRESS (
+              throw new ImDetailsError.INVALID_IM_ADDRESS (
                   /* Translators: the parameter is an IM address. */
                   _("The IM address '%s' could not be understood."),
                   im_address);
@@ -134,7 +134,7 @@ public interface Folks.IMable : Object
               (domain == null || domain == "") ||
               (resource != null && resource == ""))
             {
-              throw new IMableError.INVALID_IM_ADDRESS (
+              throw new ImDetailsError.INVALID_IM_ADDRESS (
                   /* Translators: the parameter is an IM address. */
                   _("The IM address '%s' could not be understood."),
                   im_address);
@@ -159,7 +159,7 @@ public interface Folks.IMable : Object
             }
           else
             {
-              throw new IMableError.INVALID_IM_ADDRESS (
+              throw new ImDetailsError.INVALID_IM_ADDRESS (
                   /* Translators: the parameter is an IM address. */
                   _("The IM address '%s' could not be understood."),
                   im_address);
diff --git a/folks/individual-aggregator.vala b/folks/individual-aggregator.vala
index 55d9e9e..f3da07b 100644
--- a/folks/individual-aggregator.vala
+++ b/folks/individual-aggregator.vala
@@ -865,10 +865,10 @@ public class Folks.IndividualAggregator : Object
 
       foreach (var persona in personas)
         {
-          if (!(persona is IMable))
+          if (!(persona is ImDetails))
             continue;
 
-          ((IMable) persona).im_addresses.foreach ((k, v) =>
+          ((ImDetails) persona).im_addresses.foreach ((k, v) =>
             {
               unowned string protocol = (string) k;
               unowned LinkedHashSet<string> addresses =
diff --git a/folks/individual.vala b/folks/individual.vala
index 3f3bd4a..9e23999 100644
--- a/folks/individual.vala
+++ b/folks/individual.vala
@@ -70,7 +70,7 @@ public class Folks.Individual : Object,
     FavouriteDetails,
     GenderDetails,
     GroupDetails,
-    IMable,
+    ImDetails,
     NameOwner,
     NoteOwner,
     PresenceOwner,
@@ -891,10 +891,10 @@ public class Folks.Individual : Object,
       /* populate the IM addresses as the union of our Personas' addresses */
       foreach (var persona in this.personas)
         {
-          if (persona is IMable)
+          if (persona is ImDetails)
             {
-              var imable = (IMable) persona;
-              imable.im_addresses.foreach ((k, v) =>
+              var im_details = (ImDetails) persona;
+              im_details.im_addresses.foreach ((k, v) =>
                 {
                   var cur_protocol = (string) k;
                   var cur_addresses = (LinkedHashSet<string>) v;
diff --git a/folks/persona.vala b/folks/persona.vala
index f502e73..f8a3fa5 100644
--- a/folks/persona.vala
+++ b/folks/persona.vala
@@ -133,7 +133,7 @@ public abstract class Folks.Persona : Object
    */
   public delegate void LinkablePropertyCallback (string link);
 
-  /* FIXME: This code should move to the IMable interface as a concrete
+  /* FIXME: This code should move to the ImDetails interface as a concrete
    * method of the interface. However, that depends on bgo#624842 */
   /**
    * Produce one or more mapping strings for the given property's value.
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 0c13d3b..ab87edc 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -6,7 +6,7 @@ backends/telepathy/lib/tp-lowlevel.c
 backends/telepathy/lib/tpf-persona-store.vala
 backends/telepathy/lib/tpf-persona.vala
 folks/backend-store.vala
-folks/imable.vala
+folks/im-details.vala
 folks/individual-aggregator.vala
 folks/postal-address-owner.vala
 folks/role-owner.vala
diff --git a/po/POTFILES.skip b/po/POTFILES.skip
index f38d35f..cf054ec 100644
--- a/po/POTFILES.skip
+++ b/po/POTFILES.skip
@@ -5,7 +5,7 @@ backends/telepathy/lib/tpf-persona-store.c
 backends/telepathy/lib/tpf-persona.c
 docs/gtk-doc/folks-telepathy/ccomments/tp-lowlevel.c
 folks/backend-store.c
-folks/imable.c
+folks/im-details.c
 folks/individual-aggregator.c
 folks/postal-address-owner.c
 folks/role-owner.c
diff --git a/tests/folks/linked-hash-set.vala b/tests/folks/linked-hash-set.vala
index 1cd2cf9..fcb472a 100644
--- a/tests/folks/linked-hash-set.vala
+++ b/tests/folks/linked-hash-set.vala
@@ -250,8 +250,8 @@ public class LinkedHashSetTests : Folks.TestCase
   public void test_bgo640551 ()
     {
       /* This resembles the compound structure used by the Telepathy backend's
-       * IMable implementation in Tpf.Persona (which has caused memory leaks in
-       * the past - see bgo#640551) */
+       * ImDetails implementation in Tpf.Persona (which has caused memory leaks
+       * in the past - see bgo#640551) */
       var global_im_addresses =
           new HashTable<string, LinkedHashSet<string>> (str_hash, str_equal);
       var im_address_set = new LinkedHashSet<string> ();



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