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_writer_h__
23 #define __dconf_writer_h__
27 #include "../common/dconf-changeset.h"
28 #include "dconf-generated.h"
30 #define DCONF_TYPE_WRITER (dconf_writer_get_type ())
31 #define DCONF_TYPE_SHM_WRITER (dconf_shm_writer_get_type ())
32 #define DCONF_WRITER(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \
33 DCONF_TYPE_WRITER, DConfWriter))
34 #define DCONF_WRITER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \
35 DCONF_TYPE_WRITER, DConfWriterClass))
36 #define DCONF_IS_WRITER(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \
38 #define DCONF_IS_WRITER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \
40 #define DCONF_WRITER_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \
41 DCONF_TYPE_WRITER, DConfWriterClass))
43 typedef struct _DConfWriterPrivate DConfWriterPrivate
;
44 typedef struct _DConfWriterClass DConfWriterClass
;
45 typedef struct _DConfWriter DConfWriter
;
47 struct _DConfWriterClass
49 DConfDBusWriterSkeletonClass parent_instance
;
52 void (* list
) (GHashTable
*set
);
54 /* instance methods */
55 gboolean (* begin
) (DConfWriter
*writer
,
57 void (* change
) (DConfWriter
*writer
,
58 DConfChangeset
*changeset
,
60 gboolean (* commit
) (DConfWriter
*writer
,
62 void (* end
) (DConfWriter
*writer
);
67 DConfDBusWriterSkeleton parent_instance
;
68 DConfWriterPrivate
*priv
;
72 GType
dconf_writer_get_type (void);
73 GType
dconf_shm_writer_get_type (void);
75 void dconf_writer_set_basepath (DConfWriter
*writer
,
77 DConfChangeset
* dconf_writer_diff (DConfWriter
*writer
,
78 DConfChangeset
*changeset
);
79 const gchar
* dconf_writer_get_name (DConfWriter
*writer
);
81 void dconf_writer_list (GType type
,
83 GDBusInterfaceSkeleton
*dconf_writer_new (GType type
,
86 #endif /* __dconf_writer_h__ */