-/**
- * GtkApplicationEndSessionStyle:
- * @GTK_APPLICATION_LOGOUT: End the session by logging out
- * @GTK_APPLICATION_REBOOT: Restart the computer
- * @GTK_APPLICATION_SHUTDOWN: Shut the computer down
- *
- * Different ways to end a user session, for use with
- * gtk_application_end_session().
- */
-
-/**
- * gtk_application_end_session:
- * @application: the #GtkApplication
- * @style: the desired kind of session end
- * @request_confirmation: whether or not the user should get a chance
- * to confirm the action
- *
- * Requests that the session manager end the current session.
- * @style indicates how the session should be ended, and
- * @request_confirmation indicates whether or not the user should be
- * given a chance to confirm the action. Both of these parameters are
- * merely hints though; the session manager may choose to ignore them.
- *
- * Return value: %TRUE if the request was sent; %FALSE if it could not
- * be sent (eg, because it could not connect to the session manager)
- *
- * Since: 3.4
- */
-gboolean
-gtk_application_end_session (GtkApplication *application,
- GtkApplicationEndSessionStyle style,
- gboolean request_confirmation)
-{
- g_return_val_if_fail (GTK_IS_APPLICATION (application), FALSE);
- g_return_val_if_fail (!g_application_get_is_remote (G_APPLICATION (application)), FALSE);
- g_return_val_if_fail (application->priv->sm_proxy != NULL, FALSE);
-
- switch (style)
- {
- case GTK_APPLICATION_LOGOUT:
- g_dbus_proxy_call (application->priv->sm_proxy,
- "Logout",
- g_variant_new ("(u)", request_confirmation ? 0 : 1),
- G_DBUS_CALL_FLAGS_NONE,
- G_MAXINT,
- NULL, NULL, NULL);
- break;
- case GTK_APPLICATION_REBOOT:
- case GTK_APPLICATION_SHUTDOWN:
- g_dbus_proxy_call (application->priv->sm_proxy,
- "Shutdown",
- NULL,
- G_DBUS_CALL_FLAGS_NONE,
- G_MAXINT,
- NULL, NULL, NULL);
- break;
- }
-
- return TRUE;
-}
-