[gconf/port-to-dbus: 18/23] gconfd: Add conditional DBUS code
- From: Ross Burton <rburton src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gconf/port-to-dbus: 18/23] gconfd: Add conditional DBUS code
- Date: Tue, 28 Jun 2011 14:29:04 +0000 (UTC)
commit 85df3c93ac653c9d5f6718b2554fe75831c87ab7
Author: Rob Bradford <rob linux intel com>
Date: Mon Jun 20 13:56:16 2011 +0100
gconfd: Add conditional DBUS code
gconf/gconfd.c | 26 ++++++++++++++++++++++++++
1 files changed, 26 insertions(+), 0 deletions(-)
---
diff --git a/gconf/gconfd.c b/gconf/gconfd.c
index c3697e2..0b06b64 100644
--- a/gconf/gconfd.c
+++ b/gconf/gconfd.c
@@ -36,6 +36,11 @@
#include "gconfd.h"
#include "gconf-database.h"
+#ifdef HAVE_DBUS
+#include "gconf-database-dbus.h"
+#include "gconfd-dbus.h"
+#endif
+
#ifdef HAVE_CORBA
#include <orbit/orbit.h>
@@ -888,6 +893,10 @@ main(int argc, char** argv)
init_databases ();
+#ifdef HAVE_DBUS
+ if (!gconfd_dbus_init ())
+ return 1;
+#endif
#ifdef HAVE_CORBA
orb = gconf_orb_get ();
@@ -924,6 +933,9 @@ main(int argc, char** argv)
}
#endif
+#ifdef HAVE_DBUS
+ gconf_server_load_sources ();
+#endif
#ifdef HAVE_CORBA
/* notify caller that we're done either getting the lock
@@ -1034,7 +1046,11 @@ periodic_cleanup_timeout(gpointer data)
#endif
drop_old_databases ();
+#ifdef HAVE_DBUS
+ if (no_databases_in_use () && gconfd_dbus_client_count () == 0)
+#else
if (no_databases_in_use () && client_count () == 0)
+#endif
{
gconf_log (GCL_INFO, _("GConf server is not in use, shutting down."));
gconfd_main_quit ();
@@ -1053,6 +1069,7 @@ periodic_cleanup_timeout(gpointer data)
/* Compress the running state file */
logfile_save ();
+#endif
need_log_cleanup = FALSE;
@@ -1391,6 +1408,15 @@ gconfd_notify_other_listeners (GConfDatabase *modified_db,
FALSE);
CORBA_free (cvalue);
#endif
+#ifdef HAVE_DBUS
+ gconf_database_dbus_notify_listeners (db,
+ NULL,
+ key,
+ value,
+ is_default,
+ is_writable,
+ FALSE);
+#endif
}
tmp2 = tmp2->next;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]