Document the backend api as unstable

And protect it by G_SETTINGS_ENABLE_BACKEND to make this explicit.
This commit is contained in:
Matthias Clasen
2010-04-14 22:16:27 -04:00
parent d212045835
commit ac118e00be
4 changed files with 24 additions and 7 deletions

View File

@@ -13,6 +13,7 @@
#include <glib-object.h> #include <glib-object.h>
#define G_SETTINGS_ENABLE_BACKEND
#include <gio/gsettingsbackend.h> #include <gio/gsettingsbackend.h>
#define G_TYPE_DELAYED_SETTINGS_BACKEND (g_delayed_settings_backend_get_type ()) #define G_TYPE_DELAYED_SETTINGS_BACKEND (g_delayed_settings_backend_get_type ())

View File

@@ -1,6 +1,7 @@
#ifndef _gmemorysettingsbackend_h_ #ifndef _gmemorysettingsbackend_h_
#define _gmemorysettingsbackend_h_ #define _gmemorysettingsbackend_h_
#define G_SETTINGS_ENABLE_BACKEND
#include <gio/gsettingsbackend.h> #include <gio/gsettingsbackend.h>
G_BEGIN_DECLS G_BEGIN_DECLS

View File

@@ -23,6 +23,7 @@
#include "config.h" #include "config.h"
#define G_SETTINGS_ENABLE_BACKEND
#include "gsettingsbackendinternal.h" #include "gsettingsbackendinternal.h"
#include "gmemorysettingsbackend.h" #include "gmemorysettingsbackend.h"
#include "giomodule-priv.h" #include "giomodule-priv.h"
@@ -52,7 +53,9 @@ enum {
/** /**
* SECTION:gsettingsbackend * SECTION:gsettingsbackend
* @title: GSettingsBackend
* @short_description: an interface for settings backend implementations * @short_description: an interface for settings backend implementations
* @include: gio/gsettingsbackend.h
* *
* The #GSettingsBackend interface defines a generic interface for * The #GSettingsBackend interface defines a generic interface for
* non-strictly-typed data that is stored in a hierarchy. * non-strictly-typed data that is stored in a hierarchy.
@@ -69,6 +72,14 @@ enum {
* These trees always have strings as keys and #GVariant as values. * These trees always have strings as keys and #GVariant as values.
* g_settings_backend_create_tree() is a convenience function to create * g_settings_backend_create_tree() is a convenience function to create
* suitable trees. * suitable trees.
*
* <note><para>
* The #GSettingsBackend API is exported to allow third-party
* implementations, but does not carry the same stability guarantees
* as the public GIO API. For this reason, you have to define the
* C preprocessor symbol #G_SETTINGS_ENABLE_BACKEND before including
* <filename>gio/gsettingsbackend.h</filename>
* </para></note>
**/ **/
struct _GSettingsBackendWatch struct _GSettingsBackendWatch
@@ -170,9 +181,9 @@ is_path (const gchar *path)
* @name: the name of the key or path that changed * @name: the name of the key or path that changed
* @origin_tag: the origin tag * @origin_tag: the origin tag
* *
* Emits the changed signal on @backend. This function should only be * Emits the #GSettingsBackend::changed signal on @backend.
* called by the implementation itself, to indicate that a change has * This function should only be called by the implementation itself,
* occurred. * to indicate that a change has occurred.
* *
* @name may refer to a specific single key (ie: not ending in '/') or * @name may refer to a specific single key (ie: not ending in '/') or
* may refer to a set of keys (ie: ending in '/'). In the case that it * may refer to a set of keys (ie: ending in '/'). In the case that it
@@ -210,14 +221,14 @@ g_settings_backend_changed (GSettingsBackend *backend,
} }
/** /**
* g_settings_backend_changed: * g_settings_backend_keys_changed:
* @backend: a #GSettingsBackend implementation * @backend: a #GSettingsBackend implementation
* @items: the %NULL-terminated list of changed keys * @items: the %NULL-terminated list of changed keys
* @origin_tag: the origin tag * @origin_tag: the origin tag
* *
* Emits the changed signal on @backend. This function should only be * Emits the #GSettingsBackend::keys-changed signal on @backend.
* called by the implementation itself, to indicate that a change has * This function should only be called by the implementation itself,
* occurred. * to indicate that a change has occurred.
* *
* The list of changed keys, relative to the root of the settings store, * The list of changed keys, relative to the root of the settings store,
* is @prefix prepended to each of the @items. It must either be the * is @prefix prepended to each of the @items. It must either be the

View File

@@ -24,6 +24,10 @@
#ifndef __G_SETTINGS_BACKEND_H__ #ifndef __G_SETTINGS_BACKEND_H__
#define __G_SETTINGS_BACKEND_H__ #define __G_SETTINGS_BACKEND_H__
#ifndef G_SETTINGS_ENABLE_BACKEND
#error "You must define G_SETTINGS_ENABLE_BACKEND before including <gio/gsettingsbackend.h>."
#endif
#include <glib-object.h> #include <glib-object.h>
G_BEGIN_DECLS G_BEGIN_DECLS