GSettingsBackend API/ABI change
[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 typedef void          (*GSettingsBackendChangedFunc)                    (GSettingsBackend    *backend,
30                                                                          const gchar         *key,
31                                                                          gpointer             origin_tag,
32                                                                          gpointer             user_data);
33 typedef void          (*GSettingsBackendPathChangedFunc)                (GSettingsBackend    *backend,
34                                                                          const gchar         *path,
35                                                                          gpointer             origin_tag,
36                                                                          gpointer             user_data);
37 typedef void          (*GSettingsBackendKeysChangedFunc)                (GSettingsBackend    *backend,
38                                                                          const gchar         *prefix,
39                                                                          const gchar * const *names,
40                                                                          gpointer             origin_tag,
41                                                                          gpointer             user_data);
42 typedef void          (*GSettingsBackendWritableChangedFunc)            (GSettingsBackend    *backend,
43                                                                          const gchar         *key,
44                                                                          gpointer             user_data);
45 typedef void          (*GSettingsBackendPathWritableChangedFunc)        (GSettingsBackend    *backend,
46                                                                          const gchar         *path,
47                                                                          gpointer             user_data);
48
49 G_GNUC_INTERNAL
50 void                    g_settings_backend_watch                        (GSettingsBackend                        *backend,
51                                                                          GSettingsBackendChangedFunc              changed,
52                                                                          GSettingsBackendPathChangedFunc          path_changed,
53                                                                          GSettingsBackendKeysChangedFunc          keys_changed,
54                                                                          GSettingsBackendWritableChangedFunc      writable_changed,
55                                                                          GSettingsBackendPathWritableChangedFunc  path_writable_changed,
56                                                                          gpointer                                 user_data);
57 G_GNUC_INTERNAL
58 void                    g_settings_backend_unwatch                      (GSettingsBackend                     *backend,
59                                                                          gpointer                              user_data);
60
61 G_GNUC_INTERNAL
62 gboolean                        g_settings_backend_supports_context     (const gchar                          *context);
63 G_GNUC_INTERNAL
64 GSettingsBackend *              g_settings_backend_get_with_context     (const gchar                          *context);
65 G_GNUC_INTERNAL
66 GTree *                         g_settings_backend_create_tree          (void);
67 G_GNUC_INTERNAL
68 GVariant *                      g_settings_backend_read                 (GSettingsBackend                     *backend,
69                                                                          const gchar                          *key,
70                                                                          const GVariantType                   *expected_type,
71                                                                          gboolean                              default_value);
72 G_GNUC_INTERNAL
73 gboolean                        g_settings_backend_write                (GSettingsBackend                     *backend,
74                                                                          const gchar                          *key,
75                                                                          GVariant                             *value,
76                                                                          gpointer                              origin_tag);
77 G_GNUC_INTERNAL
78 gboolean                        g_settings_backend_write_keys           (GSettingsBackend                     *backend,
79                                                                          GTree                                *tree,
80                                                                          gpointer                              origin_tag);
81 G_GNUC_INTERNAL
82 void                            g_settings_backend_reset                (GSettingsBackend                     *backend,
83                                                                          const gchar                          *key,
84                                                                          gpointer                              origin_tag);
85
86 G_GNUC_INTERNAL
87 void                            g_settings_backend_reset_path           (GSettingsBackend                     *backend,
88                                                                          const gchar                          *path,
89                                                                          gpointer                              origin_tag);
90
91 G_GNUC_INTERNAL
92 gboolean                        g_settings_backend_get_writable         (GSettingsBackend                     *backend,
93                                                                          const char                           *key);
94 G_GNUC_INTERNAL
95 void                            g_settings_backend_unsubscribe          (GSettingsBackend                     *backend,
96                                                                          const char                           *name);
97 G_GNUC_INTERNAL
98 void                            g_settings_backend_subscribe            (GSettingsBackend                     *backend,
99                                                                          const char                           *name);
100 #endif  /* __G_SETTINGS_BACKEND_INTERNAL_H__ */