static void bus_server_new_connection (BusServer *server, BusConnection *connection) { g_assert (BUS_IS_SERVER (server)); bus_dbus_impl_new_connection (server->dbus, connection); }
/** * bus_new_connection_cb: * @user_data: always NULL. * @returns: TRUE when the function can handle the connection. * * Handle incoming connections. */ static gboolean bus_new_connection_cb (GDBusServer *server, GDBusConnection *dbus_connection, gpointer user_data) { BusConnection *connection = bus_connection_new (dbus_connection); bus_dbus_impl_new_connection (dbus, connection); if (g_object_is_floating (connection)) { /* bus_dbus_impl_new_connection couldn't handle the connection. just delete the connection and return TRUE * (so that other connection handler will not handle the deleted connection.) */ ibus_object_destroy ((IBusObject *)connection); g_object_unref (connection); } return TRUE; }