PhoshDBusLoginSessionSkeleton

PhoshDBusLoginSessionSkeleton

Functions

Properties

gboolean active Read / Write
gboolean locked-hint Read / Write

Signals

Types and Values

Object Hierarchy

    GInterface
    ╰── PhoshDBusLoginSession
    GObject
    ├── GDBusInterfaceSkeleton
       ╰── PhoshDBusLoginSessionSkeleton
    ╰── GDBusProxy
        ╰── PhoshDBusLoginSessionProxy

Prerequisites

PhoshDBusLoginSession requires GObject.

Implemented Interfaces

PhoshDBusLoginSessionProxy implements GDBusInterface, GInitable, GAsyncInitable and PhoshDBusLoginSession.

PhoshDBusLoginSessionSkeleton implements GDBusInterface and PhoshDBusLoginSession.

Known Implementations

PhoshDBusLoginSession is implemented by PhoshDBusLoginSessionProxy and PhoshDBusLoginSessionSkeleton.

Description

Functions

phosh_dbus_login_session_interface_info ()

GDBusInterfaceInfo *
phosh_dbus_login_session_interface_info
                               (void);

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

Returns

A GDBusInterfaceInfo. Do not free.

[transfer none]


phosh_dbus_login_session_override_properties ()

guint
phosh_dbus_login_session_override_properties
                               (GObjectClass *klass,
                                guint property_id_begin);

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

Parameters

klass

The class structure for a GObject derived class.

 

property_id_begin

The property id to assign to the first overridden property.

 

Returns

The last property id.


phosh_dbus_login_session_complete_set_locked_hint ()

void
phosh_dbus_login_session_complete_set_locked_hint
                               (PhoshDBusLoginSession *object,
                                GDBusMethodInvocation *invocation);

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

This method will free invocation , you cannot use it afterwards.

Parameters

object

A PhoshDBusLoginSession.

 

invocation

A GDBusMethodInvocation.

[transfer full]

phosh_dbus_login_session_complete_set_brightness ()

void
phosh_dbus_login_session_complete_set_brightness
                               (PhoshDBusLoginSession *object,
                                GDBusMethodInvocation *invocation);

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

This method will free invocation , you cannot use it afterwards.

Parameters

object

A PhoshDBusLoginSession.

 

invocation

A GDBusMethodInvocation.

[transfer full]

phosh_dbus_login_session_emit_lock ()

void
phosh_dbus_login_session_emit_lock (PhoshDBusLoginSession *object);

Emits the "Lock" D-Bus signal.

Parameters

object

A PhoshDBusLoginSession.

 

phosh_dbus_login_session_emit_unlock ()

void
phosh_dbus_login_session_emit_unlock (PhoshDBusLoginSession *object);

Emits the "Unlock" D-Bus signal.

Parameters

object

A PhoshDBusLoginSession.

 

phosh_dbus_login_session_call_set_locked_hint ()

void
phosh_dbus_login_session_call_set_locked_hint
                               (PhoshDBusLoginSession *proxy,
                                gboolean arg_unnamed_arg0,
                                GCancellable *cancellable,
                                GAsyncReadyCallback callback,
                                gpointer user_data);

Asynchronously invokes the SetLockedHint() 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_session_call_set_locked_hint_finish() to get the result of the operation.

See phosh_dbus_login_session_call_set_locked_hint_sync() for the synchronous, blocking version of this method.

Parameters

proxy

A PhoshDBusLoginSessionProxy.

 

arg_unnamed_arg0

Argument to pass with the method invocation.

 

cancellable

A GCancellable or NULL.

[nullable]

callback

A GAsyncReadyCallback to call when the request is satisfied or NULL.

 

user_data

User data to pass to callback .

 

phosh_dbus_login_session_call_set_locked_hint_finish ()

gboolean
phosh_dbus_login_session_call_set_locked_hint_finish
                               (PhoshDBusLoginSession *proxy,
                                GAsyncResult *res,
                                GError **error);

Finishes an operation started with phosh_dbus_login_session_call_set_locked_hint().

Parameters

proxy

A PhoshDBusLoginSessionProxy.

 

res

The GAsyncResult obtained from the GAsyncReadyCallback passed to phosh_dbus_login_session_call_set_locked_hint().

 

error

Return location for error or NULL.

 

Returns

TRUE if the call succeeded, FALSE if error is set.

[skip]


phosh_dbus_login_session_call_set_locked_hint_sync ()

gboolean
phosh_dbus_login_session_call_set_locked_hint_sync
                               (PhoshDBusLoginSession *proxy,
                                gboolean arg_unnamed_arg0,
                                GCancellable *cancellable,
                                GError **error);

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

See phosh_dbus_login_session_call_set_locked_hint() for the asynchronous version of this method.

Parameters

proxy

A PhoshDBusLoginSessionProxy.

 

arg_unnamed_arg0

Argument to pass with the method invocation.

 

cancellable

A GCancellable or NULL.

[nullable]

error

Return location for error or NULL.

 

Returns

TRUE if the call succeeded, FALSE if error is set.

[skip]


phosh_dbus_login_session_call_set_brightness ()

void
phosh_dbus_login_session_call_set_brightness
                               (PhoshDBusLoginSession *proxy,
                                const gchar *arg_subsystem,
                                const gchar *arg_name,
                                guint arg_brightness,
                                GCancellable *cancellable,
                                GAsyncReadyCallback callback,
                                gpointer user_data);

Asynchronously invokes the SetBrightness() 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_session_call_set_brightness_finish() to get the result of the operation.

See phosh_dbus_login_session_call_set_brightness_sync() for the synchronous, blocking version of this method.

Parameters

proxy

A PhoshDBusLoginSessionProxy.

 

arg_subsystem

Argument to pass with the method invocation.

 

arg_name

Argument to pass with the method invocation.

 

arg_brightness

Argument to pass with the method invocation.

 

cancellable

A GCancellable or NULL.

[nullable]

callback

A GAsyncReadyCallback to call when the request is satisfied or NULL.

 

user_data

User data to pass to callback .

 

phosh_dbus_login_session_call_set_brightness_finish ()

gboolean
phosh_dbus_login_session_call_set_brightness_finish
                               (PhoshDBusLoginSession *proxy,
                                GAsyncResult *res,
                                GError **error);

Finishes an operation started with phosh_dbus_login_session_call_set_brightness().

Parameters

proxy

A PhoshDBusLoginSessionProxy.

 

res

The GAsyncResult obtained from the GAsyncReadyCallback passed to phosh_dbus_login_session_call_set_brightness().

 

error

Return location for error or NULL.

 

Returns

TRUE if the call succeeded, FALSE if error is set.

[skip]


phosh_dbus_login_session_call_set_brightness_sync ()

gboolean
phosh_dbus_login_session_call_set_brightness_sync
                               (PhoshDBusLoginSession *proxy,
                                const gchar *arg_subsystem,
                                const gchar *arg_name,
                                guint arg_brightness,
                                GCancellable *cancellable,
                                GError **error);

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

See phosh_dbus_login_session_call_set_brightness() for the asynchronous version of this method.

Parameters

proxy

A PhoshDBusLoginSessionProxy.

 

arg_subsystem

Argument to pass with the method invocation.

 

arg_name

Argument to pass with the method invocation.

 

arg_brightness

Argument to pass with the method invocation.

 

cancellable

A GCancellable or NULL.

[nullable]

error

Return location for error or NULL.

 

Returns

TRUE if the call succeeded, FALSE if error is set.

[skip]


phosh_dbus_login_session_get_active ()

gboolean
phosh_dbus_login_session_get_active (PhoshDBusLoginSession *object);

Gets the value of the "Active" D-Bus property.

Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

[skip]

Parameters

object

A PhoshDBusLoginSession.

 

Returns

The property value.


phosh_dbus_login_session_set_active ()

void
phosh_dbus_login_session_set_active (PhoshDBusLoginSession *object,
                                     gboolean value);

Sets the "Active" D-Bus property to value .

Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.

[skip]

Parameters

object

A PhoshDBusLoginSession.

 

value

The value to set.

 

phosh_dbus_login_session_get_locked_hint ()

gboolean
phosh_dbus_login_session_get_locked_hint
                               (PhoshDBusLoginSession *object);

Gets the value of the "LockedHint" D-Bus property.

Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

[skip]

Parameters

object

A PhoshDBusLoginSession.

 

Returns

The property value.


phosh_dbus_login_session_set_locked_hint ()

void
phosh_dbus_login_session_set_locked_hint
                               (PhoshDBusLoginSession *object,
                                gboolean value);

Sets the "LockedHint" D-Bus property to value .

Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.

[skip]

Parameters

object

A PhoshDBusLoginSession.

 

value

The value to set.

 

phosh_dbus_login_session_proxy_new ()

void
phosh_dbus_login_session_proxy_new (GDBusConnection *connection,
                                    GDBusProxyFlags flags,
                                    const gchar *name,
                                    const gchar *object_path,
                                    GCancellable *cancellable,
                                    GAsyncReadyCallback callback,
                                    gpointer user_data);

Asynchronously creates a proxy for the D-Bus interface org.freedesktop.login1.Session. See g_dbus_proxy_new() for more details.

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_session_proxy_new_finish() to get the result of the operation.

See phosh_dbus_login_session_proxy_new_sync() for the synchronous, blocking version of this constructor.

Parameters

connection

A GDBusConnection.

 

flags

Flags from the GDBusProxyFlags enumeration.

 

name

A bus name (well-known or unique) or NULL if connection is not a message bus connection.

[nullable]

object_path

An object path.

 

cancellable

A GCancellable or NULL.

[nullable]

callback

A GAsyncReadyCallback to call when the request is satisfied.

 

user_data

User data to pass to callback .

 

phosh_dbus_login_session_proxy_new_finish ()

PhoshDBusLoginSession *
phosh_dbus_login_session_proxy_new_finish
                               (GAsyncResult *res,
                                GError **error);

Finishes an operation started with phosh_dbus_login_session_proxy_new().

Parameters

res

The GAsyncResult obtained from the GAsyncReadyCallback passed to phosh_dbus_login_session_proxy_new().

 

error

Return location for error or NULL

 

Returns

The constructed proxy object or NULL if error is set.

[transfer full][type PhoshDBusLoginSessionProxy]


phosh_dbus_login_session_proxy_new_sync ()

PhoshDBusLoginSession *
phosh_dbus_login_session_proxy_new_sync
                               (GDBusConnection *connection,
                                GDBusProxyFlags flags,
                                const gchar *name,
                                const gchar *object_path,
                                GCancellable *cancellable,
                                GError **error);

Synchronously creates a proxy for the D-Bus interface org.freedesktop.login1.Session. See g_dbus_proxy_new_sync() for more details.

The calling thread is blocked until a reply is received.

See phosh_dbus_login_session_proxy_new() for the asynchronous version of this constructor.

Parameters

connection

A GDBusConnection.

 

flags

Flags from the GDBusProxyFlags enumeration.

 

name

A bus name (well-known or unique) or NULL if connection is not a message bus connection.

[nullable]

object_path

An object path.

 

cancellable

A GCancellable or NULL.

[nullable]

error

Return location for error or NULL

 

Returns

The constructed proxy object or NULL if error is set.

[transfer full][type PhoshDBusLoginSessionProxy]


phosh_dbus_login_session_proxy_new_for_bus ()

void
phosh_dbus_login_session_proxy_new_for_bus
                               (GBusType bus_type,
                                GDBusProxyFlags flags,
                                const gchar *name,
                                const gchar *object_path,
                                GCancellable *cancellable,
                                GAsyncReadyCallback callback,
                                gpointer user_data);

Like phosh_dbus_login_session_proxy_new() but takes a GBusType instead of a GDBusConnection.

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_session_proxy_new_for_bus_finish() to get the result of the operation.

See phosh_dbus_login_session_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.

Parameters

bus_type

A GBusType.

 

flags

Flags from the GDBusProxyFlags enumeration.

 

name

A bus name (well-known or unique).

 

object_path

An object path.

 

cancellable

A GCancellable or NULL.

[nullable]

callback

A GAsyncReadyCallback to call when the request is satisfied.

 

user_data

User data to pass to callback .

 

phosh_dbus_login_session_proxy_new_for_bus_finish ()

PhoshDBusLoginSession *
phosh_dbus_login_session_proxy_new_for_bus_finish
                               (GAsyncResult *res,
                                GError **error);

Finishes an operation started with phosh_dbus_login_session_proxy_new_for_bus().

Parameters

res

The GAsyncResult obtained from the GAsyncReadyCallback passed to phosh_dbus_login_session_proxy_new_for_bus().

 

error

Return location for error or NULL

 

Returns

The constructed proxy object or NULL if error is set.

[transfer full][type PhoshDBusLoginSessionProxy]


phosh_dbus_login_session_proxy_new_for_bus_sync ()

PhoshDBusLoginSession *
phosh_dbus_login_session_proxy_new_for_bus_sync
                               (GBusType bus_type,
                                GDBusProxyFlags flags,
                                const gchar *name,
                                const gchar *object_path,
                                GCancellable *cancellable,
                                GError **error);

Like phosh_dbus_login_session_proxy_new_sync() but takes a GBusType instead of a GDBusConnection.

The calling thread is blocked until a reply is received.

See phosh_dbus_login_session_proxy_new_for_bus() for the asynchronous version of this constructor.

Parameters

bus_type

A GBusType.

 

flags

Flags from the GDBusProxyFlags enumeration.

 

name

A bus name (well-known or unique).

 

object_path

An object path.

 

cancellable

A GCancellable or NULL.

[nullable]

error

Return location for error or NULL

 

Returns

The constructed proxy object or NULL if error is set.

[transfer full][type PhoshDBusLoginSessionProxy]


phosh_dbus_login_session_skeleton_new ()

PhoshDBusLoginSession *
phosh_dbus_login_session_skeleton_new (void);

Creates a skeleton object for the D-Bus interface org.freedesktop.login1.Session.

Returns

The skeleton object.

[transfer full][type PhoshDBusLoginSessionSkeleton]

Types and Values

struct PhoshDBusLoginSessionIface

struct PhoshDBusLoginSessionIface {
  GTypeInterface parent_iface;

  gboolean (*handle_set_brightness) (
    PhoshDBusLoginSession *object,
    GDBusMethodInvocation *invocation,
    const gchar *arg_subsystem,
    const gchar *arg_name,
    guint arg_brightness);

  gboolean (*handle_set_locked_hint) (
    PhoshDBusLoginSession *object,
    GDBusMethodInvocation *invocation,
    gboolean arg_unnamed_arg0);

  gboolean  (*get_active) (PhoshDBusLoginSession *object);

  gboolean  (*get_locked_hint) (PhoshDBusLoginSession *object);

  void (*lock) (
    PhoshDBusLoginSession *object);

  void (*unlock) (
    PhoshDBusLoginSession *object);
};

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

Members

GTypeInterface parent_iface;

The parent interface.

 

handle_set_brightness ()

Handler for the “handle-set-brightness” signal.

 

handle_set_locked_hint ()

Handler for the “handle-set-locked-hint” signal.

 

get_active ()

Getter for the “active” property.

 

get_locked_hint ()

Getter for the “locked-hint” property.

 

lock ()

Handler for the “lock” signal.

 

unlock ()

Handler for the “unlock” signal.

 

struct PhoshDBusLoginSessionProxy

struct PhoshDBusLoginSessionProxy;

The PhoshDBusLoginSessionProxy structure contains only private data and should only be accessed using the provided API.


struct PhoshDBusLoginSessionProxyClass

struct PhoshDBusLoginSessionProxyClass {
  GDBusProxyClass parent_class;
};

Class structure for PhoshDBusLoginSessionProxy.

Members


struct PhoshDBusLoginSessionSkeleton

struct PhoshDBusLoginSessionSkeleton;

The PhoshDBusLoginSessionSkeleton structure contains only private data and should only be accessed using the provided API.


struct PhoshDBusLoginSessionSkeletonClass

struct PhoshDBusLoginSessionSkeletonClass {
  GDBusInterfaceSkeletonClass parent_class;
};

Class structure for PhoshDBusLoginSessionSkeleton.

Members


PhoshDBusLoginSession

typedef struct _PhoshDBusLoginSession PhoshDBusLoginSession;

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


PhoshDBusLoginSessionProxyPrivate

typedef struct _PhoshDBusLoginSessionProxyPrivate PhoshDBusLoginSessionProxyPrivate;

PhoshDBusLoginSessionSkeletonPrivate

typedef struct _PhoshDBusLoginSessionSkeletonPrivate PhoshDBusLoginSessionSkeletonPrivate;

Property Details

The “active” property

  “active”                   gboolean

Represents the D-Bus property "Active".

Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

Owner: PhoshDBusLoginSession

Flags: Read / Write

Default value: FALSE


The “locked-hint” property

  “locked-hint”              gboolean

Represents the D-Bus property "LockedHint".

Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

Owner: PhoshDBusLoginSession

Flags: Read / Write

Default value: FALSE

Signal Details

The “handle-set-brightness” signal

gboolean
user_function (PhoshDBusLoginSession *object,
               GDBusMethodInvocation *invocation,
               char                  *arg_subsystem,
               char                  *arg_name,
               guint                  arg_brightness,
               gpointer               user_data)

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

If a signal handler returns TRUE, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call phosh_dbus_login_session_complete_set_brightness() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

Parameters

object

A PhoshDBusLoginSession.

 

invocation

A GDBusMethodInvocation.

 

arg_subsystem

Argument passed by remote caller.

 

arg_name

Argument passed by remote caller.

 

arg_brightness

Argument passed by remote caller.

 

user_data

user data set when the signal handler was connected.

 

Returns

G_DBUS_METHOD_INVOCATION_HANDLED or TRUE if the invocation was handled, G_DBUS_METHOD_INVOCATION_UNHANDLED or FALSE to let other signal handlers run.

Flags: Run Last


The “handle-set-locked-hint” signal

gboolean
user_function (PhoshDBusLoginSession *object,
               GDBusMethodInvocation *invocation,
               gboolean               arg_unnamed_arg0,
               gpointer               user_data)

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

If a signal handler returns TRUE, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call phosh_dbus_login_session_complete_set_locked_hint() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

Parameters

object

A PhoshDBusLoginSession.

 

invocation

A GDBusMethodInvocation.

 

arg_unnamed_arg0

Argument passed by remote caller.

 

user_data

user data set when the signal handler was connected.

 

Returns

G_DBUS_METHOD_INVOCATION_HANDLED or TRUE if the invocation was handled, G_DBUS_METHOD_INVOCATION_UNHANDLED or FALSE to let other signal handlers run.

Flags: Run Last


The “lock” signal

void
user_function (PhoshDBusLoginSession *object,
               gpointer               user_data)

On the client-side, this signal is emitted whenever the D-Bus signal "Lock" is received.

On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.

Parameters

object

A PhoshDBusLoginSession.

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “unlock” signal

void
user_function (PhoshDBusLoginSession *object,
               gpointer               user_data)

On the client-side, this signal is emitted whenever the D-Bus signal "Unlock" is received.

On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.

Parameters

object

A PhoshDBusLoginSession.

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last