Declare libdconf_service as a dependency
[dconf.git] / engine / dconf-engine-source.h
blob802f09d6bce70f5cf4d0c90850299c5bdd427dda
1 /*
2 * Copyright © 2010 Codethink Limited
3 * Copyright © 2012 Canonical Limited
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the licence, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, see <http://www.gnu.org/licenses/>.
18 * Author: Ryan Lortie <desrt@desrt.ca>
21 #ifndef __dconf_engine_source_h__
22 #define __dconf_engine_source_h__
24 #include "../gvdb/gvdb-reader.h"
25 #include <gio/gio.h>
27 typedef struct _DConfEngineSourceVTable DConfEngineSourceVTable;
28 typedef struct _DConfEngineSource DConfEngineSource;
30 struct _DConfEngineSourceVTable
32 gsize instance_size;
34 void (* init) (DConfEngineSource *source);
35 void (* finalize) (DConfEngineSource *source);
36 gboolean (* needs_reopen) (DConfEngineSource *source);
37 GvdbTable * (* reopen) (DConfEngineSource *source);
40 struct _DConfEngineSource
42 const DConfEngineSourceVTable *vtable;
44 GvdbTable *values;
45 GvdbTable *locks;
46 GBusType bus_type;
47 gboolean writable;
48 gboolean did_warn;
49 gchar *bus_name;
50 gchar *object_path;
51 gchar *name;
54 G_GNUC_INTERNAL
55 void dconf_engine_source_free (DConfEngineSource *source);
57 G_GNUC_INTERNAL
58 gboolean dconf_engine_source_refresh (DConfEngineSource *source);
60 G_GNUC_INTERNAL
61 DConfEngineSource * dconf_engine_source_new (const gchar *name);
63 G_GNUC_INTERNAL
64 DConfEngineSource * dconf_engine_source_new_default (void);
66 #endif /* __dconf_engine_source_h__ */