summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorRyan Lortie <desrt@desrt.ca>2013-01-11 13:25:48 -0500
committerRyan Lortie <desrt@desrt.ca>2013-01-11 13:25:48 -0500
commit65b56f23658156174ba01976e3d3678700235a09 (patch)
treecf1d20ba04aac63d11a0a3937e9f36655f794811 /service
parent80447f9ce0f61a4f150b0db99b7535ff5b033023 (diff)
downloaddconf-65b56f23658156174ba01976e3d3678700235a09.tar.gz
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.
Diffstat (limited to 'service')
-rw-r--r--service/dconf-writer.c7
-rw-r--r--service/dconf-writer.h2
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);