From 4bd7ed768781c376199a11dbb674c4cedce640e4 Mon Sep 17 00:00:00 2001 From: Brian Tarricone Date: Wed, 5 Sep 2007 05:38:32 +0000 Subject: * change xfconf_channel_get_*() API to return the values directly and take a 'default_value' param for when a property doesn't exist * add API to DBus interface: GetAll, Exists, Remove * add XfconfChannel API: xfconf_channel_get_all(), xfconf_channel_property_exists(), xfconf_channel_remove_property() (Old svn revision: 26713) --- xfconfd/xfconf-backend.c | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) (limited to 'xfconfd/xfconf-backend.c') diff --git a/xfconfd/xfconf-backend.c b/xfconfd/xfconf-backend.c index 4b67aaf..03402a2 100644 --- a/xfconfd/xfconf-backend.c +++ b/xfconfd/xfconf-backend.c @@ -102,6 +102,49 @@ xfconf_backend_get(XfconfBackend *backend, return iface->get(backend, channel, property, value, error); } +gboolean +xfconf_backend_get_all(XfconfBackend *backend, + const gchar *channel, + GHashTable **properties, + GError **error) +{ + XfconfBackendInterface *iface = XFCONF_BACKEND_GET_INTERFACE(backend); + + g_return_val_if_fail(iface && iface->get_all && channel && properties + && (!error || *error), FALSE); + + return iface->get_all(backend, channel, properties, error); +} + +gboolean +xfconf_backend_exists(XfconfBackend *backend, + const gchar *channel, + const gchar *property, + gboolean *exists, + GError **error) +{ + XfconfBackendInterface *iface = XFCONF_BACKEND_GET_INTERFACE(backend); + + g_return_val_if_fail(iface && iface->exists && channel && property && exists + && (!error || *error), FALSE); + + return iface->exists(backend, channel, property, exists, error); +} + +gboolean +xfconf_backend_remove(XfconfBackend *backend, + const gchar *channel, + const gchar *property, + GError **error) +{ + XfconfBackendInterface *iface = XFCONF_BACKEND_GET_INTERFACE(backend); + + g_return_val_if_fail(iface && iface->remove && channel && property + && (!error || *error), FALSE); + + return iface->remove(backend, channel, property, error); +} + gboolean xfconf_backend_flush(XfconfBackend *backend, GError **error) -- cgit v1.2.1