static void on_bus_acquired(GDBusConnection *bus, const gchar *name, gpointer user_data) { LoginKitManager *interface; GError *error = NULL; interface = login_kit_manager_skeleton_new(); g_signal_connect(interface, "handle-unlock-session", G_CALLBACK(on_handle_unlock_session), NULL); g_signal_connect(interface, "handle-list-seats", G_CALLBACK(on_handle_list_seats), NULL); g_signal_connect(interface, "handle-activate-session-on-seat", G_CALLBACK(on_handle_activate_session_on_seat), NULL); signals_subscribe(interface); if (!g_dbus_interface_skeleton_export(G_DBUS_INTERFACE_SKELETON(interface), bus, "/org/freedesktop/login1", &error)) { if (NULL != error) g_error_free(error); } }
static void on_bus_acquired(GDBusConnection *bus, const gchar *name, gpointer user_data) { LoginKitManager *interface; GError *error = NULL; interface = login_kit_manager_skeleton_new(); g_signal_connect(interface, "handle-unlock-session", G_CALLBACK(on_handle_unlock_session), NULL); g_signal_connect(interface, "handle-list-seats", G_CALLBACK(on_handle_list_seats), NULL); g_signal_connect(interface, "handle-activate-session-on-seat", G_CALLBACK(on_handle_activate_session_on_seat), NULL); g_signal_connect(interface, "handle-get-session", G_CALLBACK(on_handle_get_session), NULL); g_signal_connect(interface, "handle-can-hybrid-sleep", G_CALLBACK(on_handle_can_hybrid_sleep), NULL); g_signal_connect(interface, "handle-can-power-off", G_CALLBACK(on_handle_can_power_off), NULL); g_signal_connect(interface, "handle-can-reboot", G_CALLBACK(on_handle_can_reboot), NULL); g_signal_connect(interface, "handle-can-suspend", G_CALLBACK(on_handle_can_suspend), NULL); g_signal_connect(interface, "handle-can-hibernate", G_CALLBACK(on_handle_can_hibernate), NULL); g_signal_connect(interface, "handle-inhibit", G_CALLBACK(on_handle_inhibit), NULL); g_signal_connect(interface, "handle-suspend", G_CALLBACK(on_handle_suspend), NULL); g_signal_connect(interface, "handle-suspend", G_CALLBACK(on_handle_suspend), NULL); g_signal_connect(interface, "handle-hybrid-sleep", G_CALLBACK(on_handle_hybrid_sleep), NULL); g_signal_connect(interface, "handle-power-off", G_CALLBACK(on_handle_power_off), NULL); g_signal_connect(interface, "handle-reboot", G_CALLBACK(on_handle_reboot), NULL); g_signal_connect(interface, "handle-hibernate", G_CALLBACK(on_handle_hibernate), NULL); signals_subscribe(interface); if (!g_dbus_interface_skeleton_export(G_DBUS_INTERFACE_SKELETON(interface), bus, "/org/freedesktop/login1", &error)) g_error_free(error); }