Top | ![]() |
![]() |
![]() |
![]() |
GInterface ╰── PhoshDBusLoginManager GObject ├── GDBusInterfaceSkeleton │ ╰── PhoshDBusLoginManagerSkeleton ╰── GDBusProxy ╰── PhoshDBusLoginManagerProxy
PhoshDBusLoginManagerProxy implements GDBusInterface, GInitable, GAsyncInitable and PhoshDBusLoginManager.
PhoshDBusLoginManagerSkeleton implements GDBusInterface and PhoshDBusLoginManager.
PhoshDBusLoginManager is implemented by PhoshDBusLoginManagerProxy and PhoshDBusLoginManagerSkeleton.
GDBusInterfaceInfo *
phosh_dbus_login_manager_interface_info
(void
);
Gets a machine-readable description of the org.freedesktop.login1.Manager D-Bus interface.
guint phosh_dbus_login_manager_override_properties (GObjectClass *klass
,guint property_id_begin
);
Overrides all GObject properties in the PhoshDBusLoginManager 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_manager_complete_get_session (PhoshDBusLoginManager *object
,GDBusMethodInvocation *invocation
,const gchar *object_path
);
Helper function used in service implementations to finish handling invocations of the GetSession()
g_dbus_method_invocation_return_error()
or similar.
This method will free invocation
, you cannot use it afterwards.
void phosh_dbus_login_manager_complete_inhibit (PhoshDBusLoginManager *object
,GDBusMethodInvocation *invocation
,GUnixFDList *fd_list
,GVariant *pipe_fd
);
Helper function used in service implementations to finish handling invocations of the Inhibit()
g_dbus_method_invocation_return_error()
or similar.
This method will free invocation
, you cannot use it afterwards.
object |
||
invocation |
[transfer full] | |
fd_list |
A GUnixFDList or |
[nullable] |
pipe_fd |
Parameter to return. |
void phosh_dbus_login_manager_emit_prepare_for_sleep (PhoshDBusLoginManager *object
,gboolean arg_start
);
Emits the "PrepareForSleep" D-Bus signal.
void phosh_dbus_login_manager_call_get_session (PhoshDBusLoginManager *proxy
,const gchar *arg_session_id
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Asynchronously invokes the GetSession()
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.
See phosh_dbus_login_manager_call_get_session_sync()
for the synchronous, blocking version of this method.
proxy |
||
arg_session_id |
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_manager_call_get_session_finish (PhoshDBusLoginManager *proxy
,gchar **out_object_path
,GAsyncResult *res
,GError **error
);
Finishes an operation started with phosh_dbus_login_manager_call_get_session()
.
proxy |
||
out_object_path |
Return location for return parameter or |
[out][optional] |
res |
The GAsyncResult obtained from the GAsyncReadyCallback passed to |
|
error |
Return location for error or |
gboolean phosh_dbus_login_manager_call_get_session_sync (PhoshDBusLoginManager *proxy
,const gchar *arg_session_id
,gchar **out_object_path
,GCancellable *cancellable
,GError **error
);
Synchronously invokes the GetSession()
proxy
. The calling thread is blocked until a reply is received.
See phosh_dbus_login_manager_call_get_session()
for the asynchronous version of this method.
proxy |
||
arg_session_id |
Argument to pass with the method invocation. |
|
out_object_path |
Return location for return parameter or |
[out][optional] |
cancellable |
A GCancellable or |
[nullable] |
error |
Return location for error or |
void phosh_dbus_login_manager_call_inhibit (PhoshDBusLoginManager *proxy
,const gchar *arg_what
,const gchar *arg_who
,const gchar *arg_why
,const gchar *arg_mode
,GUnixFDList *fd_list
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Asynchronously invokes the Inhibit()
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.
See phosh_dbus_login_manager_call_inhibit_sync()
for the synchronous, blocking version of this method.
proxy |
||
arg_what |
Argument to pass with the method invocation. |
|
arg_who |
Argument to pass with the method invocation. |
|
arg_why |
Argument to pass with the method invocation. |
|
arg_mode |
Argument to pass with the method invocation. |
|
fd_list |
A GUnixFDList or |
[nullable] |
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_manager_call_inhibit_finish (PhoshDBusLoginManager *proxy
,GVariant **out_pipe_fd
,GUnixFDList **out_fd_list
,GAsyncResult *res
,GError **error
);
Finishes an operation started with phosh_dbus_login_manager_call_inhibit()
.
proxy |
||
out_pipe_fd |
Return location for return parameter or |
[out][optional] |
out_fd_list |
Return location for a GUnixFDList or |
[out][optional] |
res |
The GAsyncResult obtained from the GAsyncReadyCallback passed to |
|
error |
Return location for error or |
gboolean phosh_dbus_login_manager_call_inhibit_sync (PhoshDBusLoginManager *proxy
,const gchar *arg_what
,const gchar *arg_who
,const gchar *arg_why
,const gchar *arg_mode
,GUnixFDList *fd_list
,GVariant **out_pipe_fd
,GUnixFDList **out_fd_list
,GCancellable *cancellable
,GError **error
);
Synchronously invokes the Inhibit()
proxy
. The calling thread is blocked until a reply is received.
See phosh_dbus_login_manager_call_inhibit()
for the asynchronous version of this method.
proxy |
||
arg_what |
Argument to pass with the method invocation. |
|
arg_who |
Argument to pass with the method invocation. |
|
arg_why |
Argument to pass with the method invocation. |
|
arg_mode |
Argument to pass with the method invocation. |
|
fd_list |
A GUnixFDList or |
[nullable] |
out_pipe_fd |
Return location for return parameter or |
[out][optional] |
out_fd_list |
Return location for a GUnixFDList or |
[out] |
cancellable |
A GCancellable or |
[nullable] |
error |
Return location for error or |
void phosh_dbus_login_manager_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.Manager. 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_manager_proxy_new_finish()
to get the result of the operation.
See phosh_dbus_login_manager_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 |
PhoshDBusLoginManager * phosh_dbus_login_manager_proxy_new_finish (GAsyncResult *res
,GError **error
);
Finishes an operation started with phosh_dbus_login_manager_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 PhoshDBusLoginManagerProxy]
PhoshDBusLoginManager * phosh_dbus_login_manager_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.Manager. See g_dbus_proxy_new_sync()
for more details.
The calling thread is blocked until a reply is received.
See phosh_dbus_login_manager_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 PhoshDBusLoginManagerProxy]
void phosh_dbus_login_manager_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_manager_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_manager_proxy_new_for_bus_finish()
to get the result of the operation.
See phosh_dbus_login_manager_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 |
PhoshDBusLoginManager * phosh_dbus_login_manager_proxy_new_for_bus_finish (GAsyncResult *res
,GError **error
);
Finishes an operation started with phosh_dbus_login_manager_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 PhoshDBusLoginManagerProxy]
PhoshDBusLoginManager * phosh_dbus_login_manager_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_manager_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_manager_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 PhoshDBusLoginManagerProxy]
PhoshDBusLoginManager *
phosh_dbus_login_manager_skeleton_new (void
);
Creates a skeleton object for the D-Bus interface org.freedesktop.login1.Manager.
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); void (*prepare_for_sleep) ( PhoshDBusLoginManager *object, gboolean arg_start); };
Virtual table for the D-Bus interface org.freedesktop.login1.Manager.
GTypeInterface |
The parent interface. |
|
Handler for the “handle-get-session” signal. |
||
Handler for the “handle-inhibit” signal. |
||
Handler for the “prepare-for-sleep” signal. |
struct PhoshDBusLoginManagerProxy;
The PhoshDBusLoginManagerProxy structure contains only private data and should only be accessed using the provided API.
struct PhoshDBusLoginManagerProxyClass { GDBusProxyClass parent_class; };
Class structure for PhoshDBusLoginManagerProxy.
struct PhoshDBusLoginManagerSkeleton;
The PhoshDBusLoginManagerSkeleton structure contains only private data and should only be accessed using the provided API.
struct PhoshDBusLoginManagerSkeletonClass { GDBusInterfaceSkeletonClass parent_class; };
Class structure for PhoshDBusLoginManagerSkeleton.
typedef struct _PhoshDBusLoginManager PhoshDBusLoginManager;
Abstract interface type for the D-Bus interface org.freedesktop.login1.Manager.
typedef struct _PhoshDBusLoginManagerProxyPrivate PhoshDBusLoginManagerProxyPrivate;
“handle-get-session”
signalgboolean user_function (PhoshDBusLoginManager *object, GDBusMethodInvocation *invocation, char *arg_session_id, gpointer user_data)
Signal emitted when a remote caller is invoking the GetSession()
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_manager_complete_get_session()
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_session_id |
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-inhibit”
signalgboolean user_function (PhoshDBusLoginManager *object, GDBusMethodInvocation *invocation, GUnixFDList *fd_list, char *arg_what, char *arg_who, char *arg_why, char *arg_mode, gpointer user_data)
Signal emitted when a remote caller is invoking the Inhibit()
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_manager_complete_inhibit()
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 |
||
fd_list |
A GUnixFDList or |
[nullable] |
arg_what |
Argument passed by remote caller. |
|
arg_who |
Argument passed by remote caller. |
|
arg_why |
Argument passed by remote caller. |
|
arg_mode |
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
“prepare-for-sleep”
signalvoid user_function (PhoshDBusLoginManager *object, gboolean arg_start, gpointer user_data)
On the client-side, this signal is emitted whenever the D-Bus signal "PrepareForSleep" 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.
object |
||
arg_start |
Argument. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last