### Class

# Phosh ScreenSaverManager

#### Description [src]

    final class Phosh.ScreenSaverManager : Phosh.DBusScreenSaverSkeleton
      implements Gio.DBusInterface, Phosh.DBusScreenSaver {
      /* No available fields */
    }

Provides the org.gnome.ScreenSaver DBus interface and handles logind’s Session

This handles the `org.gnome.ScreenSaver` DBus API for screen locking and unlocking. It also handles the login1 session parts since those are closely related and this keeps `PhoshLockscreenManager` free of any session related DBus handling.

These settings influence screen blanking and locking:

`org.gnome.desktop.session idle-delay`: The session is considered idle after that many seconds of inactivity. This isn’t monitored by phosh directly but is done by gnome-session that in turn uses `GnomeIdleMonitor` which then uses `/org/gnome/Mutter/IdleMonitor/Core` on DBus. `/org/gnome/Mutter/IdleMonitor/Core` is implemented by `PhoshIdleManager` which in turn gets it from phoc via a Wayland protocol.

`org.gnome.desktop.screensaver` `lock-enabled`: Whether the screen should be locked after the screen-saver is activated.

`org.gnome.desktop.screensaver` `lock-delay`: How long after screen-saver activation should the screen be locked.

#### Ancestors

- PhoshDBusScreenSaverSkeleton
- GDBusInterfaceSkeleton
- GObject

#### Implements

- GDBusInterface
- PhoshDBusScreenSaver

#### Constructors

###### phosh_screen_saver_manager_new

No description available.

#### Instance methods

##### Methods inherited from GDBusInterfaceSkeleton (13)

###### g_dbus_interface_skeleton_export

Exports `interface_` at `object_path` on `connection`.

###### g_dbus_interface_skeleton_flush

If `interface_` has outstanding changes, request for these changes to be emitted immediately.

###### g_dbus_interface_skeleton_get_connection

Gets the first connection that `interface_` is exported on, if any.

###### g_dbus_interface_skeleton_get_connections

Gets a list of the connections that `interface_` is exported on.

###### g_dbus_interface_skeleton_get_flags

Gets the `GDBusInterfaceSkeletonFlags` that describes what the behavior of `interface_`.

###### g_dbus_interface_skeleton_get_info

Gets D-Bus introspection information for the D-Bus interface implemented by `interface_`.

###### g_dbus_interface_skeleton_get_object_path

Gets the object path that `interface_` is exported on, if any.

###### g_dbus_interface_skeleton_get_properties

Gets all D-Bus properties for `interface_`.

###### g_dbus_interface_skeleton_get_vtable

Gets the interface vtable for the D-Bus interface implemented by `interface_`. The returned function pointers should expect `interface_` itself to be passed as `user_data`.

###### g_dbus_interface_skeleton_has_connection

Checks if `interface_` is exported on `connection`.

###### g_dbus_interface_skeleton_set_flags

Sets flags describing what the behavior of `skeleton` should be.

###### g_dbus_interface_skeleton_unexport

Stops exporting `interface_` on all connections it is exported on.

###### g_dbus_interface_skeleton_unexport_from_connection

Stops exporting `interface_` on `connection`.

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

##### Methods inherited from GDBusInterface (4)

###### g_dbus_interface_dup_object

Gets the `GDBusObject` that `interface_` belongs to, if any.

###### g_dbus_interface_get_info

Gets D-Bus introspection information for the D-Bus interface implemented by `interface_`.

###### g_dbus_interface_get_object

Gets the `GDBusObject` that `interface_` belongs to, if any.

###### g_dbus_interface_set_object

Sets the `GDBusObject` for `interface_` to `object`.

##### Methods inherited from PhoshDBusScreenSaver (18)

###### phosh_dbus_screen_saver_call_get_active

Asynchronously invokes the GetActive() D-Bus method on `proxy`. When the operation is finished, `callback` will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). You can then call `phosh_dbus_screen_saver_call_get_active_finish()` to get the result of the operation.

###### phosh_dbus_screen_saver_call_get_active_finish

Finishes an operation started with phosh_dbus_screen_saver_call_get_active().

###### phosh_dbus_screen_saver_call_get_active_sync

Synchronously invokes the GetActive() D-Bus method on `proxy`. The calling thread is blocked until a reply is received.

###### phosh_dbus_screen_saver_call_get_active_time

Asynchronously invokes the GetActiveTime() D-Bus method on `proxy`. When the operation is finished, `callback` will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). You can then call `phosh_dbus_screen_saver_call_get_active_time_finish()` to get the result of the operation.

###### phosh_dbus_screen_saver_call_get_active_time_finish

Finishes an operation started with phosh_dbus_screen_saver_call_get_active_time().

###### phosh_dbus_screen_saver_call_get_active_time_sync

Synchronously invokes the GetActiveTime() D-Bus method on `proxy`. The calling thread is blocked until a reply is received.

###### phosh_dbus_screen_saver_call_lock

Asynchronously invokes the Lock() D-Bus method on `proxy`. When the operation is finished, `callback` will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). You can then call `phosh_dbus_screen_saver_call_lock_finish()` to get the result of the operation.

###### phosh_dbus_screen_saver_call_lock_finish

Finishes an operation started with phosh_dbus_screen_saver_call_lock().

###### phosh_dbus_screen_saver_call_lock_sync

Synchronously invokes the Lock() D-Bus method on `proxy`. The calling thread is blocked until a reply is received.

###### phosh_dbus_screen_saver_call_set_active

Asynchronously invokes the SetActive() D-Bus method on `proxy`. When the operation is finished, `callback` will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). You can then call `phosh_dbus_screen_saver_call_set_active_finish()` to get the result of the operation.

###### phosh_dbus_screen_saver_call_set_active_finish

Finishes an operation started with phosh_dbus_screen_saver_call_set_active().

###### phosh_dbus_screen_saver_call_set_active_sync

Synchronously invokes the SetActive() D-Bus method on `proxy`. The calling thread is blocked until a reply is received.

###### phosh_dbus_screen_saver_complete_get_active

Helper function used in service implementations to finish handling invocations of the GetActive() D-Bus method. If you instead want to finish handling an invocation by returning an error, use `g_dbus_method_invocation_return_error()` or similar.

###### phosh_dbus_screen_saver_complete_get_active_time

Helper function used in service implementations to finish handling invocations of the GetActiveTime() D-Bus method. If you instead want to finish handling an invocation by returning an error, use `g_dbus_method_invocation_return_error()` or similar.

###### phosh_dbus_screen_saver_complete_lock

Helper function used in service implementations to finish handling invocations of the Lock() D-Bus method. If you instead want to finish handling an invocation by returning an error, use `g_dbus_method_invocation_return_error()` or similar.

###### phosh_dbus_screen_saver_complete_set_active

Helper function used in service implementations to finish handling invocations of the SetActive() D-Bus method. If you instead want to finish handling an invocation by returning an error, use `g_dbus_method_invocation_return_error()` or similar.

###### phosh_dbus_screen_saver_emit_active_changed

Emits the “ActiveChanged” D-Bus signal.

###### phosh_dbus_screen_saver_emit_wake_up_screen

Emits the “WakeUpScreen” D-Bus signal.

#### Properties

###### Phosh.ScreenSaverManager:active

Whether the screen saver is active.

###### Phosh.ScreenSaverManager:lock-delay

Delay in seconds for screen lock after blank.

###### Phosh.ScreenSaverManager:lock-enabled

Whether activating the screens saver should also lock the screen.

###### Phosh.ScreenSaverManager:lockscreen-manager

No description available.

##### Properties inherited from GDBusInterfaceSkeleton (1)

###### Gio.DBusInterfaceSkeleton:g-flags

Flags from the `GDBusInterfaceSkeletonFlags` enumeration.

#### Signals

###### Phosh.ScreenSaverManager::pb-long-press

No description available.

##### Signals inherited from GDBusInterfaceSkeleton (1)

###### GDBusInterfaceSkeleton::g-authorize-method

Emitted when a method is invoked by a remote caller and used to determine if the method call is authorized.

##### Signals inherited from GObject (1)

###### GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

##### Signals inherited from PhoshDBusScreenSaver (6)

###### PhoshDBusScreenSaver::active-changed

On the client-side, this signal is emitted whenever the D-Bus signal “ActiveChanged” is received.

###### PhoshDBusScreenSaver::handle-get-active

Signal emitted when a remote caller is invoking the GetActive() D-Bus method.

###### PhoshDBusScreenSaver::handle-get-active-time

Signal emitted when a remote caller is invoking the GetActiveTime() D-Bus method.

###### PhoshDBusScreenSaver::handle-lock

Signal emitted when a remote caller is invoking the Lock() D-Bus method.

###### PhoshDBusScreenSaver::handle-set-active

Signal emitted when a remote caller is invoking the SetActive() D-Bus method.

###### PhoshDBusScreenSaver::wake-up-screen

On the client-side, this signal is emitted whenever the D-Bus signal “WakeUpScreen” is received.

#### Class structure

    struct PhoshScreenSaverManagerClass {
      PhoshDBusScreenSaverSkeletonClass parent_class;

    }

No description available.

###### Class members

`parent_class: PhoshDBusScreenSaverSkeletonClass`

  No description available.