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_writer_h__
21 #define __dconf_writer_h__
25 #include "../common/dconf-changeset.h"
26 #include "dconf-generated.h"
28 #define DCONF_TYPE_WRITER (dconf_writer_get_type ())
29 #define DCONF_WRITER(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \
30 DCONF_TYPE_WRITER, DConfWriter))
31 #define DCONF_WRITER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \
32 DCONF_TYPE_WRITER, DConfWriterClass))
33 #define DCONF_IS_WRITER(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \
35 #define DCONF_IS_WRITER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \
37 #define DCONF_WRITER_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \
38 DCONF_TYPE_WRITER, DConfWriterClass))
40 typedef struct _DConfWriterPrivate DConfWriterPrivate
;
41 typedef struct _DConfWriterClass DConfWriterClass
;
42 typedef struct _DConfWriter DConfWriter
;
44 struct _DConfWriterClass
46 DConfDBusWriterSkeletonClass parent_instance
;
49 void (* list
) (GHashTable
*set
);
51 /* instance methods */
52 gboolean (* begin
) (DConfWriter
*writer
,
54 void (* change
) (DConfWriter
*writer
,
55 DConfChangeset
*changeset
,
57 gboolean (* commit
) (DConfWriter
*writer
,
59 void (* end
) (DConfWriter
*writer
);
64 DConfDBusWriterSkeleton parent_instance
;
65 DConfWriterPrivate
*priv
;
69 GType
dconf_writer_get_type (void);
71 void dconf_writer_set_basepath (DConfWriter
*writer
,
73 DConfChangeset
* dconf_writer_diff (DConfWriter
*writer
,
74 DConfChangeset
*changeset
);
75 const gchar
* dconf_writer_get_name (DConfWriter
*writer
);
77 void dconf_writer_list (GType type
,
79 GDBusInterfaceSkeleton
*dconf_writer_new (GType type
,
82 #define DCONF_TYPE_SHM_WRITER (dconf_shm_writer_get_type ())
83 GType
dconf_shm_writer_get_type (void);
84 #define DCONF_TYPE_KEYFILE_WRITER (dconf_keyfile_writer_get_type ())
85 GType
dconf_keyfile_writer_get_type (void);
87 #endif /* __dconf_writer_h__ */