From d22d6a90652e397dda32682ac1ea305a81854024 Mon Sep 17 00:00:00 2001 From: Mark McLoughlin Date: Tue, 30 Mar 2004 15:06:19 +0000 Subject: Allow backends to notify the daemon of changes to entries. Based on a 2004-03-25 Mark McLoughlin Allow backends to notify the daemon of changes to entries. Based on a patch from Cyrille Moureaux in bug #07692. * gconf/gconf-backend.h: add add_listener() and remove_listener() members to the vtable. * gconf/gconf-database.c: (source_notify_cb): re-compute the value and notify listeners when the backend reports the key has changed. (gconf_database_readd_listener), (gconf_database_remove_listener): add/remove backend listeners. * gconf/gconf-sources.[c]: (gconf_source_add_listener), (gconf_source_remove_listener), (gconf_sources_add_listener), (gconf_sources_remove_listener): impl. the glue. * doc/gconf/tmpl/gconf-backend.sgml: update the backend documentation. * backends/markup-backend.c, backends/xml-backend.c: set the add_listener() and remove_listener() members to NULL. --- backends/markup-backend.c | 4 +++- backends/xml-backend.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'backends') diff --git a/backends/markup-backend.c b/backends/markup-backend.c index 724034b8..4bde3b66 100644 --- a/backends/markup-backend.c +++ b/backends/markup-backend.c @@ -151,7 +151,9 @@ static GConfBackendVTable markup_vtable = { sync_all, destroy_source, clear_cache, - blow_away_locks + blow_away_locks, + NULL, /* add_listener */ + NULL /* remove_listener */ }; static void diff --git a/backends/xml-backend.c b/backends/xml-backend.c index d325c44f..483a3fff 100644 --- a/backends/xml-backend.c +++ b/backends/xml-backend.c @@ -228,7 +228,9 @@ static GConfBackendVTable xml_vtable = { sync_all, destroy_source, clear_cache, - blow_away_locks + blow_away_locks, + NULL, /* add_listener */ + NULL /* remove_listener */ }; static void -- cgit v1.2.1