summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Withnall <philip.withnall@collabora.co.uk>2013-11-27 11:43:49 +0000
committerPhilip Withnall <philip@tecnocode.co.uk>2014-02-16 23:52:32 +0000
commit28821702af19b6ff65aeb18f5514d34d10b00f29 (patch)
treefa9610252b875412b261b572919ca684042731be
parentffea2730dc983d8acaf8b4e29fdb1a5c23925a12 (diff)
core: Add an IndividualAggregator.backend_store property
This is a simple construct-only getter convenience property. It tidies up IndividualAggregator construction a little, and allows runtime access to the BackendStore without having to have explicitly constructed it before the aggregator.
-rw-r--r--NEWS1
-rw-r--r--folks/individual-aggregator.vala19
2 files changed, 14 insertions, 6 deletions
diff --git a/NEWS b/NEWS
index 063a451b..6d393ef7 100644
--- a/NEWS
+++ b/NEWS
@@ -20,6 +20,7 @@ API changes:
• Add Individual.display_name
• Add StructuredName.to_string_with_format()
• Add libfolks-dummy.la and all its symbols
+ • Add IndividualAggregator.backend_store
Overview of changes from libfolks 0.9.5 to libfolks 0.9.6
=========================================================
diff --git a/folks/individual-aggregator.vala b/folks/individual-aggregator.vala
index 18151455..06d0f3da 100644
--- a/folks/individual-aggregator.vala
+++ b/folks/individual-aggregator.vala
@@ -217,6 +217,17 @@ public class Folks.IndividualAggregator : Object
get { return this._primary_store; }
}
+ /**
+ * The backend store providing the persona stores for this aggregator.
+ *
+ * @since UNRELEASED
+ */
+ public BackendStore backend_store
+ {
+ get { return this._backend_store; }
+ construct { this._backend_store = value; }
+ }
+
private Map<string, Individual> _individuals;
private Map<string, Individual> _individuals_ro;
@@ -376,8 +387,7 @@ public class Folks.IndividualAggregator : Object
replacement = "IndividualAggregator.dup")]
public IndividualAggregator ()
{
- Object ();
- this._backend_store = BackendStore.dup ();
+ Object (backend_store: BackendStore.dup ());
}
/**
@@ -437,8 +447,7 @@ public class Folks.IndividualAggregator : Object
replacement = "IndividualAggregator.dup_with_backend_store")]
public IndividualAggregator.with_backend_store (BackendStore store)
{
- Object ();
- this._backend_store = store;
+ Object (backend_store: store);
}
construct
@@ -504,8 +513,6 @@ public class Folks.IndividualAggregator : Object
this._linking_enabled = (disable_linking == null ||
disable_linking == "no" || disable_linking == "0");
- this._backend_store = BackendStore.dup ();
-
debug ("Constructing IndividualAggregator %p", this);
}