diff options
author | Ryan Lortie <desrt@desrt.ca> | 2010-07-15 21:18:55 -0400 |
---|---|---|
committer | Ryan Lortie <desrt@desrt.ca> | 2010-07-15 21:30:53 -0400 |
commit | e7fd6d849feaea45d76cda1eb074c9ea59b85637 (patch) | |
tree | ee014c5ab816989bf19c730f16373359453bb2e0 /client/dconf-client.c | |
parent | c37c49a0c25505e0136158b56aba3703db0fa828 (diff) | |
download | dconf-e7fd6d849feaea45d76cda1eb074c9ea59b85637.tar.gz |
Many improvements
- support the notion of 'profiles'
This is how we will configure layering of databases in dconf. It's
not wired-up yet (except to choose the name of the user database).
- support multiple writers in the service
Using the (very freshly API-broken) GDBus subtree support.
Introspection returns the names of existing databases, but any
object path can be used to create a new database.
- support the start of the 'shm' file
Used to prevent the reader from reopening the gvdb every time.
dconf reads now involve zero system calls in the usual case.
The server is queried on startup for the location of the shm files.
By default, this is in ~/.cache/dconf/ for now. This won't work
properly on NFS, but it's a start.
Diffstat (limited to 'client/dconf-client.c')
-rw-r--r-- | client/dconf-client.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/client/dconf-client.c b/client/dconf-client.c index fdc33d2..9b44397 100644 --- a/client/dconf-client.c +++ b/client/dconf-client.c @@ -241,6 +241,19 @@ dconf_client_class_init (DConfClientClass *class) object_class->finalize = dconf_client_finalize; } +static GVariant * +dconf_client_service_func (DConfEngineMessage *dcem) +{ + g_assert (dcem->bus_type == 'e'); + + return g_dbus_connection_call_sync (g_bus_get_sync (G_BUS_TYPE_SESSION, + NULL, NULL), + dcem->destination, dcem->object_path, + dcem->interface, dcem->method, + dcem->body, dcem->reply_type, + 0, -1, NULL, NULL); +} + /** * dconf_client_new: * @context: the context string (must by %NULL for now) @@ -265,7 +278,9 @@ dconf_client_new (const gchar *context, { DConfClient *client = g_object_new (DCONF_TYPE_CLIENT, NULL); - client->engine = dconf_engine_new (context); + dconf_engine_set_service_func (dconf_client_service_func); + + client->engine = dconf_engine_new (); client->will_write = will_write; client->watch_func = watch_func; client->user_data = user_data; |