[dconf] service: add a diff() operation on writers



commit 65b56f23658156174ba01976e3d3678700235a09
Author: Ryan Lortie <desrt desrt ca>
Date:   Fri Jan 11 13:25:48 2013 -0500

    service: add a diff() operation on writers
    
    This diffs the given changeset with the uncommited changes in the
    writer.  The result is effectively the changeset that would have to be
    applied to the writer to cause it to be equal to the passed-in
    changeset.

 service/dconf-writer.c |    7 +++++++
 service/dconf-writer.h |    2 ++
 2 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/service/dconf-writer.c b/service/dconf-writer.c
index 6df600a..a907b55 100644
--- a/service/dconf-writer.c
+++ b/service/dconf-writer.c
@@ -359,6 +359,13 @@ dconf_writer_set_basepath (DConfWriter *writer,
   writer->priv->native = FALSE;
 }
 
+DConfChangeset *
+dconf_writer_diff (DConfWriter    *writer,
+                   DConfChangeset *changeset)
+{
+  return dconf_changeset_diff (writer->priv->uncommited_values, changeset);
+}
+
 const gchar *
 dconf_writer_get_name (DConfWriter *writer)
 {
diff --git a/service/dconf-writer.h b/service/dconf-writer.h
index 4892197..5e8e0a1 100644
--- a/service/dconf-writer.h
+++ b/service/dconf-writer.h
@@ -74,6 +74,8 @@ GType                   dconf_shm_writer_get_type                       (void);
 
 void                    dconf_writer_set_basepath                       (DConfWriter *writer,
                                                                          const gchar *name);
+DConfChangeset *        dconf_writer_diff                               (DConfWriter *writer,
+                                                                         DConfChangeset *changeset);
 
 void                    dconf_writer_list                               (GType        type,
                                                                          GHashTable  *set);



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