Top | ![]() |
![]() |
![]() |
![]() |
GInterface ╰── PhoshDBusLoginSession GObject ├── GDBusInterfaceSkeleton │ ╰── PhoshDBusLoginSessionSkeleton ╰── GDBusProxy ╰── PhoshDBusLoginSessionProxy
PhoshDBusLoginSessionProxy implements GDBusInterface, GInitable, GAsyncInitable and PhoshDBusLoginSession.
PhoshDBusLoginSessionSkeleton implements GDBusInterface and PhoshDBusLoginSession.
PhoshDBusLoginSession is implemented by PhoshDBusLoginSessionProxy and PhoshDBusLoginSessionSkeleton.
GDBusInterfaceInfo *
phosh_dbus_login_session_interface_info
(void
);
Gets a machine-readable description of the org.freedesktop.login1.Session D-Bus interface.
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.
klass |
The class structure for a GObject derived class. |
|
property_id_begin |
The property id to assign to the first overridden property. |
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()
g_dbus_method_invocation_return_error()
or similar.
This method will free invocation
, you cannot use it afterwards.
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()
g_dbus_method_invocation_return_error()
or similar.
This method will free invocation
, you cannot use it afterwards.
void
phosh_dbus_login_session_emit_lock (PhoshDBusLoginSession *object
);
Emits the "Lock" D-Bus signal.
void
phosh_dbus_login_session_emit_unlock (PhoshDBusLoginSession *object
);
Emits the "Unlock" D-Bus signal.
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()
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.
proxy |
||
arg_unnamed_arg0 |
Argument to pass with the method invocation. |
|
cancellable |
A GCancellable or |
[nullable] |
callback |
A GAsyncReadyCallback to call when the request is satisfied or |
|
user_data |
User data to pass to |
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()
.
proxy |
||
res |
The GAsyncResult obtained from the GAsyncReadyCallback passed to |
|
error |
Return location for error or |
gboolean phosh_dbus_login_session_call_set_locked_hint_sync (PhoshDBusLoginSession *proxy
,gboolean arg_unnamed_arg0
,GCancellable *cancellable
,GError **error
);
Synchronously invokes the SetLockedHint()
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.
proxy |
||
arg_unnamed_arg0 |
Argument to pass with the method invocation. |
|
cancellable |
A GCancellable or |
[nullable] |
error |
Return location for error or |
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()
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.
proxy |
||
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 |
[nullable] |
callback |
A GAsyncReadyCallback to call when the request is satisfied or |
|
user_data |
User data to pass to |
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()
.
proxy |
||
res |
The GAsyncResult obtained from the GAsyncReadyCallback passed to |
|
error |
Return location for error or |
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()
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.
proxy |
||
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 |
[nullable] |
error |
Return location for error or |
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]
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]
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]
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]
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.
connection |
||
flags |
Flags from the GDBusProxyFlags enumeration. |
|
name |
A bus name (well-known or unique) or |
[nullable] |
object_path |
An object path. |
|
cancellable |
A GCancellable or |
[nullable] |
callback |
A GAsyncReadyCallback to call when the request is satisfied. |
|
user_data |
User data to pass to |
PhoshDBusLoginSession * phosh_dbus_login_session_proxy_new_finish (GAsyncResult *res
,GError **error
);
Finishes an operation started with phosh_dbus_login_session_proxy_new()
.
res |
The GAsyncResult obtained from the GAsyncReadyCallback passed to |
|
error |
Return location for error or |
The constructed proxy object or NULL
if error
is set.
[transfer full][type PhoshDBusLoginSessionProxy]
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.
connection |
||
flags |
Flags from the GDBusProxyFlags enumeration. |
|
name |
A bus name (well-known or unique) or |
[nullable] |
object_path |
An object path. |
|
cancellable |
A GCancellable or |
[nullable] |
error |
Return location for error or |
The constructed proxy object or NULL
if error
is set.
[transfer full][type PhoshDBusLoginSessionProxy]
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.
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 |
[nullable] |
callback |
A GAsyncReadyCallback to call when the request is satisfied. |
|
user_data |
User data to pass to |
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()
.
res |
The GAsyncResult obtained from the GAsyncReadyCallback passed to |
|
error |
Return location for error or |
The constructed proxy object or NULL
if error
is set.
[transfer full][type PhoshDBusLoginSessionProxy]
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.
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 |
[nullable] |
error |
Return location for error or |
The constructed proxy object or NULL
if error
is set.
[transfer full][type PhoshDBusLoginSessionProxy]
PhoshDBusLoginSession *
phosh_dbus_login_session_skeleton_new (void
);
Creates a skeleton object for the D-Bus interface org.freedesktop.login1.Session.
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.
GTypeInterface |
The parent interface. |
|
Handler for the “handle-set-brightness” signal. |
||
Handler for the “handle-set-locked-hint” signal. |
||
Getter for the “active” property. |
||
Getter for the “locked-hint” property. |
||
Handler for the “lock” signal. |
||
Handler for the “unlock” signal. |
struct PhoshDBusLoginSessionProxy;
The PhoshDBusLoginSessionProxy structure contains only private data and should only be accessed using the provided API.
struct PhoshDBusLoginSessionProxyClass { GDBusProxyClass parent_class; };
Class structure for PhoshDBusLoginSessionProxy.
struct PhoshDBusLoginSessionSkeleton;
The PhoshDBusLoginSessionSkeleton structure contains only private data and should only be accessed using the provided API.
struct PhoshDBusLoginSessionSkeletonClass { GDBusInterfaceSkeletonClass parent_class; };
Class structure for PhoshDBusLoginSessionSkeleton.
typedef struct _PhoshDBusLoginSession PhoshDBusLoginSession;
Abstract interface type for the D-Bus interface org.freedesktop.login1.Session.
typedef struct _PhoshDBusLoginSessionProxyPrivate PhoshDBusLoginSessionProxyPrivate;
“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
“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
“handle-set-brightness”
signalgboolean 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()
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.
object |
||
invocation |
||
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. |
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
“handle-set-locked-hint”
signalgboolean user_function (PhoshDBusLoginSession *object, GDBusMethodInvocation *invocation, gboolean arg_unnamed_arg0, gpointer user_data)
Signal emitted when a remote caller is invoking the SetLockedHint()
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.
object |
||
invocation |
||
arg_unnamed_arg0 |
Argument passed by remote caller. |
|
user_data |
user data set when the signal handler was connected. |
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
“lock”
signalvoid 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.
Flags: Run Last
“unlock”
signalvoid 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.
Flags: Run Last