Libxfce4util.Consolekit

g GObject.Object GObject.Object Libxfce4util.Consolekit Libxfce4util.Consolekit GObject.Object->Libxfce4util.Consolekit

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

get ()

can_hibernate ()

can_hybrid_sleep ()

can_power_off ()

can_reboot ()

can_suspend ()

hibernate (polkit_interactive)

hybrid_sleep (polkit_interactive)

power_off (polkit_interactive)

reboot (polkit_interactive)

suspend (polkit_interactive)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

None

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class Libxfce4util.Consolekit(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Libxfce4util.ConsolekitClass

classmethod get()
Returns:

A reference to the singleton object, to be released with GObject.Object.unref().

Return type:

Libxfce4util.Consolekit

Create a new Libxfce4util.Consolekit instance or increase reference count.

New in version 4.19.1.

can_hibernate()
Raises:

GLib.Error

Returns:

True if the D-Bus request was successful, False otherwise and error is set.

can_hibernate:

location to store capacity or None

auth_hibernate:

location to store authorization or None

Return type:

(bool, can_hibernate: bool, auth_hibernate: bool)

Check whether ConsoleKit can trigger and has authorization for Hibernate.

New in version 4.19.1.

can_hybrid_sleep()
Raises:

GLib.Error

Returns:

True if the D-Bus request was successful, False otherwise and error is set.

can_hybrid_sleep:

location to store capacity or None

auth_hybrid_sleep:

location to store authorization or None

Return type:

(bool, can_hybrid_sleep: bool, auth_hybrid_sleep: bool)

Check whether ConsoleKit can trigger and has authorization for HybridSleep.

New in version 4.19.1.

can_power_off()
Raises:

GLib.Error

Returns:

True if the D-Bus request was successful, False otherwise and error is set.

can_power_off:

location to store capacity or None

auth_power_off:

location to store authorization or None

Return type:

(bool, can_power_off: bool, auth_power_off: bool)

Check whether ConsoleKit can trigger PowerOff.

New in version 4.19.1.

can_reboot()
Raises:

GLib.Error

Returns:

True if the D-Bus request was successful, False otherwise and error is set.

can_reboot:

location to store capacity or None

auth_reboot:

location to store authorization or None

Return type:

(bool, can_reboot: bool, auth_reboot: bool)

Check whether ConsoleKit can trigger Reboot.

New in version 4.19.1.

can_suspend()
Raises:

GLib.Error

Returns:

True if the D-Bus request was successful, False otherwise and error is set.

can_suspend:

location to store capacity or None

auth_suspend:

location to store authorization or None

Return type:

(bool, can_suspend: bool, auth_suspend: bool)

Check whether ConsoleKit can trigger and has authorization for Suspend.

New in version 4.19.1.

hibernate(polkit_interactive)
Parameters:

polkit_interactive (bool) – whether PolicyKit should ask the user to authenticate if needed

Raises:

GLib.Error

Returns:

True if the D-Bus request was successful, False otherwise and error is set.

Return type:

bool

Ask ConsoleKit to trigger Hibernate.

New in version 4.19.1.

hybrid_sleep(polkit_interactive)
Parameters:

polkit_interactive (bool) – whether PolicyKit should ask the user to authenticate if needed

Raises:

GLib.Error

Returns:

True if the D-Bus request was successful, False otherwise and error is set.

Return type:

bool

Ask ConsoleKit to trigger HybridSleep.

New in version 4.19.1.

power_off(polkit_interactive)
Parameters:

polkit_interactive (bool) – whether PolicyKit should ask the user to authenticate if needed

Raises:

GLib.Error

Returns:

True if the D-Bus request was successful, False otherwise and error is set.

Return type:

bool

Ask ConsoleKit to trigger PowerOff.

New in version 4.19.1.

reboot(polkit_interactive)
Parameters:

polkit_interactive (bool) – whether PolicyKit should ask the user to authenticate if needed

Raises:

GLib.Error

Returns:

True if the D-Bus request was successful, False otherwise and error is set.

Return type:

bool

Ask ConsoleKit to trigger Reboot.

New in version 4.19.1.

suspend(polkit_interactive)
Parameters:

polkit_interactive (bool) – whether PolicyKit should ask the user to authenticate if needed

Raises:

GLib.Error

Returns:

True if the D-Bus request was successful, False otherwise and error is set.

Return type:

bool

Ask ConsoleKit to trigger Suspend.

New in version 4.19.1.