merge GSettingsBackend
[platform/upstream/glib.git] / gio / gsettingsbackendinternal.h
1 /*
2  * Copyright © 2009, 2010 Codethink Limited
3  * Copyright © 2010 Red Hat, Inc.
4  *
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.
9  *
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.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the
17  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18  * Boston, MA 02111-1307, USA.
19  *
20  * Authors: Ryan Lortie <desrt@desrt.ca>
21  *          Matthias Clasen <mclasen@redhat.com>
22  */
23
24 #ifndef __G_SETTINGS_BACKEND_INTERNAL_H__
25 #define __G_SETTINGS_BACKEND_INTERNAL_H__
26
27 #include "gsettingsbackend.h"
28
29 G_BEGIN_DECLS
30
31 typedef void          (*GSettingsBackendChangedFunc)                    (GSettingsBackend    *backend,
32                                                                          const gchar         *key,
33                                                                          gpointer             origin_tag,
34                                                                          gpointer             user_data);
35 typedef void          (*GSettingsBackendPathChangedFunc)                (GSettingsBackend    *backend,
36                                                                          const gchar         *path,
37                                                                          gpointer             origin_tag,
38                                                                          gpointer             user_data);
39 typedef void          (*GSettingsBackendKeysChangedFunc)                (GSettingsBackend    *backend,
40                                                                          const gchar         *prefix,
41                                                                          const gchar * const *names,
42                                                                          gpointer             origin_tag,
43                                                                          gpointer             user_data);
44 typedef void          (*GSettingsBackendWritableChangedFunc)            (GSettingsBackend    *backend,
45                                                                          const gchar         *key,
46                                                                          gpointer             user_data);
47 typedef void          (*GSettingsBackendPathWritableChangedFunc)        (GSettingsBackend    *backend,
48                                                                          const gchar         *path,
49                                                                          gpointer             user_data);
50
51 G_GNUC_INTERNAL
52 void                    g_settings_backend_watch                        (GSettingsBackend                        *backend,
53                                                                          GSettingsBackendChangedFunc              changed,
54                                                                          GSettingsBackendPathChangedFunc          path_changed,
55                                                                          GSettingsBackendKeysChangedFunc          keys_changed,
56                                                                          GSettingsBackendWritableChangedFunc      writable_changed,
57                                                                          GSettingsBackendPathWritableChangedFunc  path_writable_changed,
58                                                                          gpointer                                 user_data);
59 G_GNUC_INTERNAL
60 void                    g_settings_backend_unwatch                      (GSettingsBackend                     *backend,
61                                                                          gpointer                              user_data);
62
63 G_GNUC_INTERNAL
64 gboolean                        g_settings_backend_supports_context     (const gchar                          *context);
65 G_GNUC_INTERNAL
66 GSettingsBackend *              g_settings_backend_get_with_context     (const gchar                          *context);
67 G_GNUC_INTERNAL
68 GTree *                         g_settings_backend_create_tree          (void);
69 G_GNUC_INTERNAL
70 GVariant *                      g_settings_backend_read                 (GSettingsBackend                     *backend,
71                                                                          const gchar                          *key,
72                                                                          const GVariantType                   *expected_type);
73 G_GNUC_INTERNAL
74 void                            g_settings_backend_write                (GSettingsBackend                     *backend,
75                                                                          const gchar                          *key,
76                                                                          GVariant                             *value,
77                                                                          gpointer                              origin_tag);
78 G_GNUC_INTERNAL
79 void                            g_settings_backend_write_keys           (GSettingsBackend                     *backend,
80                                                                          GTree                                *tree,
81                                                                          gpointer                              origin_tag);
82 G_GNUC_INTERNAL
83 void                            g_settings_backend_reset                (GSettingsBackend                     *backend,
84                                                                          const gchar                          *name,
85                                                                          gpointer                              origin_tag);
86
87 G_GNUC_INTERNAL
88 gboolean                        g_settings_backend_get_writable         (GSettingsBackend                     *backend,
89                                                                          const char                           *name);
90
91 G_GNUC_INTERNAL
92 void                            g_settings_backend_unsubscribe          (GSettingsBackend                     *backend,
93                                                                          const char                           *name);
94 G_GNUC_INTERNAL
95 void                            g_settings_backend_subscribe            (GSettingsBackend                     *backend,
96                                                                          const char                           *name);
97
98 G_END_DECLS
99
100 #endif  /* __G_SETTINGS_BACKEND_INTERNAL_H__ */