summaryrefslogtreecommitdiff
path: root/backends/dummy/lib/dummy-persona.vala
diff options
context:
space:
mode:
Diffstat (limited to 'backends/dummy/lib/dummy-persona.vala')
-rw-r--r--backends/dummy/lib/dummy-persona.vala30
1 files changed, 28 insertions, 2 deletions
diff --git a/backends/dummy/lib/dummy-persona.vala b/backends/dummy/lib/dummy-persona.vala
index a0d8cbdb..56679d20 100644
--- a/backends/dummy/lib/dummy-persona.vala
+++ b/backends/dummy/lib/dummy-persona.vala
@@ -96,8 +96,8 @@ public class FolksDummy.Persona : Folks.Persona
*
* @since UNRELEASED
*/
- public Persona (PersonaStore store, string contact_id, bool is_user = false,
- string[] linkable_properties = {})
+ public Persona (PersonaStore store, string contact_id,
+ bool is_user = false, string[] linkable_properties = {})
{
var uid = Folks.Persona.build_uid (BACKEND_NAME, store.id, contact_id);
var iid = store.id + ":" + contact_id;
@@ -234,6 +234,32 @@ public class FolksDummy.Persona : Folks.Persona
}
/**
+ * Update the persona’s set of linkable properties.
+ *
+ * Update the {@link Folks.Persona.linkable_properties} property to contain
+ * the given ``linkable_properties``.
+ *
+ * @param linkable_properties new set of linkable property names, in lower
+ * case, hyphenated form
+ * @since UNRELEASED
+ */
+ public void update_linkable_properties (string[] linkable_properties)
+ {
+ var new_linkable_properties = new SmallSet<string> ();
+ new_linkable_properties.add_all_array (linkable_properties);
+
+ var old_linkable_properties = new SmallSet<string> ();
+ old_linkable_properties.add_all_array (this._linkable_properties);
+
+ if (!Folks.Internal.equal_sets<string> (old_linkable_properties,
+ new_linkable_properties))
+ {
+ this._linkable_properties = linkable_properties;
+ this.notify_property ("linkable-properties");
+ }
+ }
+
+ /**
* Delay between property changes and notifications.
*
* This sets an optional delay between client code requesting a property