### Interface

# Phosh DBusSessionManager

#### Description [src]

    interface Phosh.DBusSessionManager : GObject.Object

Abstract interface type for the D-Bus interface org.gnome.SessionManager.

#### Prerequisite

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

#### Implementations

- PhoshDBusSessionManagerProxy
- PhoshDBusSessionManagerSkeleton

#### Functions

###### phosh_dbus_session_manager_interface_info

Gets a machine-readable description of the org.gnome.SessionManager D-Bus interface.

###### phosh_dbus_session_manager_override_properties

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

#### Instance methods

###### phosh_dbus_session_manager_call_can_shutdown

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

###### phosh_dbus_session_manager_call_can_shutdown_finish

Finishes an operation started with phosh_dbus_session_manager_call_can_shutdown().

###### phosh_dbus_session_manager_call_can_shutdown_sync

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

###### phosh_dbus_session_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_session_manager_call_inhibit_finish()` to get the result of the operation.

###### phosh_dbus_session_manager_call_inhibit_finish

Finishes an operation started with phosh_dbus_session_manager_call_inhibit().

###### phosh_dbus_session_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_session_manager_call_is_inhibited

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

###### phosh_dbus_session_manager_call_is_inhibited_finish

Finishes an operation started with phosh_dbus_session_manager_call_is_inhibited().

###### phosh_dbus_session_manager_call_is_inhibited_sync

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

###### phosh_dbus_session_manager_call_logout

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

###### phosh_dbus_session_manager_call_logout_finish

Finishes an operation started with phosh_dbus_session_manager_call_logout().

###### phosh_dbus_session_manager_call_logout_sync

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

###### phosh_dbus_session_manager_call_reboot

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

###### phosh_dbus_session_manager_call_reboot_finish

Finishes an operation started with phosh_dbus_session_manager_call_reboot().

###### phosh_dbus_session_manager_call_reboot_sync

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

###### phosh_dbus_session_manager_call_register_client

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

###### phosh_dbus_session_manager_call_register_client_finish

Finishes an operation started with phosh_dbus_session_manager_call_register_client().

###### phosh_dbus_session_manager_call_register_client_sync

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

###### phosh_dbus_session_manager_call_shutdown

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

###### phosh_dbus_session_manager_call_shutdown_finish

Finishes an operation started with phosh_dbus_session_manager_call_shutdown().

###### phosh_dbus_session_manager_call_shutdown_sync

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

###### phosh_dbus_session_manager_call_uninhibit

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

###### phosh_dbus_session_manager_call_uninhibit_finish

Finishes an operation started with phosh_dbus_session_manager_call_uninhibit().

###### phosh_dbus_session_manager_call_uninhibit_sync

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

###### phosh_dbus_session_manager_complete_can_shutdown

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

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

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

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

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

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

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

Emits the “InhibitorAdded” D-Bus signal.

###### phosh_dbus_session_manager_emit_inhibitor_removed

Emits the “InhibitorRemoved” D-Bus signal.

###### phosh_dbus_session_manager_get_session_is_active

Gets the value of the “SessionIsActive” D-Bus property.

###### phosh_dbus_session_manager_set_session_is_active

Sets the “SessionIsActive” D-Bus property to `value`.

#### Properties

###### Phosh.DBusSessionManager:session-is-active

Represents the D-Bus property “SessionIsActive”.

#### Signals

###### Phosh.DBusSessionManager::handle-can-shutdown

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

###### Phosh.DBusSessionManager::handle-inhibit

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

###### Phosh.DBusSessionManager::handle-is-inhibited

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

###### Phosh.DBusSessionManager::handle-logout

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

###### Phosh.DBusSessionManager::handle-reboot

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

###### Phosh.DBusSessionManager::handle-register-client

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

###### Phosh.DBusSessionManager::handle-shutdown

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

###### Phosh.DBusSessionManager::handle-uninhibit

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

###### Phosh.DBusSessionManager::inhibitor-added

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

###### Phosh.DBusSessionManager::inhibitor-removed

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

#### Interface structure

    struct PhoshDBusSessionManagerIface {
      GTypeInterface parent_iface;
      gboolean (* handle_can_shutdown) (
        PhoshDBusSessionManager* object,
        GDBusMethodInvocation* invocation
      );
      gboolean (* handle_inhibit) (
        PhoshDBusSessionManager* object,
        GDBusMethodInvocation* invocation,
        const gchar* arg_app_id,
        guint arg_toplevel_xid,
        const gchar* arg_reason,
        guint arg_flags
      );
      gboolean (* handle_is_inhibited) (
        PhoshDBusSessionManager* object,
        GDBusMethodInvocation* invocation,
        guint arg_unnamed_arg0
      );
      gboolean (* handle_logout) (
        PhoshDBusSessionManager* object,
        GDBusMethodInvocation* invocation,
        guint arg_mode
      );
      gboolean (* handle_reboot) (
        PhoshDBusSessionManager* object,
        GDBusMethodInvocation* invocation
      );
      gboolean (* handle_register_client) (
        PhoshDBusSessionManager* object,
        GDBusMethodInvocation* invocation,
        const gchar* arg_app_id,
        const gchar* arg_client_startup_id
      );
      gboolean (* handle_shutdown) (
        PhoshDBusSessionManager* object,
        GDBusMethodInvocation* invocation
      );
      gboolean (* handle_uninhibit) (
        PhoshDBusSessionManager* object,
        GDBusMethodInvocation* invocation,
        guint arg_inhibit_cookie
      );
      gboolean (* get_session_is_active) (
        PhoshDBusSessionManager* object
      );
      void (* inhibitor_added) (
        PhoshDBusSessionManager* object,
        const gchar* arg_unnamed_arg0
      );
      void (* inhibitor_removed) (
        PhoshDBusSessionManager* object,
        const gchar* arg_unnamed_arg0
      );

    }

Virtual table for the D-Bus interface org.gnome.SessionManager.

###### Interface members

`parent_iface` |
    GTypeInterface
| The parent interface.
`handle_can_shutdown` |
    gboolean (* handle_can_shutdown) (
        PhoshDBusSessionManager* object,
        GDBusMethodInvocation* invocation
      )
| Handler for the `PhoshDBusSessionManager::handle-can-shutdown` signal.
`handle_inhibit` |
    gboolean (* handle_inhibit) (
        PhoshDBusSessionManager* object,
        GDBusMethodInvocation* invocation,
        const gchar* arg_app_id,
        guint arg_toplevel_xid,
        const gchar* arg_reason,
        guint arg_flags
      )
| Handler for the `PhoshDBusSessionManager::handle-inhibit` signal.
`handle_is_inhibited` |
    gboolean (* handle_is_inhibited) (
        PhoshDBusSessionManager* object,
        GDBusMethodInvocation* invocation,
        guint arg_unnamed_arg0
      )
| Handler for the `PhoshDBusSessionManager::handle-is-inhibited` signal.
`handle_logout` |
    gboolean (* handle_logout) (
        PhoshDBusSessionManager* object,
        GDBusMethodInvocation* invocation,
        guint arg_mode
      )
| Handler for the `PhoshDBusSessionManager::handle-logout` signal.
`handle_reboot` |
    gboolean (* handle_reboot) (
        PhoshDBusSessionManager* object,
        GDBusMethodInvocation* invocation
      )
| Handler for the `PhoshDBusSessionManager::handle-reboot` signal.
`handle_register_client` |
    gboolean (* handle_register_client) (
        PhoshDBusSessionManager* object,
        GDBusMethodInvocation* invocation,
        const gchar* arg_app_id,
        const gchar* arg_client_startup_id
      )
| Handler for the `PhoshDBusSessionManager::handle-register-client` signal.
`handle_shutdown` |
    gboolean (* handle_shutdown) (
        PhoshDBusSessionManager* object,
        GDBusMethodInvocation* invocation
      )
| Handler for the `PhoshDBusSessionManager::handle-shutdown` signal.
`handle_uninhibit` |
    gboolean (* handle_uninhibit) (
        PhoshDBusSessionManager* object,
        GDBusMethodInvocation* invocation,
        guint arg_inhibit_cookie
      )
| Handler for the `PhoshDBusSessionManager::handle-uninhibit` signal.
`get_session_is_active` |
    gboolean (* get_session_is_active) (
        PhoshDBusSessionManager* object
      )
| Getter for the `PhoshDBusSessionManager:session-is-active` property.
`inhibitor_added` |
    void (* inhibitor_added) (
        PhoshDBusSessionManager* object,
        const gchar* arg_unnamed_arg0
      )
| Handler for the `PhoshDBusSessionManager::inhibitor-added` signal.
`inhibitor_removed` |
    void (* inhibitor_removed) (
        PhoshDBusSessionManager* object,
        const gchar* arg_unnamed_arg0
      )
| Handler for the `PhoshDBusSessionManager::inhibitor-removed` signal.

#### Virtual methods

###### Phosh.DBusSessionManager.get_session_is_active

Gets the value of the “SessionIsActive” D-Bus property.

###### Phosh.DBusSessionManager.handle_can_shutdown

Handler for the `PhoshDBusSessionManager::handle-can-shutdown` signal.

###### Phosh.DBusSessionManager.handle_inhibit

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

###### Phosh.DBusSessionManager.handle_is_inhibited

Handler for the `PhoshDBusSessionManager::handle-is-inhibited` signal.

###### Phosh.DBusSessionManager.handle_logout

Handler for the `PhoshDBusSessionManager::handle-logout` signal.

###### Phosh.DBusSessionManager.handle_reboot

Handler for the `PhoshDBusSessionManager::handle-reboot` signal.

###### Phosh.DBusSessionManager.handle_register_client

Handler for the `PhoshDBusSessionManager::handle-register-client` signal.

###### Phosh.DBusSessionManager.handle_shutdown

Handler for the `PhoshDBusSessionManager::handle-shutdown` signal.

###### Phosh.DBusSessionManager.handle_uninhibit

Handler for the `PhoshDBusSessionManager::handle-uninhibit` signal.

###### Phosh.DBusSessionManager.inhibitor_added

Handler for the `PhoshDBusSessionManager::inhibitor-added` signal.

###### Phosh.DBusSessionManager.inhibitor_removed

Handler for the `PhoshDBusSessionManager::inhibitor-removed` signal.