[folks] Rename PresenceOwner -> PresenceDetails



commit 095ca9bccd5429ff54d6dcfe43baf90c49b05885
Author: Travis Reitter <travis reitter collabora co uk>
Date:   Thu Mar 10 16:59:25 2011 -0800

    Rename PresenceOwner -> PresenceDetails
    
    Helps bgo#642513 - Folks "Owner" interfaces are awkwardly-named

 NEWS                                               |    1 +
 backends/telepathy/lib/tpf-persona.vala            |    6 +++---
 folks/Makefile.am                                  |    2 +-
 folks/im-details.vala                              |    2 +-
 folks/individual.vala                              |    8 ++++----
 .../{presence-owner.vala => presence-details.vala} |   12 ++++++------
 tests/telepathy/individual-properties.vala         |    2 +-
 7 files changed, 17 insertions(+), 16 deletions(-)
---
diff --git a/NEWS b/NEWS
index 08d7982..12d37dc 100644
--- a/NEWS
+++ b/NEWS
@@ -36,6 +36,7 @@ API changes:
 * Rename IMable -> ImDetails
 * Rename NameOwner -> NameDetails
 * Rename Phoneable -> PhoneDetails
+* Rename PresenceOwner -> PresenceDetails
 
 Overview of changes from libfolks 0.3.5 to libfolks 0.3.6
 =========================================================
diff --git a/backends/telepathy/lib/tpf-persona.vala b/backends/telepathy/lib/tpf-persona.vala
index 6366513..b3bc8ae 100644
--- a/backends/telepathy/lib/tpf-persona.vala
+++ b/backends/telepathy/lib/tpf-persona.vala
@@ -33,7 +33,7 @@ public class Tpf.Persona : Folks.Persona,
     FavouriteDetails,
     GroupDetails,
     ImDetails,
-    PresenceOwner
+    PresenceDetails
 {
   private HashTable<string, bool> _groups;
   private bool _is_favourite;
@@ -69,14 +69,14 @@ public class Tpf.Persona : Folks.Persona,
   /**
    * The Persona's presence type.
    *
-   * See { link Folks.PresenceOwner.presence_type}.
+   * See { link Folks.PresenceDetails.presence_type}.
    */
   public Folks.PresenceType presence_type { get; private set; }
 
   /**
    * The Persona's presence message.
    *
-   * See { link Folks.PresenceOwner.presence_message}.
+   * See { link Folks.PresenceDetails.presence_message}.
    */
   public string presence_message { get; private set; }
 
diff --git a/folks/Makefile.am b/folks/Makefile.am
index ad76e54..ddd78e3 100644
--- a/folks/Makefile.am
+++ b/folks/Makefile.am
@@ -27,7 +27,7 @@ libfolks_la_SOURCES = \
 	note-details.vala \
 	phone-details.vala \
 	postal-address-details.vala \
-	presence-owner.vala \
+	presence-details.vala \
 	individual.vala \
 	individual-aggregator.vala \
 	linked-hash-set.vala \
diff --git a/folks/im-details.vala b/folks/im-details.vala
index 5df61ce..e7522a0 100644
--- a/folks/im-details.vala
+++ b/folks/im-details.vala
@@ -32,7 +32,7 @@ public errordomain Folks.ImDetailsError
 }
 
 /**
- * IM addresses exposed by an object implementing { link PresenceOwner}.
+ * IM addresses exposed by an object implementing { link PresenceDetails}.
  *
  * @since 0.1.13
  */
diff --git a/folks/individual.vala b/folks/individual.vala
index fc8a599..e860b0d 100644
--- a/folks/individual.vala
+++ b/folks/individual.vala
@@ -73,7 +73,7 @@ public class Folks.Individual : Object,
     ImDetails,
     NameDetails,
     NoteDetails,
-    PresenceOwner,
+    PresenceDetails,
     PhoneDetails,
     PostalAddressDetails,
     RoleOwner,
@@ -718,11 +718,11 @@ public class Folks.Individual : Object,
       /* Choose the most available presence from our personas */
       this._persona_list.foreach ((p) =>
         {
-          if (p is PresenceOwner)
+          if (p is PresenceDetails)
             {
-              unowned PresenceOwner presence = (PresenceOwner) p;
+              unowned PresenceDetails presence = (PresenceDetails) p;
 
-              if (PresenceOwner.typecmp (presence.presence_type,
+              if (PresenceDetails.typecmp (presence.presence_type,
                   presence_type) > 0)
                 {
                   presence_type = presence.presence_type;
diff --git a/folks/presence-owner.vala b/folks/presence-details.vala
similarity index 93%
rename from folks/presence-owner.vala
rename to folks/presence-details.vala
index 7339302..acd4ac1 100644
--- a/folks/presence-owner.vala
+++ b/folks/presence-details.vala
@@ -21,7 +21,7 @@
 using GLib;
 
 /**
- * The possible presence states an object implementing { link PresenceOwner}
+ * The possible presence states an object implementing { link PresenceDetails}
  * could be in.
  *
  * These closely follow the
@@ -76,7 +76,7 @@ public enum Folks.PresenceType {
  * { link PresenceType.UNSET} and their `presence_message` will be an empty
  * string.
  */
-public interface Folks.PresenceOwner : Object
+public interface Folks.PresenceDetails : Object
 {
   /**
    * The contact's presence type.
@@ -94,7 +94,7 @@ public interface Folks.PresenceOwner : Object
    * The contact's presence message.
    *
    * This is a short message written by the contact to add detail to their
-   * presence type ({ link Folks.PresenceOwner.presence_type}). If the contact
+   * presence type ({ link Folks.PresenceDetails.presence_type}). If the contact
    * hasn't set a message, it will be an empty string.
    */
   public abstract string presence_message { get; set; default = ""; }
@@ -142,8 +142,8 @@ public interface Folks.PresenceOwner : Object
    */
   public static int typecmp (PresenceType type_a, PresenceType type_b)
     {
-      return (PresenceOwner._type_availability (type_a) -
-          PresenceOwner._type_availability (type_b));
+      return (PresenceDetails._type_availability (type_a) -
+          PresenceDetails._type_availability (type_b));
     }
 
   /**
@@ -151,7 +151,7 @@ public interface Folks.PresenceOwner : Object
    *
    * This will be `true` if the contact's presence type is higher than
    * { link PresenceType.OFFLINE}, as determined by
-   * { link PresenceOwner.typecmp}.
+   * { link PresenceDetails.typecmp}.
    *
    * @return `true` if the contact is online, `false` otherwise
    */
diff --git a/tests/telepathy/individual-properties.vala b/tests/telepathy/individual-properties.vala
index 7f211f1..a63e176 100644
--- a/tests/telepathy/individual-properties.vala
+++ b/tests/telepathy/individual-properties.vala
@@ -62,7 +62,7 @@ public class IndividualPropertiesTests : Folks.TestCase
               assert (i.alias == "Olivier");
               assert (i.presence_message == "");
               assert (i.presence_type == PresenceType.AWAY);
-              assert (((PresenceOwner) i).is_online () == true);
+              assert (((PresenceDetails) i).is_online () == true);
 
               /* Check groups */
               assert (i.groups.size () == 2);



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