g_dbus_method_invocation_return_error_literal
g_dbus_method_invocation_return_gerror
g_dbus_method_invocation_return_dbus_error
+g_dbus_method_invocation_take_error
<SUBSECTION Standard>
G_DBUS_METHOD_INVOCATION
G_IS_DBUS_METHOD_INVOCATION
g_free (dbus_error_name);
}
+/**
+ * g_dbus_method_invocation_take_error: (skip)
+ * @invocation: (transfer full): A #GDBusMethodInvocation.
+ * @error: (transfer full): A #GError.
+ *
+ * Like g_dbus_method_invocation_return_gerror() but takes ownership
+ * of @error so the caller does not need to free it.
+ *
+ * This method will free @invocation, you cannot use it afterwards.
+ *
+ * Since: 2.30
+ */
+void
+g_dbus_method_invocation_take_error (GDBusMethodInvocation *invocation,
+ GError *error)
+{
+ g_return_if_fail (G_IS_DBUS_METHOD_INVOCATION (invocation));
+ g_return_if_fail (error != NULL);
+ g_dbus_method_invocation_return_gerror (invocation, error);
+ g_error_free (error);
+}
+
/**
* g_dbus_method_invocation_return_dbus_error:
* @invocation: (transfer full): A #GDBusMethodInvocation.
const gchar *message);
void g_dbus_method_invocation_return_gerror (GDBusMethodInvocation *invocation,
const GError *error);
+void g_dbus_method_invocation_take_error (GDBusMethodInvocation *invocation,
+ GError *error);
void g_dbus_method_invocation_return_dbus_error (GDBusMethodInvocation *invocation,
const gchar *error_name,
const gchar *error_message);
g_dbus_method_invocation_return_error_literal
g_dbus_method_invocation_return_error_valist
g_dbus_method_invocation_return_gerror
+g_dbus_method_invocation_take_error
g_dbus_method_invocation_return_value
#endif
#endif