#include <config.h>
-#ifdef DBUS_BUILD_TESTS
+#ifdef DBUS_ENABLE_EMBEDDED_TESTS
#include "test.h"
#include <dbus/dbus-internals.h>
#include <dbus/dbus-list.h>
add_client_watch (DBusWatch *watch,
void *data)
{
- DBusConnection *connection = data;
-
return _dbus_loop_add_watch (client_loop, watch);
}
remove_client_watch (DBusWatch *watch,
void *data)
{
- DBusConnection *connection = data;
-
_dbus_loop_remove_watch (client_loop, watch);
}
+static void
+toggle_client_watch (DBusWatch *watch,
+ void *data)
+{
+ _dbus_loop_toggle_watch (client_loop, watch);
+}
+
static dbus_bool_t
add_client_timeout (DBusTimeout *timeout,
void *data)
{
- DBusConnection *connection = data;
-
return _dbus_loop_add_timeout (client_loop, timeout);
}
remove_client_timeout (DBusTimeout *timeout,
void *data)
{
- DBusConnection *connection = data;
-
_dbus_loop_remove_timeout (client_loop, timeout);
}
if (!dbus_connection_set_watch_functions (connection,
add_client_watch,
remove_client_watch,
- NULL,
+ toggle_client_watch,
connection,
NULL))
goto out;
}
dbus_error_init (&error);
- context = bus_context_new (&config_file, FALSE, NULL, NULL, NULL, FALSE, &error);
+ context = bus_context_new (&config_file, BUS_CONTEXT_FLAG_NONE, NULL, NULL, NULL, &error);
if (context == NULL)
{
_DBUS_ASSERT_ERROR_IS_SET (&error);