[folks] Rename the Presence interface to HasPresence
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [folks] Rename the Presence interface to HasPresence
- Date: Sun, 12 Dec 2010 18:35:12 +0000 (UTC)
commit 5953792452846ee0df317c946a19522a77d15e1d
Author: Philip Withnall <philip withnall collabora co uk>
Date: Sun Dec 12 18:28:20 2010 +0000
Rename the Presence interface to HasPresence
Helps: bgo#627397
NEWS | 1 +
backends/telepathy/lib/tpf-persona.vala | 8 ++++----
folks/Makefile.am | 2 +-
folks/{presence.vala => has-presence.vala} | 12 ++++++------
folks/imable.vala | 2 +-
folks/individual.vala | 11 ++++++-----
tests/telepathy/individual-properties.vala | 2 +-
7 files changed, 20 insertions(+), 18 deletions(-)
---
diff --git a/NEWS b/NEWS
index fa448ae..2c8ca9a 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,7 @@ Overview of changes from libfolks 0.3.2 to libfolks 0.3.3
API changes:
* Rename the Avatar interface to HasAvatar
+* Rename the Presence interface to HasPresence
Bugs fixed:
* Bug 635178 â?? Leak in
diff --git a/backends/telepathy/lib/tpf-persona.vala b/backends/telepathy/lib/tpf-persona.vala
index 9f5eff0..8734f63 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,
Favourite,
Groupable,
HasAvatar,
- IMable,
- Presence
+ HasPresence,
+ IMable
{
private HashTable<string, bool> _groups;
private bool _is_favourite;
@@ -57,14 +57,14 @@ public class Tpf.Persona : Folks.Persona,
/**
* The Persona's presence type.
*
- * See { link Folks.Presence.presence_type}.
+ * See { link Folks.HasPresence.presence_type}.
*/
public Folks.PresenceType presence_type { get; private set; }
/**
* The Persona's presence message.
*
- * See { link Folks.Presence.presence_message}.
+ * See { link Folks.HasPresence.presence_message}.
*/
public string presence_message { get; private set; }
diff --git a/folks/Makefile.am b/folks/Makefile.am
index 464a575..5ec47ab 100644
--- a/folks/Makefile.am
+++ b/folks/Makefile.am
@@ -18,12 +18,12 @@ libfolks_la_SOURCES = \
favourite.vala \
groupable.vala \
has-avatar.vala \
+ has-presence.vala \
imable.vala \
individual.vala \
individual-aggregator.vala \
persona.vala \
persona-store.vala \
- presence.vala \
types.vala \
debug.vala \
$(NULL)
diff --git a/folks/presence.vala b/folks/has-presence.vala
similarity index 92%
rename from folks/presence.vala
rename to folks/has-presence.vala
index c1a3920..9d88943 100644
--- a/folks/presence.vala
+++ b/folks/has-presence.vala
@@ -21,8 +21,8 @@
using GLib;
/**
- * The possible presence states an object implementing { link Presence} could be
- * in.
+ * The possible presence states an object implementing { link HasPresence} could
+ * be in.
*
* These closely follow the
* [[http://telepathy.freedesktop.org/spec/Connection_Interface_Simple_Presence.html#Connection_Presence_Type|SimplePresence]]
@@ -76,7 +76,7 @@ public enum Folks.PresenceType {
* { link PresenceType.UNSET} and their `presence_message` will be an empty
* string.
*/
-public interface Folks.Presence : Object
+public interface Folks.HasPresence : Object
{
/**
* The contact's presence type.
@@ -94,8 +94,8 @@ public interface Folks.Presence : Object
* The contact's presence message.
*
* This is a short message written by the contact to add detail to their
- * presence type ({ link Folks.Presence.presence_type}). If the contact hasn't
- * set a message, it will be an empty string.
+ * presence type ({ link Folks.HasPresence.presence_type}). If the contact
+ * hasn't set a message, it will be an empty string.
*/
public abstract string presence_message { get; set; default = ""; }
@@ -150,7 +150,7 @@ public interface Folks.Presence : Object
* Whether the contact is online.
*
* This will be `true` if the contact's presence type is higher than
- * { link PresenceType.OFFLINE}, as determined by { link Presence.typecmp}.
+ * { link PresenceType.OFFLINE}, as determined by { link HasPresence.typecmp}.
*
* @return `true` if the contact is online, `false` otherwise
*/
diff --git a/folks/imable.vala b/folks/imable.vala
index 1215f10..fc7042a 100644
--- a/folks/imable.vala
+++ b/folks/imable.vala
@@ -21,7 +21,7 @@
using GLib;
/**
- * IM addresses exposed by an object implementing { link Presence}.
+ * IM addresses exposed by an object implementing { link HasPresence}.
*
* @since 0.1.13
*/
diff --git a/folks/individual.vala b/folks/individual.vala
index 0f68cc3..f64459a 100644
--- a/folks/individual.vala
+++ b/folks/individual.vala
@@ -67,8 +67,8 @@ public class Folks.Individual : Object,
Favourite,
Groupable,
HasAvatar,
- IMable,
- Presence
+ HasPresence,
+ IMable
{
private bool _is_favourite;
private string _alias;
@@ -515,11 +515,12 @@ public class Folks.Individual : Object,
/* Choose the most available presence from our personas */
this._persona_list.foreach ((p) =>
{
- if (p is Presence)
+ if (p is HasPresence)
{
- unowned Presence presence = (Presence) p;
+ unowned HasPresence presence = (HasPresence) p;
- if (Presence.typecmp (presence.presence_type, presence_type) > 0)
+ if (HasPresence.typecmp (presence.presence_type,
+ presence_type) > 0)
{
presence_type = presence.presence_type;
presence_message = presence.presence_message;
diff --git a/tests/telepathy/individual-properties.vala b/tests/telepathy/individual-properties.vala
index eda5371..578aac8 100644
--- a/tests/telepathy/individual-properties.vala
+++ b/tests/telepathy/individual-properties.vala
@@ -61,7 +61,7 @@ public class IndividualPropertiesTests : Folks.TestCase
assert (i.alias == "Olivier");
assert (i.presence_message == "");
assert (i.presence_type == PresenceType.AWAY);
- assert (((Presence) i).is_online () == true);
+ assert (((HasPresence) 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]