### Interface

# Phosh DBusLoginManager

#### Description [src]

    interface Phosh.DBusLoginManager : GObject.Object

Abstract interface type for the D-Bus interface org.freedesktop.login1.Manager.

#### Prerequisite

In order to implement DBusLoginManager, your type must inherit from`GObject`.

#### Implementations

- PhoshDBusLoginManagerProxy
- PhoshDBusLoginManagerSkeleton

#### Functions

###### phosh_dbus_login_manager_interface_info

Gets a machine-readable description of the org.freedesktop.login1.Manager D-Bus interface.

###### phosh_dbus_login_manager_override_properties

Overrides all `GObject` properties in the `PhoshDBusLoginManager` interface for a concrete class. The properties are overridden in the order they are defined.

#### Instance methods

###### phosh_dbus_login_manager_call_get_session

Asynchronously invokes the GetSession() 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_login_manager_call_get_session_finish()` to get the result of the operation.

###### phosh_dbus_login_manager_call_get_session_finish

Finishes an operation started with phosh_dbus_login_manager_call_get_session().

###### phosh_dbus_login_manager_call_get_session_sync

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

###### phosh_dbus_login_manager_call_inhibit

Asynchronously invokes the Inhibit() 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_login_manager_call_inhibit_finish()` to get the result of the operation.

###### phosh_dbus_login_manager_call_inhibit_finish

Finishes an operation started with phosh_dbus_login_manager_call_inhibit().

###### phosh_dbus_login_manager_call_inhibit_sync

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

###### phosh_dbus_login_manager_call_suspend

Asynchronously invokes the Suspend() 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_login_manager_call_suspend_finish()` to get the result of the operation.

###### phosh_dbus_login_manager_call_suspend_finish

Finishes an operation started with phosh_dbus_login_manager_call_suspend().

###### phosh_dbus_login_manager_call_suspend_sync

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

###### phosh_dbus_login_manager_complete_get_session

Helper function used in service implementations to finish handling invocations of the GetSession() 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_login_manager_complete_inhibit

Helper function used in service implementations to finish handling invocations of the Inhibit() 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_login_manager_complete_suspend

Helper function used in service implementations to finish handling invocations of the Suspend() 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_login_manager_emit_prepare_for_sleep

Emits the “PrepareForSleep” D-Bus signal.

#### Signals

###### Phosh.DBusLoginManager::handle-get-session

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

###### Phosh.DBusLoginManager::handle-inhibit

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

###### Phosh.DBusLoginManager::handle-suspend

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

###### Phosh.DBusLoginManager::prepare-for-sleep

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

#### Interface structure

    struct PhoshDBusLoginManagerIface {
      GTypeInterface parent_iface;
      gboolean (* handle_get_session) (
        PhoshDBusLoginManager* object,
        GDBusMethodInvocation* invocation,
        const gchar* arg_session_id
      );
      gboolean (* handle_inhibit) (
        PhoshDBusLoginManager* object,
        GDBusMethodInvocation* invocation,
        GUnixFDList* fd_list,
        const gchar* arg_what,
        const gchar* arg_who,
        const gchar* arg_why,
        const gchar* arg_mode
      );
      gboolean (* handle_suspend) (
        PhoshDBusLoginManager* object,
        GDBusMethodInvocation* invocation,
        gboolean arg_unnamed_arg0
      );
      void (* prepare_for_sleep) (
        PhoshDBusLoginManager* object,
        gboolean arg_suspending
      );

    }

Virtual table for the D-Bus interface org.freedesktop.login1.Manager.

###### Interface members

`parent_iface` |
    GTypeInterface
| The parent interface.
`handle_get_session` |
    gboolean (* handle_get_session) (
        PhoshDBusLoginManager* object,
        GDBusMethodInvocation* invocation,
        const gchar* arg_session_id
      )
| Handler for the `PhoshDBusLoginManager::handle-get-session` signal.
`handle_inhibit` |
    gboolean (* handle_inhibit) (
        PhoshDBusLoginManager* object,
        GDBusMethodInvocation* invocation,
        GUnixFDList* fd_list,
        const gchar* arg_what,
        const gchar* arg_who,
        const gchar* arg_why,
        const gchar* arg_mode
      )
| Handler for the `PhoshDBusLoginManager::handle-inhibit` signal.
`handle_suspend` |
    gboolean (* handle_suspend) (
        PhoshDBusLoginManager* object,
        GDBusMethodInvocation* invocation,
        gboolean arg_unnamed_arg0
      )
| Handler for the `PhoshDBusLoginManager::handle-suspend` signal.
`prepare_for_sleep` |
    void (* prepare_for_sleep) (
        PhoshDBusLoginManager* object,
        gboolean arg_suspending
      )
| Handler for the `PhoshDBusLoginManager::prepare-for-sleep` signal.

#### Virtual methods

###### Phosh.DBusLoginManager.handle_get_session

Handler for the `PhoshDBusLoginManager::handle-get-session` signal.

###### Phosh.DBusLoginManager.handle_inhibit

Handler for the `PhoshDBusLoginManager::handle-inhibit` signal.

###### Phosh.DBusLoginManager.handle_suspend

Handler for the `PhoshDBusLoginManager::handle-suspend` signal.

###### Phosh.DBusLoginManager.prepare_for_sleep

Handler for the `PhoshDBusLoginManager::prepare-for-sleep` signal.