## Power Management Power Management — Shutdown, restart, sleep the system |

## Synopsis

    #include <lightdm.h>

    gboolean            lightdm_get_can_suspend             (void);
    gboolean            lightdm_suspend                     (GError **error);
    gboolean            lightdm_get_can_hibernate           (void);
    gboolean            lightdm_hibernate                   (GError **error);
    gboolean            lightdm_get_can_restart             (void);
    gboolean            lightdm_restart                     (GError **error);
    gboolean            lightdm_get_can_shutdown            (void);
    gboolean            lightdm_shutdown                    (GError **error);

## Description

## Details

### lightdm_get_can_suspend ()

    gboolean            lightdm_get_can_suspend             (void);

Checks if authorized to do a system suspend.

Returns : | TRUE if can suspend the system

### lightdm_suspend ()

    gboolean            lightdm_suspend                     (GError **error);

Triggers a system suspend.

`error` : | return location for a GError, or `NULL`
Returns : | TRUE if suspend initiated.

### lightdm_get_can_hibernate ()

    gboolean            lightdm_get_can_hibernate           (void);

Checks if is authorized to do a system hibernate.

Returns : | TRUE if can hibernate the system

### lightdm_hibernate ()

    gboolean            lightdm_hibernate                   (GError **error);

Triggers a system hibernate.

`error` : | return location for a GError, or `NULL`
Returns : | TRUE if hibernate initiated.

### lightdm_get_can_restart ()

    gboolean            lightdm_get_can_restart             (void);

Checks if is authorized to do a system restart.

Returns : | TRUE if can restart the system

### lightdm_restart ()

    gboolean            lightdm_restart                     (GError **error);

Triggers a system restart.

`error` : | return location for a GError, or `NULL`
Returns : | TRUE if restart initiated.

### lightdm_get_can_shutdown ()

    gboolean            lightdm_get_can_shutdown            (void);

Checks if is authorized to do a system shutdown.

Returns : | TRUE if can shutdown the system

### lightdm_shutdown ()

    gboolean            lightdm_shutdown                    (GError **error);

Triggers a system shutdown.

`error` : | return location for a GError, or `NULL`
Returns : | TRUE if shutdown initiated.