build: Enable G_LOG_USE_STRUCTURED=1
[dconf.git] / client / dconf-client.h
blob94c304a91fe34d588ede1c9c56ebd0c30bea7de7
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_client_h__
21 #define __dconf_client_h__
23 #include <gio/gio.h>
24 #include "../common/dconf-changeset.h"
25 #include "../common/dconf-enums.h"
27 G_BEGIN_DECLS
29 #define DCONF_TYPE_CLIENT (dconf_client_get_type ())
30 G_DECLARE_FINAL_TYPE(DConfClient, dconf_client, DCONF, CLIENT, GObject)
32 DConfClient * dconf_client_new (void);
34 GVariant * dconf_client_read (DConfClient *client,
35 const gchar *key);
37 GVariant * dconf_client_read_full (DConfClient *client,
38 const gchar *key,
39 DConfReadFlags flags,
40 const GQueue *read_through);
42 gchar ** dconf_client_list (DConfClient *client,
43 const gchar *dir,
44 gint *length);
46 gchar ** dconf_client_list_locks (DConfClient *client,
47 const gchar *dir,
48 gint *length);
50 gboolean dconf_client_is_writable (DConfClient *client,
51 const gchar *key);
53 gboolean dconf_client_write_fast (DConfClient *client,
54 const gchar *key,
55 GVariant *value,
56 GError **error);
57 gboolean dconf_client_write_sync (DConfClient *client,
58 const gchar *key,
59 GVariant *value,
60 gchar **tag,
61 GCancellable *cancellable,
62 GError **error);
64 gboolean dconf_client_change_fast (DConfClient *client,
65 DConfChangeset *changeset,
66 GError **error);
67 gboolean dconf_client_change_sync (DConfClient *client,
68 DConfChangeset *changeset,
69 gchar **tag,
70 GCancellable *cancellable,
71 GError **error);
73 void dconf_client_watch_fast (DConfClient *client,
74 const gchar *path);
75 void dconf_client_watch_sync (DConfClient *client,
76 const gchar *path);
78 void dconf_client_unwatch_fast (DConfClient *client,
79 const gchar *path);
80 void dconf_client_unwatch_sync (DConfClient *client,
81 const gchar *path);
83 void dconf_client_sync (DConfClient *client);
86 G_END_DECLS
88 #endif /* __dconf_client_h__ */