Commit 18ba085d authored by Allison Karlitskaya's avatar Allison Karlitskaya

merge GSettingsBackend

parent 8d6492ed
......@@ -50,6 +50,7 @@ IGNORE_HFILES= \
gnativevolumemonitor.h \
gnetworkingprivate.h \
gpollfilemonitor.h \
gsettingsbackendinternal.h \
gthreadedresolver.h \
gunionvolumemonitor.h \
gunixdrive.h \
......
......@@ -79,6 +79,13 @@ gio-marshal.c: gio-marshal.h gio-marshal.list
$(glib_genmarshal) --prefix=_gio_marshal $(srcdir)/gio-marshal.list --body --internal) > $@.tmp && \
mv $@.tmp $@
settings_sources = \
gsettingsbackendinternal.h \
gsettingsbackend.c
settings_headers = \
gsettingsbackend.h
local_sources = \
glocaldirectorymonitor.c \
glocaldirectorymonitor.h \
......@@ -285,6 +292,7 @@ libgio_2_0_la_SOURCES = \
$(appinfo_sources) \
$(unix_sources) \
$(win32_sources) \
$(settings_sources) \
$(local_sources) \
$(marshal_sources) \
$(NULL)
......@@ -411,6 +419,7 @@ gio_headers = \
gvolumemonitor.h \
gzlibcompressor.h \
gzlibdecompressor.h \
$(settings_headers) \
$(NULL)
gioincludedir=$(includedir)/glib-2.0/gio/
......
......@@ -1340,3 +1340,17 @@ g_file_descriptor_based_get_type G_GNUC_CONST
g_file_descriptor_based_get_fd
#endif
#endif
#if IN_HEADER(__G_SETTINGS_BACKEND_H__)
#if IN_FILE(__G_SETTINGS_BACKEND_C__)
g_settings_backend_get_type
g_settings_backend_changed
g_settings_backend_keys_changed
g_settings_backend_path_changed
g_settings_backend_path_writable_changed
g_settings_backend_writable_changed
g_settings_backend_changed_tree
#endif
#endif
This diff is collapsed.
/*
* Copyright © 2009, 2010 Codethink Limited
* Copyright © 2010 Red Hat, Inc.
*
* 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.
*
* Authors: Ryan Lortie <desrt@desrt.ca>
* Matthias Clasen <mclasen@redhat.com>
*/
#ifndef __G_SETTINGS_BACKEND_H__
#define __G_SETTINGS_BACKEND_H__
#if !defined (G_SETTINGS_ENABLE_BACKEND) && !defined (GIO_COMPILATION)
#error "You must define G_SETTINGS_ENABLE_BACKEND before including <gio/gsettingsbackend.h>."
#endif
#include <glib-object.h>
G_BEGIN_DECLS
#define G_TYPE_SETTINGS_BACKEND (g_settings_backend_get_type ())
#define G_SETTINGS_BACKEND(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \
G_TYPE_SETTINGS_BACKEND, GSettingsBackend))
#define G_SETTINGS_BACKEND_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \
G_TYPE_SETTINGS_BACKEND, GSettingsBackendClass))
#define G_IS_SETTINGS_BACKEND(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \
G_TYPE_SETTINGS_BACKEND))
#define G_IS_SETTINGS_BACKEND_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \
G_TYPE_SETTINGS_BACKEND))
#define G_SETTINGS_BACKEND_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \
G_TYPE_SETTINGS_BACKEND, GSettingsBackendClass))
/**
* G_SETTINGS_BACKEND_EXTENSION_POINT_NAME:
*
* Extension point for #GSettingsBackend functionality.
**/
#define G_SETTINGS_BACKEND_EXTENSION_POINT_NAME "gsettings-backend"
/**
* GSettingsBackend:
*
* An implementation of a settings storage repository.
**/
typedef struct _GSettingsBackendPrivate GSettingsBackendPrivate;
typedef struct _GSettingsBackendClass GSettingsBackendClass;
typedef struct _GSettingsBackend GSettingsBackend;
struct _GSettingsBackendClass
{
GObjectClass parent_class;
gboolean (*supports_context) (const gchar *context);
GVariant * (*read) (GSettingsBackend *backend,
const gchar *key,
const GVariantType *expected_type);
void (*write) (GSettingsBackend *backend,
const gchar *key,
GVariant *value,
gpointer origin_tag);
void (*write_keys) (GSettingsBackend *backend,
GTree *tree,
gpointer origin_tag);
void (*reset) (GSettingsBackend *backend,
const gchar *name,
gpointer origin_tag);
gboolean (*get_writable) (GSettingsBackend *backend,
const gchar *name);
void (*subscribe) (GSettingsBackend *backend,
const gchar *name);
void (*unsubscribe) (GSettingsBackend *backend,
const gchar *name);
};
struct _GSettingsBackend
{
GObject parent_instance;
/*< private >*/
GSettingsBackendPrivate *priv;
};
GType g_settings_backend_get_type (void);
void g_settings_backend_changed (GSettingsBackend *backend,
const gchar *key,
gpointer origin_tag);
void g_settings_backend_path_changed (GSettingsBackend *backend,
const gchar *path,
gpointer origin_tag);
void g_settings_backend_keys_changed (GSettingsBackend *backend,
const gchar *path,
gchar const * const *items,
gpointer origin_tag);
void g_settings_backend_path_writable_changed(GSettingsBackend *backend,
const gchar *path);
void g_settings_backend_writable_changed (GSettingsBackend *backend,
const gchar *key);
void g_settings_backend_changed_tree (GSettingsBackend *backend,
GTree *tree,
gpointer origin_tag);
G_END_DECLS
#endif /* __G_SETTINGS_BACKEND_H__ */
/*
* Copyright © 2009, 2010 Codethink Limited
* Copyright © 2010 Red Hat, Inc.
*
* 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.
*
* Authors: Ryan Lortie <desrt@desrt.ca>
* Matthias Clasen <mclasen@redhat.com>
*/
#ifndef __G_SETTINGS_BACKEND_INTERNAL_H__
#define __G_SETTINGS_BACKEND_INTERNAL_H__
#include "gsettingsbackend.h"
G_BEGIN_DECLS
typedef void (*GSettingsBackendChangedFunc) (GSettingsBackend *backend,
const gchar *key,
gpointer origin_tag,
gpointer user_data);
typedef void (*GSettingsBackendPathChangedFunc) (GSettingsBackend *backend,
const gchar *path,
gpointer origin_tag,
gpointer user_data);
typedef void (*GSettingsBackendKeysChangedFunc) (GSettingsBackend *backend,
const gchar *prefix,
const gchar * const *names,
gpointer origin_tag,
gpointer user_data);
typedef void (*GSettingsBackendWritableChangedFunc) (GSettingsBackend *backend,
const gchar *key,
gpointer user_data);
typedef void (*GSettingsBackendPathWritableChangedFunc) (GSettingsBackend *backend,
const gchar *path,
gpointer user_data);
G_GNUC_INTERNAL
void g_settings_backend_watch (GSettingsBackend *backend,
GSettingsBackendChangedFunc changed,
GSettingsBackendPathChangedFunc path_changed,
GSettingsBackendKeysChangedFunc keys_changed,
GSettingsBackendWritableChangedFunc writable_changed,
GSettingsBackendPathWritableChangedFunc path_writable_changed,
gpointer user_data);
G_GNUC_INTERNAL
void g_settings_backend_unwatch (GSettingsBackend *backend,
gpointer user_data);
G_GNUC_INTERNAL
gboolean g_settings_backend_supports_context (const gchar *context);
G_GNUC_INTERNAL
GSettingsBackend * g_settings_backend_get_with_context (const gchar *context);
G_GNUC_INTERNAL
GTree * g_settings_backend_create_tree (void);
G_GNUC_INTERNAL
GVariant * g_settings_backend_read (GSettingsBackend *backend,
const gchar *key,
const GVariantType *expected_type);
G_GNUC_INTERNAL
void g_settings_backend_write (GSettingsBackend *backend,
const gchar *key,
GVariant *value,
gpointer origin_tag);
G_GNUC_INTERNAL
void g_settings_backend_write_keys (GSettingsBackend *backend,
GTree *tree,
gpointer origin_tag);
G_GNUC_INTERNAL
void g_settings_backend_reset (GSettingsBackend *backend,
const gchar *name,
gpointer origin_tag);
G_GNUC_INTERNAL
gboolean g_settings_backend_get_writable (GSettingsBackend *backend,
const char *name);
G_GNUC_INTERNAL
void g_settings_backend_unsubscribe (GSettingsBackend *backend,
const char *name);
G_GNUC_INTERNAL
void g_settings_backend_subscribe (GSettingsBackend *backend,
const char *name);
G_END_DECLS
#endif /* __G_SETTINGS_BACKEND_INTERNAL_H__ */
......@@ -9,7 +9,7 @@ if ! which readelf 2>/dev/null >/dev/null; then
exit 0
fi
SKIP='\<g_access\|\<g_array_\|\<g_ascii\|\<g_list_\|\<g_assertion_message\|\<g_warn_message\|\<g_atomic\|\<g_bit_\|\<g_boxed\|\<g_build_filename\|\<g_byte_array\|\<g_checksum\|\<g_child_watch\|\<g_clear_error\|\<g_convert\|\<g_dir_\|\<g_enum_\|\<g_error_\|\<g_prefix_error\|\<g_file_error_quark\|\<g_file_get_contents\|\<g_file_set_contents\|\<g_file_test\|\<g_file_read_link\|\<g_filename_\|\<g_find_program_in_path\|\<g_flags_\|\<g_free\|\<g_get_\|\<g_getenv\|\<g_setenv\|\<g_hash_table_\|\<g_hostname_\|\<g_iconv\|\<g_idle_\|\<g_intern_static_string\|\<g_io_add_watch\|\<g_io_channel_\|\<g_io_create_watch\|\<g_key_file_\|\<g_listenv\|\<g_locale_to_utf8\|\<g_log\|\<g_main_context_\|\<g_main_current_source\|\<g_main_loop_\|\<g_malloc\|\<g_markup_\|\<g_mkdir_\|\<g_mkstemp\|\<g_module_\|\<g_object_\|\<g_once_\|\<g_param_spec_\|\<g_path_\|\<g_poll\|\<g_printerr\|\<g_propagate_error\|\<g_ptr_array_\|\<g_qsort_\|\<g_quark_\|\<g_queue_\|\<g_random_int_range\|\<g_realloc\|\<g_return_if_fail\|\<g_set_error\|\<g_shell_\|\<g_signal_\|\<g_slice_\|\<g_slist_\|\<g_snprintf\|\<g_source_\|\<g_spawn_\|\<g_static_\|\<g_str\|\<g_thread_pool_\|\<g_time_val_add\|\<g_timeout_\|\<g_type_\|\<g_unlink\|\<g_uri_\|\<g_utf8_\|\<g_value_'
SKIP='\<g_access\|\<g_array_\|\<g_ascii\|\<g_list_\|\<g_assertion_message\|\<g_warn_message\|\<g_atomic\|\<g_bit_\|\<g_boxed\|\<g_build_filename\|\<g_byte_array\|\<g_checksum\|\<g_child_watch\|\<g_clear_error\|\<g_convert\|\<g_dir_\|\<g_enum_\|\<g_error_\|\<g_prefix_error\|\<g_file_error_quark\|\<g_file_get_contents\|\<g_file_set_contents\|\<g_file_test\|\<g_file_read_link\|\<g_filename_\|\<g_find_program_in_path\|\<g_flags_\|\<g_free\|\<g_get_\|\<g_getenv\|\<g_setenv\|\<g_hash_table_\|\<g_hostname_\|\<g_iconv\|\<g_idle_\|\<g_intern_static_string\|\<g_io_add_watch\|\<g_io_channel_\|\<g_io_create_watch\|\<g_key_file_\|\<g_listenv\|\<g_locale_to_utf8\|\<g_log\|\<g_main_context_\|\<g_main_current_source\|\<g_main_loop_\|\<g_malloc\|\<g_markup_\|\<g_mkdir_\|\<g_mkstemp\|\<g_module_\|\<g_object_\|\<g_once_\|\<g_param_spec_\|\<g_path_\|\<g_poll\|\<g_printerr\|\<g_propagate_error\|\<g_ptr_array_\|\<g_qsort_\|\<g_quark_\|\<g_queue_\|\<g_random_int_range\|\<g_realloc\|\<g_return_if_fail\|\<g_set_error\|\<g_shell_\|\<g_signal_\|\<g_slice_\|\<g_slist_\|\<g_snprintf\|\<g_source_\|\<g_spawn_\|\<g_static_\|\<g_str\|\<g_thread_pool_\|\<g_time_val_add\|\<g_timeout_\|\<g_type_\|\<g_unlink\|\<g_uri_\|\<g_utf8_\|\<g_value_\|\<g_tree_'
for so in .libs/lib*.so; do
echo Checking $so for local PLT entries
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment