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__
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
,
38 const gchar
* const *items
,
43 GType
dconf_client_get_type (void);
45 DConfClient
* dconf_client_new (const gchar
*profile
,
46 DConfWatchFunc watch_func
,
48 GDestroyNotify notify
);
50 GVariant
* dconf_client_read (DConfClient
*client
,
52 GVariant
* dconf_client_read_default (DConfClient
*client
,
54 GVariant
* dconf_client_read_no_default (DConfClient
*client
,
57 gchar
** dconf_client_list (DConfClient
*client
,
61 gboolean
dconf_client_is_writable (DConfClient
*client
,
64 gboolean
dconf_client_write (DConfClient
*client
,
68 GCancellable
*cancellable
,
70 void dconf_client_write_async (DConfClient
*client
,
73 GCancellable
*cancellable
,
74 GAsyncReadyCallback callback
,
76 gboolean
dconf_client_write_finish (DConfClient
*client
,
81 gboolean
dconf_client_set_locked (DConfClient
*client
,
84 GCancellable
*cancellable
,
86 void dconf_client_set_locked_async (DConfClient
*client
,
89 GCancellable
*cancellable
,
90 GAsyncReadyCallback callback
,
92 gboolean
dconf_client_set_locked_finish (DConfClient
*client
,
96 gboolean
dconf_client_write_many (DConfClient
*client
,
98 const gchar
* const *rels
,
102 GCancellable
*cancellable
,
105 /* write_many_async currently disabled due to missing Vala functionality
106 void dconf_client_write_many_async (DConfClient *client,
108 const gchar * const *rels,
111 GCancellable *cancellable,
112 GAsyncReadyCallback callback,
114 gboolean dconf_client_write_many_finish (DConfClient *client,
115 GAsyncResult *result,
119 gboolean
dconf_client_watch (DConfClient
*client
,
121 GCancellable
*cancellable
,
123 void dconf_client_watch_async (DConfClient
*client
,
125 GCancellable
*cancellable
,
126 GAsyncReadyCallback callback
,
128 gboolean
dconf_client_watch_finish (DConfClient
*client
,
129 GAsyncResult
*result
,
131 gboolean
dconf_client_unwatch (DConfClient
*client
,
133 GCancellable
*cancellable
,
135 void dconf_client_unwatch_async (DConfClient
*client
,
137 GCancellable
*cancellable
,
138 GAsyncReadyCallback callback
,
140 gboolean
dconf_client_unwatch_finish (DConfClient
*client
,
141 GAsyncResult
*result
,
145 #endif /* __dconf_client_h__ */