[folks] core: Add method to create IndividualAggregator passing in a BackendStore.



commit e1e5c8177e9d2910cb18b9298c42aa6dffb2ec87
Author: Jeremy Whiting <jpwhiting kde org>
Date:   Fri Sep 14 15:34:08 2012 -0600

    core: Add method to create IndividualAggregator passing in a BackendStore.

 folks/individual-aggregator.vala |   26 ++++++++++++++++++++++----
 1 files changed, 22 insertions(+), 4 deletions(-)
---
diff --git a/folks/individual-aggregator.vala b/folks/individual-aggregator.vala
index 6f09c60..c4d5e4b 100644
--- a/folks/individual-aggregator.vala
+++ b/folks/individual-aggregator.vala
@@ -282,10 +282,28 @@ public class Folks.IndividualAggregator : Object
    * }}}
    */
   public IndividualAggregator ()
-    {
-      Object ();
-    }
-
+  {
+    Object ();
+    this._backend_store = BackendStore.dup ();
+  }
+  
+  /**
+   * Create a new IndividualAggregator with a custom { link BackendStore}.
+   *
+   * This behaves the same as the default constructor for 
+   * { link IndivdiualAggregator}, but uses the given { link BackendStore}
+   * rather than the default one.
+   *
+   * @param store the { link BackendStore} to use instead of the default one.
+   *
+   * @since UNRELEASED
+   */
+  public IndividualAggregator.with_backend_store (BackendStore store)
+  {
+    Object ();
+    this._backend_store = store;
+  }
+  
   construct
     {
       this._stores = new HashMap<string, PersonaStore> ();



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