gnome-keyring r1368 - in trunk: . common daemon library



Author: nnielsen
Date: Wed Nov  5 16:12:32 2008
New Revision: 1368
URL: http://svn.gnome.org/viewvc/gnome-keyring?rev=1368&view=rev

Log:
	* common/gkr-dbus.c:
	* common/gkr-dbus.h:
	* daemon/gkr-daemon.c:
	* daemon/gkr-daemon.h:
	* daemon/gkr-daemon-dbus.c:
	* daemon/Makefile.am:
	* library/gnome-keyring.c:
	* library/gnome-keyring-private.h:
	* configure.in: Make DBUS a required dependency of gnome-keyring. 

Modified:
   trunk/ChangeLog
   trunk/common/gkr-dbus.c
   trunk/common/gkr-dbus.h
   trunk/configure.in
   trunk/daemon/Makefile.am
   trunk/daemon/gkr-daemon-dbus.c
   trunk/daemon/gkr-daemon.c
   trunk/daemon/gkr-daemon.h
   trunk/library/gnome-keyring-private.h
   trunk/library/gnome-keyring.c

Modified: trunk/common/gkr-dbus.c
==============================================================================
--- trunk/common/gkr-dbus.c	(original)
+++ trunk/common/gkr-dbus.c	Wed Nov  5 16:12:32 2008
@@ -25,8 +25,6 @@
 
 #include "config.h"
 
-#ifdef WITH_DBUS
-
 #include "gkr-dbus.h"
 
 #include "gkr-cleanup.h"
@@ -421,5 +419,3 @@
 		connection_setup_free (cs);		
 }
 
-#endif /* WITH_DBUS */
-

Modified: trunk/common/gkr-dbus.h
==============================================================================
--- trunk/common/gkr-dbus.h	(original)
+++ trunk/common/gkr-dbus.h	Wed Nov  5 16:12:32 2008
@@ -25,8 +25,6 @@
 #ifndef GKRDBUS_H_
 #define GKRDBUS_H_
 
-#ifdef WITH_DBUS 
-
 #include <glib.h>
 #include <dbus/dbus.h>
 
@@ -34,6 +32,4 @@
 
 void gkr_dbus_disconnect_from_mainloop (DBusConnection *connection, GMainContext *context);
 
-#endif /* WITH_DBUS */
-
 #endif /*GKRDBUS_H_*/

Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in	(original)
+++ trunk/configure.in	Wed Nov  5 16:12:32 2008
@@ -216,39 +216,32 @@
 # 
 
 DBUS_REQUIRED=1.0
+PKG_CHECK_MODULES([DBUS], dbus-1 >= 1.0)
 
-PKG_CHECK_MODULES([DBUS], [dbus-1 >= $DBUS_REQUIRED], [enable_dbus=yes], [enable_dbus=no])
-
-dbus_status=no
-if test "$enable_dbus" = "yes"; then
-	AC_DEFINE_UNQUOTED(WITH_DBUS, 1, [Include DBus dependant code])
-	
-	DBUS_VERSION=`$PKG_CONFIG --modversion dbus-1`
-	DBUS_MAJOR_VERSION=`echo $DBUS_VERSION | cut -d. -f1`
-	DBUS_MINOR_VERSION=`echo $DBUS_VERSION | cut -d. -f2`
-	DBUS_MICRO_VERSION=`echo $DBUS_VERSION | cut -d. -f3`
-	DBUS_CFLAGS="$DBUS_CFLAGS -DGKR_DBUS_MAJOR_VERSION=$DBUS_MAJOR_VERSION"
-	DBUS_CFLAGS="$DBUS_CFLAGS -DGKR_DBUS_MINOR_VERSION=$DBUS_MINOR_VERSION"
-	DBUS_CFLAGS="$DBUS_CFLAGS -DGKR_DBUS_MICRO_VERSION=$DBUS_MICRO_VERSION"
-
-	DAEMON_CFLAGS="$DAEMON_CFLAGS $DBUS_CFLAGS"
-	DAEMON_LIBS="$DAEMON_LIBS $DBUS_LIBS"
-
-	LIBRARY_CFLAGS="$LIBRARY_CFLAGS $DBUS_CFLAGS"
-	LIBRARY_LIBS="$LIBRARY_LIBS $DBUS_LIBS"
-
-	AC_ARG_WITH(dbus-services,
-			  [AC_HELP_STRING([--with-dbus-services=<dir>],
-			  [where D-BUS session services directory is])])
-	if ! test -z "$with_dbus_services" ; then
-		DBUS_SERVICES_DIR="$with_dbus_services"
-	else
-		DBUS_SERVICES_DIR="$datadir/dbus-1/services"
-	fi
-	AC_SUBST(DBUS_SERVICES_DIR)
-	dbus_status=$DBUS_VERSION
+DBUS_VERSION=`$PKG_CONFIG --modversion dbus-1`
+DBUS_MAJOR_VERSION=`echo $DBUS_VERSION | cut -d. -f1`
+DBUS_MINOR_VERSION=`echo $DBUS_VERSION | cut -d. -f2`
+DBUS_MICRO_VERSION=`echo $DBUS_VERSION | cut -d. -f3`
+DBUS_CFLAGS="$DBUS_CFLAGS -DGKR_DBUS_MAJOR_VERSION=$DBUS_MAJOR_VERSION"
+DBUS_CFLAGS="$DBUS_CFLAGS -DGKR_DBUS_MINOR_VERSION=$DBUS_MINOR_VERSION"
+DBUS_CFLAGS="$DBUS_CFLAGS -DGKR_DBUS_MICRO_VERSION=$DBUS_MICRO_VERSION"
+
+DAEMON_CFLAGS="$DAEMON_CFLAGS $DBUS_CFLAGS"
+DAEMON_LIBS="$DAEMON_LIBS $DBUS_LIBS"
+
+LIBRARY_CFLAGS="$LIBRARY_CFLAGS $DBUS_CFLAGS"
+LIBRARY_LIBS="$LIBRARY_LIBS $DBUS_LIBS"
+
+AC_ARG_WITH(dbus-services,
+		  [AC_HELP_STRING([--with-dbus-services=<dir>],
+		  [where D-BUS session services directory is])])
+if ! test -z "$with_dbus_services" ; then
+	DBUS_SERVICES_DIR="$with_dbus_services"
+else
+	DBUS_SERVICES_DIR="$datadir/dbus-1/services"
 fi
-AM_CONDITIONAL(WITH_DBUS, test "$enable_dbus" == "yes")
+
+AC_SUBST(DBUS_SERVICES_DIR)
 
 # --------------------------------------------------------------------
 # HAL Checks

Modified: trunk/daemon/Makefile.am
==============================================================================
--- trunk/daemon/Makefile.am	(original)
+++ trunk/daemon/Makefile.am	Wed Nov  5 16:12:32 2008
@@ -54,12 +54,10 @@
 EXTRA_DIST = org.gnome.keyring.service.in
 CLEANFILES = org.gnome.keyring.service
 
-if WITH_DBUS
 servicedir       = $(DBUS_SERVICES_DIR)
 service_in_files = org.gnome.keyring.service.in
 service_DATA     = $(service_in_files:.service.in=.service)
 
 $(service_DATA): $(service_in_files) Makefile
 	@sed -e "s|\ BINDIR\@|$(bindir)|" $< > $@
-endif
 

Modified: trunk/daemon/gkr-daemon-dbus.c
==============================================================================
--- trunk/daemon/gkr-daemon-dbus.c	(original)
+++ trunk/daemon/gkr-daemon-dbus.c	Wed Nov  5 16:12:32 2008
@@ -22,8 +22,6 @@
 
 #include "config.h"
 
-#ifdef WITH_DBUS
-
 #include "gkr-daemon.h"
 
 #include "common/gkr-cleanup.h"
@@ -147,6 +145,3 @@
 		return;
 	}
 }
-
-
-#endif /* WITH_DBUS */

Modified: trunk/daemon/gkr-daemon.c
==============================================================================
--- trunk/daemon/gkr-daemon.c	(original)
+++ trunk/daemon/gkr-daemon.c	Wed Nov  5 16:12:32 2008
@@ -583,7 +583,6 @@
 	
 	gkr_async_workers_init (loop);
 	
-#ifdef WITH_DBUS
 	/* 
 	 * We may be launched before the DBUS session, (ie: via PAM) 
 	 * and DBus tries to launch itself somehow, so double check 
@@ -592,7 +591,6 @@
 	env = getenv ("DBUS_SESSION_BUS_ADDRESS");
 	if (env && env[0])
 		gkr_daemon_dbus_setup (loop);
-#endif
 
 	/*
 	 * Unlock the login keyring if we were given a password on STDIN.

Modified: trunk/daemon/gkr-daemon.h
==============================================================================
--- trunk/daemon/gkr-daemon.h	(original)
+++ trunk/daemon/gkr-daemon.h	Wed Nov  5 16:12:32 2008
@@ -49,8 +49,6 @@
 const gchar*   gkr_daemon_io_get_socket_path      (void);
 
 /* Dbus Initialization/Cleanup */
-#ifdef WITH_DBUS
 void gkr_daemon_dbus_setup (GMainLoop *loop);
-#endif 
 
 #endif /* GNOME_KEYRING_DAEMON_H */

Modified: trunk/library/gnome-keyring-private.h
==============================================================================
--- trunk/library/gnome-keyring-private.h	(original)
+++ trunk/library/gnome-keyring-private.h	Wed Nov  5 16:12:32 2008
@@ -52,11 +52,9 @@
 	time_t ctime;
 };
 
-#ifdef WITH_DBUS
 #define GNOME_KEYRING_DAEMON_SERVICE    "org.gnome.keyring"
 #define GNOME_KEYRING_DAEMON_PATH       "/org/gnome/keyring/daemon"
 #define GNOME_KEYRING_DAEMON_INTERFACE  "org.gnome.keyring.Daemon"
-#endif
 
 void 	_gnome_keyring_memory_dump (void);
 extern  gboolean gnome_keyring_memory_warning;

Modified: trunk/library/gnome-keyring.c
==============================================================================
--- trunk/library/gnome-keyring.c	(original)
+++ trunk/library/gnome-keyring.c	Wed Nov  5 16:12:32 2008
@@ -46,9 +46,7 @@
 #include <sys/un.h>
 #include <stdarg.h>
 
-#ifdef WITH_DBUS
 #include <dbus/dbus.h>
-#endif
 
 typedef enum {
 	CALLBACK_DONE,
@@ -100,8 +98,6 @@
 	GDestroyNotify destroy_reply_data;
 };
 
-#ifdef WITH_DBUS
-
 static gchar* 
 find_daemon_via_dbus ()
 {
@@ -153,8 +149,6 @@
 	return socket;
 }
 
-#endif 
-
 static int 
 connect_to_daemon_at (const gchar *path)
 {
@@ -200,7 +194,6 @@
 		}
 	}
 
-#ifdef WITH_DBUS
 	/* Try using DBus to find daemon */
 	if (sock < 0) {
 		gchar *dpath = find_daemon_via_dbus ();
@@ -213,7 +206,6 @@
 			}
 		}
 	}
-#endif
 
 	if (sock < 0)
 		return -1;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]