Bug #636806.
GSettingsBackend
GSettingsBackendClass
G_SETTINGS_BACKEND_EXTENSION_POINT_NAME
+g_settings_backend_get_default
g_settings_backend_changed
g_settings_backend_path_changed
g_settings_backend_keys_changed
g_settings_backend_changed_tree
g_settings_backend_flatten_tree
g_keyfile_settings_backend_new
+g_memory_settings_backend_new
+g_null_settings_backend_new
<SUBSECTION Standard>
G_IS_SETTINGS_BACKEND
gdelayedsettingsbackend.h \
gdelayedsettingsbackend.c \
gkeyfilesettingsbackend.c \
- gmemorysettingsbackend.h \
gmemorysettingsbackend.c \
- gnullsettingsbackend.h \
gnullsettingsbackend.c \
gsettingsbackendinternal.h \
gsettingsbackend.c \
g_settings_backend_path_writable_changed
g_settings_backend_writable_changed
g_settings_backend_changed_tree
-#endif
+g_settings_backend_get_default
#endif
-#if IN_HEADER(__G_SETTINGS_BACKEND_H__)
#if IN_FILE(__G_KEYFILE_SETTINGS_BACKEND_C__)
g_keyfile_settings_backend_new
#endif
+
+#if IN_FILE(__G_MEMORY_SETTINGS_BACKEND_C__)
+g_memory_settings_backend_new
+#endif
+
+#if IN_FILE(__G_NULL_SETTINGS_BACKEND_C__)
+g_null_settings_backend_new
+#endif
#endif
#if IN_HEADER(__G_SETTINGS_H__)
#include "giomodule.h"
#include "giomodule-priv.h"
-#include "gmemorysettingsbackend.h"
#include "glocalfilemonitor.h"
#include "glocaldirectorymonitor.h"
#include "gnativevolumemonitor.h"
#include "gproxyresolver.h"
#include "gproxy.h"
+#include "gsettingsbackendinternal.h"
#include "gsocks4proxy.h"
#include "gsocks4aproxy.h"
#include "gsocks5proxy.h"
}
/* Initialize types from built-in "modules" */
+ g_null_settings_backend_get_type ();
g_memory_settings_backend_get_type ();
#if defined(HAVE_SYS_INOTIFY_H) || defined(HAVE_LINUX_INOTIFY_H)
_g_inotify_directory_monitor_get_type ();
#include "config.h"
-#include "gmemorysettingsbackend.h"
#include "gsimplepermission.h"
-#include "gsettingsbackend.h"
+#include "gsettingsbackendinternal.h"
#include "giomodule.h"
backend_class->get_permission = g_memory_settings_backend_get_permission;
object_class->finalize = g_memory_settings_backend_finalize;
}
+
+GSettingsBackend *
+g_memory_settings_backend_new (void)
+{
+ return g_object_new (G_TYPE_MEMORY_SETTINGS_BACKEND, NULL);
+}
+++ /dev/null
-/*
- * Copyright © 2010 Codethink Limited
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the licence, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Author: Ryan Lortie <desrt@desrt.ca>
- */
-
-#ifndef __GMEMORY_SETTINGS_BACKEND_H__
-#define __GMEMORY_SETTINGS_BACKEND_H__
-
-#include <glib-object.h>
-
-G_GNUC_INTERNAL
-GType g_memory_settings_backend_get_type (void);
-
-#endif /* __G_MEMORY_SETTINGS_BACKEND_H__ */
#include "config.h"
-#include "gnullsettingsbackend.h"
+#include "gsettingsbackendinternal.h"
+#include "giomodule.h"
#include "gsimplepermission.h"
typedef GSettingsBackendClass GNullSettingsBackendClass;
typedef GSettingsBackend GNullSettingsBackend;
-static GType g_null_settings_backend_get_type (void);
-G_DEFINE_TYPE (GNullSettingsBackend,
- g_null_settings_backend,
- G_TYPE_SETTINGS_BACKEND)
+G_DEFINE_TYPE_WITH_CODE (GNullSettingsBackend,
+ g_null_settings_backend,
+ G_TYPE_SETTINGS_BACKEND,
+ g_io_extension_point_implement (G_SETTINGS_BACKEND_EXTENSION_POINT_NAME,
+ g_define_type_id, "null", 10))
static GVariant *
g_null_settings_backend_read (GSettingsBackend *backend,
+++ /dev/null
-/*
- * Copyright © 2010 Codethink Limited
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the licence, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Author: Ryan Lortie <desrt@desrt.ca>
- */
-
-#ifndef __G_NULL_SETTINGS_BACKEND_H__
-#define __G_NULL_SETTINGS_BACKEND_H__
-
-#include <gio/gsettingsbackend.h>
-
-G_GNUC_INTERNAL
-GSettingsBackend * g_null_settings_backend_new (void);
-
-#endif /* __G_NULL_SETTINGS_BACKEND_H__ */
#include "config.h"
#include "gsettingsbackendinternal.h"
-#include "gnullsettingsbackend.h"
#include "gsimplepermission.h"
#include "giomodule-priv.h"
#include "gio-marshal.h"
g_free, (GDestroyNotify) g_variant_unref);
}
-/*< private >
+/**
* g_settings_backend_get_default:
* @returns: the default #GSettingsBackend
*
* environment variable to the name of a settings backend.
*
* The user gets a reference to the backend.
+ *
+ * Since: 2.28
*/
GSettingsBackend *
g_settings_backend_get_default (void)
GTree *tree,
gpointer origin_tag);
+GSettingsBackend * g_settings_backend_get_default (void);
+
GSettingsBackend * g_keyfile_settings_backend_new (const gchar *filename,
const gchar *root_path,
const gchar *root_group);
+GSettingsBackend * g_null_settings_backend_new (void);
+
+GSettingsBackend * g_memory_settings_backend_new (void);
+
G_END_DECLS
#endif /* __G_SETTINGS_BACKEND_H__ */
GPermission * g_settings_backend_get_permission (GSettingsBackend *backend,
const gchar *path);
G_GNUC_INTERNAL
-GSettingsBackend * g_settings_backend_get_default (void);
-G_GNUC_INTERNAL
void g_settings_backend_sync_default (void);
+G_GNUC_INTERNAL
+GType g_null_settings_backend_get_type (void);
+
+G_GNUC_INTERNAL
+GType g_memory_settings_backend_get_type (void);
+
#endif /* __G_SETTINGS_BACKEND_INTERNAL_H__ */