writer: fix header
[dconf.git] / service / dconf-writer.h
blob32a7d4b54adfdacf455f768584a23ec067ed69f6
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_writer_h__
23 #define __dconf_writer_h__
25 #include <gio/gio.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), \
37 DCONF_TYPE_WRITER))
38 #define DCONF_IS_WRITER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \
39 DCONF_TYPE_WRITER))
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;
51 /* static methods */
52 void (* list) (GHashTable *set);
54 /* instance methods */
55 gboolean (* begin) (DConfWriter *writer,
56 GError **error);
57 void (* change) (DConfWriter *writer,
58 DConfChangeset *changeset,
59 const gchar *tag);
60 gboolean (* commit) (DConfWriter *writer,
61 GError **error);
62 void (* end) (DConfWriter *writer);
65 struct _DConfWriter
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,
76 const gchar *name);
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,
82 GHashTable *set);
83 GDBusInterfaceSkeleton *dconf_writer_new (GType type,
84 const gchar *name);
86 #endif /* __dconf_writer_h__ */