XfceSystemd

XfceSystemd — Session management via systemd

Functions

Types and Values

Object Hierarchy

    GObject
    ╰── XfceSystemd

Includes

#include <libxfce4util/libxfce4util.h>

Description

Functions

xfce_systemd_get ()

XfceSystemd *
xfce_systemd_get (void);

Create a new XfceSystemd instance or increase reference count.

Returns

A reference to the singleton object, to be released with g_object_unref().

[transfer full]

Since: 4.19.1


xfce_systemd_try_restart ()

gboolean
xfce_systemd_try_restart (XfceSystemd *systemd,
                          GError **error);

Ask systemd to trigger restart.

Parameters

systemd

the XfceSystemd object

 

error

location to store error on failure or NULL.

[out][nullable]

Returns

TRUE if the D-Bus request was successful, FALSE otherwise and error is set.

Since: 4.19.1


xfce_systemd_try_shutdown ()

gboolean
xfce_systemd_try_shutdown (XfceSystemd *systemd,
                           GError **error);

Ask systemd to trigger shutdown.

Parameters

systemd

the XfceSystemd object

 

error

location to store error on failure or NULL.

[out][nullable]

Returns

TRUE if the D-Bus request was successful, FALSE otherwise and error is set.

Since: 4.19.1


xfce_systemd_try_suspend ()

gboolean
xfce_systemd_try_suspend (XfceSystemd *systemd,
                          GError **error);

Ask systemd to trigger suspend.

Parameters

systemd

the XfceSystemd object

 

error

location to store error on failure or NULL.

[out][nullable]

Returns

TRUE if the D-Bus request was successful, FALSE otherwise and error is set.

Since: 4.19.1


xfce_systemd_try_hibernate ()

gboolean
xfce_systemd_try_hibernate (XfceSystemd *systemd,
                            GError **error);

Ask systemd to trigger hibernate.

Parameters

systemd

the XfceSystemd object

 

error

location to store error on failure or NULL.

[out][nullable]

Returns

TRUE if the D-Bus request was successful, FALSE otherwise and error is set.

Since: 4.19.1


xfce_systemd_try_hybrid_sleep ()

gboolean
xfce_systemd_try_hybrid_sleep (XfceSystemd *systemd,
                               GError **error);

Ask systemd to trigger hybrid sleep.

Parameters

systemd

the XfceSystemd object

 

error

location to store error on failure or NULL.

[out][nullable]

Returns

TRUE if the D-Bus request was successful, FALSE otherwise and error is set.

Since: 4.19.1


xfce_systemd_can_restart ()

gboolean
xfce_systemd_can_restart (XfceSystemd *systemd,
                          gboolean *can_restart,
                          GError **error);

Check whether systemd can trigger restart.

Parameters

systemd

the XfceSystemd object

 

can_restart

location to store capacity or NULL.

[out][nullable]

error

location to store error on failure or NULL.

[out][nullable]

Returns

TRUE if the D-Bus request was successful, FALSE otherwise and error is set.

Since: 4.19.1


xfce_systemd_can_shutdown ()

gboolean
xfce_systemd_can_shutdown (XfceSystemd *systemd,
                           gboolean *can_shutdown,
                           GError **error);

Check whether systemd can trigger shutdown.

Parameters

systemd

the XfceSystemd object

 

can_shutdown

location to store capacity or NULL.

[out][nullable]

error

location to store error on failure or NULL.

[out][nullable]

Returns

TRUE if the D-Bus request was successful, FALSE otherwise and error is set.

Since: 4.19.1


xfce_systemd_can_suspend ()

gboolean
xfce_systemd_can_suspend (XfceSystemd *systemd,
                          gboolean *can_suspend,
                          gboolean *auth_suspend,
                          GError **error);

Check whether systemd can trigger and has authorization for suspend.

Parameters

systemd

the XfceSystemd object

 

can_suspend

location to store capacity or NULL.

[out][nullable]

auth_suspend

location to store authorization or NULL.

[out][nullable]

error

location to store error on failure or NULL.

[out][nullable]

Returns

TRUE if the D-Bus request was successful, FALSE otherwise and error is set.

Since: 4.19.1


xfce_systemd_can_hibernate ()

gboolean
xfce_systemd_can_hibernate (XfceSystemd *systemd,
                            gboolean *can_hibernate,
                            gboolean *auth_hibernate,
                            GError **error);

Check whether systemd can trigger and has authorization for hibernate.

Parameters

systemd

the XfceSystemd object

 

can_hibernate

location to store capacity or NULL.

[out][nullable]

auth_hibernate

location to store authorization or NULL.

[out][nullable]

error

location to store error on failure or NULL.

[out][nullable]

Returns

TRUE if the D-Bus request was successful, FALSE otherwise and error is set.

Since: 4.19.1


xfce_systemd_can_hybrid_sleep ()

gboolean
xfce_systemd_can_hybrid_sleep (XfceSystemd *systemd,
                               gboolean *can_hybrid_sleep,
                               gboolean *auth_hybrid_sleep,
                               GError **error);

Check whether systemd can trigger and has authorization for hybrid sleep.

Parameters

systemd

the XfceSystemd object

 

can_hybrid_sleep

location to store capacity or NULL.

[out][nullable]

auth_hybrid_sleep

location to store authorization or NULL.

[out][nullable]

error

location to store error on failure or NULL.

[out][nullable]

Returns

TRUE if the D-Bus request was successful, FALSE otherwise and error is set.

Since: 4.19.1

Types and Values

XfceSystemd

typedef struct _XfceSystemd XfceSystemd;