Declare libdconf_service as a dependency
[dconf.git] / common / dconf-changeset.h
blobb0ce4509a6d345112b6fb3b5c6ef095ebcbe3491
1 /*
2 * Copyright © 2010 Codethink Limited
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the licence, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, see <http://www.gnu.org/licenses/>.
17 * Author: Ryan Lortie <desrt@desrt.ca>
20 #ifndef __dconf_changeset_h__
21 #define __dconf_changeset_h__
23 #include <glib.h>
25 typedef struct _DConfChangeset DConfChangeset;
27 typedef gboolean (* DConfChangesetPredicate) (const gchar *path,
28 GVariant *value,
29 gpointer user_data);
31 DConfChangeset * dconf_changeset_new (void);
32 DConfChangeset * dconf_changeset_new_database (DConfChangeset *copy_of);
34 DConfChangeset * dconf_changeset_new_write (const gchar *path,
35 GVariant *value);
37 DConfChangeset * dconf_changeset_ref (DConfChangeset *changeset);
38 void dconf_changeset_unref (DConfChangeset *changeset);
40 gboolean dconf_changeset_is_empty (DConfChangeset *changeset);
42 void dconf_changeset_set (DConfChangeset *changeset,
43 const gchar *path,
44 GVariant *value);
46 gboolean dconf_changeset_get (DConfChangeset *changeset,
47 const gchar *key,
48 GVariant **value);
50 gboolean dconf_changeset_is_similar_to (DConfChangeset *changeset,
51 DConfChangeset *other);
53 gboolean dconf_changeset_all (DConfChangeset *changeset,
54 DConfChangesetPredicate predicate,
55 gpointer user_data);
57 guint dconf_changeset_describe (DConfChangeset *changeset,
58 const gchar **prefix,
59 const gchar * const **paths,
60 GVariant * const **values);
62 GVariant * dconf_changeset_serialise (DConfChangeset *changeset);
63 DConfChangeset * dconf_changeset_deserialise (GVariant *serialised);
65 void dconf_changeset_change (DConfChangeset *changeset,
66 DConfChangeset *changes);
68 DConfChangeset * dconf_changeset_diff (DConfChangeset *from,
69 DConfChangeset *to);
71 void dconf_changeset_seal (DConfChangeset *changeset);
73 G_DEFINE_AUTOPTR_CLEANUP_FUNC(DConfChangeset, dconf_changeset_unref)
75 #endif /* __dconf_changeset_h__ */