2010-04-15 20:59:41 +02:00
|
|
|
/*
|
|
|
|
* 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"
|
|
|
|
|
2010-09-09 21:45:53 +02:00
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
void (* changed) (GObject *target,
|
|
|
|
GSettingsBackend *backend,
|
|
|
|
const gchar *key,
|
|
|
|
gpointer origin_tag);
|
|
|
|
void (* path_changed) (GObject *target,
|
|
|
|
GSettingsBackend *backend,
|
|
|
|
const gchar *path,
|
|
|
|
gpointer origin_tag);
|
|
|
|
void (* keys_changed) (GObject *target,
|
|
|
|
GSettingsBackend *backend,
|
|
|
|
const gchar *prefix,
|
|
|
|
const gchar * const *names,
|
|
|
|
gpointer origin_tag);
|
|
|
|
void (* writable_changed) (GObject *target,
|
|
|
|
GSettingsBackend *backend,
|
|
|
|
const gchar *key);
|
|
|
|
void (* path_writable_changed) (GObject *target,
|
|
|
|
GSettingsBackend *backend,
|
|
|
|
const gchar *path);
|
|
|
|
} GSettingsListenerVTable;
|
2010-04-15 20:59:41 +02:00
|
|
|
|
2010-09-09 21:45:53 +02:00
|
|
|
void g_settings_backend_watch (GSettingsBackend *backend,
|
|
|
|
const GSettingsListenerVTable *vtable,
|
|
|
|
GObject *target,
|
|
|
|
GMainContext *context);
|
|
|
|
void g_settings_backend_unwatch (GSettingsBackend *backend,
|
|
|
|
GObject *target);
|
2010-04-15 20:59:41 +02:00
|
|
|
|
2010-06-17 20:05:40 +02:00
|
|
|
GTree * g_settings_backend_create_tree (void);
|
2010-09-09 21:45:53 +02:00
|
|
|
|
|
|
|
GVariant * g_settings_backend_read (GSettingsBackend *backend,
|
|
|
|
const gchar *key,
|
|
|
|
const GVariantType *expected_type,
|
|
|
|
gboolean default_value);
|
2013-10-27 17:42:32 +01:00
|
|
|
GVariant * g_settings_backend_read_user_value (GSettingsBackend *backend,
|
|
|
|
const gchar *key,
|
|
|
|
const GVariantType *expected_type);
|
2010-09-09 21:45:53 +02:00
|
|
|
gboolean g_settings_backend_write (GSettingsBackend *backend,
|
|
|
|
const gchar *key,
|
|
|
|
GVariant *value,
|
|
|
|
gpointer origin_tag);
|
|
|
|
gboolean g_settings_backend_write_tree (GSettingsBackend *backend,
|
|
|
|
GTree *tree,
|
|
|
|
gpointer origin_tag);
|
|
|
|
void g_settings_backend_reset (GSettingsBackend *backend,
|
|
|
|
const gchar *key,
|
|
|
|
gpointer origin_tag);
|
|
|
|
gboolean g_settings_backend_get_writable (GSettingsBackend *backend,
|
|
|
|
const char *key);
|
|
|
|
void g_settings_backend_unsubscribe (GSettingsBackend *backend,
|
|
|
|
const char *name);
|
|
|
|
void g_settings_backend_subscribe (GSettingsBackend *backend,
|
|
|
|
const char *name);
|
|
|
|
GPermission * g_settings_backend_get_permission (GSettingsBackend *backend,
|
|
|
|
const gchar *path);
|
2010-06-17 20:05:40 +02:00
|
|
|
void g_settings_backend_sync_default (void);
|
2010-05-16 13:02:23 +02:00
|
|
|
|
2010-12-05 15:34:26 +01:00
|
|
|
GType g_null_settings_backend_get_type (void);
|
|
|
|
|
|
|
|
GType g_memory_settings_backend_get_type (void);
|
|
|
|
|
2012-04-12 05:25:09 +02:00
|
|
|
#ifdef HAVE_COCOA
|
2011-12-26 16:04:38 +01:00
|
|
|
GType g_nextstep_settings_backend_get_type (void);
|
|
|
|
#endif
|
|
|
|
|
2010-04-15 20:59:41 +02:00
|
|
|
#endif /* __G_SETTINGS_BACKEND_INTERNAL_H__ */
|