Fix up CLEANFILES for both libraries
[dconf.git] / client / dconf-client.h
blob019bb38b5065db273093eb734aea3aa113474d87
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, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
19 * Author: Ryan Lortie <desrt@desrt.ca>
22 #ifndef __dconf_client_h__
23 #define __dconf_client_h__
25 #include <gio/gio.h>
27 G_BEGIN_DECLS
29 #define DCONF_TYPE_CLIENT (dconf_client_get_type ())
30 #define DCONF_CLIENT(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), DCONF_TYPE_CLIENT, DConfClient))
31 #define DCONF_IS_CLIENT(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), DCONF_TYPE_CLIENT))
33 typedef GObjectClass DConfClientClass;
34 typedef struct _DConfClient DConfClient;
36 typedef void (*DConfWatchFunc) (DConfClient *client,
37 const gchar *path,
38 const gchar * const *items,
39 gint n_items,
40 const gchar *tag,
41 gpointer user_data);
43 GType dconf_client_get_type (void);
45 DConfClient * dconf_client_new (const gchar *profile,
46 DConfWatchFunc watch_func,
47 gpointer user_data,
48 GDestroyNotify notify);
50 GVariant * dconf_client_read (DConfClient *client,
51 const gchar *key);
52 GVariant * dconf_client_read_default (DConfClient *client,
53 const gchar *key);
54 GVariant * dconf_client_read_no_default (DConfClient *client,
55 const gchar *key);
57 gchar ** dconf_client_list (DConfClient *client,
58 const gchar *dir,
59 gint *length);
61 gboolean dconf_client_is_writable (DConfClient *client,
62 const gchar *key);
64 gboolean dconf_client_write (DConfClient *client,
65 const gchar *key,
66 GVariant *value,
67 gchar **tag,
68 GCancellable *cancellable,
69 GError **error);
70 void dconf_client_write_async (DConfClient *client,
71 const gchar *key,
72 GVariant *value,
73 GCancellable *cancellable,
74 GAsyncReadyCallback callback,
75 gpointer user_data);
76 gboolean dconf_client_write_finish (DConfClient *client,
77 GAsyncResult *result,
78 gchar **tag,
79 GError **error);
81 gboolean dconf_client_set_locked (DConfClient *client,
82 const gchar *path,
83 gboolean locked,
84 GCancellable *cancellable,
85 GError **error);
86 void dconf_client_set_locked_async (DConfClient *client,
87 const gchar *path,
88 gboolean locked,
89 GCancellable *cancellable,
90 GAsyncReadyCallback callback,
91 gpointer user_data);
92 gboolean dconf_client_set_locked_finish (DConfClient *client,
93 GAsyncResult *result,
94 GError **error);
96 gboolean dconf_client_write_many (DConfClient *client,
97 const gchar *dir,
98 const gchar * const *rels,
99 GVariant **values,
100 gint n_values,
101 gchar **tag,
102 GCancellable *cancellable,
103 GError **error);
105 /* write_many_async currently disabled due to missing Vala functionality
106 void dconf_client_write_many_async (DConfClient *client,
107 const gchar *dir,
108 const gchar * const *rels,
109 GVariant **values,
110 gint n_values,
111 GCancellable *cancellable,
112 GAsyncReadyCallback callback,
113 gpointer user_data);
114 gboolean dconf_client_write_many_finish (DConfClient *client,
115 GAsyncResult *result,
116 gchar **tag,
117 GError **error);*/
119 gboolean dconf_client_watch (DConfClient *client,
120 const gchar *path,
121 GCancellable *cancellable,
122 GError **error);
123 void dconf_client_watch_async (DConfClient *client,
124 const gchar *path,
125 GCancellable *cancellable,
126 GAsyncReadyCallback callback,
127 gpointer user_data);
128 gboolean dconf_client_watch_finish (DConfClient *client,
129 GAsyncResult *result,
130 GError **error);
131 gboolean dconf_client_unwatch (DConfClient *client,
132 const gchar *path,
133 GCancellable *cancellable,
134 GError **error);
135 void dconf_client_unwatch_async (DConfClient *client,
136 const gchar *path,
137 GCancellable *cancellable,
138 GAsyncReadyCallback callback,
139 gpointer user_data);
140 gboolean dconf_client_unwatch_finish (DConfClient *client,
141 GAsyncResult *result,
142 GError **error);
143 G_END_DECLS
145 #endif /* __dconf_client_h__ */