Skip to content

Instantly share code, notes, and snippets.

@ebassi
Created January 29, 2019 13:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ebassi/23e397cce0a8c2b81419b8cdd62cec1b to your computer and use it in GitHub Desktop.
Save ebassi/23e397cce0a8c2b81419b8cdd62cec1b to your computer and use it in GitHub Desktop.
/**
* login1_session_complete_take_device:
* @object: A #Login1Session.
* @invocation: (transfer full): A #GDBusMethodInvocation.
* @fd_list: (nullable): A #GUnixFDList or %NULL.
* @fd: Parameter to return.
* @paused: Parameter to return.
*
* Helper function used in service implementations to finish handling invocations of the <link linkend="gd
bus-method-org-freedesktop-login1-Session.TakeDevice">TakeDevice()</link> D-Bus method. If you instead wan
t to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or s
imilar.
*
* This method will free @invocation, you cannot use it afterwards.
*/
void
login1_session_complete_take_device (
Login1Session *object,
GDBusMethodInvocation *invocation,
GUnixFDList *fd_list,
GVariant *fd,
gboolean paused)
{
g_dbus_method_invocation_return_value_with_unix_fd_list (invocation,
g_variant_new ("(@hb)",
fd,
paused),
fd_list);
}
/**
* gxdp_documents_complete_add:
* @object: A #GXdpDocuments.
* @invocation: (transfer full): A #GDBusMethodInvocation.
* @fd_list: (nullable): A #GUnixFDList or %NULL.
* @doc_id: Parameter to return.
*
* Helper function used in service implementations to finish handling invocations of the <link linkend="gd
bus-method-org-freedesktop-portal-Documents.Add">Add()</link> 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.
*/
void
gxdp_documents_complete_add (
GXdpDocuments *object,
GDBusMethodInvocation *invocation,
GUnixFDList *fd_list,
const gchar *doc_id)
{
g_dbus_method_invocation_return_value_with_unix_fd_list (invocation,
g_variant_new ("(s)",
doc_id),
fd_list);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment