diff options
author | Ryan Lortie <desrt@desrt.ca> | 2011-09-11 12:44:36 -0400 |
---|---|---|
committer | Ryan Lortie <desrt@desrt.ca> | 2011-09-11 12:44:36 -0400 |
commit | 83e61fdbe0b71bc20c82789b56c48e6dcd44981a (patch) | |
tree | 1493eeb8cf53739d4ea657a52308d80776b62be9 /service | |
parent | 8f9f2b5ebd55164985c8330d33d0f8269da4a1c8 (diff) | |
download | dconf-83e61fdbe0b71bc20c82789b56c48e6dcd44981a.tar.gz |
Remove 'set lock' support from dconf
The dconf service can not presently be run at the system level and it
doesn't make sense to support locks on user-level databases. It also
became clear that most distributors and sysadmins would rather work
directly with text files anyway, so we supported that directly instead.
For this reason, 'set lock' support has never been properly implemented.
All the plumbing was added for it though, which means we have it
appearing on the API of the client library and documented in the help of
the commandline tool. This is misleading, since these functions do
nothing at all (and actually contain bugs anyway since their
do-nothingness was never actually tested).
For now, we rip out these functions. We can add them back later if we
decide to support this properly.
Diffstat (limited to 'service')
-rw-r--r-- | service/dconf-interfaces.c | 11 | ||||
-rw-r--r-- | service/dconf-writer.c | 9 | ||||
-rw-r--r-- | service/dconf-writer.h | 4 | ||||
-rw-r--r-- | service/service.c | 18 |
4 files changed, 1 insertions, 41 deletions
diff --git a/service/dconf-interfaces.c b/service/dconf-interfaces.c index cac039c..180f3a3 100644 --- a/service/dconf-interfaces.c +++ b/service/dconf-interfaces.c @@ -27,15 +27,12 @@ static const GDBusArgInfo names_arg = { -1, (gchar *) "names", (gchar *) "as" }; static const GDBusArgInfo tag_arg = { -1, (gchar *) "tag", (gchar *) "s" }; static const GDBusArgInfo value_arg = { -1, (gchar *) "value", (gchar *) "av" }; static const GDBusArgInfo values_arg = { -1, (gchar *) "values", (gchar *) "a(sav)" }; -static const GDBusArgInfo locked_arg = { -1, (gchar *) "locked", (gchar *) "b" }; static const GDBusArgInfo *write_in[] = { &name_arg, &value_arg, NULL }; static const GDBusArgInfo *write_out[] = { &tag_arg, NULL }; static const GDBusArgInfo *many_in[] = { &path_arg, &values_arg, NULL }; static const GDBusArgInfo *many_out[] = { &tag_arg, NULL }; static const GDBusArgInfo *notify_args[] = { &path_arg, &names_arg, &tag_arg, NULL }; -static const GDBusArgInfo *setlocked_in[] = { &name_arg, &locked_arg, NULL }; -static const GDBusArgInfo *setlocked_out[] = { NULL }; static const GDBusMethodInfo write_method = { -1, (gchar *) "Write", @@ -49,12 +46,6 @@ static const GDBusMethodInfo writemany_method = { (GDBusArgInfo **) many_out }; -static const GDBusMethodInfo setlocked_method = { - -1, (gchar *) "SetLocked", - (GDBusArgInfo **) setlocked_in, - (GDBusArgInfo **) setlocked_out -}; - static const GDBusSignalInfo notify_signal = { -1, (gchar *) "Notify", (GDBusArgInfo **) notify_args @@ -65,7 +56,7 @@ static const GDBusPropertyInfo shmdir_property = { }; static const GDBusMethodInfo *writer_methods[] = { - &write_method, &writemany_method, &setlocked_method, NULL + &write_method, &writemany_method, NULL }; static const GDBusSignalInfo *writer_signals[] = { diff --git a/service/dconf-writer.c b/service/dconf-writer.c index 3b98efd..3f2aeee 100644 --- a/service/dconf-writer.c +++ b/service/dconf-writer.c @@ -128,15 +128,6 @@ dconf_writer_write_many (DConfWriter *writer, return TRUE; } -gboolean -dconf_writer_set_lock (DConfWriter *writer, - const gchar *name, - gboolean locked, - GError **error) -{ - return TRUE; -} - const gchar * dconf_writer_get_name (DConfWriter *writer) { diff --git a/service/dconf-writer.h b/service/dconf-writer.h index 4c2e6b3..c469d1b 100644 --- a/service/dconf-writer.h +++ b/service/dconf-writer.h @@ -41,9 +41,5 @@ gboolean dconf_writer_write_many (DConfWr GVariant * const *values, gsize n_items, GError **error); -gboolean dconf_writer_set_lock (DConfWriter *writer, - const gchar *name, - gboolean locked, - GError **error); #endif /* __dconf_writer_h__ */ diff --git a/service/service.c b/service/service.c index 99051ec..407f8a1 100644 --- a/service/service.c +++ b/service/service.c @@ -280,24 +280,6 @@ method_call (GDBusConnection *connection, g_free (tag); } - else if (strcmp (method_name, "SetLocked") == 0) - { - GError *error = NULL; - const gchar *name; - gboolean locked; - - g_variant_get (parameters, "(&sb)", &name, &locked); - - if (!dconf_writer_set_lock (writer, name, locked, &error)) - { - g_dbus_method_invocation_return_gerror (invocation, error); - g_error_free (error); - return; - } - - g_dbus_method_invocation_return_value (invocation, NULL); - } - else g_assert_not_reached (); } |