+2006-10-19 John (J5) Palmieri <johnp@redhat.com>
+
+ * bus/dir-watch-default.c, bus/dir-watch-dnotify.c,
+ bus/dir-watch-kqueue.c (bus_watch_directory): Pass in a BusContext
+ instead of a void *. kqueue uses this to get the context's loop
+ while the other modules ignore the parameter. This allows us to
+ avoid platform conditionals
+
+ * bus/bus.c (process_config_postinit): Pass in the context to the
+ watch
+
2006-10-19 John (J5) Palmieri <johnp@redhat.com>
* bus/messagebus.in, bus/rc.messagebus.in: run dbus-uuidgen --ensure
}
void
-bus_watch_directory (const char *dir, void *userdata)
+bus_watch_directory (const char *dir, BusContext *context)
{
}
static int num_fds = 0;
void
-bus_watch_directory (const char *dir, void *userdata)
+bus_watch_directory (const char *dir, BusContext *context)
{
int fd;
}
void
-bus_watch_directory (const char *dir, void *userdata)
+bus_watch_directory (const char *dir, BusContext *context)
{
int fd;
struct kevent ev;
goto out;
}
- loop = userdata;
+ loop = bus_context_get_loop (context);
watch = _dbus_watch_new (kq, DBUS_WATCH_READABLE, TRUE,
_handle_kqueue_watch, NULL, NULL);
*
*/
+#include "bus.h"
+
#ifndef DIR_WATCH_H
#define DIR_WATCH_H
/* setup a watch on a directory (OS dependent, may be a NOP) */
-void bus_watch_directory (const char *directory, void *userdata);
+void bus_watch_directory (const char *directory, BusContext *context);
/* drop all the watches previously set up by bus_config_watch_directory (OS dependent, may be a NOP) */
void bus_drop_all_directory_watches (void);