Example #1
0
/* Move to a new context */
static ConnectionSetup*
connection_setup_new_from_old (GMainContext    *context,
                               ConnectionSetup *old)
{
    GSList *tmp;
    ConnectionSetup *cs;

    g_assert (old->context != context);

    cs = connection_setup_new (context, old->connection);

    tmp = old->ios;
    while (tmp != NULL) {
        IOHandler *handler = tmp->data;

        connection_setup_add_watch (cs, handler->watch);

        tmp = tmp->next;
    }

    tmp = old->timeouts;
    while (tmp != NULL) {
        TimeoutHandler *handler = tmp->data;

        connection_setup_add_timeout (cs, handler->timeout);

        tmp = tmp->next;
    }

    return cs;
}
static dbus_bool_t
add_watch (DBusWatch *watch, gpointer data)
{
	ConnectionSetup *cs = data;
	connection_setup_add_watch (cs, watch);
	return TRUE;
}
Example #3
0
static dbus_bool_t add_watch(DBusWatch *watch, void *data)
{
	connection_setup_add_watch(data, watch);
	return TRUE;
}