/*
 * This file is generated by gdbus-codegen, do not modify it.
 *
 * The license of this code is the same as for the D-Bus interface description
 * it was derived from. Note that it links to GLib, so must comply with the
 * LGPL linking clauses.
 */

#ifdef HAVE_CONFIG_H
#  include "config.h"
#endif

#include "xdg-desktop-portal-dbus.h"

#include <string.h>
#ifdef G_OS_UNIX
#  include <gio/gunixfdlist.h>
#endif

#ifdef G_ENABLE_DEBUG
#define g_marshal_value_peek_boolean(v)  g_value_get_boolean (v)
#define g_marshal_value_peek_char(v)     g_value_get_schar (v)
#define g_marshal_value_peek_uchar(v)    g_value_get_uchar (v)
#define g_marshal_value_peek_int(v)      g_value_get_int (v)
#define g_marshal_value_peek_uint(v)     g_value_get_uint (v)
#define g_marshal_value_peek_long(v)     g_value_get_long (v)
#define g_marshal_value_peek_ulong(v)    g_value_get_ulong (v)
#define g_marshal_value_peek_int64(v)    g_value_get_int64 (v)
#define g_marshal_value_peek_uint64(v)   g_value_get_uint64 (v)
#define g_marshal_value_peek_enum(v)     g_value_get_enum (v)
#define g_marshal_value_peek_flags(v)    g_value_get_flags (v)
#define g_marshal_value_peek_float(v)    g_value_get_float (v)
#define g_marshal_value_peek_double(v)   g_value_get_double (v)
#define g_marshal_value_peek_string(v)   (char*) g_value_get_string (v)
#define g_marshal_value_peek_param(v)    g_value_get_param (v)
#define g_marshal_value_peek_boxed(v)    g_value_get_boxed (v)
#define g_marshal_value_peek_pointer(v)  g_value_get_pointer (v)
#define g_marshal_value_peek_object(v)   g_value_get_object (v)
#define g_marshal_value_peek_variant(v)  g_value_get_variant (v)
#else /* !G_ENABLE_DEBUG */
/* WARNING: This code accesses GValues directly, which is UNSUPPORTED API.
 *          Do not access GValues directly in your code. Instead, use the
 *          g_value_get_*() functions
 */
#define g_marshal_value_peek_boolean(v)  (v)->data[0].v_int
#define g_marshal_value_peek_char(v)     (v)->data[0].v_int
#define g_marshal_value_peek_uchar(v)    (v)->data[0].v_uint
#define g_marshal_value_peek_int(v)      (v)->data[0].v_int
#define g_marshal_value_peek_uint(v)     (v)->data[0].v_uint
#define g_marshal_value_peek_long(v)     (v)->data[0].v_long
#define g_marshal_value_peek_ulong(v)    (v)->data[0].v_ulong
#define g_marshal_value_peek_int64(v)    (v)->data[0].v_int64
#define g_marshal_value_peek_uint64(v)   (v)->data[0].v_uint64
#define g_marshal_value_peek_enum(v)     (v)->data[0].v_long
#define g_marshal_value_peek_flags(v)    (v)->data[0].v_ulong
#define g_marshal_value_peek_float(v)    (v)->data[0].v_float
#define g_marshal_value_peek_double(v)   (v)->data[0].v_double
#define g_marshal_value_peek_string(v)   (v)->data[0].v_pointer
#define g_marshal_value_peek_param(v)    (v)->data[0].v_pointer
#define g_marshal_value_peek_boxed(v)    (v)->data[0].v_pointer
#define g_marshal_value_peek_pointer(v)  (v)->data[0].v_pointer
#define g_marshal_value_peek_object(v)   (v)->data[0].v_pointer
#define g_marshal_value_peek_variant(v)  (v)->data[0].v_pointer
#endif /* !G_ENABLE_DEBUG */

typedef struct
{
  GDBusArgInfo parent_struct;
  gboolean use_gvariant;
} _ExtendedGDBusArgInfo;

typedef struct
{
  GDBusMethodInfo parent_struct;
  const gchar *signal_name;
  gboolean pass_fdlist;
} _ExtendedGDBusMethodInfo;

typedef struct
{
  GDBusSignalInfo parent_struct;
  const gchar *signal_name;
} _ExtendedGDBusSignalInfo;

typedef struct
{
  GDBusPropertyInfo parent_struct;
  const gchar *hyphen_name;
  guint use_gvariant : 1;
  guint emits_changed_signal : 1;
} _ExtendedGDBusPropertyInfo;

typedef struct
{
  GDBusInterfaceInfo parent_struct;
  const gchar *hyphen_name;
} _ExtendedGDBusInterfaceInfo;

typedef struct
{
  const _ExtendedGDBusPropertyInfo *info;
  guint prop_id;
  GValue orig_value; /* the value before the change */
} ChangedProperty;

static void
_changed_property_free (ChangedProperty *data)
{
  g_value_unset (&data->orig_value);
  g_free (data);
}

static gboolean
_g_strv_equal0 (gchar **a, gchar **b)
{
  gboolean ret = FALSE;
  guint n;
  if (a == NULL && b == NULL)
    {
      ret = TRUE;
      goto out;
    }
  if (a == NULL || b == NULL)
    goto out;
  if (g_strv_length (a) != g_strv_length (b))
    goto out;
  for (n = 0; a[n] != NULL; n++)
    if (g_strcmp0 (a[n], b[n]) != 0)
      goto out;
  ret = TRUE;
out:
  return ret;
}

static gboolean
_g_variant_equal0 (GVariant *a, GVariant *b)
{
  gboolean ret = FALSE;
  if (a == NULL && b == NULL)
    {
      ret = TRUE;
      goto out;
    }
  if (a == NULL || b == NULL)
    goto out;
  ret = g_variant_equal (a, b);
out:
  return ret;
}

G_GNUC_UNUSED static gboolean
_g_value_equal (const GValue *a, const GValue *b)
{
  gboolean ret = FALSE;
  g_assert (G_VALUE_TYPE (a) == G_VALUE_TYPE (b));
  switch (G_VALUE_TYPE (a))
    {
      case G_TYPE_BOOLEAN:
        ret = (g_value_get_boolean (a) == g_value_get_boolean (b));
        break;
      case G_TYPE_UCHAR:
        ret = (g_value_get_uchar (a) == g_value_get_uchar (b));
        break;
      case G_TYPE_INT:
        ret = (g_value_get_int (a) == g_value_get_int (b));
        break;
      case G_TYPE_UINT:
        ret = (g_value_get_uint (a) == g_value_get_uint (b));
        break;
      case G_TYPE_INT64:
        ret = (g_value_get_int64 (a) == g_value_get_int64 (b));
        break;
      case G_TYPE_UINT64:
        ret = (g_value_get_uint64 (a) == g_value_get_uint64 (b));
        break;
      case G_TYPE_DOUBLE:
        {
          /* Avoid -Wfloat-equal warnings by doing a direct bit compare */
          gdouble da = g_value_get_double (a);
          gdouble db = g_value_get_double (b);
          ret = memcmp (&da, &db, sizeof (gdouble)) == 0;
        }
        break;
      case G_TYPE_STRING:
        ret = (g_strcmp0 (g_value_get_string (a), g_value_get_string (b)) == 0);
        break;
      case G_TYPE_VARIANT:
        ret = _g_variant_equal0 (g_value_get_variant (a), g_value_get_variant (b));
        break;
      default:
        if (G_VALUE_TYPE (a) == G_TYPE_STRV)
          ret = _g_strv_equal0 (g_value_get_boxed (a), g_value_get_boxed (b));
        else
          g_critical ("_g_value_equal() does not handle type %s", g_type_name (G_VALUE_TYPE (a)));
        break;
    }
  return ret;
}

static void
_g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_STRING_STRING_STRING_STRING_STRING_VARIANT (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint G_GNUC_UNUSED,
    void         *marshal_data)
{
  typedef gboolean (*_GDbusCodegenMarshalBoolean_ObjectStringStringStringStringStringStringVariantFunc)
       (void *data1,
        GDBusMethodInvocation *arg_method_invocation,
        const gchar *arg_handle,
        const gchar *arg_app_id,
        const gchar *arg_parent_window,
        const gchar *arg_title,
        const gchar *arg_subtitle,
        const gchar *arg_body,
        GVariant *arg_options,
        void *data2);
  _GDbusCodegenMarshalBoolean_ObjectStringStringStringStringStringStringVariantFunc callback;
  GCClosure *cc = (GCClosure*) closure;
  void *data1, *data2;
  gboolean v_return;

  g_return_if_fail (return_value != NULL);
  g_return_if_fail (n_param_values == 9);

  if (G_CCLOSURE_SWAP_DATA (closure))
    {
      data1 = closure->data;
      data2 = g_value_peek_pointer (param_values + 0);
    }
  else
    {
      data1 = g_value_peek_pointer (param_values + 0);
      data2 = closure->data;
    }

  callback = (_GDbusCodegenMarshalBoolean_ObjectStringStringStringStringStringStringVariantFunc)
    (marshal_data ? marshal_data : cc->callback);

  v_return =
    callback (data1,
              g_marshal_value_peek_object (param_values + 1),
              g_marshal_value_peek_string (param_values + 2),
              g_marshal_value_peek_string (param_values + 3),
              g_marshal_value_peek_string (param_values + 4),
              g_marshal_value_peek_string (param_values + 5),
              g_marshal_value_peek_string (param_values + 6),
              g_marshal_value_peek_string (param_values + 7),
              g_marshal_value_peek_variant (param_values + 8),
              data2);

  g_value_set_boolean (return_value, v_return);
}

static void
_g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_STRING_STRING_VARIANT (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint G_GNUC_UNUSED,
    void         *marshal_data)
{
  typedef gboolean (*_GDbusCodegenMarshalBoolean_ObjectStringStringStringVariantFunc)
       (void *data1,
        GDBusMethodInvocation *arg_method_invocation,
        const gchar *arg_handle,
        const gchar *arg_app_id,
        const gchar *arg_window,
        GVariant *arg_options,
        void *data2);
  _GDbusCodegenMarshalBoolean_ObjectStringStringStringVariantFunc callback;
  GCClosure *cc = (GCClosure*) closure;
  void *data1, *data2;
  gboolean v_return;

  g_return_if_fail (return_value != NULL);
  g_return_if_fail (n_param_values == 6);

  if (G_CCLOSURE_SWAP_DATA (closure))
    {
      data1 = closure->data;
      data2 = g_value_peek_pointer (param_values + 0);
    }
  else
    {
      data1 = g_value_peek_pointer (param_values + 0);
      data2 = closure->data;
    }

  callback = (_GDbusCodegenMarshalBoolean_ObjectStringStringStringVariantFunc)
    (marshal_data ? marshal_data : cc->callback);

  v_return =
    callback (data1,
              g_marshal_value_peek_object (param_values + 1),
              g_marshal_value_peek_string (param_values + 2),
              g_marshal_value_peek_string (param_values + 3),
              g_marshal_value_peek_string (param_values + 4),
              g_marshal_value_peek_variant (param_values + 5),
              data2);

  g_value_set_boolean (return_value, v_return);
}

static void
_g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_STRING_STRING_BOXED_VARIANT (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint G_GNUC_UNUSED,
    void         *marshal_data)
{
  typedef gboolean (*_GDbusCodegenMarshalBoolean_ObjectStringStringStringBoxedVariantFunc)
       (void *data1,
        GDBusMethodInvocation *arg_method_invocation,
        const gchar *arg_handle,
        const gchar *arg_app_id,
        const gchar *arg_parent_window,
        const gchar *const *arg_choices,
        GVariant *arg_options,
        void *data2);
  _GDbusCodegenMarshalBoolean_ObjectStringStringStringBoxedVariantFunc callback;
  GCClosure *cc = (GCClosure*) closure;
  void *data1, *data2;
  gboolean v_return;

  g_return_if_fail (return_value != NULL);
  g_return_if_fail (n_param_values == 7);

  if (G_CCLOSURE_SWAP_DATA (closure))
    {
      data1 = closure->data;
      data2 = g_value_peek_pointer (param_values + 0);
    }
  else
    {
      data1 = g_value_peek_pointer (param_values + 0);
      data2 = closure->data;
    }

  callback = (_GDbusCodegenMarshalBoolean_ObjectStringStringStringBoxedVariantFunc)
    (marshal_data ? marshal_data : cc->callback);

  v_return =
    callback (data1,
              g_marshal_value_peek_object (param_values + 1),
              g_marshal_value_peek_string (param_values + 2),
              g_marshal_value_peek_string (param_values + 3),
              g_marshal_value_peek_string (param_values + 4),
              g_marshal_value_peek_boxed (param_values + 5),
              g_marshal_value_peek_variant (param_values + 6),
              data2);

  g_value_set_boolean (return_value, v_return);
}

static void
_g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_BOXED (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint G_GNUC_UNUSED,
    void         *marshal_data)
{
  typedef gboolean (*_GDbusCodegenMarshalBoolean_ObjectStringBoxedFunc)
       (void *data1,
        GDBusMethodInvocation *arg_method_invocation,
        const gchar *arg_handle,
        const gchar *const *arg_choices,
        void *data2);
  _GDbusCodegenMarshalBoolean_ObjectStringBoxedFunc callback;
  GCClosure *cc = (GCClosure*) closure;
  void *data1, *data2;
  gboolean v_return;

  g_return_if_fail (return_value != NULL);
  g_return_if_fail (n_param_values == 4);

  if (G_CCLOSURE_SWAP_DATA (closure))
    {
      data1 = closure->data;
      data2 = g_value_peek_pointer (param_values + 0);
    }
  else
    {
      data1 = g_value_peek_pointer (param_values + 0);
      data2 = closure->data;
    }

  callback = (_GDbusCodegenMarshalBoolean_ObjectStringBoxedFunc)
    (marshal_data ? marshal_data : cc->callback);

  v_return =
    callback (data1,
              g_marshal_value_peek_object (param_values + 1),
              g_marshal_value_peek_string (param_values + 2),
              g_marshal_value_peek_boxed (param_values + 3),
              data2);

  g_value_set_boolean (return_value, v_return);
}

static void
_g_dbus_codegen_marshal_BOOLEAN__OBJECT (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint G_GNUC_UNUSED,
    void         *marshal_data)
{
  typedef gboolean (*_GDbusCodegenMarshalBoolean_ObjectFunc)
       (void *data1,
        GDBusMethodInvocation *arg_method_invocation,
        void *data2);
  _GDbusCodegenMarshalBoolean_ObjectFunc callback;
  GCClosure *cc = (GCClosure*) closure;
  void *data1, *data2;
  gboolean v_return;

  g_return_if_fail (return_value != NULL);
  g_return_if_fail (n_param_values == 2);

  if (G_CCLOSURE_SWAP_DATA (closure))
    {
      data1 = closure->data;
      data2 = g_value_peek_pointer (param_values + 0);
    }
  else
    {
      data1 = g_value_peek_pointer (param_values + 0);
      data2 = closure->data;
    }

  callback = (_GDbusCodegenMarshalBoolean_ObjectFunc)
    (marshal_data ? marshal_data : cc->callback);

  v_return =
    callback (data1,
              g_marshal_value_peek_object (param_values + 1),
              data2);

  g_value_set_boolean (return_value, v_return);
}

static void
_g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_STRING_STRING (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint G_GNUC_UNUSED,
    void         *marshal_data)
{
  typedef gboolean (*_GDbusCodegenMarshalBoolean_ObjectStringStringStringFunc)
       (void *data1,
        GDBusMethodInvocation *arg_method_invocation,
        const gchar *arg_handle,
        const gchar *arg_app_id,
        const gchar *arg_name,
        void *data2);
  _GDbusCodegenMarshalBoolean_ObjectStringStringStringFunc callback;
  GCClosure *cc = (GCClosure*) closure;
  void *data1, *data2;
  gboolean v_return;

  g_return_if_fail (return_value != NULL);
  g_return_if_fail (n_param_values == 5);

  if (G_CCLOSURE_SWAP_DATA (closure))
    {
      data1 = closure->data;
      data2 = g_value_peek_pointer (param_values + 0);
    }
  else
    {
      data1 = g_value_peek_pointer (param_values + 0);
      data2 = closure->data;
    }

  callback = (_GDbusCodegenMarshalBoolean_ObjectStringStringStringFunc)
    (marshal_data ? marshal_data : cc->callback);

  v_return =
    callback (data1,
              g_marshal_value_peek_object (param_values + 1),
              g_marshal_value_peek_string (param_values + 2),
              g_marshal_value_peek_string (param_values + 3),
              g_marshal_value_peek_string (param_values + 4),
              data2);

  g_value_set_boolean (return_value, v_return);
}

static void
_g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_BOOLEAN_BOXED_UINT (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint G_GNUC_UNUSED,
    void         *marshal_data)
{
  typedef gboolean (*_GDbusCodegenMarshalBoolean_ObjectStringBooleanBoxedUintFunc)
       (void *data1,
        GDBusMethodInvocation *arg_method_invocation,
        const gchar *arg_app_id,
        gboolean arg_enable,
        const gchar *const *arg_commandline,
        guint arg_flags,
        void *data2);
  _GDbusCodegenMarshalBoolean_ObjectStringBooleanBoxedUintFunc callback;
  GCClosure *cc = (GCClosure*) closure;
  void *data1, *data2;
  gboolean v_return;

  g_return_if_fail (return_value != NULL);
  g_return_if_fail (n_param_values == 6);

  if (G_CCLOSURE_SWAP_DATA (closure))
    {
      data1 = closure->data;
      data2 = g_value_peek_pointer (param_values + 0);
    }
  else
    {
      data1 = g_value_peek_pointer (param_values + 0);
      data2 = closure->data;
    }

  callback = (_GDbusCodegenMarshalBoolean_ObjectStringBooleanBoxedUintFunc)
    (marshal_data ? marshal_data : cc->callback);

  v_return =
    callback (data1,
              g_marshal_value_peek_object (param_values + 1),
              g_marshal_value_peek_string (param_values + 2),
              g_marshal_value_peek_boolean (param_values + 3),
              g_marshal_value_peek_boxed (param_values + 4),
              g_marshal_value_peek_uint (param_values + 5),
              data2);

  g_value_set_boolean (return_value, v_return);
}

static void
_g_dbus_codegen_marshal_VOID__STRING_VARIANT (
    GClosure     *closure,
    GValue       *return_value G_GNUC_UNUSED,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint G_GNUC_UNUSED,
    void         *marshal_data)
{
  typedef void (*_GDbusCodegenMarshalVoid_StringVariantFunc)
       (void *data1,
        const gchar *arg_session_handle,
        GVariant *arg_options,
        void *data2);
  _GDbusCodegenMarshalVoid_StringVariantFunc callback;
  GCClosure *cc = (GCClosure*) closure;
  void *data1, *data2;

  g_return_if_fail (n_param_values == 3);

  if (G_CCLOSURE_SWAP_DATA (closure))
    {
      data1 = closure->data;
      data2 = g_value_peek_pointer (param_values + 0);
    }
  else
    {
      data1 = g_value_peek_pointer (param_values + 0);
      data2 = closure->data;
    }

  callback = (_GDbusCodegenMarshalVoid_StringVariantFunc)
    (marshal_data ? marshal_data : cc->callback);

  callback (data1,
            g_marshal_value_peek_string (param_values + 1),
            g_marshal_value_peek_variant (param_values + 2),
            data2);
}

static void
_g_dbus_codegen_marshal_VOID__STRING_STRING_UINT (
    GClosure     *closure,
    GValue       *return_value G_GNUC_UNUSED,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint G_GNUC_UNUSED,
    void         *marshal_data)
{
  typedef void (*_GDbusCodegenMarshalVoid_StringStringUintFunc)
       (void *data1,
        const gchar *arg_session_handle,
        const gchar *arg_mime_type,
        guint arg_serial,
        void *data2);
  _GDbusCodegenMarshalVoid_StringStringUintFunc callback;
  GCClosure *cc = (GCClosure*) closure;
  void *data1, *data2;

  g_return_if_fail (n_param_values == 4);

  if (G_CCLOSURE_SWAP_DATA (closure))
    {
      data1 = closure->data;
      data2 = g_value_peek_pointer (param_values + 0);
    }
  else
    {
      data1 = g_value_peek_pointer (param_values + 0);
      data2 = closure->data;
    }

  callback = (_GDbusCodegenMarshalVoid_StringStringUintFunc)
    (marshal_data ? marshal_data : cc->callback);

  callback (data1,
            g_marshal_value_peek_string (param_values + 1),
            g_marshal_value_peek_string (param_values + 2),
            g_marshal_value_peek_uint (param_values + 3),
            data2);
}

static void
_g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_VARIANT (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint G_GNUC_UNUSED,
    void         *marshal_data)
{
  typedef gboolean (*_GDbusCodegenMarshalBoolean_ObjectStringVariantFunc)
       (void *data1,
        GDBusMethodInvocation *arg_method_invocation,
        const gchar *arg_session_handle,
        GVariant *arg_options,
        void *data2);
  _GDbusCodegenMarshalBoolean_ObjectStringVariantFunc callback;
  GCClosure *cc = (GCClosure*) closure;
  void *data1, *data2;
  gboolean v_return;

  g_return_if_fail (return_value != NULL);
  g_return_if_fail (n_param_values == 4);

  if (G_CCLOSURE_SWAP_DATA (closure))
    {
      data1 = closure->data;
      data2 = g_value_peek_pointer (param_values + 0);
    }
  else
    {
      data1 = g_value_peek_pointer (param_values + 0);
      data2 = closure->data;
    }

  callback = (_GDbusCodegenMarshalBoolean_ObjectStringVariantFunc)
    (marshal_data ? marshal_data : cc->callback);

  v_return =
    callback (data1,
              g_marshal_value_peek_object (param_values + 1),
              g_marshal_value_peek_string (param_values + 2),
              g_marshal_value_peek_variant (param_values + 3),
              data2);

  g_value_set_boolean (return_value, v_return);
}

static void
_g_dbus_codegen_marshal_BOOLEAN__OBJECT_OBJECT_STRING_UINT (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint G_GNUC_UNUSED,
    void         *marshal_data)
{
  typedef gboolean (*_GDbusCodegenMarshalBoolean_ObjectObjectStringUintFunc)
       (void *data1,
        GDBusMethodInvocation *arg_method_invocation,
        GUnixFDList *arg_fd_list,
        const gchar *arg_session_handle,
        guint arg_serial,
        void *data2);
  _GDbusCodegenMarshalBoolean_ObjectObjectStringUintFunc callback;
  GCClosure *cc = (GCClosure*) closure;
  void *data1, *data2;
  gboolean v_return;

  g_return_if_fail (return_value != NULL);
  g_return_if_fail (n_param_values == 5);

  if (G_CCLOSURE_SWAP_DATA (closure))
    {
      data1 = closure->data;
      data2 = g_value_peek_pointer (param_values + 0);
    }
  else
    {
      data1 = g_value_peek_pointer (param_values + 0);
      data2 = closure->data;
    }

  callback = (_GDbusCodegenMarshalBoolean_ObjectObjectStringUintFunc)
    (marshal_data ? marshal_data : cc->callback);

  v_return =
    callback (data1,
              g_marshal_value_peek_object (param_values + 1),
              g_marshal_value_peek_object (param_values + 2),
              g_marshal_value_peek_string (param_values + 3),
              g_marshal_value_peek_uint (param_values + 4),
              data2);

  g_value_set_boolean (return_value, v_return);
}

static void
_g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_UINT_BOOLEAN (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint G_GNUC_UNUSED,
    void         *marshal_data)
{
  typedef gboolean (*_GDbusCodegenMarshalBoolean_ObjectStringUintBooleanFunc)
       (void *data1,
        GDBusMethodInvocation *arg_method_invocation,
        const gchar *arg_session_handle,
        guint arg_serial,
        gboolean arg_success,
        void *data2);
  _GDbusCodegenMarshalBoolean_ObjectStringUintBooleanFunc callback;
  GCClosure *cc = (GCClosure*) closure;
  void *data1, *data2;
  gboolean v_return;

  g_return_if_fail (return_value != NULL);
  g_return_if_fail (n_param_values == 5);

  if (G_CCLOSURE_SWAP_DATA (closure))
    {
      data1 = closure->data;
      data2 = g_value_peek_pointer (param_values + 0);
    }
  else
    {
      data1 = g_value_peek_pointer (param_values + 0);
      data2 = closure->data;
    }

  callback = (_GDbusCodegenMarshalBoolean_ObjectStringUintBooleanFunc)
    (marshal_data ? marshal_data : cc->callback);

  v_return =
    callback (data1,
              g_marshal_value_peek_object (param_values + 1),
              g_marshal_value_peek_string (param_values + 2),
              g_marshal_value_peek_uint (param_values + 3),
              g_marshal_value_peek_boolean (param_values + 4),
              data2);

  g_value_set_boolean (return_value, v_return);
}

static void
_g_dbus_codegen_marshal_BOOLEAN__OBJECT_OBJECT_STRING_STRING (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint G_GNUC_UNUSED,
    void         *marshal_data)
{
  typedef gboolean (*_GDbusCodegenMarshalBoolean_ObjectObjectStringStringFunc)
       (void *data1,
        GDBusMethodInvocation *arg_method_invocation,
        GUnixFDList *arg_fd_list,
        const gchar *arg_session_handle,
        const gchar *arg_mime_type,
        void *data2);
  _GDbusCodegenMarshalBoolean_ObjectObjectStringStringFunc callback;
  GCClosure *cc = (GCClosure*) closure;
  void *data1, *data2;
  gboolean v_return;

  g_return_if_fail (return_value != NULL);
  g_return_if_fail (n_param_values == 5);

  if (G_CCLOSURE_SWAP_DATA (closure))
    {
      data1 = closure->data;
      data2 = g_value_peek_pointer (param_values + 0);
    }
  else
    {
      data1 = g_value_peek_pointer (param_values + 0);
      data2 = closure->data;
    }

  callback = (_GDbusCodegenMarshalBoolean_ObjectObjectStringStringFunc)
    (marshal_data ? marshal_data : cc->callback);

  v_return =
    callback (data1,
              g_marshal_value_peek_object (param_values + 1),
              g_marshal_value_peek_object (param_values + 2),
              g_marshal_value_peek_string (param_values + 3),
              g_marshal_value_peek_string (param_values + 4),
              data2);

  g_value_set_boolean (return_value, v_return);
}

static void
_g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_STRING_STRING_STRING_VARIANT_VARIANT (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint G_GNUC_UNUSED,
    void         *marshal_data)
{
  typedef gboolean (*_GDbusCodegenMarshalBoolean_ObjectStringStringStringStringVariantVariantFunc)
       (void *data1,
        GDBusMethodInvocation *arg_method_invocation,
        const gchar *arg_handle,
        const gchar *arg_app_id,
        const gchar *arg_parent_window,
        const gchar *arg_name,
        GVariant *arg_icon_v,
        GVariant *arg_options,
        void *data2);
  _GDbusCodegenMarshalBoolean_ObjectStringStringStringStringVariantVariantFunc callback;
  GCClosure *cc = (GCClosure*) closure;
  void *data1, *data2;
  gboolean v_return;

  g_return_if_fail (return_value != NULL);
  g_return_if_fail (n_param_values == 8);

  if (G_CCLOSURE_SWAP_DATA (closure))
    {
      data1 = closure->data;
      data2 = g_value_peek_pointer (param_values + 0);
    }
  else
    {
      data1 = g_value_peek_pointer (param_values + 0);
      data2 = closure->data;
    }

  callback = (_GDbusCodegenMarshalBoolean_ObjectStringStringStringStringVariantVariantFunc)
    (marshal_data ? marshal_data : cc->callback);

  v_return =
    callback (data1,
              g_marshal_value_peek_object (param_values + 1),
              g_marshal_value_peek_string (param_values + 2),
              g_marshal_value_peek_string (param_values + 3),
              g_marshal_value_peek_string (param_values + 4),
              g_marshal_value_peek_string (param_values + 5),
              g_marshal_value_peek_variant (param_values + 6),
              g_marshal_value_peek_variant (param_values + 7),
              data2);

  g_value_set_boolean (return_value, v_return);
}

static void
_g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_STRING_STRING_STRING_VARIANT (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint G_GNUC_UNUSED,
    void         *marshal_data)
{
  typedef gboolean (*_GDbusCodegenMarshalBoolean_ObjectStringStringStringStringVariantFunc)
       (void *data1,
        GDBusMethodInvocation *arg_method_invocation,
        const gchar *arg_handle,
        const gchar *arg_app_id,
        const gchar *arg_parent_window,
        const gchar *arg_title,
        GVariant *arg_options,
        void *data2);
  _GDbusCodegenMarshalBoolean_ObjectStringStringStringStringVariantFunc callback;
  GCClosure *cc = (GCClosure*) closure;
  void *data1, *data2;
  gboolean v_return;

  g_return_if_fail (return_value != NULL);
  g_return_if_fail (n_param_values == 7);

  if (G_CCLOSURE_SWAP_DATA (closure))
    {
      data1 = closure->data;
      data2 = g_value_peek_pointer (param_values + 0);
    }
  else
    {
      data1 = g_value_peek_pointer (param_values + 0);
      data2 = closure->data;
    }

  callback = (_GDbusCodegenMarshalBoolean_ObjectStringStringStringStringVariantFunc)
    (marshal_data ? marshal_data : cc->callback);

  v_return =
    callback (data1,
              g_marshal_value_peek_object (param_values + 1),
              g_marshal_value_peek_string (param_values + 2),
              g_marshal_value_peek_string (param_values + 3),
              g_marshal_value_peek_string (param_values + 4),
              g_marshal_value_peek_string (param_values + 5),
              g_marshal_value_peek_variant (param_values + 6),
              data2);

  g_value_set_boolean (return_value, v_return);
}

static void
_g_dbus_codegen_marshal_VOID__STRING_STRING_UINT64_VARIANT (
    GClosure     *closure,
    GValue       *return_value G_GNUC_UNUSED,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint G_GNUC_UNUSED,
    void         *marshal_data)
{
  typedef void (*_GDbusCodegenMarshalVoid_StringStringUint64VariantFunc)
       (void *data1,
        const gchar *arg_session_handle,
        const gchar *arg_shortcut_id,
        guint64 arg_timestamp,
        GVariant *arg_options,
        void *data2);
  _GDbusCodegenMarshalVoid_StringStringUint64VariantFunc callback;
  GCClosure *cc = (GCClosure*) closure;
  void *data1, *data2;

  g_return_if_fail (n_param_values == 5);

  if (G_CCLOSURE_SWAP_DATA (closure))
    {
      data1 = closure->data;
      data2 = g_value_peek_pointer (param_values + 0);
    }
  else
    {
      data1 = g_value_peek_pointer (param_values + 0);
      data2 = closure->data;
    }

  callback = (_GDbusCodegenMarshalVoid_StringStringUint64VariantFunc)
    (marshal_data ? marshal_data : cc->callback);

  callback (data1,
            g_marshal_value_peek_string (param_values + 1),
            g_marshal_value_peek_string (param_values + 2),
            g_marshal_value_peek_uint64 (param_values + 3),
            g_marshal_value_peek_variant (param_values + 4),
            data2);
}

static void
_g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_STRING_VARIANT_STRING_VARIANT (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint G_GNUC_UNUSED,
    void         *marshal_data)
{
  typedef gboolean (*_GDbusCodegenMarshalBoolean_ObjectStringStringVariantStringVariantFunc)
       (void *data1,
        GDBusMethodInvocation *arg_method_invocation,
        const gchar *arg_handle,
        const gchar *arg_session_handle,
        GVariant *arg_shortcuts,
        const gchar *arg_parent_window,
        GVariant *arg_options,
        void *data2);
  _GDbusCodegenMarshalBoolean_ObjectStringStringVariantStringVariantFunc callback;
  GCClosure *cc = (GCClosure*) closure;
  void *data1, *data2;
  gboolean v_return;

  g_return_if_fail (return_value != NULL);
  g_return_if_fail (n_param_values == 7);

  if (G_CCLOSURE_SWAP_DATA (closure))
    {
      data1 = closure->data;
      data2 = g_value_peek_pointer (param_values + 0);
    }
  else
    {
      data1 = g_value_peek_pointer (param_values + 0);
      data2 = closure->data;
    }

  callback = (_GDbusCodegenMarshalBoolean_ObjectStringStringVariantStringVariantFunc)
    (marshal_data ? marshal_data : cc->callback);

  v_return =
    callback (data1,
              g_marshal_value_peek_object (param_values + 1),
              g_marshal_value_peek_string (param_values + 2),
              g_marshal_value_peek_string (param_values + 3),
              g_marshal_value_peek_variant (param_values + 4),
              g_marshal_value_peek_string (param_values + 5),
              g_marshal_value_peek_variant (param_values + 6),
              data2);

  g_value_set_boolean (return_value, v_return);
}

static void
_g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_STRING (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint G_GNUC_UNUSED,
    void         *marshal_data)
{
  typedef gboolean (*_GDbusCodegenMarshalBoolean_ObjectStringStringFunc)
       (void *data1,
        GDBusMethodInvocation *arg_method_invocation,
        const gchar *arg_handle,
        const gchar *arg_session_handle,
        void *data2);
  _GDbusCodegenMarshalBoolean_ObjectStringStringFunc callback;
  GCClosure *cc = (GCClosure*) closure;
  void *data1, *data2;
  gboolean v_return;

  g_return_if_fail (return_value != NULL);
  g_return_if_fail (n_param_values == 4);

  if (G_CCLOSURE_SWAP_DATA (closure))
    {
      data1 = closure->data;
      data2 = g_value_peek_pointer (param_values + 0);
    }
  else
    {
      data1 = g_value_peek_pointer (param_values + 0);
      data2 = closure->data;
    }

  callback = (_GDbusCodegenMarshalBoolean_ObjectStringStringFunc)
    (marshal_data ? marshal_data : cc->callback);

  v_return =
    callback (data1,
              g_marshal_value_peek_object (param_values + 1),
              g_marshal_value_peek_string (param_values + 2),
              g_marshal_value_peek_string (param_values + 3),
              data2);

  g_value_set_boolean (return_value, v_return);
}

static void
_g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_STRING_STRING_VARIANT_VARIANT_UINT (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint G_GNUC_UNUSED,
    void         *marshal_data)
{
  typedef gboolean (*_GDbusCodegenMarshalBoolean_ObjectStringStringStringVariantVariantUintFunc)
       (void *data1,
        GDBusMethodInvocation *arg_method_invocation,
        const gchar *arg_handle,
        const gchar *arg_session_handle,
        const gchar *arg_app_id,
        GVariant *arg_options,
        GVariant *arg_barriers,
        guint arg_zone_set,
        void *data2);
  _GDbusCodegenMarshalBoolean_ObjectStringStringStringVariantVariantUintFunc callback;
  GCClosure *cc = (GCClosure*) closure;
  void *data1, *data2;
  gboolean v_return;

  g_return_if_fail (return_value != NULL);
  g_return_if_fail (n_param_values == 8);

  if (G_CCLOSURE_SWAP_DATA (closure))
    {
      data1 = closure->data;
      data2 = g_value_peek_pointer (param_values + 0);
    }
  else
    {
      data1 = g_value_peek_pointer (param_values + 0);
      data2 = closure->data;
    }

  callback = (_GDbusCodegenMarshalBoolean_ObjectStringStringStringVariantVariantUintFunc)
    (marshal_data ? marshal_data : cc->callback);

  v_return =
    callback (data1,
              g_marshal_value_peek_object (param_values + 1),
              g_marshal_value_peek_string (param_values + 2),
              g_marshal_value_peek_string (param_values + 3),
              g_marshal_value_peek_string (param_values + 4),
              g_marshal_value_peek_variant (param_values + 5),
              g_marshal_value_peek_variant (param_values + 6),
              g_marshal_value_peek_uint (param_values + 7),
              data2);

  g_value_set_boolean (return_value, v_return);
}

static void
_g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_STRING_VARIANT (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint G_GNUC_UNUSED,
    void         *marshal_data)
{
  typedef gboolean (*_GDbusCodegenMarshalBoolean_ObjectStringStringVariantFunc)
       (void *data1,
        GDBusMethodInvocation *arg_method_invocation,
        const gchar *arg_session_handle,
        const gchar *arg_app_id,
        GVariant *arg_options,
        void *data2);
  _GDbusCodegenMarshalBoolean_ObjectStringStringVariantFunc callback;
  GCClosure *cc = (GCClosure*) closure;
  void *data1, *data2;
  gboolean v_return;

  g_return_if_fail (return_value != NULL);
  g_return_if_fail (n_param_values == 5);

  if (G_CCLOSURE_SWAP_DATA (closure))
    {
      data1 = closure->data;
      data2 = g_value_peek_pointer (param_values + 0);
    }
  else
    {
      data1 = g_value_peek_pointer (param_values + 0);
      data2 = closure->data;
    }

  callback = (_GDbusCodegenMarshalBoolean_ObjectStringStringVariantFunc)
    (marshal_data ? marshal_data : cc->callback);

  v_return =
    callback (data1,
              g_marshal_value_peek_object (param_values + 1),
              g_marshal_value_peek_string (param_values + 2),
              g_marshal_value_peek_string (param_values + 3),
              g_marshal_value_peek_variant (param_values + 4),
              data2);

  g_value_set_boolean (return_value, v_return);
}

static void
_g_dbus_codegen_marshal_BOOLEAN__OBJECT_OBJECT_STRING_STRING_VARIANT (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint G_GNUC_UNUSED,
    void         *marshal_data)
{
  typedef gboolean (*_GDbusCodegenMarshalBoolean_ObjectObjectStringStringVariantFunc)
       (void *data1,
        GDBusMethodInvocation *arg_method_invocation,
        GUnixFDList *arg_fd_list,
        const gchar *arg_session_handle,
        const gchar *arg_app_id,
        GVariant *arg_options,
        void *data2);
  _GDbusCodegenMarshalBoolean_ObjectObjectStringStringVariantFunc callback;
  GCClosure *cc = (GCClosure*) closure;
  void *data1, *data2;
  gboolean v_return;

  g_return_if_fail (return_value != NULL);
  g_return_if_fail (n_param_values == 6);

  if (G_CCLOSURE_SWAP_DATA (closure))
    {
      data1 = closure->data;
      data2 = g_value_peek_pointer (param_values + 0);
    }
  else
    {
      data1 = g_value_peek_pointer (param_values + 0);
      data2 = closure->data;
    }

  callback = (_GDbusCodegenMarshalBoolean_ObjectObjectStringStringVariantFunc)
    (marshal_data ? marshal_data : cc->callback);

  v_return =
    callback (data1,
              g_marshal_value_peek_object (param_values + 1),
              g_marshal_value_peek_object (param_values + 2),
              g_marshal_value_peek_string (param_values + 3),
              g_marshal_value_peek_string (param_values + 4),
              g_marshal_value_peek_variant (param_values + 5),
              data2);

  g_value_set_boolean (return_value, v_return);
}

static void
_g_dbus_codegen_marshal_VOID__STRING_STRING_STRING_VARIANT (
    GClosure     *closure,
    GValue       *return_value G_GNUC_UNUSED,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint G_GNUC_UNUSED,
    void         *marshal_data)
{
  typedef void (*_GDbusCodegenMarshalVoid_StringStringStringVariantFunc)
       (void *data1,
        const gchar *arg_app_id,
        const gchar *arg_id,
        const gchar *arg_action,
        GVariant *arg_parameter,
        void *data2);
  _GDbusCodegenMarshalVoid_StringStringStringVariantFunc callback;
  GCClosure *cc = (GCClosure*) closure;
  void *data1, *data2;

  g_return_if_fail (n_param_values == 5);

  if (G_CCLOSURE_SWAP_DATA (closure))
    {
      data1 = closure->data;
      data2 = g_value_peek_pointer (param_values + 0);
    }
  else
    {
      data1 = g_value_peek_pointer (param_values + 0);
      data2 = closure->data;
    }

  callback = (_GDbusCodegenMarshalVoid_StringStringStringVariantFunc)
    (marshal_data ? marshal_data : cc->callback);

  callback (data1,
            g_marshal_value_peek_string (param_values + 1),
            g_marshal_value_peek_string (param_values + 2),
            g_marshal_value_peek_string (param_values + 3),
            g_marshal_value_peek_variant (param_values + 4),
            data2);
}

static void
_g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_STRING_STRING_STRING_VARIANT_VARIANT_VARIANT (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint G_GNUC_UNUSED,
    void         *marshal_data)
{
  typedef gboolean (*_GDbusCodegenMarshalBoolean_ObjectStringStringStringStringVariantVariantVariantFunc)
       (void *data1,
        GDBusMethodInvocation *arg_method_invocation,
        const gchar *arg_handle,
        const gchar *arg_app_id,
        const gchar *arg_parent_window,
        const gchar *arg_title,
        GVariant *arg_settings,
        GVariant *arg_page_setup,
        GVariant *arg_options,
        void *data2);
  _GDbusCodegenMarshalBoolean_ObjectStringStringStringStringVariantVariantVariantFunc callback;
  GCClosure *cc = (GCClosure*) closure;
  void *data1, *data2;
  gboolean v_return;

  g_return_if_fail (return_value != NULL);
  g_return_if_fail (n_param_values == 9);

  if (G_CCLOSURE_SWAP_DATA (closure))
    {
      data1 = closure->data;
      data2 = g_value_peek_pointer (param_values + 0);
    }
  else
    {
      data1 = g_value_peek_pointer (param_values + 0);
      data2 = closure->data;
    }

  callback = (_GDbusCodegenMarshalBoolean_ObjectStringStringStringStringVariantVariantVariantFunc)
    (marshal_data ? marshal_data : cc->callback);

  v_return =
    callback (data1,
              g_marshal_value_peek_object (param_values + 1),
              g_marshal_value_peek_string (param_values + 2),
              g_marshal_value_peek_string (param_values + 3),
              g_marshal_value_peek_string (param_values + 4),
              g_marshal_value_peek_string (param_values + 5),
              g_marshal_value_peek_variant (param_values + 6),
              g_marshal_value_peek_variant (param_values + 7),
              g_marshal_value_peek_variant (param_values + 8),
              data2);

  g_value_set_boolean (return_value, v_return);
}

static void
_g_dbus_codegen_marshal_BOOLEAN__OBJECT_OBJECT_STRING_STRING_STRING_STRING_VARIANT_VARIANT (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint G_GNUC_UNUSED,
    void         *marshal_data)
{
  typedef gboolean (*_GDbusCodegenMarshalBoolean_ObjectObjectStringStringStringStringVariantVariantFunc)
       (void *data1,
        GDBusMethodInvocation *arg_method_invocation,
        GUnixFDList *arg_fd_list,
        const gchar *arg_handle,
        const gchar *arg_app_id,
        const gchar *arg_parent_window,
        const gchar *arg_title,
        GVariant *arg_fd,
        GVariant *arg_options,
        void *data2);
  _GDbusCodegenMarshalBoolean_ObjectObjectStringStringStringStringVariantVariantFunc callback;
  GCClosure *cc = (GCClosure*) closure;
  void *data1, *data2;
  gboolean v_return;

  g_return_if_fail (return_value != NULL);
  g_return_if_fail (n_param_values == 9);

  if (G_CCLOSURE_SWAP_DATA (closure))
    {
      data1 = closure->data;
      data2 = g_value_peek_pointer (param_values + 0);
    }
  else
    {
      data1 = g_value_peek_pointer (param_values + 0);
      data2 = closure->data;
    }

  callback = (_GDbusCodegenMarshalBoolean_ObjectObjectStringStringStringStringVariantVariantFunc)
    (marshal_data ? marshal_data : cc->callback);

  v_return =
    callback (data1,
              g_marshal_value_peek_object (param_values + 1),
              g_marshal_value_peek_object (param_values + 2),
              g_marshal_value_peek_string (param_values + 3),
              g_marshal_value_peek_string (param_values + 4),
              g_marshal_value_peek_string (param_values + 5),
              g_marshal_value_peek_string (param_values + 6),
              g_marshal_value_peek_variant (param_values + 7),
              g_marshal_value_peek_variant (param_values + 8),
              data2);

  g_value_set_boolean (return_value, v_return);
}

static void
_g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_VARIANT_DOUBLE_DOUBLE (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint G_GNUC_UNUSED,
    void         *marshal_data)
{
  typedef gboolean (*_GDbusCodegenMarshalBoolean_ObjectStringVariantDoubleDoubleFunc)
       (void *data1,
        GDBusMethodInvocation *arg_method_invocation,
        const gchar *arg_session_handle,
        GVariant *arg_options,
        gdouble arg_dx,
        gdouble arg_dy,
        void *data2);
  _GDbusCodegenMarshalBoolean_ObjectStringVariantDoubleDoubleFunc callback;
  GCClosure *cc = (GCClosure*) closure;
  void *data1, *data2;
  gboolean v_return;

  g_return_if_fail (return_value != NULL);
  g_return_if_fail (n_param_values == 6);

  if (G_CCLOSURE_SWAP_DATA (closure))
    {
      data1 = closure->data;
      data2 = g_value_peek_pointer (param_values + 0);
    }
  else
    {
      data1 = g_value_peek_pointer (param_values + 0);
      data2 = closure->data;
    }

  callback = (_GDbusCodegenMarshalBoolean_ObjectStringVariantDoubleDoubleFunc)
    (marshal_data ? marshal_data : cc->callback);

  v_return =
    callback (data1,
              g_marshal_value_peek_object (param_values + 1),
              g_marshal_value_peek_string (param_values + 2),
              g_marshal_value_peek_variant (param_values + 3),
              g_marshal_value_peek_double (param_values + 4),
              g_marshal_value_peek_double (param_values + 5),
              data2);

  g_value_set_boolean (return_value, v_return);
}

static void
_g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_VARIANT_UINT_DOUBLE_DOUBLE (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint G_GNUC_UNUSED,
    void         *marshal_data)
{
  typedef gboolean (*_GDbusCodegenMarshalBoolean_ObjectStringVariantUintDoubleDoubleFunc)
       (void *data1,
        GDBusMethodInvocation *arg_method_invocation,
        const gchar *arg_session_handle,
        GVariant *arg_options,
        guint arg_stream,
        gdouble arg_x,
        gdouble arg_y,
        void *data2);
  _GDbusCodegenMarshalBoolean_ObjectStringVariantUintDoubleDoubleFunc callback;
  GCClosure *cc = (GCClosure*) closure;
  void *data1, *data2;
  gboolean v_return;

  g_return_if_fail (return_value != NULL);
  g_return_if_fail (n_param_values == 7);

  if (G_CCLOSURE_SWAP_DATA (closure))
    {
      data1 = closure->data;
      data2 = g_value_peek_pointer (param_values + 0);
    }
  else
    {
      data1 = g_value_peek_pointer (param_values + 0);
      data2 = closure->data;
    }

  callback = (_GDbusCodegenMarshalBoolean_ObjectStringVariantUintDoubleDoubleFunc)
    (marshal_data ? marshal_data : cc->callback);

  v_return =
    callback (data1,
              g_marshal_value_peek_object (param_values + 1),
              g_marshal_value_peek_string (param_values + 2),
              g_marshal_value_peek_variant (param_values + 3),
              g_marshal_value_peek_uint (param_values + 4),
              g_marshal_value_peek_double (param_values + 5),
              g_marshal_value_peek_double (param_values + 6),
              data2);

  g_value_set_boolean (return_value, v_return);
}

static void
_g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_VARIANT_INT_UINT (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint G_GNUC_UNUSED,
    void         *marshal_data)
{
  typedef gboolean (*_GDbusCodegenMarshalBoolean_ObjectStringVariantIntUintFunc)
       (void *data1,
        GDBusMethodInvocation *arg_method_invocation,
        const gchar *arg_session_handle,
        GVariant *arg_options,
        gint arg_button,
        guint arg_state,
        void *data2);
  _GDbusCodegenMarshalBoolean_ObjectStringVariantIntUintFunc callback;
  GCClosure *cc = (GCClosure*) closure;
  void *data1, *data2;
  gboolean v_return;

  g_return_if_fail (return_value != NULL);
  g_return_if_fail (n_param_values == 6);

  if (G_CCLOSURE_SWAP_DATA (closure))
    {
      data1 = closure->data;
      data2 = g_value_peek_pointer (param_values + 0);
    }
  else
    {
      data1 = g_value_peek_pointer (param_values + 0);
      data2 = closure->data;
    }

  callback = (_GDbusCodegenMarshalBoolean_ObjectStringVariantIntUintFunc)
    (marshal_data ? marshal_data : cc->callback);

  v_return =
    callback (data1,
              g_marshal_value_peek_object (param_values + 1),
              g_marshal_value_peek_string (param_values + 2),
              g_marshal_value_peek_variant (param_values + 3),
              g_marshal_value_peek_int (param_values + 4),
              g_marshal_value_peek_uint (param_values + 5),
              data2);

  g_value_set_boolean (return_value, v_return);
}

static void
_g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_VARIANT_UINT_INT (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint G_GNUC_UNUSED,
    void         *marshal_data)
{
  typedef gboolean (*_GDbusCodegenMarshalBoolean_ObjectStringVariantUintIntFunc)
       (void *data1,
        GDBusMethodInvocation *arg_method_invocation,
        const gchar *arg_session_handle,
        GVariant *arg_options,
        guint arg_axis,
        gint arg_steps,
        void *data2);
  _GDbusCodegenMarshalBoolean_ObjectStringVariantUintIntFunc callback;
  GCClosure *cc = (GCClosure*) closure;
  void *data1, *data2;
  gboolean v_return;

  g_return_if_fail (return_value != NULL);
  g_return_if_fail (n_param_values == 6);

  if (G_CCLOSURE_SWAP_DATA (closure))
    {
      data1 = closure->data;
      data2 = g_value_peek_pointer (param_values + 0);
    }
  else
    {
      data1 = g_value_peek_pointer (param_values + 0);
      data2 = closure->data;
    }

  callback = (_GDbusCodegenMarshalBoolean_ObjectStringVariantUintIntFunc)
    (marshal_data ? marshal_data : cc->callback);

  v_return =
    callback (data1,
              g_marshal_value_peek_object (param_values + 1),
              g_marshal_value_peek_string (param_values + 2),
              g_marshal_value_peek_variant (param_values + 3),
              g_marshal_value_peek_uint (param_values + 4),
              g_marshal_value_peek_int (param_values + 5),
              data2);

  g_value_set_boolean (return_value, v_return);
}

static void
_g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_VARIANT_UINT_UINT_DOUBLE_DOUBLE (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint G_GNUC_UNUSED,
    void         *marshal_data)
{
  typedef gboolean (*_GDbusCodegenMarshalBoolean_ObjectStringVariantUintUintDoubleDoubleFunc)
       (void *data1,
        GDBusMethodInvocation *arg_method_invocation,
        const gchar *arg_session_handle,
        GVariant *arg_options,
        guint arg_stream,
        guint arg_slot,
        gdouble arg_x,
        gdouble arg_y,
        void *data2);
  _GDbusCodegenMarshalBoolean_ObjectStringVariantUintUintDoubleDoubleFunc callback;
  GCClosure *cc = (GCClosure*) closure;
  void *data1, *data2;
  gboolean v_return;

  g_return_if_fail (return_value != NULL);
  g_return_if_fail (n_param_values == 8);

  if (G_CCLOSURE_SWAP_DATA (closure))
    {
      data1 = closure->data;
      data2 = g_value_peek_pointer (param_values + 0);
    }
  else
    {
      data1 = g_value_peek_pointer (param_values + 0);
      data2 = closure->data;
    }

  callback = (_GDbusCodegenMarshalBoolean_ObjectStringVariantUintUintDoubleDoubleFunc)
    (marshal_data ? marshal_data : cc->callback);

  v_return =
    callback (data1,
              g_marshal_value_peek_object (param_values + 1),
              g_marshal_value_peek_string (param_values + 2),
              g_marshal_value_peek_variant (param_values + 3),
              g_marshal_value_peek_uint (param_values + 4),
              g_marshal_value_peek_uint (param_values + 5),
              g_marshal_value_peek_double (param_values + 6),
              g_marshal_value_peek_double (param_values + 7),
              data2);

  g_value_set_boolean (return_value, v_return);
}

static void
_g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_VARIANT_UINT (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint G_GNUC_UNUSED,
    void         *marshal_data)
{
  typedef gboolean (*_GDbusCodegenMarshalBoolean_ObjectStringVariantUintFunc)
       (void *data1,
        GDBusMethodInvocation *arg_method_invocation,
        const gchar *arg_session_handle,
        GVariant *arg_options,
        guint arg_slot,
        void *data2);
  _GDbusCodegenMarshalBoolean_ObjectStringVariantUintFunc callback;
  GCClosure *cc = (GCClosure*) closure;
  void *data1, *data2;
  gboolean v_return;

  g_return_if_fail (return_value != NULL);
  g_return_if_fail (n_param_values == 5);

  if (G_CCLOSURE_SWAP_DATA (closure))
    {
      data1 = closure->data;
      data2 = g_value_peek_pointer (param_values + 0);
    }
  else
    {
      data1 = g_value_peek_pointer (param_values + 0);
      data2 = closure->data;
    }

  callback = (_GDbusCodegenMarshalBoolean_ObjectStringVariantUintFunc)
    (marshal_data ? marshal_data : cc->callback);

  v_return =
    callback (data1,
              g_marshal_value_peek_object (param_values + 1),
              g_marshal_value_peek_string (param_values + 2),
              g_marshal_value_peek_variant (param_values + 3),
              g_marshal_value_peek_uint (param_values + 4),
              data2);

  g_value_set_boolean (return_value, v_return);
}

static void
_g_dbus_codegen_marshal_VOID__STRING_STRING_VARIANT (
    GClosure     *closure,
    GValue       *return_value G_GNUC_UNUSED,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint G_GNUC_UNUSED,
    void         *marshal_data)
{
  typedef void (*_GDbusCodegenMarshalVoid_StringStringVariantFunc)
       (void *data1,
        const gchar *arg_namespace,
        const gchar *arg_key,
        GVariant *arg_value,
        void *data2);
  _GDbusCodegenMarshalVoid_StringStringVariantFunc callback;
  GCClosure *cc = (GCClosure*) closure;
  void *data1, *data2;

  g_return_if_fail (n_param_values == 4);

  if (G_CCLOSURE_SWAP_DATA (closure))
    {
      data1 = closure->data;
      data2 = g_value_peek_pointer (param_values + 0);
    }
  else
    {
      data1 = g_value_peek_pointer (param_values + 0);
      data2 = closure->data;
    }

  callback = (_GDbusCodegenMarshalVoid_StringStringVariantFunc)
    (marshal_data ? marshal_data : cc->callback);

  callback (data1,
            g_marshal_value_peek_string (param_values + 1),
            g_marshal_value_peek_string (param_values + 2),
            g_marshal_value_peek_variant (param_values + 3),
            data2);
}

static void
_g_dbus_codegen_marshal_BOOLEAN__OBJECT_BOXED (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint G_GNUC_UNUSED,
    void         *marshal_data)
{
  typedef gboolean (*_GDbusCodegenMarshalBoolean_ObjectBoxedFunc)
       (void *data1,
        GDBusMethodInvocation *arg_method_invocation,
        const gchar *const *arg_namespaces,
        void *data2);
  _GDbusCodegenMarshalBoolean_ObjectBoxedFunc callback;
  GCClosure *cc = (GCClosure*) closure;
  void *data1, *data2;
  gboolean v_return;

  g_return_if_fail (return_value != NULL);
  g_return_if_fail (n_param_values == 3);

  if (G_CCLOSURE_SWAP_DATA (closure))
    {
      data1 = closure->data;
      data2 = g_value_peek_pointer (param_values + 0);
    }
  else
    {
      data1 = g_value_peek_pointer (param_values + 0);
      data2 = closure->data;
    }

  callback = (_GDbusCodegenMarshalBoolean_ObjectBoxedFunc)
    (marshal_data ? marshal_data : cc->callback);

  v_return =
    callback (data1,
              g_marshal_value_peek_object (param_values + 1),
              g_marshal_value_peek_boxed (param_values + 2),
              data2);

  g_value_set_boolean (return_value, v_return);
}

static void
_g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_STRING_STRING_VARIANT_VARIANT (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint G_GNUC_UNUSED,
    void         *marshal_data)
{
  typedef gboolean (*_GDbusCodegenMarshalBoolean_ObjectStringStringStringVariantVariantFunc)
       (void *data1,
        GDBusMethodInvocation *arg_method_invocation,
        const gchar *arg_handle,
        const gchar *arg_parent_window,
        const gchar *arg_app_id,
        GVariant *arg_devices,
        GVariant *arg_options,
        void *data2);
  _GDbusCodegenMarshalBoolean_ObjectStringStringStringVariantVariantFunc callback;
  GCClosure *cc = (GCClosure*) closure;
  void *data1, *data2;
  gboolean v_return;

  g_return_if_fail (return_value != NULL);
  g_return_if_fail (n_param_values == 7);

  if (G_CCLOSURE_SWAP_DATA (closure))
    {
      data1 = closure->data;
      data2 = g_value_peek_pointer (param_values + 0);
    }
  else
    {
      data1 = g_value_peek_pointer (param_values + 0);
      data2 = closure->data;
    }

  callback = (_GDbusCodegenMarshalBoolean_ObjectStringStringStringVariantVariantFunc)
    (marshal_data ? marshal_data : cc->callback);

  v_return =
    callback (data1,
              g_marshal_value_peek_object (param_values + 1),
              g_marshal_value_peek_string (param_values + 2),
              g_marshal_value_peek_string (param_values + 3),
              g_marshal_value_peek_string (param_values + 4),
              g_marshal_value_peek_variant (param_values + 5),
              g_marshal_value_peek_variant (param_values + 6),
              data2);

  g_value_set_boolean (return_value, v_return);
}

/* ------------------------------------------------------------------------
 * Code for interface org.freedesktop.impl.portal.Access
 * ------------------------------------------------------------------------
 */

/**
 * SECTION:XdpImplAccess
 * @title: XdpImplAccess
 * @short_description: Generated C code for the org.freedesktop.impl.portal.Access D-Bus interface
 *
 * This section contains code for working with the <link linkend="gdbus-interface-org-freedesktop-impl-portal-Access.top_of_page">org.freedesktop.impl.portal.Access</link> D-Bus interface in C.
 */

/* ---- Introspection data for org.freedesktop.impl.portal.Access ---- */

static const _ExtendedGDBusArgInfo _xdp_impl_access_method_info_access_dialog_IN_ARG_handle =
{
  {
    -1,
    (gchar *) "handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_access_method_info_access_dialog_IN_ARG_app_id =
{
  {
    -1,
    (gchar *) "app_id",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_access_method_info_access_dialog_IN_ARG_parent_window =
{
  {
    -1,
    (gchar *) "parent_window",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_access_method_info_access_dialog_IN_ARG_title =
{
  {
    -1,
    (gchar *) "title",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_access_method_info_access_dialog_IN_ARG_subtitle =
{
  {
    -1,
    (gchar *) "subtitle",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_access_method_info_access_dialog_IN_ARG_body =
{
  {
    -1,
    (gchar *) "body",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_access_method_info_access_dialog_IN_ARG_options =
{
  {
    -1,
    (gchar *) "options",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_access_method_info_access_dialog_IN_ARG_pointers[] =
{
  &_xdp_impl_access_method_info_access_dialog_IN_ARG_handle.parent_struct,
  &_xdp_impl_access_method_info_access_dialog_IN_ARG_app_id.parent_struct,
  &_xdp_impl_access_method_info_access_dialog_IN_ARG_parent_window.parent_struct,
  &_xdp_impl_access_method_info_access_dialog_IN_ARG_title.parent_struct,
  &_xdp_impl_access_method_info_access_dialog_IN_ARG_subtitle.parent_struct,
  &_xdp_impl_access_method_info_access_dialog_IN_ARG_body.parent_struct,
  &_xdp_impl_access_method_info_access_dialog_IN_ARG_options.parent_struct,
  NULL
};

static const _ExtendedGDBusArgInfo _xdp_impl_access_method_info_access_dialog_OUT_ARG_response =
{
  {
    -1,
    (gchar *) "response",
    (gchar *) "u",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_access_method_info_access_dialog_OUT_ARG_results =
{
  {
    -1,
    (gchar *) "results",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_access_method_info_access_dialog_OUT_ARG_pointers[] =
{
  &_xdp_impl_access_method_info_access_dialog_OUT_ARG_response.parent_struct,
  &_xdp_impl_access_method_info_access_dialog_OUT_ARG_results.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_access_method_access_dialog_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.In6",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_access_method_access_dialog_annotation_info_1 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.Out1",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo * const _xdp_impl_access_method_access_dialog_annotation_info_pointers[] =
{
  &_xdp_impl_access_method_access_dialog_annotation_info_0,
  &_xdp_impl_access_method_access_dialog_annotation_info_1,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_impl_access_method_info_access_dialog =
{
  {
    -1,
    (gchar *) "AccessDialog",
    (GDBusArgInfo **) &_xdp_impl_access_method_info_access_dialog_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_impl_access_method_info_access_dialog_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_impl_access_method_access_dialog_annotation_info_pointers
  },
  "handle-access-dialog",
  FALSE
};

static const GDBusMethodInfo * const _xdp_impl_access_method_info_pointers[] =
{
  &_xdp_impl_access_method_info_access_dialog.parent_struct,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _xdp_impl_access_interface_info =
{
  {
    -1,
    (gchar *) "org.freedesktop.impl.portal.Access",
    (GDBusMethodInfo **) &_xdp_impl_access_method_info_pointers,
    NULL,
    NULL,
    NULL
  },
  "access",
};


/**
 * xdp_impl_access_interface_info:
 *
 * Gets a machine-readable description of the <link linkend="gdbus-interface-org-freedesktop-impl-portal-Access.top_of_page">org.freedesktop.impl.portal.Access</link> D-Bus interface.
 *
 * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
 */
GDBusInterfaceInfo *
xdp_impl_access_interface_info (void)
{
  return (GDBusInterfaceInfo *) &_xdp_impl_access_interface_info.parent_struct;
}

/**
 * xdp_impl_access_override_properties:
 * @klass: The class structure for a #GObject derived class.
 * @property_id_begin: The property id to assign to the first overridden property.
 *
 * Overrides all #GObject properties in the #XdpImplAccess interface for a concrete class.
 * The properties are overridden in the order they are defined.
 *
 * Returns: The last property id.
 */
guint
xdp_impl_access_override_properties (GObjectClass *klass G_GNUC_UNUSED, guint property_id_begin)
{
  return property_id_begin - 1;
}


inline static void
xdp_impl_access_method_marshal_access_dialog (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  _g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_STRING_STRING_STRING_STRING_STRING_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}


/**
 * XdpImplAccess:
 *
 * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-Access.top_of_page">org.freedesktop.impl.portal.Access</link>.
 */

/**
 * XdpImplAccessIface:
 * @parent_iface: The parent interface.
 * @handle_access_dialog: Handler for the #XdpImplAccess::handle-access-dialog signal.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-Access.top_of_page">org.freedesktop.impl.portal.Access</link>.
 */

typedef XdpImplAccessIface XdpImplAccessInterface;
G_DEFINE_INTERFACE (XdpImplAccess, xdp_impl_access, G_TYPE_OBJECT)

static void
xdp_impl_access_default_init (XdpImplAccessIface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * XdpImplAccess::handle-access-dialog:
   * @object: A #XdpImplAccess.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_handle: Argument passed by remote caller.
   * @arg_app_id: Argument passed by remote caller.
   * @arg_parent_window: Argument passed by remote caller.
   * @arg_title: Argument passed by remote caller.
   * @arg_subtitle: Argument passed by remote caller.
   * @arg_body: Argument passed by remote caller.
   * @arg_options: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-impl-portal-Access.AccessDialog">AccessDialog()</link> 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 xdp_impl_access_complete_access_dialog() 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.
   *
   * 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.
   */
  g_signal_new ("handle-access-dialog",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpImplAccessIface, handle_access_dialog),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_impl_access_method_marshal_access_dialog,
    G_TYPE_BOOLEAN,
    8,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_VARIANT);

}

/**
 * xdp_impl_access_call_access_dialog:
 * @proxy: A #XdpImplAccessProxy.
 * @arg_handle: Argument to pass with the method invocation.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_parent_window: Argument to pass with the method invocation.
 * @arg_title: Argument to pass with the method invocation.
 * @arg_subtitle: Argument to pass with the method invocation.
 * @arg_body: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-Access.AccessDialog">AccessDialog()</link> 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 xdp_impl_access_call_access_dialog_finish() to get the result of the operation.
 *
 * See xdp_impl_access_call_access_dialog_sync() for the synchronous, blocking version of this method.
 */
void
xdp_impl_access_call_access_dialog (
    XdpImplAccess *proxy,
    const gchar *arg_handle,
    const gchar *arg_app_id,
    const gchar *arg_parent_window,
    const gchar *arg_title,
    const gchar *arg_subtitle,
    const gchar *arg_body,
    GVariant *arg_options,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "AccessDialog",
    g_variant_new ("(osssss@a{sv})",
                   arg_handle,
                   arg_app_id,
                   arg_parent_window,
                   arg_title,
                   arg_subtitle,
                   arg_body,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_impl_access_call_access_dialog_finish:
 * @proxy: A #XdpImplAccessProxy.
 * @out_response: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_results: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_access_call_access_dialog().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_impl_access_call_access_dialog().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_access_call_access_dialog_finish (
    XdpImplAccess *proxy,
    guint* out_response,
    GVariant ** out_results,
    GAsyncResult *res,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(u@a{sv})",
                 out_response,
                 out_results);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_access_call_access_dialog_sync:
 * @proxy: A #XdpImplAccessProxy.
 * @arg_handle: Argument to pass with the method invocation.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_parent_window: Argument to pass with the method invocation.
 * @arg_title: Argument to pass with the method invocation.
 * @arg_subtitle: Argument to pass with the method invocation.
 * @arg_body: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @out_response: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_results: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-Access.AccessDialog">AccessDialog()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_access_call_access_dialog() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_access_call_access_dialog_sync (
    XdpImplAccess *proxy,
    const gchar *arg_handle,
    const gchar *arg_app_id,
    const gchar *arg_parent_window,
    const gchar *arg_title,
    const gchar *arg_subtitle,
    const gchar *arg_body,
    GVariant *arg_options,
    guint* out_response,
    GVariant ** out_results,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "AccessDialog",
    g_variant_new ("(osssss@a{sv})",
                   arg_handle,
                   arg_app_id,
                   arg_parent_window,
                   arg_title,
                   arg_subtitle,
                   arg_body,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(u@a{sv})",
                 out_response,
                 out_results);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_access_complete_access_dialog:
 * @object: A #XdpImplAccess.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @response: Parameter to return.
 * @results: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-impl-portal-Access.AccessDialog">AccessDialog()</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
xdp_impl_access_complete_access_dialog (
    XdpImplAccess *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    guint response,
    GVariant *results)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(u@a{sv})",
                   response,
                   results));
}

/* ------------------------------------------------------------------------ */

/**
 * XdpImplAccessProxy:
 *
 * The #XdpImplAccessProxy structure contains only private data and should only be accessed using the provided API.
 */

/**
 * XdpImplAccessProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpImplAccessProxy.
 */

struct _XdpImplAccessProxyPrivate
{
  GData *qdata;
};

static void xdp_impl_access_proxy_iface_init (XdpImplAccessIface *iface);

#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpImplAccessProxy, xdp_impl_access_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (XdpImplAccessProxy)
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_ACCESS, xdp_impl_access_proxy_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpImplAccessProxy, xdp_impl_access_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_ACCESS, xdp_impl_access_proxy_iface_init))

#endif
static void
xdp_impl_access_proxy_finalize (GObject *object)
{
  XdpImplAccessProxy *proxy = XDP_IMPL_ACCESS_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (xdp_impl_access_proxy_parent_class)->finalize (object);
}

static void
xdp_impl_access_proxy_get_property (GObject      *object G_GNUC_UNUSED,
  guint         prop_id G_GNUC_UNUSED,
  GValue       *value G_GNUC_UNUSED,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
}

static void
xdp_impl_access_proxy_set_property (GObject      *object G_GNUC_UNUSED,
  guint         prop_id G_GNUC_UNUSED,
  const GValue *value G_GNUC_UNUSED,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
}

static void
xdp_impl_access_proxy_g_signal (GDBusProxy *proxy,
  const gchar *sender_name G_GNUC_UNUSED,
  const gchar *signal_name,
  GVariant *parameters)
{
  _ExtendedGDBusSignalInfo *info;
  GVariantIter iter;
  GVariant *child;
  GValue *paramv;
  gsize num_params;
  gsize n;
  guint signal_id;
  info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_xdp_impl_access_interface_info.parent_struct, signal_name);
  if (info == NULL)
    return;
  num_params = g_variant_n_children (parameters);
  paramv = g_new0 (GValue, num_params + 1);
  g_value_init (&paramv[0], XDP_IMPL_TYPE_ACCESS);
  g_value_set_object (&paramv[0], proxy);
  g_variant_iter_init (&iter, parameters);
  n = 1;
  while ((child = g_variant_iter_next_value (&iter)) != NULL)
    {
      _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1];
      if (arg_info->use_gvariant)
        {
          g_value_init (&paramv[n], G_TYPE_VARIANT);
          g_value_set_variant (&paramv[n], child);
          n++;
        }
      else
        g_dbus_gvariant_to_gvalue (child, &paramv[n++]);
      g_variant_unref (child);
    }
  signal_id = g_signal_lookup (info->signal_name, XDP_IMPL_TYPE_ACCESS);
  g_signal_emitv (paramv, signal_id, 0, NULL);
  for (n = 0; n < num_params + 1; n++)
    g_value_unset (&paramv[n]);
  g_free (paramv);
}

static void
xdp_impl_access_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  XdpImplAccessProxy *proxy = XDP_IMPL_ACCESS_PROXY (_proxy);
  guint n;
  const gchar *key;
  GVariantIter *iter;
  _ExtendedGDBusPropertyInfo *info;
  g_variant_get (changed_properties, "a{sv}", &iter);
  while (g_variant_iter_next (iter, "{&sv}", &key, NULL))
    {
      info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_access_interface_info.parent_struct, key);
      g_datalist_remove_data (&proxy->priv->qdata, key);
      if (info != NULL)
        g_object_notify (G_OBJECT (proxy), info->hyphen_name);
    }
  g_variant_iter_free (iter);
  for (n = 0; invalidated_properties[n] != NULL; n++)
    {
      info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_access_interface_info.parent_struct, invalidated_properties[n]);
      g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]);
      if (info != NULL)
        g_object_notify (G_OBJECT (proxy), info->hyphen_name);
    }
}

static void
xdp_impl_access_proxy_init (XdpImplAccessProxy *proxy)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  proxy->priv = xdp_impl_access_proxy_get_instance_private (proxy);
#else
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, XDP_IMPL_TYPE_ACCESS_PROXY, XdpImplAccessProxyPrivate);
#endif

  g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), xdp_impl_access_interface_info ());
}

static void
xdp_impl_access_proxy_class_init (XdpImplAccessProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = xdp_impl_access_proxy_finalize;
  gobject_class->get_property = xdp_impl_access_proxy_get_property;
  gobject_class->set_property = xdp_impl_access_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = xdp_impl_access_proxy_g_signal;
  proxy_class->g_properties_changed = xdp_impl_access_proxy_g_properties_changed;

#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
  g_type_class_add_private (klass, sizeof (XdpImplAccessProxyPrivate));
#endif
}

static void
xdp_impl_access_proxy_iface_init (XdpImplAccessIface *iface G_GNUC_UNUSED)
{
}

/**
 * xdp_impl_access_proxy_new:
 * @connection: A #GDBusConnection.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-Access.top_of_page">org.freedesktop.impl.portal.Access</link>. 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 xdp_impl_access_proxy_new_finish() to get the result of the operation.
 *
 * See xdp_impl_access_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_impl_access_proxy_new (
    GDBusConnection     *connection,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GAsyncReadyCallback  callback,
    gpointer             user_data)
{
  g_async_initable_new_async (XDP_IMPL_TYPE_ACCESS_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.Access", NULL);
}

/**
 * xdp_impl_access_proxy_new_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_access_proxy_new().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_impl_access_proxy_new().
 *
 * Returns: (transfer full) (type XdpImplAccessProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplAccess *
xdp_impl_access_proxy_new_finish (
    GAsyncResult        *res,
    GError             **error)
{
  GObject *ret;
  GObject *source_object;
  source_object = g_async_result_get_source_object (res);
  ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
  g_object_unref (source_object);
  if (ret != NULL)
    return XDP_IMPL_ACCESS (ret);
  else
    return NULL;
}

/**
 * xdp_impl_access_proxy_new_sync:
 * @connection: A #GDBusConnection.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL
 *
 * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-Access.top_of_page">org.freedesktop.impl.portal.Access</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_access_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpImplAccessProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplAccess *
xdp_impl_access_proxy_new_sync (
    GDBusConnection     *connection,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GError             **error)
{
  GInitable *ret;
  ret = g_initable_new (XDP_IMPL_TYPE_ACCESS_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.Access", NULL);
  if (ret != NULL)
    return XDP_IMPL_ACCESS (ret);
  else
    return NULL;
}


/**
 * xdp_impl_access_proxy_new_for_bus:
 * @bus_type: A #GBusType.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: A bus name (well-known or unique).
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
 * @user_data: User data to pass to @callback.
 *
 * Like xdp_impl_access_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 xdp_impl_access_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See xdp_impl_access_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_impl_access_proxy_new_for_bus (
    GBusType             bus_type,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GAsyncReadyCallback  callback,
    gpointer             user_data)
{
  g_async_initable_new_async (XDP_IMPL_TYPE_ACCESS_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.Access", NULL);
}

/**
 * xdp_impl_access_proxy_new_for_bus_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_access_proxy_new_for_bus().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_impl_access_proxy_new_for_bus().
 *
 * Returns: (transfer full) (type XdpImplAccessProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplAccess *
xdp_impl_access_proxy_new_for_bus_finish (
    GAsyncResult        *res,
    GError             **error)
{
  GObject *ret;
  GObject *source_object;
  source_object = g_async_result_get_source_object (res);
  ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
  g_object_unref (source_object);
  if (ret != NULL)
    return XDP_IMPL_ACCESS (ret);
  else
    return NULL;
}

/**
 * xdp_impl_access_proxy_new_for_bus_sync:
 * @bus_type: A #GBusType.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: A bus name (well-known or unique).
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL
 *
 * Like xdp_impl_access_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_access_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpImplAccessProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplAccess *
xdp_impl_access_proxy_new_for_bus_sync (
    GBusType             bus_type,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GError             **error)
{
  GInitable *ret;
  ret = g_initable_new (XDP_IMPL_TYPE_ACCESS_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.Access", NULL);
  if (ret != NULL)
    return XDP_IMPL_ACCESS (ret);
  else
    return NULL;
}


/* ------------------------------------------------------------------------ */

/**
 * XdpImplAccessSkeleton:
 *
 * The #XdpImplAccessSkeleton structure contains only private data and should only be accessed using the provided API.
 */

/**
 * XdpImplAccessSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpImplAccessSkeleton.
 */

struct _XdpImplAccessSkeletonPrivate
{
  GValue *properties;
  GList *changed_properties;
  GSource *changed_properties_idle_source;
  GMainContext *context;
  GMutex lock;
};

static void
_xdp_impl_access_skeleton_handle_method_call (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name,
  const gchar *method_name,
  GVariant *parameters,
  GDBusMethodInvocation *invocation,
  gpointer user_data)
{
  XdpImplAccessSkeleton *skeleton = XDP_IMPL_ACCESS_SKELETON (user_data);
  _ExtendedGDBusMethodInfo *info;
  GVariantIter iter;
  GVariant *child;
  GValue *paramv;
  gsize num_params;
  guint num_extra;
  gsize n;
  guint signal_id;
  GValue return_value = G_VALUE_INIT;
  info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
  g_assert (info != NULL);
  num_params = g_variant_n_children (parameters);
  num_extra = info->pass_fdlist ? 3 : 2;  paramv = g_new0 (GValue, num_params + num_extra);
  n = 0;
  g_value_init (&paramv[n], XDP_IMPL_TYPE_ACCESS);
  g_value_set_object (&paramv[n++], skeleton);
  g_value_init (&paramv[n], G_TYPE_DBUS_METHOD_INVOCATION);
  g_value_set_object (&paramv[n++], invocation);
  if (info->pass_fdlist)
    {
#ifdef G_OS_UNIX
      g_value_init (&paramv[n], G_TYPE_UNIX_FD_LIST);
      g_value_set_object (&paramv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation)));
#else
      g_assert_not_reached ();
#endif
    }
  g_variant_iter_init (&iter, parameters);
  while ((child = g_variant_iter_next_value (&iter)) != NULL)
    {
      _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra];
      if (arg_info->use_gvariant)
        {
          g_value_init (&paramv[n], G_TYPE_VARIANT);
          g_value_set_variant (&paramv[n], child);
          n++;
        }
      else
        g_dbus_gvariant_to_gvalue (child, &paramv[n++]);
      g_variant_unref (child);
    }
  signal_id = g_signal_lookup (info->signal_name, XDP_IMPL_TYPE_ACCESS);
  g_value_init (&return_value, G_TYPE_BOOLEAN);
  g_signal_emitv (paramv, signal_id, 0, &return_value);
  if (!g_value_get_boolean (&return_value))
    g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD, "Method %s is not implemented on interface %s", method_name, interface_name);
  g_value_unset (&return_value);
  for (n = 0; n < num_params + num_extra; n++)
    g_value_unset (&paramv[n]);
  g_free (paramv);
}

static GVariant *
_xdp_impl_access_skeleton_handle_get_property (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name G_GNUC_UNUSED,
  const gchar *property_name,
  GError **error,
  gpointer user_data)
{
  XdpImplAccessSkeleton *skeleton = XDP_IMPL_ACCESS_SKELETON (user_data);
  GValue value = G_VALUE_INIT;
  GParamSpec *pspec;
  _ExtendedGDBusPropertyInfo *info;
  GVariant *ret;
  ret = NULL;
  info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_access_interface_info.parent_struct, property_name);
  g_assert (info != NULL);
  pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
  if (pspec == NULL)
    {
      g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
    }
  else
    {
      g_value_init (&value, pspec->value_type);
      g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value);
      ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature));
      g_value_unset (&value);
    }
  return ret;
}

static gboolean
_xdp_impl_access_skeleton_handle_set_property (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name G_GNUC_UNUSED,
  const gchar *property_name,
  GVariant *variant,
  GError **error,
  gpointer user_data)
{
  XdpImplAccessSkeleton *skeleton = XDP_IMPL_ACCESS_SKELETON (user_data);
  GValue value = G_VALUE_INIT;
  GParamSpec *pspec;
  _ExtendedGDBusPropertyInfo *info;
  gboolean ret;
  ret = FALSE;
  info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_access_interface_info.parent_struct, property_name);
  g_assert (info != NULL);
  pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
  if (pspec == NULL)
    {
      g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
    }
  else
    {
      if (info->use_gvariant)
        g_value_set_variant (&value, variant);
      else
        g_dbus_gvariant_to_gvalue (variant, &value);
      g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value);
      g_value_unset (&value);
      ret = TRUE;
    }
  return ret;
}

static const GDBusInterfaceVTable _xdp_impl_access_skeleton_vtable =
{
  _xdp_impl_access_skeleton_handle_method_call,
  _xdp_impl_access_skeleton_handle_get_property,
  _xdp_impl_access_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
xdp_impl_access_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return xdp_impl_access_interface_info ();
}

static GDBusInterfaceVTable *
xdp_impl_access_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_xdp_impl_access_skeleton_vtable;
}

static GVariant *
xdp_impl_access_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  XdpImplAccessSkeleton *skeleton = XDP_IMPL_ACCESS_SKELETON (_skeleton);

  GVariantBuilder builder;
  guint n;
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_84
  g_variant_builder_init_static (&builder, G_VARIANT_TYPE ("a{sv}"));
#else
  g_variant_builder_init(&builder, G_VARIANT_TYPE ("a{sv}"));
#endif
  if (_xdp_impl_access_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _xdp_impl_access_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _xdp_impl_access_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _xdp_impl_access_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.impl.portal.Access", info->name, NULL, skeleton);
          if (value != NULL)
            {
              g_variant_take_ref (value);
              g_variant_builder_add (&builder, "{sv}", info->name, value);
              g_variant_unref (value);
            }
        }
    }
out:
  return g_variant_builder_end (&builder);
}

static void
xdp_impl_access_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton G_GNUC_UNUSED)
{
}

static void xdp_impl_access_skeleton_iface_init (XdpImplAccessIface *iface);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpImplAccessSkeleton, xdp_impl_access_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (XdpImplAccessSkeleton)
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_ACCESS, xdp_impl_access_skeleton_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpImplAccessSkeleton, xdp_impl_access_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_ACCESS, xdp_impl_access_skeleton_iface_init))

#endif
static void
xdp_impl_access_skeleton_finalize (GObject *object)
{
  XdpImplAccessSkeleton *skeleton = XDP_IMPL_ACCESS_SKELETON (object);
  g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  /* coverity[missing_lock : SUPPRESS] */
  g_clear_pointer (&skeleton->priv->changed_properties_idle_source, g_source_destroy);
#else
  if (skeleton->priv->changed_properties_idle_source != NULL)
    g_source_destroy (skeleton->priv->changed_properties_idle_source);
skeleton->priv->changed_properties_idle_source = NULL;
#endif
  g_main_context_unref (skeleton->priv->context);
  g_mutex_clear (&skeleton->priv->lock);
  G_OBJECT_CLASS (xdp_impl_access_skeleton_parent_class)->finalize (object);
}

static void
xdp_impl_access_skeleton_init (XdpImplAccessSkeleton *skeleton)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  skeleton->priv = xdp_impl_access_skeleton_get_instance_private (skeleton);
#else
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, XDP_IMPL_TYPE_ACCESS_SKELETON, XdpImplAccessSkeletonPrivate);
#endif

  g_mutex_init (&skeleton->priv->lock);
  skeleton->priv->context = g_main_context_ref_thread_default ();
}

static void
xdp_impl_access_skeleton_class_init (XdpImplAccessSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize = xdp_impl_access_skeleton_finalize;

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = xdp_impl_access_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = xdp_impl_access_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = xdp_impl_access_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = xdp_impl_access_skeleton_dbus_interface_get_vtable;

#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
  g_type_class_add_private (klass, sizeof (XdpImplAccessSkeletonPrivate));
#endif
}

static void
xdp_impl_access_skeleton_iface_init (XdpImplAccessIface *iface G_GNUC_UNUSED)
{
}

/**
 * xdp_impl_access_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-Access.top_of_page">org.freedesktop.impl.portal.Access</link>.
 *
 * Returns: (transfer full) (type XdpImplAccessSkeleton): The skeleton object.
 */
XdpImplAccess *
xdp_impl_access_skeleton_new (void)
{
  return XDP_IMPL_ACCESS (g_object_new (XDP_IMPL_TYPE_ACCESS_SKELETON, NULL));
}

/* ------------------------------------------------------------------------
 * Code for interface org.freedesktop.impl.portal.Account
 * ------------------------------------------------------------------------
 */

/**
 * SECTION:XdpImplAccount
 * @title: XdpImplAccount
 * @short_description: Generated C code for the org.freedesktop.impl.portal.Account D-Bus interface
 *
 * This section contains code for working with the <link linkend="gdbus-interface-org-freedesktop-impl-portal-Account.top_of_page">org.freedesktop.impl.portal.Account</link> D-Bus interface in C.
 */

/* ---- Introspection data for org.freedesktop.impl.portal.Account ---- */

static const _ExtendedGDBusArgInfo _xdp_impl_account_method_info_get_user_information_IN_ARG_handle =
{
  {
    -1,
    (gchar *) "handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_account_method_info_get_user_information_IN_ARG_app_id =
{
  {
    -1,
    (gchar *) "app_id",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_account_method_info_get_user_information_IN_ARG_window =
{
  {
    -1,
    (gchar *) "window",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_account_method_info_get_user_information_IN_ARG_options =
{
  {
    -1,
    (gchar *) "options",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_account_method_info_get_user_information_IN_ARG_pointers[] =
{
  &_xdp_impl_account_method_info_get_user_information_IN_ARG_handle.parent_struct,
  &_xdp_impl_account_method_info_get_user_information_IN_ARG_app_id.parent_struct,
  &_xdp_impl_account_method_info_get_user_information_IN_ARG_window.parent_struct,
  &_xdp_impl_account_method_info_get_user_information_IN_ARG_options.parent_struct,
  NULL
};

static const _ExtendedGDBusArgInfo _xdp_impl_account_method_info_get_user_information_OUT_ARG_response =
{
  {
    -1,
    (gchar *) "response",
    (gchar *) "u",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_account_method_info_get_user_information_OUT_ARG_results =
{
  {
    -1,
    (gchar *) "results",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_account_method_info_get_user_information_OUT_ARG_pointers[] =
{
  &_xdp_impl_account_method_info_get_user_information_OUT_ARG_response.parent_struct,
  &_xdp_impl_account_method_info_get_user_information_OUT_ARG_results.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_account_method_get_user_information_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.In3",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_account_method_get_user_information_annotation_info_1 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.Out1",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo * const _xdp_impl_account_method_get_user_information_annotation_info_pointers[] =
{
  &_xdp_impl_account_method_get_user_information_annotation_info_0,
  &_xdp_impl_account_method_get_user_information_annotation_info_1,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_impl_account_method_info_get_user_information =
{
  {
    -1,
    (gchar *) "GetUserInformation",
    (GDBusArgInfo **) &_xdp_impl_account_method_info_get_user_information_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_impl_account_method_info_get_user_information_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_impl_account_method_get_user_information_annotation_info_pointers
  },
  "handle-get-user-information",
  FALSE
};

static const GDBusMethodInfo * const _xdp_impl_account_method_info_pointers[] =
{
  &_xdp_impl_account_method_info_get_user_information.parent_struct,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _xdp_impl_account_interface_info =
{
  {
    -1,
    (gchar *) "org.freedesktop.impl.portal.Account",
    (GDBusMethodInfo **) &_xdp_impl_account_method_info_pointers,
    NULL,
    NULL,
    NULL
  },
  "account",
};


/**
 * xdp_impl_account_interface_info:
 *
 * Gets a machine-readable description of the <link linkend="gdbus-interface-org-freedesktop-impl-portal-Account.top_of_page">org.freedesktop.impl.portal.Account</link> D-Bus interface.
 *
 * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
 */
GDBusInterfaceInfo *
xdp_impl_account_interface_info (void)
{
  return (GDBusInterfaceInfo *) &_xdp_impl_account_interface_info.parent_struct;
}

/**
 * xdp_impl_account_override_properties:
 * @klass: The class structure for a #GObject derived class.
 * @property_id_begin: The property id to assign to the first overridden property.
 *
 * Overrides all #GObject properties in the #XdpImplAccount interface for a concrete class.
 * The properties are overridden in the order they are defined.
 *
 * Returns: The last property id.
 */
guint
xdp_impl_account_override_properties (GObjectClass *klass G_GNUC_UNUSED, guint property_id_begin)
{
  return property_id_begin - 1;
}


inline static void
xdp_impl_account_method_marshal_get_user_information (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  _g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_STRING_STRING_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}


/**
 * XdpImplAccount:
 *
 * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-Account.top_of_page">org.freedesktop.impl.portal.Account</link>.
 */

/**
 * XdpImplAccountIface:
 * @parent_iface: The parent interface.
 * @handle_get_user_information: Handler for the #XdpImplAccount::handle-get-user-information signal.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-Account.top_of_page">org.freedesktop.impl.portal.Account</link>.
 */

typedef XdpImplAccountIface XdpImplAccountInterface;
G_DEFINE_INTERFACE (XdpImplAccount, xdp_impl_account, G_TYPE_OBJECT)

static void
xdp_impl_account_default_init (XdpImplAccountIface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * XdpImplAccount::handle-get-user-information:
   * @object: A #XdpImplAccount.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_handle: Argument passed by remote caller.
   * @arg_app_id: Argument passed by remote caller.
   * @arg_window: Argument passed by remote caller.
   * @arg_options: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-impl-portal-Account.GetUserInformation">GetUserInformation()</link> 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 xdp_impl_account_complete_get_user_information() 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.
   *
   * 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.
   */
  g_signal_new ("handle-get-user-information",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpImplAccountIface, handle_get_user_information),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_impl_account_method_marshal_get_user_information,
    G_TYPE_BOOLEAN,
    5,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_VARIANT);

}

/**
 * xdp_impl_account_call_get_user_information:
 * @proxy: A #XdpImplAccountProxy.
 * @arg_handle: Argument to pass with the method invocation.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_window: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-Account.GetUserInformation">GetUserInformation()</link> 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 xdp_impl_account_call_get_user_information_finish() to get the result of the operation.
 *
 * See xdp_impl_account_call_get_user_information_sync() for the synchronous, blocking version of this method.
 */
void
xdp_impl_account_call_get_user_information (
    XdpImplAccount *proxy,
    const gchar *arg_handle,
    const gchar *arg_app_id,
    const gchar *arg_window,
    GVariant *arg_options,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "GetUserInformation",
    g_variant_new ("(oss@a{sv})",
                   arg_handle,
                   arg_app_id,
                   arg_window,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_impl_account_call_get_user_information_finish:
 * @proxy: A #XdpImplAccountProxy.
 * @out_response: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_results: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_account_call_get_user_information().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_impl_account_call_get_user_information().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_account_call_get_user_information_finish (
    XdpImplAccount *proxy,
    guint* out_response,
    GVariant ** out_results,
    GAsyncResult *res,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(u@a{sv})",
                 out_response,
                 out_results);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_account_call_get_user_information_sync:
 * @proxy: A #XdpImplAccountProxy.
 * @arg_handle: Argument to pass with the method invocation.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_window: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @out_response: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_results: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-Account.GetUserInformation">GetUserInformation()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_account_call_get_user_information() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_account_call_get_user_information_sync (
    XdpImplAccount *proxy,
    const gchar *arg_handle,
    const gchar *arg_app_id,
    const gchar *arg_window,
    GVariant *arg_options,
    guint* out_response,
    GVariant ** out_results,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "GetUserInformation",
    g_variant_new ("(oss@a{sv})",
                   arg_handle,
                   arg_app_id,
                   arg_window,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(u@a{sv})",
                 out_response,
                 out_results);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_account_complete_get_user_information:
 * @object: A #XdpImplAccount.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @response: Parameter to return.
 * @results: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-impl-portal-Account.GetUserInformation">GetUserInformation()</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
xdp_impl_account_complete_get_user_information (
    XdpImplAccount *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    guint response,
    GVariant *results)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(u@a{sv})",
                   response,
                   results));
}

/* ------------------------------------------------------------------------ */

/**
 * XdpImplAccountProxy:
 *
 * The #XdpImplAccountProxy structure contains only private data and should only be accessed using the provided API.
 */

/**
 * XdpImplAccountProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpImplAccountProxy.
 */

struct _XdpImplAccountProxyPrivate
{
  GData *qdata;
};

static void xdp_impl_account_proxy_iface_init (XdpImplAccountIface *iface);

#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpImplAccountProxy, xdp_impl_account_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (XdpImplAccountProxy)
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_ACCOUNT, xdp_impl_account_proxy_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpImplAccountProxy, xdp_impl_account_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_ACCOUNT, xdp_impl_account_proxy_iface_init))

#endif
static void
xdp_impl_account_proxy_finalize (GObject *object)
{
  XdpImplAccountProxy *proxy = XDP_IMPL_ACCOUNT_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (xdp_impl_account_proxy_parent_class)->finalize (object);
}

static void
xdp_impl_account_proxy_get_property (GObject      *object G_GNUC_UNUSED,
  guint         prop_id G_GNUC_UNUSED,
  GValue       *value G_GNUC_UNUSED,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
}

static void
xdp_impl_account_proxy_set_property (GObject      *object G_GNUC_UNUSED,
  guint         prop_id G_GNUC_UNUSED,
  const GValue *value G_GNUC_UNUSED,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
}

static void
xdp_impl_account_proxy_g_signal (GDBusProxy *proxy,
  const gchar *sender_name G_GNUC_UNUSED,
  const gchar *signal_name,
  GVariant *parameters)
{
  _ExtendedGDBusSignalInfo *info;
  GVariantIter iter;
  GVariant *child;
  GValue *paramv;
  gsize num_params;
  gsize n;
  guint signal_id;
  info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_xdp_impl_account_interface_info.parent_struct, signal_name);
  if (info == NULL)
    return;
  num_params = g_variant_n_children (parameters);
  paramv = g_new0 (GValue, num_params + 1);
  g_value_init (&paramv[0], XDP_IMPL_TYPE_ACCOUNT);
  g_value_set_object (&paramv[0], proxy);
  g_variant_iter_init (&iter, parameters);
  n = 1;
  while ((child = g_variant_iter_next_value (&iter)) != NULL)
    {
      _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1];
      if (arg_info->use_gvariant)
        {
          g_value_init (&paramv[n], G_TYPE_VARIANT);
          g_value_set_variant (&paramv[n], child);
          n++;
        }
      else
        g_dbus_gvariant_to_gvalue (child, &paramv[n++]);
      g_variant_unref (child);
    }
  signal_id = g_signal_lookup (info->signal_name, XDP_IMPL_TYPE_ACCOUNT);
  g_signal_emitv (paramv, signal_id, 0, NULL);
  for (n = 0; n < num_params + 1; n++)
    g_value_unset (&paramv[n]);
  g_free (paramv);
}

static void
xdp_impl_account_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  XdpImplAccountProxy *proxy = XDP_IMPL_ACCOUNT_PROXY (_proxy);
  guint n;
  const gchar *key;
  GVariantIter *iter;
  _ExtendedGDBusPropertyInfo *info;
  g_variant_get (changed_properties, "a{sv}", &iter);
  while (g_variant_iter_next (iter, "{&sv}", &key, NULL))
    {
      info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_account_interface_info.parent_struct, key);
      g_datalist_remove_data (&proxy->priv->qdata, key);
      if (info != NULL)
        g_object_notify (G_OBJECT (proxy), info->hyphen_name);
    }
  g_variant_iter_free (iter);
  for (n = 0; invalidated_properties[n] != NULL; n++)
    {
      info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_account_interface_info.parent_struct, invalidated_properties[n]);
      g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]);
      if (info != NULL)
        g_object_notify (G_OBJECT (proxy), info->hyphen_name);
    }
}

static void
xdp_impl_account_proxy_init (XdpImplAccountProxy *proxy)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  proxy->priv = xdp_impl_account_proxy_get_instance_private (proxy);
#else
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, XDP_IMPL_TYPE_ACCOUNT_PROXY, XdpImplAccountProxyPrivate);
#endif

  g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), xdp_impl_account_interface_info ());
}

static void
xdp_impl_account_proxy_class_init (XdpImplAccountProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = xdp_impl_account_proxy_finalize;
  gobject_class->get_property = xdp_impl_account_proxy_get_property;
  gobject_class->set_property = xdp_impl_account_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = xdp_impl_account_proxy_g_signal;
  proxy_class->g_properties_changed = xdp_impl_account_proxy_g_properties_changed;

#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
  g_type_class_add_private (klass, sizeof (XdpImplAccountProxyPrivate));
#endif
}

static void
xdp_impl_account_proxy_iface_init (XdpImplAccountIface *iface G_GNUC_UNUSED)
{
}

/**
 * xdp_impl_account_proxy_new:
 * @connection: A #GDBusConnection.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-Account.top_of_page">org.freedesktop.impl.portal.Account</link>. 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 xdp_impl_account_proxy_new_finish() to get the result of the operation.
 *
 * See xdp_impl_account_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_impl_account_proxy_new (
    GDBusConnection     *connection,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GAsyncReadyCallback  callback,
    gpointer             user_data)
{
  g_async_initable_new_async (XDP_IMPL_TYPE_ACCOUNT_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.Account", NULL);
}

/**
 * xdp_impl_account_proxy_new_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_account_proxy_new().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_impl_account_proxy_new().
 *
 * Returns: (transfer full) (type XdpImplAccountProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplAccount *
xdp_impl_account_proxy_new_finish (
    GAsyncResult        *res,
    GError             **error)
{
  GObject *ret;
  GObject *source_object;
  source_object = g_async_result_get_source_object (res);
  ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
  g_object_unref (source_object);
  if (ret != NULL)
    return XDP_IMPL_ACCOUNT (ret);
  else
    return NULL;
}

/**
 * xdp_impl_account_proxy_new_sync:
 * @connection: A #GDBusConnection.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL
 *
 * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-Account.top_of_page">org.freedesktop.impl.portal.Account</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_account_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpImplAccountProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplAccount *
xdp_impl_account_proxy_new_sync (
    GDBusConnection     *connection,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GError             **error)
{
  GInitable *ret;
  ret = g_initable_new (XDP_IMPL_TYPE_ACCOUNT_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.Account", NULL);
  if (ret != NULL)
    return XDP_IMPL_ACCOUNT (ret);
  else
    return NULL;
}


/**
 * xdp_impl_account_proxy_new_for_bus:
 * @bus_type: A #GBusType.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: A bus name (well-known or unique).
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
 * @user_data: User data to pass to @callback.
 *
 * Like xdp_impl_account_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 xdp_impl_account_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See xdp_impl_account_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_impl_account_proxy_new_for_bus (
    GBusType             bus_type,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GAsyncReadyCallback  callback,
    gpointer             user_data)
{
  g_async_initable_new_async (XDP_IMPL_TYPE_ACCOUNT_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.Account", NULL);
}

/**
 * xdp_impl_account_proxy_new_for_bus_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_account_proxy_new_for_bus().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_impl_account_proxy_new_for_bus().
 *
 * Returns: (transfer full) (type XdpImplAccountProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplAccount *
xdp_impl_account_proxy_new_for_bus_finish (
    GAsyncResult        *res,
    GError             **error)
{
  GObject *ret;
  GObject *source_object;
  source_object = g_async_result_get_source_object (res);
  ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
  g_object_unref (source_object);
  if (ret != NULL)
    return XDP_IMPL_ACCOUNT (ret);
  else
    return NULL;
}

/**
 * xdp_impl_account_proxy_new_for_bus_sync:
 * @bus_type: A #GBusType.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: A bus name (well-known or unique).
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL
 *
 * Like xdp_impl_account_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_account_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpImplAccountProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplAccount *
xdp_impl_account_proxy_new_for_bus_sync (
    GBusType             bus_type,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GError             **error)
{
  GInitable *ret;
  ret = g_initable_new (XDP_IMPL_TYPE_ACCOUNT_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.Account", NULL);
  if (ret != NULL)
    return XDP_IMPL_ACCOUNT (ret);
  else
    return NULL;
}


/* ------------------------------------------------------------------------ */

/**
 * XdpImplAccountSkeleton:
 *
 * The #XdpImplAccountSkeleton structure contains only private data and should only be accessed using the provided API.
 */

/**
 * XdpImplAccountSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpImplAccountSkeleton.
 */

struct _XdpImplAccountSkeletonPrivate
{
  GValue *properties;
  GList *changed_properties;
  GSource *changed_properties_idle_source;
  GMainContext *context;
  GMutex lock;
};

static void
_xdp_impl_account_skeleton_handle_method_call (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name,
  const gchar *method_name,
  GVariant *parameters,
  GDBusMethodInvocation *invocation,
  gpointer user_data)
{
  XdpImplAccountSkeleton *skeleton = XDP_IMPL_ACCOUNT_SKELETON (user_data);
  _ExtendedGDBusMethodInfo *info;
  GVariantIter iter;
  GVariant *child;
  GValue *paramv;
  gsize num_params;
  guint num_extra;
  gsize n;
  guint signal_id;
  GValue return_value = G_VALUE_INIT;
  info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
  g_assert (info != NULL);
  num_params = g_variant_n_children (parameters);
  num_extra = info->pass_fdlist ? 3 : 2;  paramv = g_new0 (GValue, num_params + num_extra);
  n = 0;
  g_value_init (&paramv[n], XDP_IMPL_TYPE_ACCOUNT);
  g_value_set_object (&paramv[n++], skeleton);
  g_value_init (&paramv[n], G_TYPE_DBUS_METHOD_INVOCATION);
  g_value_set_object (&paramv[n++], invocation);
  if (info->pass_fdlist)
    {
#ifdef G_OS_UNIX
      g_value_init (&paramv[n], G_TYPE_UNIX_FD_LIST);
      g_value_set_object (&paramv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation)));
#else
      g_assert_not_reached ();
#endif
    }
  g_variant_iter_init (&iter, parameters);
  while ((child = g_variant_iter_next_value (&iter)) != NULL)
    {
      _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra];
      if (arg_info->use_gvariant)
        {
          g_value_init (&paramv[n], G_TYPE_VARIANT);
          g_value_set_variant (&paramv[n], child);
          n++;
        }
      else
        g_dbus_gvariant_to_gvalue (child, &paramv[n++]);
      g_variant_unref (child);
    }
  signal_id = g_signal_lookup (info->signal_name, XDP_IMPL_TYPE_ACCOUNT);
  g_value_init (&return_value, G_TYPE_BOOLEAN);
  g_signal_emitv (paramv, signal_id, 0, &return_value);
  if (!g_value_get_boolean (&return_value))
    g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD, "Method %s is not implemented on interface %s", method_name, interface_name);
  g_value_unset (&return_value);
  for (n = 0; n < num_params + num_extra; n++)
    g_value_unset (&paramv[n]);
  g_free (paramv);
}

static GVariant *
_xdp_impl_account_skeleton_handle_get_property (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name G_GNUC_UNUSED,
  const gchar *property_name,
  GError **error,
  gpointer user_data)
{
  XdpImplAccountSkeleton *skeleton = XDP_IMPL_ACCOUNT_SKELETON (user_data);
  GValue value = G_VALUE_INIT;
  GParamSpec *pspec;
  _ExtendedGDBusPropertyInfo *info;
  GVariant *ret;
  ret = NULL;
  info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_account_interface_info.parent_struct, property_name);
  g_assert (info != NULL);
  pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
  if (pspec == NULL)
    {
      g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
    }
  else
    {
      g_value_init (&value, pspec->value_type);
      g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value);
      ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature));
      g_value_unset (&value);
    }
  return ret;
}

static gboolean
_xdp_impl_account_skeleton_handle_set_property (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name G_GNUC_UNUSED,
  const gchar *property_name,
  GVariant *variant,
  GError **error,
  gpointer user_data)
{
  XdpImplAccountSkeleton *skeleton = XDP_IMPL_ACCOUNT_SKELETON (user_data);
  GValue value = G_VALUE_INIT;
  GParamSpec *pspec;
  _ExtendedGDBusPropertyInfo *info;
  gboolean ret;
  ret = FALSE;
  info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_account_interface_info.parent_struct, property_name);
  g_assert (info != NULL);
  pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
  if (pspec == NULL)
    {
      g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
    }
  else
    {
      if (info->use_gvariant)
        g_value_set_variant (&value, variant);
      else
        g_dbus_gvariant_to_gvalue (variant, &value);
      g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value);
      g_value_unset (&value);
      ret = TRUE;
    }
  return ret;
}

static const GDBusInterfaceVTable _xdp_impl_account_skeleton_vtable =
{
  _xdp_impl_account_skeleton_handle_method_call,
  _xdp_impl_account_skeleton_handle_get_property,
  _xdp_impl_account_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
xdp_impl_account_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return xdp_impl_account_interface_info ();
}

static GDBusInterfaceVTable *
xdp_impl_account_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_xdp_impl_account_skeleton_vtable;
}

static GVariant *
xdp_impl_account_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  XdpImplAccountSkeleton *skeleton = XDP_IMPL_ACCOUNT_SKELETON (_skeleton);

  GVariantBuilder builder;
  guint n;
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_84
  g_variant_builder_init_static (&builder, G_VARIANT_TYPE ("a{sv}"));
#else
  g_variant_builder_init(&builder, G_VARIANT_TYPE ("a{sv}"));
#endif
  if (_xdp_impl_account_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _xdp_impl_account_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _xdp_impl_account_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _xdp_impl_account_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.impl.portal.Account", info->name, NULL, skeleton);
          if (value != NULL)
            {
              g_variant_take_ref (value);
              g_variant_builder_add (&builder, "{sv}", info->name, value);
              g_variant_unref (value);
            }
        }
    }
out:
  return g_variant_builder_end (&builder);
}

static void
xdp_impl_account_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton G_GNUC_UNUSED)
{
}

static void xdp_impl_account_skeleton_iface_init (XdpImplAccountIface *iface);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpImplAccountSkeleton, xdp_impl_account_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (XdpImplAccountSkeleton)
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_ACCOUNT, xdp_impl_account_skeleton_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpImplAccountSkeleton, xdp_impl_account_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_ACCOUNT, xdp_impl_account_skeleton_iface_init))

#endif
static void
xdp_impl_account_skeleton_finalize (GObject *object)
{
  XdpImplAccountSkeleton *skeleton = XDP_IMPL_ACCOUNT_SKELETON (object);
  g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  /* coverity[missing_lock : SUPPRESS] */
  g_clear_pointer (&skeleton->priv->changed_properties_idle_source, g_source_destroy);
#else
  if (skeleton->priv->changed_properties_idle_source != NULL)
    g_source_destroy (skeleton->priv->changed_properties_idle_source);
skeleton->priv->changed_properties_idle_source = NULL;
#endif
  g_main_context_unref (skeleton->priv->context);
  g_mutex_clear (&skeleton->priv->lock);
  G_OBJECT_CLASS (xdp_impl_account_skeleton_parent_class)->finalize (object);
}

static void
xdp_impl_account_skeleton_init (XdpImplAccountSkeleton *skeleton)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  skeleton->priv = xdp_impl_account_skeleton_get_instance_private (skeleton);
#else
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, XDP_IMPL_TYPE_ACCOUNT_SKELETON, XdpImplAccountSkeletonPrivate);
#endif

  g_mutex_init (&skeleton->priv->lock);
  skeleton->priv->context = g_main_context_ref_thread_default ();
}

static void
xdp_impl_account_skeleton_class_init (XdpImplAccountSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize = xdp_impl_account_skeleton_finalize;

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = xdp_impl_account_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = xdp_impl_account_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = xdp_impl_account_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = xdp_impl_account_skeleton_dbus_interface_get_vtable;

#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
  g_type_class_add_private (klass, sizeof (XdpImplAccountSkeletonPrivate));
#endif
}

static void
xdp_impl_account_skeleton_iface_init (XdpImplAccountIface *iface G_GNUC_UNUSED)
{
}

/**
 * xdp_impl_account_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-Account.top_of_page">org.freedesktop.impl.portal.Account</link>.
 *
 * Returns: (transfer full) (type XdpImplAccountSkeleton): The skeleton object.
 */
XdpImplAccount *
xdp_impl_account_skeleton_new (void)
{
  return XDP_IMPL_ACCOUNT (g_object_new (XDP_IMPL_TYPE_ACCOUNT_SKELETON, NULL));
}

/* ------------------------------------------------------------------------
 * Code for interface org.freedesktop.impl.portal.AppChooser
 * ------------------------------------------------------------------------
 */

/**
 * SECTION:XdpImplAppChooser
 * @title: XdpImplAppChooser
 * @short_description: Generated C code for the org.freedesktop.impl.portal.AppChooser D-Bus interface
 *
 * This section contains code for working with the <link linkend="gdbus-interface-org-freedesktop-impl-portal-AppChooser.top_of_page">org.freedesktop.impl.portal.AppChooser</link> D-Bus interface in C.
 */

/* ---- Introspection data for org.freedesktop.impl.portal.AppChooser ---- */

static const _ExtendedGDBusArgInfo _xdp_impl_app_chooser_method_info_choose_application_IN_ARG_handle =
{
  {
    -1,
    (gchar *) "handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_app_chooser_method_info_choose_application_IN_ARG_app_id =
{
  {
    -1,
    (gchar *) "app_id",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_app_chooser_method_info_choose_application_IN_ARG_parent_window =
{
  {
    -1,
    (gchar *) "parent_window",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_app_chooser_method_info_choose_application_IN_ARG_choices =
{
  {
    -1,
    (gchar *) "choices",
    (gchar *) "as",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_app_chooser_method_info_choose_application_IN_ARG_options =
{
  {
    -1,
    (gchar *) "options",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_app_chooser_method_info_choose_application_IN_ARG_pointers[] =
{
  &_xdp_impl_app_chooser_method_info_choose_application_IN_ARG_handle.parent_struct,
  &_xdp_impl_app_chooser_method_info_choose_application_IN_ARG_app_id.parent_struct,
  &_xdp_impl_app_chooser_method_info_choose_application_IN_ARG_parent_window.parent_struct,
  &_xdp_impl_app_chooser_method_info_choose_application_IN_ARG_choices.parent_struct,
  &_xdp_impl_app_chooser_method_info_choose_application_IN_ARG_options.parent_struct,
  NULL
};

static const _ExtendedGDBusArgInfo _xdp_impl_app_chooser_method_info_choose_application_OUT_ARG_response =
{
  {
    -1,
    (gchar *) "response",
    (gchar *) "u",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_app_chooser_method_info_choose_application_OUT_ARG_results =
{
  {
    -1,
    (gchar *) "results",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_app_chooser_method_info_choose_application_OUT_ARG_pointers[] =
{
  &_xdp_impl_app_chooser_method_info_choose_application_OUT_ARG_response.parent_struct,
  &_xdp_impl_app_chooser_method_info_choose_application_OUT_ARG_results.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_app_chooser_method_choose_application_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.In4",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_app_chooser_method_choose_application_annotation_info_1 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.Out1",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo * const _xdp_impl_app_chooser_method_choose_application_annotation_info_pointers[] =
{
  &_xdp_impl_app_chooser_method_choose_application_annotation_info_0,
  &_xdp_impl_app_chooser_method_choose_application_annotation_info_1,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_impl_app_chooser_method_info_choose_application =
{
  {
    -1,
    (gchar *) "ChooseApplication",
    (GDBusArgInfo **) &_xdp_impl_app_chooser_method_info_choose_application_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_impl_app_chooser_method_info_choose_application_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_impl_app_chooser_method_choose_application_annotation_info_pointers
  },
  "handle-choose-application",
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_app_chooser_method_info_update_choices_IN_ARG_handle =
{
  {
    -1,
    (gchar *) "handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_app_chooser_method_info_update_choices_IN_ARG_choices =
{
  {
    -1,
    (gchar *) "choices",
    (gchar *) "as",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_app_chooser_method_info_update_choices_IN_ARG_pointers[] =
{
  &_xdp_impl_app_chooser_method_info_update_choices_IN_ARG_handle.parent_struct,
  &_xdp_impl_app_chooser_method_info_update_choices_IN_ARG_choices.parent_struct,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_impl_app_chooser_method_info_update_choices =
{
  {
    -1,
    (gchar *) "UpdateChoices",
    (GDBusArgInfo **) &_xdp_impl_app_chooser_method_info_update_choices_IN_ARG_pointers,
    NULL,
    NULL
  },
  "handle-update-choices",
  FALSE
};

static const GDBusMethodInfo * const _xdp_impl_app_chooser_method_info_pointers[] =
{
  &_xdp_impl_app_chooser_method_info_choose_application.parent_struct,
  &_xdp_impl_app_chooser_method_info_update_choices.parent_struct,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _xdp_impl_app_chooser_interface_info =
{
  {
    -1,
    (gchar *) "org.freedesktop.impl.portal.AppChooser",
    (GDBusMethodInfo **) &_xdp_impl_app_chooser_method_info_pointers,
    NULL,
    NULL,
    NULL
  },
  "app-chooser",
};


/**
 * xdp_impl_app_chooser_interface_info:
 *
 * Gets a machine-readable description of the <link linkend="gdbus-interface-org-freedesktop-impl-portal-AppChooser.top_of_page">org.freedesktop.impl.portal.AppChooser</link> D-Bus interface.
 *
 * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
 */
GDBusInterfaceInfo *
xdp_impl_app_chooser_interface_info (void)
{
  return (GDBusInterfaceInfo *) &_xdp_impl_app_chooser_interface_info.parent_struct;
}

/**
 * xdp_impl_app_chooser_override_properties:
 * @klass: The class structure for a #GObject derived class.
 * @property_id_begin: The property id to assign to the first overridden property.
 *
 * Overrides all #GObject properties in the #XdpImplAppChooser interface for a concrete class.
 * The properties are overridden in the order they are defined.
 *
 * Returns: The last property id.
 */
guint
xdp_impl_app_chooser_override_properties (GObjectClass *klass G_GNUC_UNUSED, guint property_id_begin)
{
  return property_id_begin - 1;
}


inline static void
xdp_impl_app_chooser_method_marshal_choose_application (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  _g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_STRING_STRING_BOXED_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_impl_app_chooser_method_marshal_update_choices (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  _g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_BOXED (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}


/**
 * XdpImplAppChooser:
 *
 * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-AppChooser.top_of_page">org.freedesktop.impl.portal.AppChooser</link>.
 */

/**
 * XdpImplAppChooserIface:
 * @parent_iface: The parent interface.
 * @handle_choose_application: Handler for the #XdpImplAppChooser::handle-choose-application signal.
 * @handle_update_choices: Handler for the #XdpImplAppChooser::handle-update-choices signal.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-AppChooser.top_of_page">org.freedesktop.impl.portal.AppChooser</link>.
 */

typedef XdpImplAppChooserIface XdpImplAppChooserInterface;
G_DEFINE_INTERFACE (XdpImplAppChooser, xdp_impl_app_chooser, G_TYPE_OBJECT)

static void
xdp_impl_app_chooser_default_init (XdpImplAppChooserIface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * XdpImplAppChooser::handle-choose-application:
   * @object: A #XdpImplAppChooser.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_handle: Argument passed by remote caller.
   * @arg_app_id: Argument passed by remote caller.
   * @arg_parent_window: Argument passed by remote caller.
   * @arg_choices: Argument passed by remote caller.
   * @arg_options: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-impl-portal-AppChooser.ChooseApplication">ChooseApplication()</link> 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 xdp_impl_app_chooser_complete_choose_application() 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.
   *
   * 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.
   */
  g_signal_new ("handle-choose-application",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpImplAppChooserIface, handle_choose_application),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_impl_app_chooser_method_marshal_choose_application,
    G_TYPE_BOOLEAN,
    6,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRV, G_TYPE_VARIANT);

  /**
   * XdpImplAppChooser::handle-update-choices:
   * @object: A #XdpImplAppChooser.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_handle: Argument passed by remote caller.
   * @arg_choices: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-impl-portal-AppChooser.UpdateChoices">UpdateChoices()</link> 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 xdp_impl_app_chooser_complete_update_choices() 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.
   *
   * 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.
   */
  g_signal_new ("handle-update-choices",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpImplAppChooserIface, handle_update_choices),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_impl_app_chooser_method_marshal_update_choices,
    G_TYPE_BOOLEAN,
    3,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_STRV);

}

/**
 * xdp_impl_app_chooser_call_choose_application:
 * @proxy: A #XdpImplAppChooserProxy.
 * @arg_handle: Argument to pass with the method invocation.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_parent_window: Argument to pass with the method invocation.
 * @arg_choices: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-AppChooser.ChooseApplication">ChooseApplication()</link> 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 xdp_impl_app_chooser_call_choose_application_finish() to get the result of the operation.
 *
 * See xdp_impl_app_chooser_call_choose_application_sync() for the synchronous, blocking version of this method.
 */
void
xdp_impl_app_chooser_call_choose_application (
    XdpImplAppChooser *proxy,
    const gchar *arg_handle,
    const gchar *arg_app_id,
    const gchar *arg_parent_window,
    const gchar *const *arg_choices,
    GVariant *arg_options,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "ChooseApplication",
    g_variant_new ("(oss^as@a{sv})",
                   arg_handle,
                   arg_app_id,
                   arg_parent_window,
                   arg_choices,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_impl_app_chooser_call_choose_application_finish:
 * @proxy: A #XdpImplAppChooserProxy.
 * @out_response: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_results: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_app_chooser_call_choose_application().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_impl_app_chooser_call_choose_application().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_app_chooser_call_choose_application_finish (
    XdpImplAppChooser *proxy,
    guint* out_response,
    GVariant ** out_results,
    GAsyncResult *res,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(u@a{sv})",
                 out_response,
                 out_results);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_app_chooser_call_choose_application_sync:
 * @proxy: A #XdpImplAppChooserProxy.
 * @arg_handle: Argument to pass with the method invocation.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_parent_window: Argument to pass with the method invocation.
 * @arg_choices: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @out_response: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_results: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-AppChooser.ChooseApplication">ChooseApplication()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_app_chooser_call_choose_application() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_app_chooser_call_choose_application_sync (
    XdpImplAppChooser *proxy,
    const gchar *arg_handle,
    const gchar *arg_app_id,
    const gchar *arg_parent_window,
    const gchar *const *arg_choices,
    GVariant *arg_options,
    guint* out_response,
    GVariant ** out_results,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "ChooseApplication",
    g_variant_new ("(oss^as@a{sv})",
                   arg_handle,
                   arg_app_id,
                   arg_parent_window,
                   arg_choices,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(u@a{sv})",
                 out_response,
                 out_results);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_app_chooser_call_update_choices:
 * @proxy: A #XdpImplAppChooserProxy.
 * @arg_handle: Argument to pass with the method invocation.
 * @arg_choices: Argument to pass with the method invocation.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-AppChooser.UpdateChoices">UpdateChoices()</link> 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 xdp_impl_app_chooser_call_update_choices_finish() to get the result of the operation.
 *
 * See xdp_impl_app_chooser_call_update_choices_sync() for the synchronous, blocking version of this method.
 */
void
xdp_impl_app_chooser_call_update_choices (
    XdpImplAppChooser *proxy,
    const gchar *arg_handle,
    const gchar *const *arg_choices,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "UpdateChoices",
    g_variant_new ("(o^as)",
                   arg_handle,
                   arg_choices),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_impl_app_chooser_call_update_choices_finish:
 * @proxy: A #XdpImplAppChooserProxy.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_app_chooser_call_update_choices().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_impl_app_chooser_call_update_choices().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_app_chooser_call_update_choices_finish (
    XdpImplAppChooser *proxy,
    GAsyncResult *res,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "()");
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_app_chooser_call_update_choices_sync:
 * @proxy: A #XdpImplAppChooserProxy.
 * @arg_handle: Argument to pass with the method invocation.
 * @arg_choices: Argument to pass with the method invocation.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-AppChooser.UpdateChoices">UpdateChoices()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_app_chooser_call_update_choices() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_app_chooser_call_update_choices_sync (
    XdpImplAppChooser *proxy,
    const gchar *arg_handle,
    const gchar *const *arg_choices,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "UpdateChoices",
    g_variant_new ("(o^as)",
                   arg_handle,
                   arg_choices),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "()");
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_app_chooser_complete_choose_application:
 * @object: A #XdpImplAppChooser.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @response: Parameter to return.
 * @results: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-impl-portal-AppChooser.ChooseApplication">ChooseApplication()</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
xdp_impl_app_chooser_complete_choose_application (
    XdpImplAppChooser *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    guint response,
    GVariant *results)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(u@a{sv})",
                   response,
                   results));
}

/**
 * xdp_impl_app_chooser_complete_update_choices:
 * @object: A #XdpImplAppChooser.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-impl-portal-AppChooser.UpdateChoices">UpdateChoices()</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
xdp_impl_app_chooser_complete_update_choices (
    XdpImplAppChooser *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("()"));
}

/* ------------------------------------------------------------------------ */

/**
 * XdpImplAppChooserProxy:
 *
 * The #XdpImplAppChooserProxy structure contains only private data and should only be accessed using the provided API.
 */

/**
 * XdpImplAppChooserProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpImplAppChooserProxy.
 */

struct _XdpImplAppChooserProxyPrivate
{
  GData *qdata;
};

static void xdp_impl_app_chooser_proxy_iface_init (XdpImplAppChooserIface *iface);

#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpImplAppChooserProxy, xdp_impl_app_chooser_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (XdpImplAppChooserProxy)
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_APP_CHOOSER, xdp_impl_app_chooser_proxy_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpImplAppChooserProxy, xdp_impl_app_chooser_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_APP_CHOOSER, xdp_impl_app_chooser_proxy_iface_init))

#endif
static void
xdp_impl_app_chooser_proxy_finalize (GObject *object)
{
  XdpImplAppChooserProxy *proxy = XDP_IMPL_APP_CHOOSER_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (xdp_impl_app_chooser_proxy_parent_class)->finalize (object);
}

static void
xdp_impl_app_chooser_proxy_get_property (GObject      *object G_GNUC_UNUSED,
  guint         prop_id G_GNUC_UNUSED,
  GValue       *value G_GNUC_UNUSED,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
}

static void
xdp_impl_app_chooser_proxy_set_property (GObject      *object G_GNUC_UNUSED,
  guint         prop_id G_GNUC_UNUSED,
  const GValue *value G_GNUC_UNUSED,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
}

static void
xdp_impl_app_chooser_proxy_g_signal (GDBusProxy *proxy,
  const gchar *sender_name G_GNUC_UNUSED,
  const gchar *signal_name,
  GVariant *parameters)
{
  _ExtendedGDBusSignalInfo *info;
  GVariantIter iter;
  GVariant *child;
  GValue *paramv;
  gsize num_params;
  gsize n;
  guint signal_id;
  info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_xdp_impl_app_chooser_interface_info.parent_struct, signal_name);
  if (info == NULL)
    return;
  num_params = g_variant_n_children (parameters);
  paramv = g_new0 (GValue, num_params + 1);
  g_value_init (&paramv[0], XDP_IMPL_TYPE_APP_CHOOSER);
  g_value_set_object (&paramv[0], proxy);
  g_variant_iter_init (&iter, parameters);
  n = 1;
  while ((child = g_variant_iter_next_value (&iter)) != NULL)
    {
      _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1];
      if (arg_info->use_gvariant)
        {
          g_value_init (&paramv[n], G_TYPE_VARIANT);
          g_value_set_variant (&paramv[n], child);
          n++;
        }
      else
        g_dbus_gvariant_to_gvalue (child, &paramv[n++]);
      g_variant_unref (child);
    }
  signal_id = g_signal_lookup (info->signal_name, XDP_IMPL_TYPE_APP_CHOOSER);
  g_signal_emitv (paramv, signal_id, 0, NULL);
  for (n = 0; n < num_params + 1; n++)
    g_value_unset (&paramv[n]);
  g_free (paramv);
}

static void
xdp_impl_app_chooser_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  XdpImplAppChooserProxy *proxy = XDP_IMPL_APP_CHOOSER_PROXY (_proxy);
  guint n;
  const gchar *key;
  GVariantIter *iter;
  _ExtendedGDBusPropertyInfo *info;
  g_variant_get (changed_properties, "a{sv}", &iter);
  while (g_variant_iter_next (iter, "{&sv}", &key, NULL))
    {
      info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_app_chooser_interface_info.parent_struct, key);
      g_datalist_remove_data (&proxy->priv->qdata, key);
      if (info != NULL)
        g_object_notify (G_OBJECT (proxy), info->hyphen_name);
    }
  g_variant_iter_free (iter);
  for (n = 0; invalidated_properties[n] != NULL; n++)
    {
      info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_app_chooser_interface_info.parent_struct, invalidated_properties[n]);
      g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]);
      if (info != NULL)
        g_object_notify (G_OBJECT (proxy), info->hyphen_name);
    }
}

static void
xdp_impl_app_chooser_proxy_init (XdpImplAppChooserProxy *proxy)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  proxy->priv = xdp_impl_app_chooser_proxy_get_instance_private (proxy);
#else
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, XDP_IMPL_TYPE_APP_CHOOSER_PROXY, XdpImplAppChooserProxyPrivate);
#endif

  g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), xdp_impl_app_chooser_interface_info ());
}

static void
xdp_impl_app_chooser_proxy_class_init (XdpImplAppChooserProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = xdp_impl_app_chooser_proxy_finalize;
  gobject_class->get_property = xdp_impl_app_chooser_proxy_get_property;
  gobject_class->set_property = xdp_impl_app_chooser_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = xdp_impl_app_chooser_proxy_g_signal;
  proxy_class->g_properties_changed = xdp_impl_app_chooser_proxy_g_properties_changed;

#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
  g_type_class_add_private (klass, sizeof (XdpImplAppChooserProxyPrivate));
#endif
}

static void
xdp_impl_app_chooser_proxy_iface_init (XdpImplAppChooserIface *iface G_GNUC_UNUSED)
{
}

/**
 * xdp_impl_app_chooser_proxy_new:
 * @connection: A #GDBusConnection.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-AppChooser.top_of_page">org.freedesktop.impl.portal.AppChooser</link>. 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 xdp_impl_app_chooser_proxy_new_finish() to get the result of the operation.
 *
 * See xdp_impl_app_chooser_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_impl_app_chooser_proxy_new (
    GDBusConnection     *connection,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GAsyncReadyCallback  callback,
    gpointer             user_data)
{
  g_async_initable_new_async (XDP_IMPL_TYPE_APP_CHOOSER_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.AppChooser", NULL);
}

/**
 * xdp_impl_app_chooser_proxy_new_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_app_chooser_proxy_new().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_impl_app_chooser_proxy_new().
 *
 * Returns: (transfer full) (type XdpImplAppChooserProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplAppChooser *
xdp_impl_app_chooser_proxy_new_finish (
    GAsyncResult        *res,
    GError             **error)
{
  GObject *ret;
  GObject *source_object;
  source_object = g_async_result_get_source_object (res);
  ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
  g_object_unref (source_object);
  if (ret != NULL)
    return XDP_IMPL_APP_CHOOSER (ret);
  else
    return NULL;
}

/**
 * xdp_impl_app_chooser_proxy_new_sync:
 * @connection: A #GDBusConnection.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL
 *
 * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-AppChooser.top_of_page">org.freedesktop.impl.portal.AppChooser</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_app_chooser_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpImplAppChooserProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplAppChooser *
xdp_impl_app_chooser_proxy_new_sync (
    GDBusConnection     *connection,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GError             **error)
{
  GInitable *ret;
  ret = g_initable_new (XDP_IMPL_TYPE_APP_CHOOSER_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.AppChooser", NULL);
  if (ret != NULL)
    return XDP_IMPL_APP_CHOOSER (ret);
  else
    return NULL;
}


/**
 * xdp_impl_app_chooser_proxy_new_for_bus:
 * @bus_type: A #GBusType.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: A bus name (well-known or unique).
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
 * @user_data: User data to pass to @callback.
 *
 * Like xdp_impl_app_chooser_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 xdp_impl_app_chooser_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See xdp_impl_app_chooser_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_impl_app_chooser_proxy_new_for_bus (
    GBusType             bus_type,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GAsyncReadyCallback  callback,
    gpointer             user_data)
{
  g_async_initable_new_async (XDP_IMPL_TYPE_APP_CHOOSER_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.AppChooser", NULL);
}

/**
 * xdp_impl_app_chooser_proxy_new_for_bus_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_app_chooser_proxy_new_for_bus().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_impl_app_chooser_proxy_new_for_bus().
 *
 * Returns: (transfer full) (type XdpImplAppChooserProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplAppChooser *
xdp_impl_app_chooser_proxy_new_for_bus_finish (
    GAsyncResult        *res,
    GError             **error)
{
  GObject *ret;
  GObject *source_object;
  source_object = g_async_result_get_source_object (res);
  ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
  g_object_unref (source_object);
  if (ret != NULL)
    return XDP_IMPL_APP_CHOOSER (ret);
  else
    return NULL;
}

/**
 * xdp_impl_app_chooser_proxy_new_for_bus_sync:
 * @bus_type: A #GBusType.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: A bus name (well-known or unique).
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL
 *
 * Like xdp_impl_app_chooser_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_app_chooser_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpImplAppChooserProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplAppChooser *
xdp_impl_app_chooser_proxy_new_for_bus_sync (
    GBusType             bus_type,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GError             **error)
{
  GInitable *ret;
  ret = g_initable_new (XDP_IMPL_TYPE_APP_CHOOSER_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.AppChooser", NULL);
  if (ret != NULL)
    return XDP_IMPL_APP_CHOOSER (ret);
  else
    return NULL;
}


/* ------------------------------------------------------------------------ */

/**
 * XdpImplAppChooserSkeleton:
 *
 * The #XdpImplAppChooserSkeleton structure contains only private data and should only be accessed using the provided API.
 */

/**
 * XdpImplAppChooserSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpImplAppChooserSkeleton.
 */

struct _XdpImplAppChooserSkeletonPrivate
{
  GValue *properties;
  GList *changed_properties;
  GSource *changed_properties_idle_source;
  GMainContext *context;
  GMutex lock;
};

static void
_xdp_impl_app_chooser_skeleton_handle_method_call (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name,
  const gchar *method_name,
  GVariant *parameters,
  GDBusMethodInvocation *invocation,
  gpointer user_data)
{
  XdpImplAppChooserSkeleton *skeleton = XDP_IMPL_APP_CHOOSER_SKELETON (user_data);
  _ExtendedGDBusMethodInfo *info;
  GVariantIter iter;
  GVariant *child;
  GValue *paramv;
  gsize num_params;
  guint num_extra;
  gsize n;
  guint signal_id;
  GValue return_value = G_VALUE_INIT;
  info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
  g_assert (info != NULL);
  num_params = g_variant_n_children (parameters);
  num_extra = info->pass_fdlist ? 3 : 2;  paramv = g_new0 (GValue, num_params + num_extra);
  n = 0;
  g_value_init (&paramv[n], XDP_IMPL_TYPE_APP_CHOOSER);
  g_value_set_object (&paramv[n++], skeleton);
  g_value_init (&paramv[n], G_TYPE_DBUS_METHOD_INVOCATION);
  g_value_set_object (&paramv[n++], invocation);
  if (info->pass_fdlist)
    {
#ifdef G_OS_UNIX
      g_value_init (&paramv[n], G_TYPE_UNIX_FD_LIST);
      g_value_set_object (&paramv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation)));
#else
      g_assert_not_reached ();
#endif
    }
  g_variant_iter_init (&iter, parameters);
  while ((child = g_variant_iter_next_value (&iter)) != NULL)
    {
      _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra];
      if (arg_info->use_gvariant)
        {
          g_value_init (&paramv[n], G_TYPE_VARIANT);
          g_value_set_variant (&paramv[n], child);
          n++;
        }
      else
        g_dbus_gvariant_to_gvalue (child, &paramv[n++]);
      g_variant_unref (child);
    }
  signal_id = g_signal_lookup (info->signal_name, XDP_IMPL_TYPE_APP_CHOOSER);
  g_value_init (&return_value, G_TYPE_BOOLEAN);
  g_signal_emitv (paramv, signal_id, 0, &return_value);
  if (!g_value_get_boolean (&return_value))
    g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD, "Method %s is not implemented on interface %s", method_name, interface_name);
  g_value_unset (&return_value);
  for (n = 0; n < num_params + num_extra; n++)
    g_value_unset (&paramv[n]);
  g_free (paramv);
}

static GVariant *
_xdp_impl_app_chooser_skeleton_handle_get_property (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name G_GNUC_UNUSED,
  const gchar *property_name,
  GError **error,
  gpointer user_data)
{
  XdpImplAppChooserSkeleton *skeleton = XDP_IMPL_APP_CHOOSER_SKELETON (user_data);
  GValue value = G_VALUE_INIT;
  GParamSpec *pspec;
  _ExtendedGDBusPropertyInfo *info;
  GVariant *ret;
  ret = NULL;
  info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_app_chooser_interface_info.parent_struct, property_name);
  g_assert (info != NULL);
  pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
  if (pspec == NULL)
    {
      g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
    }
  else
    {
      g_value_init (&value, pspec->value_type);
      g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value);
      ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature));
      g_value_unset (&value);
    }
  return ret;
}

static gboolean
_xdp_impl_app_chooser_skeleton_handle_set_property (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name G_GNUC_UNUSED,
  const gchar *property_name,
  GVariant *variant,
  GError **error,
  gpointer user_data)
{
  XdpImplAppChooserSkeleton *skeleton = XDP_IMPL_APP_CHOOSER_SKELETON (user_data);
  GValue value = G_VALUE_INIT;
  GParamSpec *pspec;
  _ExtendedGDBusPropertyInfo *info;
  gboolean ret;
  ret = FALSE;
  info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_app_chooser_interface_info.parent_struct, property_name);
  g_assert (info != NULL);
  pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
  if (pspec == NULL)
    {
      g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
    }
  else
    {
      if (info->use_gvariant)
        g_value_set_variant (&value, variant);
      else
        g_dbus_gvariant_to_gvalue (variant, &value);
      g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value);
      g_value_unset (&value);
      ret = TRUE;
    }
  return ret;
}

static const GDBusInterfaceVTable _xdp_impl_app_chooser_skeleton_vtable =
{
  _xdp_impl_app_chooser_skeleton_handle_method_call,
  _xdp_impl_app_chooser_skeleton_handle_get_property,
  _xdp_impl_app_chooser_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
xdp_impl_app_chooser_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return xdp_impl_app_chooser_interface_info ();
}

static GDBusInterfaceVTable *
xdp_impl_app_chooser_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_xdp_impl_app_chooser_skeleton_vtable;
}

static GVariant *
xdp_impl_app_chooser_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  XdpImplAppChooserSkeleton *skeleton = XDP_IMPL_APP_CHOOSER_SKELETON (_skeleton);

  GVariantBuilder builder;
  guint n;
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_84
  g_variant_builder_init_static (&builder, G_VARIANT_TYPE ("a{sv}"));
#else
  g_variant_builder_init(&builder, G_VARIANT_TYPE ("a{sv}"));
#endif
  if (_xdp_impl_app_chooser_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _xdp_impl_app_chooser_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _xdp_impl_app_chooser_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _xdp_impl_app_chooser_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.impl.portal.AppChooser", info->name, NULL, skeleton);
          if (value != NULL)
            {
              g_variant_take_ref (value);
              g_variant_builder_add (&builder, "{sv}", info->name, value);
              g_variant_unref (value);
            }
        }
    }
out:
  return g_variant_builder_end (&builder);
}

static void
xdp_impl_app_chooser_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton G_GNUC_UNUSED)
{
}

static void xdp_impl_app_chooser_skeleton_iface_init (XdpImplAppChooserIface *iface);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpImplAppChooserSkeleton, xdp_impl_app_chooser_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (XdpImplAppChooserSkeleton)
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_APP_CHOOSER, xdp_impl_app_chooser_skeleton_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpImplAppChooserSkeleton, xdp_impl_app_chooser_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_APP_CHOOSER, xdp_impl_app_chooser_skeleton_iface_init))

#endif
static void
xdp_impl_app_chooser_skeleton_finalize (GObject *object)
{
  XdpImplAppChooserSkeleton *skeleton = XDP_IMPL_APP_CHOOSER_SKELETON (object);
  g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  /* coverity[missing_lock : SUPPRESS] */
  g_clear_pointer (&skeleton->priv->changed_properties_idle_source, g_source_destroy);
#else
  if (skeleton->priv->changed_properties_idle_source != NULL)
    g_source_destroy (skeleton->priv->changed_properties_idle_source);
skeleton->priv->changed_properties_idle_source = NULL;
#endif
  g_main_context_unref (skeleton->priv->context);
  g_mutex_clear (&skeleton->priv->lock);
  G_OBJECT_CLASS (xdp_impl_app_chooser_skeleton_parent_class)->finalize (object);
}

static void
xdp_impl_app_chooser_skeleton_init (XdpImplAppChooserSkeleton *skeleton)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  skeleton->priv = xdp_impl_app_chooser_skeleton_get_instance_private (skeleton);
#else
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, XDP_IMPL_TYPE_APP_CHOOSER_SKELETON, XdpImplAppChooserSkeletonPrivate);
#endif

  g_mutex_init (&skeleton->priv->lock);
  skeleton->priv->context = g_main_context_ref_thread_default ();
}

static void
xdp_impl_app_chooser_skeleton_class_init (XdpImplAppChooserSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize = xdp_impl_app_chooser_skeleton_finalize;

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = xdp_impl_app_chooser_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = xdp_impl_app_chooser_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = xdp_impl_app_chooser_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = xdp_impl_app_chooser_skeleton_dbus_interface_get_vtable;

#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
  g_type_class_add_private (klass, sizeof (XdpImplAppChooserSkeletonPrivate));
#endif
}

static void
xdp_impl_app_chooser_skeleton_iface_init (XdpImplAppChooserIface *iface G_GNUC_UNUSED)
{
}

/**
 * xdp_impl_app_chooser_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-AppChooser.top_of_page">org.freedesktop.impl.portal.AppChooser</link>.
 *
 * Returns: (transfer full) (type XdpImplAppChooserSkeleton): The skeleton object.
 */
XdpImplAppChooser *
xdp_impl_app_chooser_skeleton_new (void)
{
  return XDP_IMPL_APP_CHOOSER (g_object_new (XDP_IMPL_TYPE_APP_CHOOSER_SKELETON, NULL));
}

/* ------------------------------------------------------------------------
 * Code for interface org.freedesktop.impl.portal.Background
 * ------------------------------------------------------------------------
 */

/**
 * SECTION:XdpImplBackground
 * @title: XdpImplBackground
 * @short_description: Generated C code for the org.freedesktop.impl.portal.Background D-Bus interface
 *
 * This section contains code for working with the <link linkend="gdbus-interface-org-freedesktop-impl-portal-Background.top_of_page">org.freedesktop.impl.portal.Background</link> D-Bus interface in C.
 */

enum
{
  XDP_IMPL__BACKGROUND_RUNNING_APPLICATIONS_CHANGED,
};

static unsigned XDP_IMPL__BACKGROUND_SIGNALS[1] = { 0 };

/* ---- Introspection data for org.freedesktop.impl.portal.Background ---- */

static const _ExtendedGDBusArgInfo _xdp_impl_background_method_info_get_app_state_OUT_ARG_apps =
{
  {
    -1,
    (gchar *) "apps",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_background_method_info_get_app_state_OUT_ARG_pointers[] =
{
  &_xdp_impl_background_method_info_get_app_state_OUT_ARG_apps.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_background_method_get_app_state_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.Out0",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo * const _xdp_impl_background_method_get_app_state_annotation_info_pointers[] =
{
  &_xdp_impl_background_method_get_app_state_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_impl_background_method_info_get_app_state =
{
  {
    -1,
    (gchar *) "GetAppState",
    NULL,
    (GDBusArgInfo **) &_xdp_impl_background_method_info_get_app_state_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_impl_background_method_get_app_state_annotation_info_pointers
  },
  "handle-get-app-state",
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_background_method_info_notify_background_IN_ARG_handle =
{
  {
    -1,
    (gchar *) "handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_background_method_info_notify_background_IN_ARG_app_id =
{
  {
    -1,
    (gchar *) "app_id",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_background_method_info_notify_background_IN_ARG_name =
{
  {
    -1,
    (gchar *) "name",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_background_method_info_notify_background_IN_ARG_pointers[] =
{
  &_xdp_impl_background_method_info_notify_background_IN_ARG_handle.parent_struct,
  &_xdp_impl_background_method_info_notify_background_IN_ARG_app_id.parent_struct,
  &_xdp_impl_background_method_info_notify_background_IN_ARG_name.parent_struct,
  NULL
};

static const _ExtendedGDBusArgInfo _xdp_impl_background_method_info_notify_background_OUT_ARG_response =
{
  {
    -1,
    (gchar *) "response",
    (gchar *) "u",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_background_method_info_notify_background_OUT_ARG_results =
{
  {
    -1,
    (gchar *) "results",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_background_method_info_notify_background_OUT_ARG_pointers[] =
{
  &_xdp_impl_background_method_info_notify_background_OUT_ARG_response.parent_struct,
  &_xdp_impl_background_method_info_notify_background_OUT_ARG_results.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_background_method_notify_background_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.Out1",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo * const _xdp_impl_background_method_notify_background_annotation_info_pointers[] =
{
  &_xdp_impl_background_method_notify_background_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_impl_background_method_info_notify_background =
{
  {
    -1,
    (gchar *) "NotifyBackground",
    (GDBusArgInfo **) &_xdp_impl_background_method_info_notify_background_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_impl_background_method_info_notify_background_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_impl_background_method_notify_background_annotation_info_pointers
  },
  "handle-notify-background",
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_background_method_info_enable_autostart_IN_ARG_app_id =
{
  {
    -1,
    (gchar *) "app_id",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_background_method_info_enable_autostart_IN_ARG_enable =
{
  {
    -1,
    (gchar *) "enable",
    (gchar *) "b",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_background_method_info_enable_autostart_IN_ARG_commandline =
{
  {
    -1,
    (gchar *) "commandline",
    (gchar *) "as",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_background_method_info_enable_autostart_IN_ARG_flags =
{
  {
    -1,
    (gchar *) "flags",
    (gchar *) "u",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_background_method_info_enable_autostart_IN_ARG_pointers[] =
{
  &_xdp_impl_background_method_info_enable_autostart_IN_ARG_app_id.parent_struct,
  &_xdp_impl_background_method_info_enable_autostart_IN_ARG_enable.parent_struct,
  &_xdp_impl_background_method_info_enable_autostart_IN_ARG_commandline.parent_struct,
  &_xdp_impl_background_method_info_enable_autostart_IN_ARG_flags.parent_struct,
  NULL
};

static const _ExtendedGDBusArgInfo _xdp_impl_background_method_info_enable_autostart_OUT_ARG_result =
{
  {
    -1,
    (gchar *) "result",
    (gchar *) "b",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_background_method_info_enable_autostart_OUT_ARG_pointers[] =
{
  &_xdp_impl_background_method_info_enable_autostart_OUT_ARG_result.parent_struct,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_impl_background_method_info_enable_autostart =
{
  {
    -1,
    (gchar *) "EnableAutostart",
    (GDBusArgInfo **) &_xdp_impl_background_method_info_enable_autostart_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_impl_background_method_info_enable_autostart_OUT_ARG_pointers,
    NULL
  },
  "handle-enable-autostart",
  FALSE
};

static const GDBusMethodInfo * const _xdp_impl_background_method_info_pointers[] =
{
  &_xdp_impl_background_method_info_get_app_state.parent_struct,
  &_xdp_impl_background_method_info_notify_background.parent_struct,
  &_xdp_impl_background_method_info_enable_autostart.parent_struct,
  NULL
};

static const _ExtendedGDBusSignalInfo _xdp_impl_background_signal_info_running_applications_changed =
{
  {
    -1,
    (gchar *) "RunningApplicationsChanged",
    NULL,
    NULL
  },
  "running-applications-changed"
};

static const GDBusSignalInfo * const _xdp_impl_background_signal_info_pointers[] =
{
  &_xdp_impl_background_signal_info_running_applications_changed.parent_struct,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _xdp_impl_background_interface_info =
{
  {
    -1,
    (gchar *) "org.freedesktop.impl.portal.Background",
    (GDBusMethodInfo **) &_xdp_impl_background_method_info_pointers,
    (GDBusSignalInfo **) &_xdp_impl_background_signal_info_pointers,
    NULL,
    NULL
  },
  "background",
};


/**
 * xdp_impl_background_interface_info:
 *
 * Gets a machine-readable description of the <link linkend="gdbus-interface-org-freedesktop-impl-portal-Background.top_of_page">org.freedesktop.impl.portal.Background</link> D-Bus interface.
 *
 * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
 */
GDBusInterfaceInfo *
xdp_impl_background_interface_info (void)
{
  return (GDBusInterfaceInfo *) &_xdp_impl_background_interface_info.parent_struct;
}

/**
 * xdp_impl_background_override_properties:
 * @klass: The class structure for a #GObject derived class.
 * @property_id_begin: The property id to assign to the first overridden property.
 *
 * Overrides all #GObject properties in the #XdpImplBackground interface for a concrete class.
 * The properties are overridden in the order they are defined.
 *
 * Returns: The last property id.
 */
guint
xdp_impl_background_override_properties (GObjectClass *klass G_GNUC_UNUSED, guint property_id_begin)
{
  return property_id_begin - 1;
}


inline static void
xdp_impl_background_signal_marshal_running_applications_changed (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  g_cclosure_marshal_VOID__VOID (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_impl_background_method_marshal_get_app_state (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  _g_dbus_codegen_marshal_BOOLEAN__OBJECT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_impl_background_method_marshal_notify_background (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  _g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_STRING_STRING (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_impl_background_method_marshal_enable_autostart (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  _g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_BOOLEAN_BOXED_UINT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}


/**
 * XdpImplBackground:
 *
 * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-Background.top_of_page">org.freedesktop.impl.portal.Background</link>.
 */

/**
 * XdpImplBackgroundIface:
 * @parent_iface: The parent interface.
 * @handle_enable_autostart: Handler for the #XdpImplBackground::handle-enable-autostart signal.
 * @handle_get_app_state: Handler for the #XdpImplBackground::handle-get-app-state signal.
 * @handle_notify_background: Handler for the #XdpImplBackground::handle-notify-background signal.
 * @running_applications_changed: Handler for the #XdpImplBackground::running-applications-changed signal.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-Background.top_of_page">org.freedesktop.impl.portal.Background</link>.
 */

typedef XdpImplBackgroundIface XdpImplBackgroundInterface;
G_DEFINE_INTERFACE (XdpImplBackground, xdp_impl_background, G_TYPE_OBJECT)

static void
xdp_impl_background_default_init (XdpImplBackgroundIface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * XdpImplBackground::handle-get-app-state:
   * @object: A #XdpImplBackground.
   * @invocation: A #GDBusMethodInvocation.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-impl-portal-Background.GetAppState">GetAppState()</link> 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 xdp_impl_background_complete_get_app_state() 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.
   *
   * 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.
   */
  g_signal_new ("handle-get-app-state",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpImplBackgroundIface, handle_get_app_state),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_impl_background_method_marshal_get_app_state,
    G_TYPE_BOOLEAN,
    1,
    G_TYPE_DBUS_METHOD_INVOCATION);

  /**
   * XdpImplBackground::handle-notify-background:
   * @object: A #XdpImplBackground.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_handle: Argument passed by remote caller.
   * @arg_app_id: Argument passed by remote caller.
   * @arg_name: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-impl-portal-Background.NotifyBackground">NotifyBackground()</link> 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 xdp_impl_background_complete_notify_background() 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.
   *
   * 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.
   */
  g_signal_new ("handle-notify-background",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpImplBackgroundIface, handle_notify_background),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_impl_background_method_marshal_notify_background,
    G_TYPE_BOOLEAN,
    4,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING);

  /**
   * XdpImplBackground::handle-enable-autostart:
   * @object: A #XdpImplBackground.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_app_id: Argument passed by remote caller.
   * @arg_enable: Argument passed by remote caller.
   * @arg_commandline: Argument passed by remote caller.
   * @arg_flags: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-impl-portal-Background.EnableAutostart">EnableAutostart()</link> 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 xdp_impl_background_complete_enable_autostart() 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.
   *
   * 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.
   */
  g_signal_new ("handle-enable-autostart",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpImplBackgroundIface, handle_enable_autostart),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_impl_background_method_marshal_enable_autostart,
    G_TYPE_BOOLEAN,
    5,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_BOOLEAN, G_TYPE_STRV, G_TYPE_UINT);

  /* GObject signals for received D-Bus signals: */
  /**
   * XdpImplBackground::running-applications-changed:
   * @object: A #XdpImplBackground.
   *
   * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-freedesktop-impl-portal-Background.RunningApplicationsChanged">"RunningApplicationsChanged"</link> 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.
   */
  XDP_IMPL__BACKGROUND_SIGNALS[XDP_IMPL__BACKGROUND_RUNNING_APPLICATIONS_CHANGED] =
    g_signal_new ("running-applications-changed",
      G_TYPE_FROM_INTERFACE (iface),
      G_SIGNAL_RUN_LAST,
      G_STRUCT_OFFSET (XdpImplBackgroundIface, running_applications_changed),
      NULL,
      NULL,
      xdp_impl_background_signal_marshal_running_applications_changed,
      G_TYPE_NONE,
      0);

}

/**
 * xdp_impl_background_emit_running_applications_changed:
 * @object: A #XdpImplBackground.
 *
 * Emits the <link linkend="gdbus-signal-org-freedesktop-impl-portal-Background.RunningApplicationsChanged">"RunningApplicationsChanged"</link> D-Bus signal.
 */
void
xdp_impl_background_emit_running_applications_changed (
    XdpImplBackground *object)
{
  g_signal_emit (object, XDP_IMPL__BACKGROUND_SIGNALS[XDP_IMPL__BACKGROUND_RUNNING_APPLICATIONS_CHANGED], 0);
}

/**
 * xdp_impl_background_call_get_app_state:
 * @proxy: A #XdpImplBackgroundProxy.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-Background.GetAppState">GetAppState()</link> 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 xdp_impl_background_call_get_app_state_finish() to get the result of the operation.
 *
 * See xdp_impl_background_call_get_app_state_sync() for the synchronous, blocking version of this method.
 */
void
xdp_impl_background_call_get_app_state (
    XdpImplBackground *proxy,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "GetAppState",
    g_variant_new ("()"),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_impl_background_call_get_app_state_finish:
 * @proxy: A #XdpImplBackgroundProxy.
 * @out_apps: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_background_call_get_app_state().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_impl_background_call_get_app_state().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_background_call_get_app_state_finish (
    XdpImplBackground *proxy,
    GVariant ** out_apps,
    GAsyncResult *res,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(@a{sv})",
                 out_apps);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_background_call_get_app_state_sync:
 * @proxy: A #XdpImplBackgroundProxy.
 * @out_apps: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-Background.GetAppState">GetAppState()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_background_call_get_app_state() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_background_call_get_app_state_sync (
    XdpImplBackground *proxy,
    GVariant ** out_apps,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "GetAppState",
    g_variant_new ("()"),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(@a{sv})",
                 out_apps);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_background_call_notify_background:
 * @proxy: A #XdpImplBackgroundProxy.
 * @arg_handle: Argument to pass with the method invocation.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_name: Argument to pass with the method invocation.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-Background.NotifyBackground">NotifyBackground()</link> 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 xdp_impl_background_call_notify_background_finish() to get the result of the operation.
 *
 * See xdp_impl_background_call_notify_background_sync() for the synchronous, blocking version of this method.
 */
void
xdp_impl_background_call_notify_background (
    XdpImplBackground *proxy,
    const gchar *arg_handle,
    const gchar *arg_app_id,
    const gchar *arg_name,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "NotifyBackground",
    g_variant_new ("(oss)",
                   arg_handle,
                   arg_app_id,
                   arg_name),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_impl_background_call_notify_background_finish:
 * @proxy: A #XdpImplBackgroundProxy.
 * @out_response: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_results: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_background_call_notify_background().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_impl_background_call_notify_background().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_background_call_notify_background_finish (
    XdpImplBackground *proxy,
    guint* out_response,
    GVariant ** out_results,
    GAsyncResult *res,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(u@a{sv})",
                 out_response,
                 out_results);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_background_call_notify_background_sync:
 * @proxy: A #XdpImplBackgroundProxy.
 * @arg_handle: Argument to pass with the method invocation.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_name: Argument to pass with the method invocation.
 * @out_response: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_results: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-Background.NotifyBackground">NotifyBackground()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_background_call_notify_background() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_background_call_notify_background_sync (
    XdpImplBackground *proxy,
    const gchar *arg_handle,
    const gchar *arg_app_id,
    const gchar *arg_name,
    guint* out_response,
    GVariant ** out_results,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "NotifyBackground",
    g_variant_new ("(oss)",
                   arg_handle,
                   arg_app_id,
                   arg_name),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(u@a{sv})",
                 out_response,
                 out_results);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_background_call_enable_autostart:
 * @proxy: A #XdpImplBackgroundProxy.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_enable: Argument to pass with the method invocation.
 * @arg_commandline: Argument to pass with the method invocation.
 * @arg_flags: Argument to pass with the method invocation.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-Background.EnableAutostart">EnableAutostart()</link> 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 xdp_impl_background_call_enable_autostart_finish() to get the result of the operation.
 *
 * See xdp_impl_background_call_enable_autostart_sync() for the synchronous, blocking version of this method.
 */
void
xdp_impl_background_call_enable_autostart (
    XdpImplBackground *proxy,
    const gchar *arg_app_id,
    gboolean arg_enable,
    const gchar *const *arg_commandline,
    guint arg_flags,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "EnableAutostart",
    g_variant_new ("(sb^asu)",
                   arg_app_id,
                   arg_enable,
                   arg_commandline,
                   arg_flags),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_impl_background_call_enable_autostart_finish:
 * @proxy: A #XdpImplBackgroundProxy.
 * @out_result: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_background_call_enable_autostart().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_impl_background_call_enable_autostart().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_background_call_enable_autostart_finish (
    XdpImplBackground *proxy,
    gboolean* out_result,
    GAsyncResult *res,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(b)",
                 out_result);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_background_call_enable_autostart_sync:
 * @proxy: A #XdpImplBackgroundProxy.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_enable: Argument to pass with the method invocation.
 * @arg_commandline: Argument to pass with the method invocation.
 * @arg_flags: Argument to pass with the method invocation.
 * @out_result: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-Background.EnableAutostart">EnableAutostart()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_background_call_enable_autostart() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_background_call_enable_autostart_sync (
    XdpImplBackground *proxy,
    const gchar *arg_app_id,
    gboolean arg_enable,
    const gchar *const *arg_commandline,
    guint arg_flags,
    gboolean* out_result,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "EnableAutostart",
    g_variant_new ("(sb^asu)",
                   arg_app_id,
                   arg_enable,
                   arg_commandline,
                   arg_flags),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(b)",
                 out_result);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_background_complete_get_app_state:
 * @object: A #XdpImplBackground.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @apps: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-impl-portal-Background.GetAppState">GetAppState()</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
xdp_impl_background_complete_get_app_state (
    XdpImplBackground *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    GVariant *apps)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(@a{sv})",
                   apps));
}

/**
 * xdp_impl_background_complete_notify_background:
 * @object: A #XdpImplBackground.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @response: Parameter to return.
 * @results: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-impl-portal-Background.NotifyBackground">NotifyBackground()</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
xdp_impl_background_complete_notify_background (
    XdpImplBackground *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    guint response,
    GVariant *results)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(u@a{sv})",
                   response,
                   results));
}

/**
 * xdp_impl_background_complete_enable_autostart:
 * @object: A #XdpImplBackground.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @result: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-impl-portal-Background.EnableAutostart">EnableAutostart()</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
xdp_impl_background_complete_enable_autostart (
    XdpImplBackground *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    gboolean result)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(b)",
                   result));
}

/* ------------------------------------------------------------------------ */

/**
 * XdpImplBackgroundProxy:
 *
 * The #XdpImplBackgroundProxy structure contains only private data and should only be accessed using the provided API.
 */

/**
 * XdpImplBackgroundProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpImplBackgroundProxy.
 */

struct _XdpImplBackgroundProxyPrivate
{
  GData *qdata;
};

static void xdp_impl_background_proxy_iface_init (XdpImplBackgroundIface *iface);

#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpImplBackgroundProxy, xdp_impl_background_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (XdpImplBackgroundProxy)
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_BACKGROUND, xdp_impl_background_proxy_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpImplBackgroundProxy, xdp_impl_background_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_BACKGROUND, xdp_impl_background_proxy_iface_init))

#endif
static void
xdp_impl_background_proxy_finalize (GObject *object)
{
  XdpImplBackgroundProxy *proxy = XDP_IMPL_BACKGROUND_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (xdp_impl_background_proxy_parent_class)->finalize (object);
}

static void
xdp_impl_background_proxy_get_property (GObject      *object G_GNUC_UNUSED,
  guint         prop_id G_GNUC_UNUSED,
  GValue       *value G_GNUC_UNUSED,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
}

static void
xdp_impl_background_proxy_set_property (GObject      *object G_GNUC_UNUSED,
  guint         prop_id G_GNUC_UNUSED,
  const GValue *value G_GNUC_UNUSED,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
}

static void
xdp_impl_background_proxy_g_signal (GDBusProxy *proxy,
  const gchar *sender_name G_GNUC_UNUSED,
  const gchar *signal_name,
  GVariant *parameters)
{
  _ExtendedGDBusSignalInfo *info;
  GVariantIter iter;
  GVariant *child;
  GValue *paramv;
  gsize num_params;
  gsize n;
  guint signal_id;
  info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_xdp_impl_background_interface_info.parent_struct, signal_name);
  if (info == NULL)
    return;
  num_params = g_variant_n_children (parameters);
  paramv = g_new0 (GValue, num_params + 1);
  g_value_init (&paramv[0], XDP_IMPL_TYPE_BACKGROUND);
  g_value_set_object (&paramv[0], proxy);
  g_variant_iter_init (&iter, parameters);
  n = 1;
  while ((child = g_variant_iter_next_value (&iter)) != NULL)
    {
      _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1];
      if (arg_info->use_gvariant)
        {
          g_value_init (&paramv[n], G_TYPE_VARIANT);
          g_value_set_variant (&paramv[n], child);
          n++;
        }
      else
        g_dbus_gvariant_to_gvalue (child, &paramv[n++]);
      g_variant_unref (child);
    }
  signal_id = g_signal_lookup (info->signal_name, XDP_IMPL_TYPE_BACKGROUND);
  g_signal_emitv (paramv, signal_id, 0, NULL);
  for (n = 0; n < num_params + 1; n++)
    g_value_unset (&paramv[n]);
  g_free (paramv);
}

static void
xdp_impl_background_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  XdpImplBackgroundProxy *proxy = XDP_IMPL_BACKGROUND_PROXY (_proxy);
  guint n;
  const gchar *key;
  GVariantIter *iter;
  _ExtendedGDBusPropertyInfo *info;
  g_variant_get (changed_properties, "a{sv}", &iter);
  while (g_variant_iter_next (iter, "{&sv}", &key, NULL))
    {
      info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_background_interface_info.parent_struct, key);
      g_datalist_remove_data (&proxy->priv->qdata, key);
      if (info != NULL)
        g_object_notify (G_OBJECT (proxy), info->hyphen_name);
    }
  g_variant_iter_free (iter);
  for (n = 0; invalidated_properties[n] != NULL; n++)
    {
      info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_background_interface_info.parent_struct, invalidated_properties[n]);
      g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]);
      if (info != NULL)
        g_object_notify (G_OBJECT (proxy), info->hyphen_name);
    }
}

static void
xdp_impl_background_proxy_init (XdpImplBackgroundProxy *proxy)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  proxy->priv = xdp_impl_background_proxy_get_instance_private (proxy);
#else
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, XDP_IMPL_TYPE_BACKGROUND_PROXY, XdpImplBackgroundProxyPrivate);
#endif

  g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), xdp_impl_background_interface_info ());
}

static void
xdp_impl_background_proxy_class_init (XdpImplBackgroundProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = xdp_impl_background_proxy_finalize;
  gobject_class->get_property = xdp_impl_background_proxy_get_property;
  gobject_class->set_property = xdp_impl_background_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = xdp_impl_background_proxy_g_signal;
  proxy_class->g_properties_changed = xdp_impl_background_proxy_g_properties_changed;

#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
  g_type_class_add_private (klass, sizeof (XdpImplBackgroundProxyPrivate));
#endif
}

static void
xdp_impl_background_proxy_iface_init (XdpImplBackgroundIface *iface G_GNUC_UNUSED)
{
}

/**
 * xdp_impl_background_proxy_new:
 * @connection: A #GDBusConnection.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-Background.top_of_page">org.freedesktop.impl.portal.Background</link>. 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 xdp_impl_background_proxy_new_finish() to get the result of the operation.
 *
 * See xdp_impl_background_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_impl_background_proxy_new (
    GDBusConnection     *connection,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GAsyncReadyCallback  callback,
    gpointer             user_data)
{
  g_async_initable_new_async (XDP_IMPL_TYPE_BACKGROUND_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.Background", NULL);
}

/**
 * xdp_impl_background_proxy_new_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_background_proxy_new().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_impl_background_proxy_new().
 *
 * Returns: (transfer full) (type XdpImplBackgroundProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplBackground *
xdp_impl_background_proxy_new_finish (
    GAsyncResult        *res,
    GError             **error)
{
  GObject *ret;
  GObject *source_object;
  source_object = g_async_result_get_source_object (res);
  ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
  g_object_unref (source_object);
  if (ret != NULL)
    return XDP_IMPL_BACKGROUND (ret);
  else
    return NULL;
}

/**
 * xdp_impl_background_proxy_new_sync:
 * @connection: A #GDBusConnection.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL
 *
 * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-Background.top_of_page">org.freedesktop.impl.portal.Background</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_background_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpImplBackgroundProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplBackground *
xdp_impl_background_proxy_new_sync (
    GDBusConnection     *connection,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GError             **error)
{
  GInitable *ret;
  ret = g_initable_new (XDP_IMPL_TYPE_BACKGROUND_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.Background", NULL);
  if (ret != NULL)
    return XDP_IMPL_BACKGROUND (ret);
  else
    return NULL;
}


/**
 * xdp_impl_background_proxy_new_for_bus:
 * @bus_type: A #GBusType.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: A bus name (well-known or unique).
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
 * @user_data: User data to pass to @callback.
 *
 * Like xdp_impl_background_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 xdp_impl_background_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See xdp_impl_background_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_impl_background_proxy_new_for_bus (
    GBusType             bus_type,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GAsyncReadyCallback  callback,
    gpointer             user_data)
{
  g_async_initable_new_async (XDP_IMPL_TYPE_BACKGROUND_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.Background", NULL);
}

/**
 * xdp_impl_background_proxy_new_for_bus_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_background_proxy_new_for_bus().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_impl_background_proxy_new_for_bus().
 *
 * Returns: (transfer full) (type XdpImplBackgroundProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplBackground *
xdp_impl_background_proxy_new_for_bus_finish (
    GAsyncResult        *res,
    GError             **error)
{
  GObject *ret;
  GObject *source_object;
  source_object = g_async_result_get_source_object (res);
  ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
  g_object_unref (source_object);
  if (ret != NULL)
    return XDP_IMPL_BACKGROUND (ret);
  else
    return NULL;
}

/**
 * xdp_impl_background_proxy_new_for_bus_sync:
 * @bus_type: A #GBusType.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: A bus name (well-known or unique).
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL
 *
 * Like xdp_impl_background_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_background_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpImplBackgroundProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplBackground *
xdp_impl_background_proxy_new_for_bus_sync (
    GBusType             bus_type,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GError             **error)
{
  GInitable *ret;
  ret = g_initable_new (XDP_IMPL_TYPE_BACKGROUND_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.Background", NULL);
  if (ret != NULL)
    return XDP_IMPL_BACKGROUND (ret);
  else
    return NULL;
}


/* ------------------------------------------------------------------------ */

/**
 * XdpImplBackgroundSkeleton:
 *
 * The #XdpImplBackgroundSkeleton structure contains only private data and should only be accessed using the provided API.
 */

/**
 * XdpImplBackgroundSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpImplBackgroundSkeleton.
 */

struct _XdpImplBackgroundSkeletonPrivate
{
  GValue *properties;
  GList *changed_properties;
  GSource *changed_properties_idle_source;
  GMainContext *context;
  GMutex lock;
};

static void
_xdp_impl_background_skeleton_handle_method_call (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name,
  const gchar *method_name,
  GVariant *parameters,
  GDBusMethodInvocation *invocation,
  gpointer user_data)
{
  XdpImplBackgroundSkeleton *skeleton = XDP_IMPL_BACKGROUND_SKELETON (user_data);
  _ExtendedGDBusMethodInfo *info;
  GVariantIter iter;
  GVariant *child;
  GValue *paramv;
  gsize num_params;
  guint num_extra;
  gsize n;
  guint signal_id;
  GValue return_value = G_VALUE_INIT;
  info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
  g_assert (info != NULL);
  num_params = g_variant_n_children (parameters);
  num_extra = info->pass_fdlist ? 3 : 2;  paramv = g_new0 (GValue, num_params + num_extra);
  n = 0;
  g_value_init (&paramv[n], XDP_IMPL_TYPE_BACKGROUND);
  g_value_set_object (&paramv[n++], skeleton);
  g_value_init (&paramv[n], G_TYPE_DBUS_METHOD_INVOCATION);
  g_value_set_object (&paramv[n++], invocation);
  if (info->pass_fdlist)
    {
#ifdef G_OS_UNIX
      g_value_init (&paramv[n], G_TYPE_UNIX_FD_LIST);
      g_value_set_object (&paramv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation)));
#else
      g_assert_not_reached ();
#endif
    }
  g_variant_iter_init (&iter, parameters);
  while ((child = g_variant_iter_next_value (&iter)) != NULL)
    {
      _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra];
      if (arg_info->use_gvariant)
        {
          g_value_init (&paramv[n], G_TYPE_VARIANT);
          g_value_set_variant (&paramv[n], child);
          n++;
        }
      else
        g_dbus_gvariant_to_gvalue (child, &paramv[n++]);
      g_variant_unref (child);
    }
  signal_id = g_signal_lookup (info->signal_name, XDP_IMPL_TYPE_BACKGROUND);
  g_value_init (&return_value, G_TYPE_BOOLEAN);
  g_signal_emitv (paramv, signal_id, 0, &return_value);
  if (!g_value_get_boolean (&return_value))
    g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD, "Method %s is not implemented on interface %s", method_name, interface_name);
  g_value_unset (&return_value);
  for (n = 0; n < num_params + num_extra; n++)
    g_value_unset (&paramv[n]);
  g_free (paramv);
}

static GVariant *
_xdp_impl_background_skeleton_handle_get_property (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name G_GNUC_UNUSED,
  const gchar *property_name,
  GError **error,
  gpointer user_data)
{
  XdpImplBackgroundSkeleton *skeleton = XDP_IMPL_BACKGROUND_SKELETON (user_data);
  GValue value = G_VALUE_INIT;
  GParamSpec *pspec;
  _ExtendedGDBusPropertyInfo *info;
  GVariant *ret;
  ret = NULL;
  info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_background_interface_info.parent_struct, property_name);
  g_assert (info != NULL);
  pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
  if (pspec == NULL)
    {
      g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
    }
  else
    {
      g_value_init (&value, pspec->value_type);
      g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value);
      ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature));
      g_value_unset (&value);
    }
  return ret;
}

static gboolean
_xdp_impl_background_skeleton_handle_set_property (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name G_GNUC_UNUSED,
  const gchar *property_name,
  GVariant *variant,
  GError **error,
  gpointer user_data)
{
  XdpImplBackgroundSkeleton *skeleton = XDP_IMPL_BACKGROUND_SKELETON (user_data);
  GValue value = G_VALUE_INIT;
  GParamSpec *pspec;
  _ExtendedGDBusPropertyInfo *info;
  gboolean ret;
  ret = FALSE;
  info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_background_interface_info.parent_struct, property_name);
  g_assert (info != NULL);
  pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
  if (pspec == NULL)
    {
      g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
    }
  else
    {
      if (info->use_gvariant)
        g_value_set_variant (&value, variant);
      else
        g_dbus_gvariant_to_gvalue (variant, &value);
      g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value);
      g_value_unset (&value);
      ret = TRUE;
    }
  return ret;
}

static const GDBusInterfaceVTable _xdp_impl_background_skeleton_vtable =
{
  _xdp_impl_background_skeleton_handle_method_call,
  _xdp_impl_background_skeleton_handle_get_property,
  _xdp_impl_background_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
xdp_impl_background_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return xdp_impl_background_interface_info ();
}

static GDBusInterfaceVTable *
xdp_impl_background_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_xdp_impl_background_skeleton_vtable;
}

static GVariant *
xdp_impl_background_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  XdpImplBackgroundSkeleton *skeleton = XDP_IMPL_BACKGROUND_SKELETON (_skeleton);

  GVariantBuilder builder;
  guint n;
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_84
  g_variant_builder_init_static (&builder, G_VARIANT_TYPE ("a{sv}"));
#else
  g_variant_builder_init(&builder, G_VARIANT_TYPE ("a{sv}"));
#endif
  if (_xdp_impl_background_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _xdp_impl_background_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _xdp_impl_background_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _xdp_impl_background_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.impl.portal.Background", info->name, NULL, skeleton);
          if (value != NULL)
            {
              g_variant_take_ref (value);
              g_variant_builder_add (&builder, "{sv}", info->name, value);
              g_variant_unref (value);
            }
        }
    }
out:
  return g_variant_builder_end (&builder);
}

static void
xdp_impl_background_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton G_GNUC_UNUSED)
{
}

static void
_xdp_impl_background_on_signal_running_applications_changed (
    XdpImplBackground *object)
{
  XdpImplBackgroundSkeleton *skeleton = XDP_IMPL_BACKGROUND_SKELETON (object);

  GList      *connections, *l;
  GVariant   *signal_variant;
  connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));

  signal_variant = g_variant_ref_sink (g_variant_new ("()"));
  for (l = connections; l != NULL; l = l->next)
    {
      GDBusConnection *connection = l->data;
      g_dbus_connection_emit_signal (connection,
        NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.impl.portal.Background", "RunningApplicationsChanged",
        signal_variant, NULL);
    }
  g_variant_unref (signal_variant);
  g_list_free_full (connections, g_object_unref);
}

static void xdp_impl_background_skeleton_iface_init (XdpImplBackgroundIface *iface);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpImplBackgroundSkeleton, xdp_impl_background_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (XdpImplBackgroundSkeleton)
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_BACKGROUND, xdp_impl_background_skeleton_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpImplBackgroundSkeleton, xdp_impl_background_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_BACKGROUND, xdp_impl_background_skeleton_iface_init))

#endif
static void
xdp_impl_background_skeleton_finalize (GObject *object)
{
  XdpImplBackgroundSkeleton *skeleton = XDP_IMPL_BACKGROUND_SKELETON (object);
  g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  /* coverity[missing_lock : SUPPRESS] */
  g_clear_pointer (&skeleton->priv->changed_properties_idle_source, g_source_destroy);
#else
  if (skeleton->priv->changed_properties_idle_source != NULL)
    g_source_destroy (skeleton->priv->changed_properties_idle_source);
skeleton->priv->changed_properties_idle_source = NULL;
#endif
  g_main_context_unref (skeleton->priv->context);
  g_mutex_clear (&skeleton->priv->lock);
  G_OBJECT_CLASS (xdp_impl_background_skeleton_parent_class)->finalize (object);
}

static void
xdp_impl_background_skeleton_init (XdpImplBackgroundSkeleton *skeleton)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  skeleton->priv = xdp_impl_background_skeleton_get_instance_private (skeleton);
#else
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, XDP_IMPL_TYPE_BACKGROUND_SKELETON, XdpImplBackgroundSkeletonPrivate);
#endif

  g_mutex_init (&skeleton->priv->lock);
  skeleton->priv->context = g_main_context_ref_thread_default ();
}

static void
xdp_impl_background_skeleton_class_init (XdpImplBackgroundSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize = xdp_impl_background_skeleton_finalize;

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = xdp_impl_background_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = xdp_impl_background_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = xdp_impl_background_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = xdp_impl_background_skeleton_dbus_interface_get_vtable;

#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
  g_type_class_add_private (klass, sizeof (XdpImplBackgroundSkeletonPrivate));
#endif
}

static void
xdp_impl_background_skeleton_iface_init (XdpImplBackgroundIface *iface)
{
  iface->running_applications_changed = _xdp_impl_background_on_signal_running_applications_changed;
}

/**
 * xdp_impl_background_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-Background.top_of_page">org.freedesktop.impl.portal.Background</link>.
 *
 * Returns: (transfer full) (type XdpImplBackgroundSkeleton): The skeleton object.
 */
XdpImplBackground *
xdp_impl_background_skeleton_new (void)
{
  return XDP_IMPL_BACKGROUND (g_object_new (XDP_IMPL_TYPE_BACKGROUND_SKELETON, NULL));
}

/* ------------------------------------------------------------------------
 * Code for interface org.freedesktop.impl.portal.Clipboard
 * ------------------------------------------------------------------------
 */

/**
 * SECTION:XdpImplClipboard
 * @title: XdpImplClipboard
 * @short_description: Generated C code for the org.freedesktop.impl.portal.Clipboard D-Bus interface
 *
 * This section contains code for working with the <link linkend="gdbus-interface-org-freedesktop-impl-portal-Clipboard.top_of_page">org.freedesktop.impl.portal.Clipboard</link> D-Bus interface in C.
 */

enum
{
  XDP_IMPL__CLIPBOARD_SELECTION_OWNER_CHANGED,
  XDP_IMPL__CLIPBOARD_SELECTION_TRANSFER,
};

static unsigned XDP_IMPL__CLIPBOARD_SIGNALS[2] = { 0 };

/* ---- Introspection data for org.freedesktop.impl.portal.Clipboard ---- */

static const _ExtendedGDBusArgInfo _xdp_impl_clipboard_method_info_request_clipboard_IN_ARG_session_handle =
{
  {
    -1,
    (gchar *) "session_handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_clipboard_method_info_request_clipboard_IN_ARG_options =
{
  {
    -1,
    (gchar *) "options",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_clipboard_method_info_request_clipboard_IN_ARG_pointers[] =
{
  &_xdp_impl_clipboard_method_info_request_clipboard_IN_ARG_session_handle.parent_struct,
  &_xdp_impl_clipboard_method_info_request_clipboard_IN_ARG_options.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_clipboard_method_request_clipboard_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.In1",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo * const _xdp_impl_clipboard_method_request_clipboard_annotation_info_pointers[] =
{
  &_xdp_impl_clipboard_method_request_clipboard_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_impl_clipboard_method_info_request_clipboard =
{
  {
    -1,
    (gchar *) "RequestClipboard",
    (GDBusArgInfo **) &_xdp_impl_clipboard_method_info_request_clipboard_IN_ARG_pointers,
    NULL,
    (GDBusAnnotationInfo **) &_xdp_impl_clipboard_method_request_clipboard_annotation_info_pointers
  },
  "handle-request-clipboard",
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_clipboard_method_info_set_selection_IN_ARG_session_handle =
{
  {
    -1,
    (gchar *) "session_handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_clipboard_method_info_set_selection_IN_ARG_options =
{
  {
    -1,
    (gchar *) "options",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_clipboard_method_info_set_selection_IN_ARG_pointers[] =
{
  &_xdp_impl_clipboard_method_info_set_selection_IN_ARG_session_handle.parent_struct,
  &_xdp_impl_clipboard_method_info_set_selection_IN_ARG_options.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_clipboard_method_set_selection_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.In1",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo * const _xdp_impl_clipboard_method_set_selection_annotation_info_pointers[] =
{
  &_xdp_impl_clipboard_method_set_selection_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_impl_clipboard_method_info_set_selection =
{
  {
    -1,
    (gchar *) "SetSelection",
    (GDBusArgInfo **) &_xdp_impl_clipboard_method_info_set_selection_IN_ARG_pointers,
    NULL,
    (GDBusAnnotationInfo **) &_xdp_impl_clipboard_method_set_selection_annotation_info_pointers
  },
  "handle-set-selection",
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_clipboard_method_info_selection_write_IN_ARG_session_handle =
{
  {
    -1,
    (gchar *) "session_handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_clipboard_method_info_selection_write_IN_ARG_serial =
{
  {
    -1,
    (gchar *) "serial",
    (gchar *) "u",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_clipboard_method_info_selection_write_IN_ARG_pointers[] =
{
  &_xdp_impl_clipboard_method_info_selection_write_IN_ARG_session_handle.parent_struct,
  &_xdp_impl_clipboard_method_info_selection_write_IN_ARG_serial.parent_struct,
  NULL
};

static const _ExtendedGDBusArgInfo _xdp_impl_clipboard_method_info_selection_write_OUT_ARG_fd =
{
  {
    -1,
    (gchar *) "fd",
    (gchar *) "h",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_clipboard_method_info_selection_write_OUT_ARG_pointers[] =
{
  &_xdp_impl_clipboard_method_info_selection_write_OUT_ARG_fd.parent_struct,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_impl_clipboard_method_info_selection_write =
{
  {
    -1,
    (gchar *) "SelectionWrite",
    (GDBusArgInfo **) &_xdp_impl_clipboard_method_info_selection_write_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_impl_clipboard_method_info_selection_write_OUT_ARG_pointers,
    NULL
  },
  "handle-selection-write",
  TRUE
};

static const _ExtendedGDBusArgInfo _xdp_impl_clipboard_method_info_selection_write_done_IN_ARG_session_handle =
{
  {
    -1,
    (gchar *) "session_handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_clipboard_method_info_selection_write_done_IN_ARG_serial =
{
  {
    -1,
    (gchar *) "serial",
    (gchar *) "u",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_clipboard_method_info_selection_write_done_IN_ARG_success =
{
  {
    -1,
    (gchar *) "success",
    (gchar *) "b",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_clipboard_method_info_selection_write_done_IN_ARG_pointers[] =
{
  &_xdp_impl_clipboard_method_info_selection_write_done_IN_ARG_session_handle.parent_struct,
  &_xdp_impl_clipboard_method_info_selection_write_done_IN_ARG_serial.parent_struct,
  &_xdp_impl_clipboard_method_info_selection_write_done_IN_ARG_success.parent_struct,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_impl_clipboard_method_info_selection_write_done =
{
  {
    -1,
    (gchar *) "SelectionWriteDone",
    (GDBusArgInfo **) &_xdp_impl_clipboard_method_info_selection_write_done_IN_ARG_pointers,
    NULL,
    NULL
  },
  "handle-selection-write-done",
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_clipboard_method_info_selection_read_IN_ARG_session_handle =
{
  {
    -1,
    (gchar *) "session_handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_clipboard_method_info_selection_read_IN_ARG_mime_type =
{
  {
    -1,
    (gchar *) "mime_type",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_clipboard_method_info_selection_read_IN_ARG_pointers[] =
{
  &_xdp_impl_clipboard_method_info_selection_read_IN_ARG_session_handle.parent_struct,
  &_xdp_impl_clipboard_method_info_selection_read_IN_ARG_mime_type.parent_struct,
  NULL
};

static const _ExtendedGDBusArgInfo _xdp_impl_clipboard_method_info_selection_read_OUT_ARG_fd =
{
  {
    -1,
    (gchar *) "fd",
    (gchar *) "h",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_clipboard_method_info_selection_read_OUT_ARG_pointers[] =
{
  &_xdp_impl_clipboard_method_info_selection_read_OUT_ARG_fd.parent_struct,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_impl_clipboard_method_info_selection_read =
{
  {
    -1,
    (gchar *) "SelectionRead",
    (GDBusArgInfo **) &_xdp_impl_clipboard_method_info_selection_read_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_impl_clipboard_method_info_selection_read_OUT_ARG_pointers,
    NULL
  },
  "handle-selection-read",
  TRUE
};

static const GDBusMethodInfo * const _xdp_impl_clipboard_method_info_pointers[] =
{
  &_xdp_impl_clipboard_method_info_request_clipboard.parent_struct,
  &_xdp_impl_clipboard_method_info_set_selection.parent_struct,
  &_xdp_impl_clipboard_method_info_selection_write.parent_struct,
  &_xdp_impl_clipboard_method_info_selection_write_done.parent_struct,
  &_xdp_impl_clipboard_method_info_selection_read.parent_struct,
  NULL
};

static const _ExtendedGDBusArgInfo _xdp_impl_clipboard_signal_info_selection_owner_changed_ARG_session_handle =
{
  {
    -1,
    (gchar *) "session_handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_clipboard_signal_info_selection_owner_changed_ARG_options =
{
  {
    -1,
    (gchar *) "options",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_clipboard_signal_info_selection_owner_changed_ARG_pointers[] =
{
  &_xdp_impl_clipboard_signal_info_selection_owner_changed_ARG_session_handle.parent_struct,
  &_xdp_impl_clipboard_signal_info_selection_owner_changed_ARG_options.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_clipboard_signal_selection_owner_changed_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.Out1",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo * const _xdp_impl_clipboard_signal_selection_owner_changed_annotation_info_pointers[] =
{
  &_xdp_impl_clipboard_signal_selection_owner_changed_annotation_info_0,
  NULL
};

static const _ExtendedGDBusSignalInfo _xdp_impl_clipboard_signal_info_selection_owner_changed =
{
  {
    -1,
    (gchar *) "SelectionOwnerChanged",
    (GDBusArgInfo **) &_xdp_impl_clipboard_signal_info_selection_owner_changed_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_impl_clipboard_signal_selection_owner_changed_annotation_info_pointers
  },
  "selection-owner-changed"
};

static const _ExtendedGDBusArgInfo _xdp_impl_clipboard_signal_info_selection_transfer_ARG_session_handle =
{
  {
    -1,
    (gchar *) "session_handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_clipboard_signal_info_selection_transfer_ARG_mime_type =
{
  {
    -1,
    (gchar *) "mime_type",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_clipboard_signal_info_selection_transfer_ARG_serial =
{
  {
    -1,
    (gchar *) "serial",
    (gchar *) "u",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_clipboard_signal_info_selection_transfer_ARG_pointers[] =
{
  &_xdp_impl_clipboard_signal_info_selection_transfer_ARG_session_handle.parent_struct,
  &_xdp_impl_clipboard_signal_info_selection_transfer_ARG_mime_type.parent_struct,
  &_xdp_impl_clipboard_signal_info_selection_transfer_ARG_serial.parent_struct,
  NULL
};

static const _ExtendedGDBusSignalInfo _xdp_impl_clipboard_signal_info_selection_transfer =
{
  {
    -1,
    (gchar *) "SelectionTransfer",
    (GDBusArgInfo **) &_xdp_impl_clipboard_signal_info_selection_transfer_ARG_pointers,
    NULL
  },
  "selection-transfer"
};

static const GDBusSignalInfo * const _xdp_impl_clipboard_signal_info_pointers[] =
{
  &_xdp_impl_clipboard_signal_info_selection_owner_changed.parent_struct,
  &_xdp_impl_clipboard_signal_info_selection_transfer.parent_struct,
  NULL
};

static const _ExtendedGDBusPropertyInfo _xdp_impl_clipboard_property_info_version =
{
  {
    -1,
    (gchar *) "version",
    (gchar *) "u",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "version",
  FALSE,
  TRUE
};

static const GDBusPropertyInfo * const _xdp_impl_clipboard_property_info_pointers[] =
{
  &_xdp_impl_clipboard_property_info_version.parent_struct,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _xdp_impl_clipboard_interface_info =
{
  {
    -1,
    (gchar *) "org.freedesktop.impl.portal.Clipboard",
    (GDBusMethodInfo **) &_xdp_impl_clipboard_method_info_pointers,
    (GDBusSignalInfo **) &_xdp_impl_clipboard_signal_info_pointers,
    (GDBusPropertyInfo **) &_xdp_impl_clipboard_property_info_pointers,
    NULL
  },
  "clipboard",
};


/**
 * xdp_impl_clipboard_interface_info:
 *
 * Gets a machine-readable description of the <link linkend="gdbus-interface-org-freedesktop-impl-portal-Clipboard.top_of_page">org.freedesktop.impl.portal.Clipboard</link> D-Bus interface.
 *
 * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
 */
GDBusInterfaceInfo *
xdp_impl_clipboard_interface_info (void)
{
  return (GDBusInterfaceInfo *) &_xdp_impl_clipboard_interface_info.parent_struct;
}

/**
 * xdp_impl_clipboard_override_properties:
 * @klass: The class structure for a #GObject derived class.
 * @property_id_begin: The property id to assign to the first overridden property.
 *
 * Overrides all #GObject properties in the #XdpImplClipboard interface for a concrete class.
 * The properties are overridden in the order they are defined.
 *
 * Returns: The last property id.
 */
guint
xdp_impl_clipboard_override_properties (GObjectClass *klass, guint property_id_begin)
{
  g_object_class_override_property (klass, property_id_begin++, "version");
  return property_id_begin - 1;
}


inline static void
xdp_impl_clipboard_signal_marshal_selection_owner_changed (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  _g_dbus_codegen_marshal_VOID__STRING_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_impl_clipboard_signal_marshal_selection_transfer (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  _g_dbus_codegen_marshal_VOID__STRING_STRING_UINT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_impl_clipboard_method_marshal_request_clipboard (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  _g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_impl_clipboard_method_marshal_set_selection (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  _g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_impl_clipboard_method_marshal_selection_write (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  _g_dbus_codegen_marshal_BOOLEAN__OBJECT_OBJECT_STRING_UINT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_impl_clipboard_method_marshal_selection_write_done (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  _g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_UINT_BOOLEAN (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_impl_clipboard_method_marshal_selection_read (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  _g_dbus_codegen_marshal_BOOLEAN__OBJECT_OBJECT_STRING_STRING (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}


/**
 * XdpImplClipboard:
 *
 * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-Clipboard.top_of_page">org.freedesktop.impl.portal.Clipboard</link>.
 */

/**
 * XdpImplClipboardIface:
 * @parent_iface: The parent interface.
 * @handle_request_clipboard: Handler for the #XdpImplClipboard::handle-request-clipboard signal.
 * @handle_selection_read: Handler for the #XdpImplClipboard::handle-selection-read signal.
 * @handle_selection_write: Handler for the #XdpImplClipboard::handle-selection-write signal.
 * @handle_selection_write_done: Handler for the #XdpImplClipboard::handle-selection-write-done signal.
 * @handle_set_selection: Handler for the #XdpImplClipboard::handle-set-selection signal.
 * @get_version: Getter for the #XdpImplClipboard:version property.
 * @selection_owner_changed: Handler for the #XdpImplClipboard::selection-owner-changed signal.
 * @selection_transfer: Handler for the #XdpImplClipboard::selection-transfer signal.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-Clipboard.top_of_page">org.freedesktop.impl.portal.Clipboard</link>.
 */

typedef XdpImplClipboardIface XdpImplClipboardInterface;
G_DEFINE_INTERFACE (XdpImplClipboard, xdp_impl_clipboard, G_TYPE_OBJECT)

static void
xdp_impl_clipboard_default_init (XdpImplClipboardIface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * XdpImplClipboard::handle-request-clipboard:
   * @object: A #XdpImplClipboard.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_session_handle: Argument passed by remote caller.
   * @arg_options: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-impl-portal-Clipboard.RequestClipboard">RequestClipboard()</link> 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 xdp_impl_clipboard_complete_request_clipboard() 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.
   *
   * 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.
   */
  g_signal_new ("handle-request-clipboard",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpImplClipboardIface, handle_request_clipboard),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_impl_clipboard_method_marshal_request_clipboard,
    G_TYPE_BOOLEAN,
    3,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_VARIANT);

  /**
   * XdpImplClipboard::handle-set-selection:
   * @object: A #XdpImplClipboard.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_session_handle: Argument passed by remote caller.
   * @arg_options: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-impl-portal-Clipboard.SetSelection">SetSelection()</link> 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 xdp_impl_clipboard_complete_set_selection() 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.
   *
   * 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.
   */
  g_signal_new ("handle-set-selection",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpImplClipboardIface, handle_set_selection),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_impl_clipboard_method_marshal_set_selection,
    G_TYPE_BOOLEAN,
    3,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_VARIANT);

  /**
   * XdpImplClipboard::handle-selection-write:
   * @object: A #XdpImplClipboard.
   * @invocation: A #GDBusMethodInvocation.
   * @fd_list: (nullable): A #GUnixFDList or %NULL.
   * @arg_session_handle: Argument passed by remote caller.
   * @arg_serial: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-impl-portal-Clipboard.SelectionWrite">SelectionWrite()</link> 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 xdp_impl_clipboard_complete_selection_write() 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.
   *
   * 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.
   */
  g_signal_new ("handle-selection-write",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpImplClipboardIface, handle_selection_write),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_impl_clipboard_method_marshal_selection_write,
    G_TYPE_BOOLEAN,
    4,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UNIX_FD_LIST, G_TYPE_STRING, G_TYPE_UINT);

  /**
   * XdpImplClipboard::handle-selection-write-done:
   * @object: A #XdpImplClipboard.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_session_handle: Argument passed by remote caller.
   * @arg_serial: Argument passed by remote caller.
   * @arg_success: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-impl-portal-Clipboard.SelectionWriteDone">SelectionWriteDone()</link> 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 xdp_impl_clipboard_complete_selection_write_done() 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.
   *
   * 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.
   */
  g_signal_new ("handle-selection-write-done",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpImplClipboardIface, handle_selection_write_done),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_impl_clipboard_method_marshal_selection_write_done,
    G_TYPE_BOOLEAN,
    4,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_UINT, G_TYPE_BOOLEAN);

  /**
   * XdpImplClipboard::handle-selection-read:
   * @object: A #XdpImplClipboard.
   * @invocation: A #GDBusMethodInvocation.
   * @fd_list: (nullable): A #GUnixFDList or %NULL.
   * @arg_session_handle: Argument passed by remote caller.
   * @arg_mime_type: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-impl-portal-Clipboard.SelectionRead">SelectionRead()</link> 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 xdp_impl_clipboard_complete_selection_read() 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.
   *
   * 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.
   */
  g_signal_new ("handle-selection-read",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpImplClipboardIface, handle_selection_read),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_impl_clipboard_method_marshal_selection_read,
    G_TYPE_BOOLEAN,
    4,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UNIX_FD_LIST, G_TYPE_STRING, G_TYPE_STRING);

  /* GObject signals for received D-Bus signals: */
  /**
   * XdpImplClipboard::selection-owner-changed:
   * @object: A #XdpImplClipboard.
   * @arg_session_handle: Argument.
   * @arg_options: Argument.
   *
   * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-freedesktop-impl-portal-Clipboard.SelectionOwnerChanged">"SelectionOwnerChanged"</link> 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.
   */
  XDP_IMPL__CLIPBOARD_SIGNALS[XDP_IMPL__CLIPBOARD_SELECTION_OWNER_CHANGED] =
    g_signal_new ("selection-owner-changed",
      G_TYPE_FROM_INTERFACE (iface),
      G_SIGNAL_RUN_LAST,
      G_STRUCT_OFFSET (XdpImplClipboardIface, selection_owner_changed),
      NULL,
      NULL,
      xdp_impl_clipboard_signal_marshal_selection_owner_changed,
      G_TYPE_NONE,
      2, G_TYPE_STRING, G_TYPE_VARIANT);

  /**
   * XdpImplClipboard::selection-transfer:
   * @object: A #XdpImplClipboard.
   * @arg_session_handle: Argument.
   * @arg_mime_type: Argument.
   * @arg_serial: Argument.
   *
   * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-freedesktop-impl-portal-Clipboard.SelectionTransfer">"SelectionTransfer"</link> 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.
   */
  XDP_IMPL__CLIPBOARD_SIGNALS[XDP_IMPL__CLIPBOARD_SELECTION_TRANSFER] =
    g_signal_new ("selection-transfer",
      G_TYPE_FROM_INTERFACE (iface),
      G_SIGNAL_RUN_LAST,
      G_STRUCT_OFFSET (XdpImplClipboardIface, selection_transfer),
      NULL,
      NULL,
      xdp_impl_clipboard_signal_marshal_selection_transfer,
      G_TYPE_NONE,
      3, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_UINT);

  /* GObject properties for D-Bus properties: */
  /**
   * XdpImplClipboard:version:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-impl-portal-Clipboard.version">"version"</link>.
   *
   * 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.
   */
  g_object_interface_install_property (iface,
    g_param_spec_uint ("version", "version", "version", 0, G_MAXUINT32, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
}

/**
 * xdp_impl_clipboard_get_version: (skip)
 * @object: A #XdpImplClipboard.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-impl-portal-Clipboard.version">"version"</link> D-Bus property.
 *
 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
 *
 * Returns: The property value.
 */
guint 
xdp_impl_clipboard_get_version (XdpImplClipboard *object)
{
  g_return_val_if_fail (XDP_IMPL_IS_CLIPBOARD (object), 0);

  return XDP_IMPL_CLIPBOARD_GET_IFACE (object)->get_version (object);
}

/**
 * xdp_impl_clipboard_set_version: (skip)
 * @object: A #XdpImplClipboard.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-freedesktop-impl-portal-Clipboard.version">"version"</link> 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.
 */
void
xdp_impl_clipboard_set_version (XdpImplClipboard *object, guint value)
{
  g_object_set (G_OBJECT (object), "version", value, NULL);
}

/**
 * xdp_impl_clipboard_emit_selection_owner_changed:
 * @object: A #XdpImplClipboard.
 * @arg_session_handle: Argument to pass with the signal.
 * @arg_options: Argument to pass with the signal.
 *
 * Emits the <link linkend="gdbus-signal-org-freedesktop-impl-portal-Clipboard.SelectionOwnerChanged">"SelectionOwnerChanged"</link> D-Bus signal.
 */
void
xdp_impl_clipboard_emit_selection_owner_changed (
    XdpImplClipboard *object,
    const gchar *arg_session_handle,
    GVariant *arg_options)
{
  g_signal_emit (object, XDP_IMPL__CLIPBOARD_SIGNALS[XDP_IMPL__CLIPBOARD_SELECTION_OWNER_CHANGED], 0, arg_session_handle, arg_options);
}

/**
 * xdp_impl_clipboard_emit_selection_transfer:
 * @object: A #XdpImplClipboard.
 * @arg_session_handle: Argument to pass with the signal.
 * @arg_mime_type: Argument to pass with the signal.
 * @arg_serial: Argument to pass with the signal.
 *
 * Emits the <link linkend="gdbus-signal-org-freedesktop-impl-portal-Clipboard.SelectionTransfer">"SelectionTransfer"</link> D-Bus signal.
 */
void
xdp_impl_clipboard_emit_selection_transfer (
    XdpImplClipboard *object,
    const gchar *arg_session_handle,
    const gchar *arg_mime_type,
    guint arg_serial)
{
  g_signal_emit (object, XDP_IMPL__CLIPBOARD_SIGNALS[XDP_IMPL__CLIPBOARD_SELECTION_TRANSFER], 0, arg_session_handle, arg_mime_type, arg_serial);
}

/**
 * xdp_impl_clipboard_call_request_clipboard:
 * @proxy: A #XdpImplClipboardProxy.
 * @arg_session_handle: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-Clipboard.RequestClipboard">RequestClipboard()</link> 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 xdp_impl_clipboard_call_request_clipboard_finish() to get the result of the operation.
 *
 * See xdp_impl_clipboard_call_request_clipboard_sync() for the synchronous, blocking version of this method.
 */
void
xdp_impl_clipboard_call_request_clipboard (
    XdpImplClipboard *proxy,
    const gchar *arg_session_handle,
    GVariant *arg_options,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "RequestClipboard",
    g_variant_new ("(o@a{sv})",
                   arg_session_handle,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_impl_clipboard_call_request_clipboard_finish:
 * @proxy: A #XdpImplClipboardProxy.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_clipboard_call_request_clipboard().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_impl_clipboard_call_request_clipboard().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_clipboard_call_request_clipboard_finish (
    XdpImplClipboard *proxy,
    GAsyncResult *res,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "()");
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_clipboard_call_request_clipboard_sync:
 * @proxy: A #XdpImplClipboardProxy.
 * @arg_session_handle: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-Clipboard.RequestClipboard">RequestClipboard()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_clipboard_call_request_clipboard() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_clipboard_call_request_clipboard_sync (
    XdpImplClipboard *proxy,
    const gchar *arg_session_handle,
    GVariant *arg_options,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "RequestClipboard",
    g_variant_new ("(o@a{sv})",
                   arg_session_handle,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "()");
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_clipboard_call_set_selection:
 * @proxy: A #XdpImplClipboardProxy.
 * @arg_session_handle: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-Clipboard.SetSelection">SetSelection()</link> 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 xdp_impl_clipboard_call_set_selection_finish() to get the result of the operation.
 *
 * See xdp_impl_clipboard_call_set_selection_sync() for the synchronous, blocking version of this method.
 */
void
xdp_impl_clipboard_call_set_selection (
    XdpImplClipboard *proxy,
    const gchar *arg_session_handle,
    GVariant *arg_options,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "SetSelection",
    g_variant_new ("(o@a{sv})",
                   arg_session_handle,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_impl_clipboard_call_set_selection_finish:
 * @proxy: A #XdpImplClipboardProxy.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_clipboard_call_set_selection().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_impl_clipboard_call_set_selection().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_clipboard_call_set_selection_finish (
    XdpImplClipboard *proxy,
    GAsyncResult *res,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "()");
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_clipboard_call_set_selection_sync:
 * @proxy: A #XdpImplClipboardProxy.
 * @arg_session_handle: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-Clipboard.SetSelection">SetSelection()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_clipboard_call_set_selection() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_clipboard_call_set_selection_sync (
    XdpImplClipboard *proxy,
    const gchar *arg_session_handle,
    GVariant *arg_options,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "SetSelection",
    g_variant_new ("(o@a{sv})",
                   arg_session_handle,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "()");
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_clipboard_call_selection_write:
 * @proxy: A #XdpImplClipboardProxy.
 * @arg_session_handle: Argument to pass with the method invocation.
 * @arg_serial: Argument to pass with the method invocation.
 * @fd_list: (nullable): A #GUnixFDList or %NULL.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-Clipboard.SelectionWrite">SelectionWrite()</link> 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 xdp_impl_clipboard_call_selection_write_finish() to get the result of the operation.
 *
 * See xdp_impl_clipboard_call_selection_write_sync() for the synchronous, blocking version of this method.
 */
void
xdp_impl_clipboard_call_selection_write (
    XdpImplClipboard *proxy,
    const gchar *arg_session_handle,
    guint arg_serial,
    GUnixFDList *fd_list,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call_with_unix_fd_list (G_DBUS_PROXY (proxy),
    "SelectionWrite",
    g_variant_new ("(ou)",
                   arg_session_handle,
                   arg_serial),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    fd_list,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_impl_clipboard_call_selection_write_finish:
 * @proxy: A #XdpImplClipboardProxy.
 * @out_fd: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_fd_list: (out) (optional) (nullable): Return location for a #GUnixFDList or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_clipboard_call_selection_write().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_impl_clipboard_call_selection_write().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_clipboard_call_selection_write_finish (
    XdpImplClipboard *proxy,
    GVariant ** out_fd,
    GUnixFDList **out_fd_list,
    GAsyncResult *res,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_with_unix_fd_list_finish (G_DBUS_PROXY (proxy), out_fd_list, res, error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(@h)",
                 out_fd);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_clipboard_call_selection_write_sync:
 * @proxy: A #XdpImplClipboardProxy.
 * @arg_session_handle: Argument to pass with the method invocation.
 * @arg_serial: Argument to pass with the method invocation.
 * @fd_list: (nullable): A #GUnixFDList or %NULL.
 * @out_fd: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_fd_list: (out) (optional) (nullable): Return location for a #GUnixFDList or %NULL.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-Clipboard.SelectionWrite">SelectionWrite()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_clipboard_call_selection_write() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_clipboard_call_selection_write_sync (
    XdpImplClipboard *proxy,
    const gchar *arg_session_handle,
    guint arg_serial,
    GUnixFDList  *fd_list,
    GVariant ** out_fd,
    GUnixFDList **out_fd_list,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_with_unix_fd_list_sync (G_DBUS_PROXY (proxy),
    "SelectionWrite",
    g_variant_new ("(ou)",
                   arg_session_handle,
                   arg_serial),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    fd_list,
    out_fd_list,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(@h)",
                 out_fd);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_clipboard_call_selection_write_done:
 * @proxy: A #XdpImplClipboardProxy.
 * @arg_session_handle: Argument to pass with the method invocation.
 * @arg_serial: Argument to pass with the method invocation.
 * @arg_success: Argument to pass with the method invocation.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-Clipboard.SelectionWriteDone">SelectionWriteDone()</link> 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 xdp_impl_clipboard_call_selection_write_done_finish() to get the result of the operation.
 *
 * See xdp_impl_clipboard_call_selection_write_done_sync() for the synchronous, blocking version of this method.
 */
void
xdp_impl_clipboard_call_selection_write_done (
    XdpImplClipboard *proxy,
    const gchar *arg_session_handle,
    guint arg_serial,
    gboolean arg_success,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "SelectionWriteDone",
    g_variant_new ("(oub)",
                   arg_session_handle,
                   arg_serial,
                   arg_success),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_impl_clipboard_call_selection_write_done_finish:
 * @proxy: A #XdpImplClipboardProxy.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_clipboard_call_selection_write_done().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_impl_clipboard_call_selection_write_done().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_clipboard_call_selection_write_done_finish (
    XdpImplClipboard *proxy,
    GAsyncResult *res,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "()");
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_clipboard_call_selection_write_done_sync:
 * @proxy: A #XdpImplClipboardProxy.
 * @arg_session_handle: Argument to pass with the method invocation.
 * @arg_serial: Argument to pass with the method invocation.
 * @arg_success: Argument to pass with the method invocation.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-Clipboard.SelectionWriteDone">SelectionWriteDone()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_clipboard_call_selection_write_done() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_clipboard_call_selection_write_done_sync (
    XdpImplClipboard *proxy,
    const gchar *arg_session_handle,
    guint arg_serial,
    gboolean arg_success,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "SelectionWriteDone",
    g_variant_new ("(oub)",
                   arg_session_handle,
                   arg_serial,
                   arg_success),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "()");
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_clipboard_call_selection_read:
 * @proxy: A #XdpImplClipboardProxy.
 * @arg_session_handle: Argument to pass with the method invocation.
 * @arg_mime_type: Argument to pass with the method invocation.
 * @fd_list: (nullable): A #GUnixFDList or %NULL.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-Clipboard.SelectionRead">SelectionRead()</link> 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 xdp_impl_clipboard_call_selection_read_finish() to get the result of the operation.
 *
 * See xdp_impl_clipboard_call_selection_read_sync() for the synchronous, blocking version of this method.
 */
void
xdp_impl_clipboard_call_selection_read (
    XdpImplClipboard *proxy,
    const gchar *arg_session_handle,
    const gchar *arg_mime_type,
    GUnixFDList *fd_list,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call_with_unix_fd_list (G_DBUS_PROXY (proxy),
    "SelectionRead",
    g_variant_new ("(os)",
                   arg_session_handle,
                   arg_mime_type),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    fd_list,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_impl_clipboard_call_selection_read_finish:
 * @proxy: A #XdpImplClipboardProxy.
 * @out_fd: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_fd_list: (out) (optional) (nullable): Return location for a #GUnixFDList or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_clipboard_call_selection_read().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_impl_clipboard_call_selection_read().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_clipboard_call_selection_read_finish (
    XdpImplClipboard *proxy,
    GVariant ** out_fd,
    GUnixFDList **out_fd_list,
    GAsyncResult *res,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_with_unix_fd_list_finish (G_DBUS_PROXY (proxy), out_fd_list, res, error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(@h)",
                 out_fd);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_clipboard_call_selection_read_sync:
 * @proxy: A #XdpImplClipboardProxy.
 * @arg_session_handle: Argument to pass with the method invocation.
 * @arg_mime_type: Argument to pass with the method invocation.
 * @fd_list: (nullable): A #GUnixFDList or %NULL.
 * @out_fd: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_fd_list: (out) (optional) (nullable): Return location for a #GUnixFDList or %NULL.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-Clipboard.SelectionRead">SelectionRead()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_clipboard_call_selection_read() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_clipboard_call_selection_read_sync (
    XdpImplClipboard *proxy,
    const gchar *arg_session_handle,
    const gchar *arg_mime_type,
    GUnixFDList  *fd_list,
    GVariant ** out_fd,
    GUnixFDList **out_fd_list,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_with_unix_fd_list_sync (G_DBUS_PROXY (proxy),
    "SelectionRead",
    g_variant_new ("(os)",
                   arg_session_handle,
                   arg_mime_type),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    fd_list,
    out_fd_list,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(@h)",
                 out_fd);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_clipboard_complete_request_clipboard:
 * @object: A #XdpImplClipboard.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-impl-portal-Clipboard.RequestClipboard">RequestClipboard()</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
xdp_impl_clipboard_complete_request_clipboard (
    XdpImplClipboard *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("()"));
}

/**
 * xdp_impl_clipboard_complete_set_selection:
 * @object: A #XdpImplClipboard.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-impl-portal-Clipboard.SetSelection">SetSelection()</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
xdp_impl_clipboard_complete_set_selection (
    XdpImplClipboard *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("()"));
}

/**
 * xdp_impl_clipboard_complete_selection_write:
 * @object: A #XdpImplClipboard.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @fd_list: (nullable): A #GUnixFDList or %NULL.
 * @fd: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-impl-portal-Clipboard.SelectionWrite">SelectionWrite()</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
xdp_impl_clipboard_complete_selection_write (
    XdpImplClipboard *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    GUnixFDList *fd_list,
    GVariant *fd)
{
  g_dbus_method_invocation_return_value_with_unix_fd_list (invocation,
    g_variant_new ("(@h)",
                   fd),
    fd_list);
}

/**
 * xdp_impl_clipboard_complete_selection_write_done:
 * @object: A #XdpImplClipboard.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-impl-portal-Clipboard.SelectionWriteDone">SelectionWriteDone()</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
xdp_impl_clipboard_complete_selection_write_done (
    XdpImplClipboard *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("()"));
}

/**
 * xdp_impl_clipboard_complete_selection_read:
 * @object: A #XdpImplClipboard.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @fd_list: (nullable): A #GUnixFDList or %NULL.
 * @fd: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-impl-portal-Clipboard.SelectionRead">SelectionRead()</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
xdp_impl_clipboard_complete_selection_read (
    XdpImplClipboard *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    GUnixFDList *fd_list,
    GVariant *fd)
{
  g_dbus_method_invocation_return_value_with_unix_fd_list (invocation,
    g_variant_new ("(@h)",
                   fd),
    fd_list);
}

/* ------------------------------------------------------------------------ */

/**
 * XdpImplClipboardProxy:
 *
 * The #XdpImplClipboardProxy structure contains only private data and should only be accessed using the provided API.
 */

/**
 * XdpImplClipboardProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpImplClipboardProxy.
 */

struct _XdpImplClipboardProxyPrivate
{
  GData *qdata;
};

static void xdp_impl_clipboard_proxy_iface_init (XdpImplClipboardIface *iface);

#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpImplClipboardProxy, xdp_impl_clipboard_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (XdpImplClipboardProxy)
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_CLIPBOARD, xdp_impl_clipboard_proxy_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpImplClipboardProxy, xdp_impl_clipboard_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_CLIPBOARD, xdp_impl_clipboard_proxy_iface_init))

#endif
static void
xdp_impl_clipboard_proxy_finalize (GObject *object)
{
  XdpImplClipboardProxy *proxy = XDP_IMPL_CLIPBOARD_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (xdp_impl_clipboard_proxy_parent_class)->finalize (object);
}

static void
xdp_impl_clipboard_proxy_get_property (GObject      *object,
  guint         prop_id,
  GValue       *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  const _ExtendedGDBusPropertyInfo *info;
  GVariant *variant;
  g_assert (prop_id != 0 && prop_id - 1 < 1);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_impl_clipboard_property_info_pointers[prop_id - 1];
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), info->parent_struct.name);
  if (info->use_gvariant)
    {
      g_value_set_variant (value, variant);
    }
  else
    {
      if (variant != NULL)
        g_dbus_gvariant_to_gvalue (variant, value);
    }
  if (variant != NULL)
    g_variant_unref (variant);
}

static void
xdp_impl_clipboard_proxy_set_property_cb (GDBusProxy *proxy,
  GAsyncResult *res,
  gpointer      user_data)
{
  const _ExtendedGDBusPropertyInfo *info = user_data;
  GError *error;
  GVariant *_ret;
  error = NULL;
  _ret = g_dbus_proxy_call_finish (proxy, res, &error);
  if (!_ret)
    {
      g_warning ("Error setting property '%s' on interface org.freedesktop.impl.portal.Clipboard: %s (%s, %d)",
                 info->parent_struct.name, 
                 error->message, g_quark_to_string (error->domain), error->code);
      g_error_free (error);
    }
  else
    {
      g_variant_unref (_ret);
    }
}

static void
xdp_impl_clipboard_proxy_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  const _ExtendedGDBusPropertyInfo *info;
  GVariant *variant;
  g_assert (prop_id != 0 && prop_id - 1 < 1);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_impl_clipboard_property_info_pointers[prop_id - 1];
  variant = g_dbus_gvalue_to_gvariant (value, G_VARIANT_TYPE (info->parent_struct.signature));
  g_dbus_proxy_call (G_DBUS_PROXY (object),
    "org.freedesktop.DBus.Properties.Set",
    g_variant_new ("(ssv)", "org.freedesktop.impl.portal.Clipboard", info->parent_struct.name, variant),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    NULL, (GAsyncReadyCallback) xdp_impl_clipboard_proxy_set_property_cb, (GDBusPropertyInfo *) &info->parent_struct);
  g_variant_unref (variant);
}

static void
xdp_impl_clipboard_proxy_g_signal (GDBusProxy *proxy,
  const gchar *sender_name G_GNUC_UNUSED,
  const gchar *signal_name,
  GVariant *parameters)
{
  _ExtendedGDBusSignalInfo *info;
  GVariantIter iter;
  GVariant *child;
  GValue *paramv;
  gsize num_params;
  gsize n;
  guint signal_id;
  info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_xdp_impl_clipboard_interface_info.parent_struct, signal_name);
  if (info == NULL)
    return;
  num_params = g_variant_n_children (parameters);
  paramv = g_new0 (GValue, num_params + 1);
  g_value_init (&paramv[0], XDP_IMPL_TYPE_CLIPBOARD);
  g_value_set_object (&paramv[0], proxy);
  g_variant_iter_init (&iter, parameters);
  n = 1;
  while ((child = g_variant_iter_next_value (&iter)) != NULL)
    {
      _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1];
      if (arg_info->use_gvariant)
        {
          g_value_init (&paramv[n], G_TYPE_VARIANT);
          g_value_set_variant (&paramv[n], child);
          n++;
        }
      else
        g_dbus_gvariant_to_gvalue (child, &paramv[n++]);
      g_variant_unref (child);
    }
  signal_id = g_signal_lookup (info->signal_name, XDP_IMPL_TYPE_CLIPBOARD);
  g_signal_emitv (paramv, signal_id, 0, NULL);
  for (n = 0; n < num_params + 1; n++)
    g_value_unset (&paramv[n]);
  g_free (paramv);
}

static void
xdp_impl_clipboard_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  XdpImplClipboardProxy *proxy = XDP_IMPL_CLIPBOARD_PROXY (_proxy);
  guint n;
  const gchar *key;
  GVariantIter *iter;
  _ExtendedGDBusPropertyInfo *info;
  g_variant_get (changed_properties, "a{sv}", &iter);
  while (g_variant_iter_next (iter, "{&sv}", &key, NULL))
    {
      info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_clipboard_interface_info.parent_struct, key);
      g_datalist_remove_data (&proxy->priv->qdata, key);
      if (info != NULL)
        g_object_notify (G_OBJECT (proxy), info->hyphen_name);
    }
  g_variant_iter_free (iter);
  for (n = 0; invalidated_properties[n] != NULL; n++)
    {
      info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_clipboard_interface_info.parent_struct, invalidated_properties[n]);
      g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]);
      if (info != NULL)
        g_object_notify (G_OBJECT (proxy), info->hyphen_name);
    }
}

static guint 
xdp_impl_clipboard_proxy_get_version (XdpImplClipboard *object)
{
  XdpImplClipboardProxy *proxy = XDP_IMPL_CLIPBOARD_PROXY (object);
  GVariant *variant;
  guint value = 0;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "version");
  if (variant != NULL)
    {
      value = g_variant_get_uint32 (variant);
      g_variant_unref (variant);
    }
  return value;
}

static void
xdp_impl_clipboard_proxy_init (XdpImplClipboardProxy *proxy)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  proxy->priv = xdp_impl_clipboard_proxy_get_instance_private (proxy);
#else
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, XDP_IMPL_TYPE_CLIPBOARD_PROXY, XdpImplClipboardProxyPrivate);
#endif

  g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), xdp_impl_clipboard_interface_info ());
}

static void
xdp_impl_clipboard_proxy_class_init (XdpImplClipboardProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = xdp_impl_clipboard_proxy_finalize;
  gobject_class->get_property = xdp_impl_clipboard_proxy_get_property;
  gobject_class->set_property = xdp_impl_clipboard_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = xdp_impl_clipboard_proxy_g_signal;
  proxy_class->g_properties_changed = xdp_impl_clipboard_proxy_g_properties_changed;

  xdp_impl_clipboard_override_properties (gobject_class, 1);

#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
  g_type_class_add_private (klass, sizeof (XdpImplClipboardProxyPrivate));
#endif
}

static void
xdp_impl_clipboard_proxy_iface_init (XdpImplClipboardIface *iface)
{
  iface->get_version = xdp_impl_clipboard_proxy_get_version;
}

/**
 * xdp_impl_clipboard_proxy_new:
 * @connection: A #GDBusConnection.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-Clipboard.top_of_page">org.freedesktop.impl.portal.Clipboard</link>. 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 xdp_impl_clipboard_proxy_new_finish() to get the result of the operation.
 *
 * See xdp_impl_clipboard_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_impl_clipboard_proxy_new (
    GDBusConnection     *connection,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GAsyncReadyCallback  callback,
    gpointer             user_data)
{
  g_async_initable_new_async (XDP_IMPL_TYPE_CLIPBOARD_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.Clipboard", NULL);
}

/**
 * xdp_impl_clipboard_proxy_new_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_clipboard_proxy_new().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_impl_clipboard_proxy_new().
 *
 * Returns: (transfer full) (type XdpImplClipboardProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplClipboard *
xdp_impl_clipboard_proxy_new_finish (
    GAsyncResult        *res,
    GError             **error)
{
  GObject *ret;
  GObject *source_object;
  source_object = g_async_result_get_source_object (res);
  ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
  g_object_unref (source_object);
  if (ret != NULL)
    return XDP_IMPL_CLIPBOARD (ret);
  else
    return NULL;
}

/**
 * xdp_impl_clipboard_proxy_new_sync:
 * @connection: A #GDBusConnection.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL
 *
 * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-Clipboard.top_of_page">org.freedesktop.impl.portal.Clipboard</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_clipboard_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpImplClipboardProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplClipboard *
xdp_impl_clipboard_proxy_new_sync (
    GDBusConnection     *connection,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GError             **error)
{
  GInitable *ret;
  ret = g_initable_new (XDP_IMPL_TYPE_CLIPBOARD_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.Clipboard", NULL);
  if (ret != NULL)
    return XDP_IMPL_CLIPBOARD (ret);
  else
    return NULL;
}


/**
 * xdp_impl_clipboard_proxy_new_for_bus:
 * @bus_type: A #GBusType.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: A bus name (well-known or unique).
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
 * @user_data: User data to pass to @callback.
 *
 * Like xdp_impl_clipboard_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 xdp_impl_clipboard_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See xdp_impl_clipboard_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_impl_clipboard_proxy_new_for_bus (
    GBusType             bus_type,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GAsyncReadyCallback  callback,
    gpointer             user_data)
{
  g_async_initable_new_async (XDP_IMPL_TYPE_CLIPBOARD_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.Clipboard", NULL);
}

/**
 * xdp_impl_clipboard_proxy_new_for_bus_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_clipboard_proxy_new_for_bus().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_impl_clipboard_proxy_new_for_bus().
 *
 * Returns: (transfer full) (type XdpImplClipboardProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplClipboard *
xdp_impl_clipboard_proxy_new_for_bus_finish (
    GAsyncResult        *res,
    GError             **error)
{
  GObject *ret;
  GObject *source_object;
  source_object = g_async_result_get_source_object (res);
  ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
  g_object_unref (source_object);
  if (ret != NULL)
    return XDP_IMPL_CLIPBOARD (ret);
  else
    return NULL;
}

/**
 * xdp_impl_clipboard_proxy_new_for_bus_sync:
 * @bus_type: A #GBusType.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: A bus name (well-known or unique).
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL
 *
 * Like xdp_impl_clipboard_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_clipboard_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpImplClipboardProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplClipboard *
xdp_impl_clipboard_proxy_new_for_bus_sync (
    GBusType             bus_type,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GError             **error)
{
  GInitable *ret;
  ret = g_initable_new (XDP_IMPL_TYPE_CLIPBOARD_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.Clipboard", NULL);
  if (ret != NULL)
    return XDP_IMPL_CLIPBOARD (ret);
  else
    return NULL;
}


/* ------------------------------------------------------------------------ */

/**
 * XdpImplClipboardSkeleton:
 *
 * The #XdpImplClipboardSkeleton structure contains only private data and should only be accessed using the provided API.
 */

/**
 * XdpImplClipboardSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpImplClipboardSkeleton.
 */

struct _XdpImplClipboardSkeletonPrivate
{
  GValue *properties;
  GList *changed_properties;
  GSource *changed_properties_idle_source;
  GMainContext *context;
  GMutex lock;
};

static void
_xdp_impl_clipboard_skeleton_handle_method_call (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name,
  const gchar *method_name,
  GVariant *parameters,
  GDBusMethodInvocation *invocation,
  gpointer user_data)
{
  XdpImplClipboardSkeleton *skeleton = XDP_IMPL_CLIPBOARD_SKELETON (user_data);
  _ExtendedGDBusMethodInfo *info;
  GVariantIter iter;
  GVariant *child;
  GValue *paramv;
  gsize num_params;
  guint num_extra;
  gsize n;
  guint signal_id;
  GValue return_value = G_VALUE_INIT;
  info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
  g_assert (info != NULL);
  num_params = g_variant_n_children (parameters);
  num_extra = info->pass_fdlist ? 3 : 2;  paramv = g_new0 (GValue, num_params + num_extra);
  n = 0;
  g_value_init (&paramv[n], XDP_IMPL_TYPE_CLIPBOARD);
  g_value_set_object (&paramv[n++], skeleton);
  g_value_init (&paramv[n], G_TYPE_DBUS_METHOD_INVOCATION);
  g_value_set_object (&paramv[n++], invocation);
  if (info->pass_fdlist)
    {
#ifdef G_OS_UNIX
      g_value_init (&paramv[n], G_TYPE_UNIX_FD_LIST);
      g_value_set_object (&paramv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation)));
#else
      g_assert_not_reached ();
#endif
    }
  g_variant_iter_init (&iter, parameters);
  while ((child = g_variant_iter_next_value (&iter)) != NULL)
    {
      _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra];
      if (arg_info->use_gvariant)
        {
          g_value_init (&paramv[n], G_TYPE_VARIANT);
          g_value_set_variant (&paramv[n], child);
          n++;
        }
      else
        g_dbus_gvariant_to_gvalue (child, &paramv[n++]);
      g_variant_unref (child);
    }
  signal_id = g_signal_lookup (info->signal_name, XDP_IMPL_TYPE_CLIPBOARD);
  g_value_init (&return_value, G_TYPE_BOOLEAN);
  g_signal_emitv (paramv, signal_id, 0, &return_value);
  if (!g_value_get_boolean (&return_value))
    g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD, "Method %s is not implemented on interface %s", method_name, interface_name);
  g_value_unset (&return_value);
  for (n = 0; n < num_params + num_extra; n++)
    g_value_unset (&paramv[n]);
  g_free (paramv);
}

static GVariant *
_xdp_impl_clipboard_skeleton_handle_get_property (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name G_GNUC_UNUSED,
  const gchar *property_name,
  GError **error,
  gpointer user_data)
{
  XdpImplClipboardSkeleton *skeleton = XDP_IMPL_CLIPBOARD_SKELETON (user_data);
  GValue value = G_VALUE_INIT;
  GParamSpec *pspec;
  _ExtendedGDBusPropertyInfo *info;
  GVariant *ret;
  ret = NULL;
  info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_clipboard_interface_info.parent_struct, property_name);
  g_assert (info != NULL);
  pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
  if (pspec == NULL)
    {
      g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
    }
  else
    {
      g_value_init (&value, pspec->value_type);
      g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value);
      ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature));
      g_value_unset (&value);
    }
  return ret;
}

static gboolean
_xdp_impl_clipboard_skeleton_handle_set_property (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name G_GNUC_UNUSED,
  const gchar *property_name,
  GVariant *variant,
  GError **error,
  gpointer user_data)
{
  XdpImplClipboardSkeleton *skeleton = XDP_IMPL_CLIPBOARD_SKELETON (user_data);
  GValue value = G_VALUE_INIT;
  GParamSpec *pspec;
  _ExtendedGDBusPropertyInfo *info;
  gboolean ret;
  ret = FALSE;
  info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_clipboard_interface_info.parent_struct, property_name);
  g_assert (info != NULL);
  pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
  if (pspec == NULL)
    {
      g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
    }
  else
    {
      if (info->use_gvariant)
        g_value_set_variant (&value, variant);
      else
        g_dbus_gvariant_to_gvalue (variant, &value);
      g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value);
      g_value_unset (&value);
      ret = TRUE;
    }
  return ret;
}

static const GDBusInterfaceVTable _xdp_impl_clipboard_skeleton_vtable =
{
  _xdp_impl_clipboard_skeleton_handle_method_call,
  _xdp_impl_clipboard_skeleton_handle_get_property,
  _xdp_impl_clipboard_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
xdp_impl_clipboard_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return xdp_impl_clipboard_interface_info ();
}

static GDBusInterfaceVTable *
xdp_impl_clipboard_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_xdp_impl_clipboard_skeleton_vtable;
}

static GVariant *
xdp_impl_clipboard_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  XdpImplClipboardSkeleton *skeleton = XDP_IMPL_CLIPBOARD_SKELETON (_skeleton);

  GVariantBuilder builder;
  guint n;
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_84
  g_variant_builder_init_static (&builder, G_VARIANT_TYPE ("a{sv}"));
#else
  g_variant_builder_init(&builder, G_VARIANT_TYPE ("a{sv}"));
#endif
  if (_xdp_impl_clipboard_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _xdp_impl_clipboard_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _xdp_impl_clipboard_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _xdp_impl_clipboard_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.impl.portal.Clipboard", info->name, NULL, skeleton);
          if (value != NULL)
            {
              g_variant_take_ref (value);
              g_variant_builder_add (&builder, "{sv}", info->name, value);
              g_variant_unref (value);
            }
        }
    }
out:
  return g_variant_builder_end (&builder);
}

static gboolean _xdp_impl_clipboard_emit_changed (gpointer user_data);

static void
xdp_impl_clipboard_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
{
  XdpImplClipboardSkeleton *skeleton = XDP_IMPL_CLIPBOARD_SKELETON (_skeleton);
  gboolean emit_changed = FALSE;

  g_mutex_lock (&skeleton->priv->lock);
  if (skeleton->priv->changed_properties_idle_source != NULL)
    {
      g_source_destroy (skeleton->priv->changed_properties_idle_source);
      skeleton->priv->changed_properties_idle_source = NULL;
      emit_changed = TRUE;
    }
  g_mutex_unlock (&skeleton->priv->lock);

  if (emit_changed)
    _xdp_impl_clipboard_emit_changed (skeleton);
}

static void
_xdp_impl_clipboard_on_signal_selection_owner_changed (
    XdpImplClipboard *object,
    const gchar *arg_session_handle,
    GVariant *arg_options)
{
  XdpImplClipboardSkeleton *skeleton = XDP_IMPL_CLIPBOARD_SKELETON (object);

  GList      *connections, *l;
  GVariant   *signal_variant;
  connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));

  signal_variant = g_variant_ref_sink (g_variant_new ("(o@a{sv})",
                   arg_session_handle,
                   arg_options));
  for (l = connections; l != NULL; l = l->next)
    {
      GDBusConnection *connection = l->data;
      g_dbus_connection_emit_signal (connection,
        NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.impl.portal.Clipboard", "SelectionOwnerChanged",
        signal_variant, NULL);
    }
  g_variant_unref (signal_variant);
  g_list_free_full (connections, g_object_unref);
}

static void
_xdp_impl_clipboard_on_signal_selection_transfer (
    XdpImplClipboard *object,
    const gchar *arg_session_handle,
    const gchar *arg_mime_type,
    guint arg_serial)
{
  XdpImplClipboardSkeleton *skeleton = XDP_IMPL_CLIPBOARD_SKELETON (object);

  GList      *connections, *l;
  GVariant   *signal_variant;
  connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));

  signal_variant = g_variant_ref_sink (g_variant_new ("(osu)",
                   arg_session_handle,
                   arg_mime_type,
                   arg_serial));
  for (l = connections; l != NULL; l = l->next)
    {
      GDBusConnection *connection = l->data;
      g_dbus_connection_emit_signal (connection,
        NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.impl.portal.Clipboard", "SelectionTransfer",
        signal_variant, NULL);
    }
  g_variant_unref (signal_variant);
  g_list_free_full (connections, g_object_unref);
}

static void xdp_impl_clipboard_skeleton_iface_init (XdpImplClipboardIface *iface);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpImplClipboardSkeleton, xdp_impl_clipboard_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (XdpImplClipboardSkeleton)
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_CLIPBOARD, xdp_impl_clipboard_skeleton_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpImplClipboardSkeleton, xdp_impl_clipboard_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_CLIPBOARD, xdp_impl_clipboard_skeleton_iface_init))

#endif
static void
xdp_impl_clipboard_skeleton_finalize (GObject *object)
{
  XdpImplClipboardSkeleton *skeleton = XDP_IMPL_CLIPBOARD_SKELETON (object);
  guint n;
  for (n = 0; n < 1; n++)
    g_value_unset (&skeleton->priv->properties[n]);
  g_free (skeleton->priv->properties);
  g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  /* coverity[missing_lock : SUPPRESS] */
  g_clear_pointer (&skeleton->priv->changed_properties_idle_source, g_source_destroy);
#else
  if (skeleton->priv->changed_properties_idle_source != NULL)
    g_source_destroy (skeleton->priv->changed_properties_idle_source);
skeleton->priv->changed_properties_idle_source = NULL;
#endif
  g_main_context_unref (skeleton->priv->context);
  g_mutex_clear (&skeleton->priv->lock);
  G_OBJECT_CLASS (xdp_impl_clipboard_skeleton_parent_class)->finalize (object);
}

static void
xdp_impl_clipboard_skeleton_get_property (GObject      *object,
  guint         prop_id,
  GValue       *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  XdpImplClipboardSkeleton *skeleton = XDP_IMPL_CLIPBOARD_SKELETON (object);
  g_assert (prop_id != 0 && prop_id - 1 < 1);
  g_mutex_lock (&skeleton->priv->lock);
  g_value_copy (&skeleton->priv->properties[prop_id - 1], value);
  g_mutex_unlock (&skeleton->priv->lock);
}

static gboolean
_xdp_impl_clipboard_emit_changed (gpointer user_data)
{
  XdpImplClipboardSkeleton *skeleton = XDP_IMPL_CLIPBOARD_SKELETON (user_data);
  GList *l;
  GVariantBuilder builder;
  GVariantBuilder invalidated_builder;
  guint num_changes;

  g_mutex_lock (&skeleton->priv->lock);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_84
  g_variant_builder_init_static (&builder, G_VARIANT_TYPE ("a{sv}"));
  g_variant_builder_init_static (&invalidated_builder, G_VARIANT_TYPE ("as"));
#else
  g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
  g_variant_builder_init (&invalidated_builder, G_VARIANT_TYPE ("as"));
#endif
  for (l = skeleton->priv->changed_properties, num_changes = 0; l != NULL; l = l->next)
    {
      ChangedProperty *cp = l->data;
      GVariant *variant;
      const GValue *cur_value;

      cur_value = &skeleton->priv->properties[cp->prop_id - 1];
      if (!_g_value_equal (cur_value, &cp->orig_value))
        {
          variant = g_dbus_gvalue_to_gvariant (cur_value, G_VARIANT_TYPE (cp->info->parent_struct.signature));
          g_variant_builder_add (&builder, "{sv}", cp->info->parent_struct.name, variant);
          g_variant_unref (variant);
          num_changes++;
        }
    }
  if (num_changes > 0)
    {
      GList *connections, *ll;
      GVariant *signal_variant;
      signal_variant = g_variant_ref_sink (g_variant_new ("(sa{sv}as)", "org.freedesktop.impl.portal.Clipboard",
                                           &builder, &invalidated_builder));
      connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
      for (ll = connections; ll != NULL; ll = ll->next)
        {
          GDBusConnection *connection = ll->data;

          g_dbus_connection_emit_signal (connection,
                                         NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)),
                                         "org.freedesktop.DBus.Properties",
                                         "PropertiesChanged",
                                         signal_variant,
                                         NULL);
        }
      g_variant_unref (signal_variant);
      g_list_free_full (connections, g_object_unref);
    }
  else
    {
      g_variant_builder_clear (&builder);
      g_variant_builder_clear (&invalidated_builder);
    }
  g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
  skeleton->priv->changed_properties = NULL;
  skeleton->priv->changed_properties_idle_source = NULL;
  g_mutex_unlock (&skeleton->priv->lock);
  return FALSE;
}

static void
_xdp_impl_clipboard_schedule_emit_changed (XdpImplClipboardSkeleton *skeleton, const _ExtendedGDBusPropertyInfo *info, guint prop_id, const GValue *orig_value)
{
  ChangedProperty *cp;
  GList *l;
  cp = NULL;
  for (l = skeleton->priv->changed_properties; l != NULL; l = l->next)
    {
      ChangedProperty *i_cp = l->data;
      if (i_cp->info == info)
        {
          cp = i_cp;
          break;
        }
    }
  if (cp == NULL)
    {
      cp = g_new0 (ChangedProperty, 1);
      cp->prop_id = prop_id;
      cp->info = info;
      skeleton->priv->changed_properties = g_list_prepend (skeleton->priv->changed_properties, cp);
      g_value_init (&cp->orig_value, G_VALUE_TYPE (orig_value));
      g_value_copy (orig_value, &cp->orig_value);
    }
}

static void
xdp_impl_clipboard_skeleton_notify (GObject      *object,
  GParamSpec *pspec G_GNUC_UNUSED)
{
  XdpImplClipboardSkeleton *skeleton = XDP_IMPL_CLIPBOARD_SKELETON (object);
  g_mutex_lock (&skeleton->priv->lock);
  if (skeleton->priv->changed_properties != NULL &&
      skeleton->priv->changed_properties_idle_source == NULL)
    {
      skeleton->priv->changed_properties_idle_source = g_idle_source_new ();
      g_source_set_priority (skeleton->priv->changed_properties_idle_source, G_PRIORITY_DEFAULT);
      g_source_set_callback (skeleton->priv->changed_properties_idle_source, _xdp_impl_clipboard_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
      g_source_set_name (skeleton->priv->changed_properties_idle_source, "[generated] _xdp_impl_clipboard_emit_changed");
      g_source_attach (skeleton->priv->changed_properties_idle_source, skeleton->priv->context);
      g_source_unref (skeleton->priv->changed_properties_idle_source);
    }
  g_mutex_unlock (&skeleton->priv->lock);
}

static void
xdp_impl_clipboard_skeleton_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec)
{
  const _ExtendedGDBusPropertyInfo *info;
  XdpImplClipboardSkeleton *skeleton = XDP_IMPL_CLIPBOARD_SKELETON (object);
  g_assert (prop_id != 0 && prop_id - 1 < 1);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_impl_clipboard_property_info_pointers[prop_id - 1];
  g_mutex_lock (&skeleton->priv->lock);
  g_object_freeze_notify (object);
  if (!_g_value_equal (value, &skeleton->priv->properties[prop_id - 1]))
    {
      if (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)) != NULL &&
          info->emits_changed_signal)
        _xdp_impl_clipboard_schedule_emit_changed (skeleton, info, prop_id, &skeleton->priv->properties[prop_id - 1]);
      g_value_copy (value, &skeleton->priv->properties[prop_id - 1]);
      g_object_notify_by_pspec (object, pspec);
    }
  g_mutex_unlock (&skeleton->priv->lock);
  g_object_thaw_notify (object);
}

static void
xdp_impl_clipboard_skeleton_init (XdpImplClipboardSkeleton *skeleton)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  skeleton->priv = xdp_impl_clipboard_skeleton_get_instance_private (skeleton);
#else
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, XDP_IMPL_TYPE_CLIPBOARD_SKELETON, XdpImplClipboardSkeletonPrivate);
#endif

  g_mutex_init (&skeleton->priv->lock);
  skeleton->priv->context = g_main_context_ref_thread_default ();
  skeleton->priv->properties = g_new0 (GValue, 1);
  g_value_init (&skeleton->priv->properties[0], G_TYPE_UINT);
}

static guint 
xdp_impl_clipboard_skeleton_get_version (XdpImplClipboard *object)
{
  XdpImplClipboardSkeleton *skeleton = XDP_IMPL_CLIPBOARD_SKELETON (object);
  guint value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_marshal_value_peek_uint (&(skeleton->priv->properties[0]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static void
xdp_impl_clipboard_skeleton_class_init (XdpImplClipboardSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize = xdp_impl_clipboard_skeleton_finalize;
  gobject_class->get_property = xdp_impl_clipboard_skeleton_get_property;
  gobject_class->set_property = xdp_impl_clipboard_skeleton_set_property;
  gobject_class->notify       = xdp_impl_clipboard_skeleton_notify;


  xdp_impl_clipboard_override_properties (gobject_class, 1);

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = xdp_impl_clipboard_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = xdp_impl_clipboard_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = xdp_impl_clipboard_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = xdp_impl_clipboard_skeleton_dbus_interface_get_vtable;

#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
  g_type_class_add_private (klass, sizeof (XdpImplClipboardSkeletonPrivate));
#endif
}

static void
xdp_impl_clipboard_skeleton_iface_init (XdpImplClipboardIface *iface)
{
  iface->selection_owner_changed = _xdp_impl_clipboard_on_signal_selection_owner_changed;
  iface->selection_transfer = _xdp_impl_clipboard_on_signal_selection_transfer;
  iface->get_version = xdp_impl_clipboard_skeleton_get_version;
}

/**
 * xdp_impl_clipboard_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-Clipboard.top_of_page">org.freedesktop.impl.portal.Clipboard</link>.
 *
 * Returns: (transfer full) (type XdpImplClipboardSkeleton): The skeleton object.
 */
XdpImplClipboard *
xdp_impl_clipboard_skeleton_new (void)
{
  return XDP_IMPL_CLIPBOARD (g_object_new (XDP_IMPL_TYPE_CLIPBOARD_SKELETON, NULL));
}

/* ------------------------------------------------------------------------
 * Code for interface org.freedesktop.impl.portal.DynamicLauncher
 * ------------------------------------------------------------------------
 */

/**
 * SECTION:XdpImplDynamicLauncher
 * @title: XdpImplDynamicLauncher
 * @short_description: Generated C code for the org.freedesktop.impl.portal.DynamicLauncher D-Bus interface
 *
 * This section contains code for working with the <link linkend="gdbus-interface-org-freedesktop-impl-portal-DynamicLauncher.top_of_page">org.freedesktop.impl.portal.DynamicLauncher</link> D-Bus interface in C.
 */

/* ---- Introspection data for org.freedesktop.impl.portal.DynamicLauncher ---- */

static const _ExtendedGDBusArgInfo _xdp_impl_dynamic_launcher_method_info_prepare_install_IN_ARG_handle =
{
  {
    -1,
    (gchar *) "handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_dynamic_launcher_method_info_prepare_install_IN_ARG_app_id =
{
  {
    -1,
    (gchar *) "app_id",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_dynamic_launcher_method_info_prepare_install_IN_ARG_parent_window =
{
  {
    -1,
    (gchar *) "parent_window",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_dynamic_launcher_method_info_prepare_install_IN_ARG_name =
{
  {
    -1,
    (gchar *) "name",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_dynamic_launcher_method_info_prepare_install_IN_ARG_icon_v =
{
  {
    -1,
    (gchar *) "icon_v",
    (gchar *) "v",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_dynamic_launcher_method_info_prepare_install_IN_ARG_options =
{
  {
    -1,
    (gchar *) "options",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_dynamic_launcher_method_info_prepare_install_IN_ARG_pointers[] =
{
  &_xdp_impl_dynamic_launcher_method_info_prepare_install_IN_ARG_handle.parent_struct,
  &_xdp_impl_dynamic_launcher_method_info_prepare_install_IN_ARG_app_id.parent_struct,
  &_xdp_impl_dynamic_launcher_method_info_prepare_install_IN_ARG_parent_window.parent_struct,
  &_xdp_impl_dynamic_launcher_method_info_prepare_install_IN_ARG_name.parent_struct,
  &_xdp_impl_dynamic_launcher_method_info_prepare_install_IN_ARG_icon_v.parent_struct,
  &_xdp_impl_dynamic_launcher_method_info_prepare_install_IN_ARG_options.parent_struct,
  NULL
};

static const _ExtendedGDBusArgInfo _xdp_impl_dynamic_launcher_method_info_prepare_install_OUT_ARG_response =
{
  {
    -1,
    (gchar *) "response",
    (gchar *) "u",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_dynamic_launcher_method_info_prepare_install_OUT_ARG_results =
{
  {
    -1,
    (gchar *) "results",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_dynamic_launcher_method_info_prepare_install_OUT_ARG_pointers[] =
{
  &_xdp_impl_dynamic_launcher_method_info_prepare_install_OUT_ARG_response.parent_struct,
  &_xdp_impl_dynamic_launcher_method_info_prepare_install_OUT_ARG_results.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_dynamic_launcher_method_prepare_install_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.In5",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_dynamic_launcher_method_prepare_install_annotation_info_1 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.Out1",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo * const _xdp_impl_dynamic_launcher_method_prepare_install_annotation_info_pointers[] =
{
  &_xdp_impl_dynamic_launcher_method_prepare_install_annotation_info_0,
  &_xdp_impl_dynamic_launcher_method_prepare_install_annotation_info_1,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_impl_dynamic_launcher_method_info_prepare_install =
{
  {
    -1,
    (gchar *) "PrepareInstall",
    (GDBusArgInfo **) &_xdp_impl_dynamic_launcher_method_info_prepare_install_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_impl_dynamic_launcher_method_info_prepare_install_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_impl_dynamic_launcher_method_prepare_install_annotation_info_pointers
  },
  "handle-prepare-install",
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_dynamic_launcher_method_info_request_install_token_IN_ARG_app_id =
{
  {
    -1,
    (gchar *) "app_id",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_dynamic_launcher_method_info_request_install_token_IN_ARG_options =
{
  {
    -1,
    (gchar *) "options",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_dynamic_launcher_method_info_request_install_token_IN_ARG_pointers[] =
{
  &_xdp_impl_dynamic_launcher_method_info_request_install_token_IN_ARG_app_id.parent_struct,
  &_xdp_impl_dynamic_launcher_method_info_request_install_token_IN_ARG_options.parent_struct,
  NULL
};

static const _ExtendedGDBusArgInfo _xdp_impl_dynamic_launcher_method_info_request_install_token_OUT_ARG_response =
{
  {
    -1,
    (gchar *) "response",
    (gchar *) "u",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_dynamic_launcher_method_info_request_install_token_OUT_ARG_pointers[] =
{
  &_xdp_impl_dynamic_launcher_method_info_request_install_token_OUT_ARG_response.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_dynamic_launcher_method_request_install_token_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.In1",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo * const _xdp_impl_dynamic_launcher_method_request_install_token_annotation_info_pointers[] =
{
  &_xdp_impl_dynamic_launcher_method_request_install_token_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_impl_dynamic_launcher_method_info_request_install_token =
{
  {
    -1,
    (gchar *) "RequestInstallToken",
    (GDBusArgInfo **) &_xdp_impl_dynamic_launcher_method_info_request_install_token_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_impl_dynamic_launcher_method_info_request_install_token_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_impl_dynamic_launcher_method_request_install_token_annotation_info_pointers
  },
  "handle-request-install-token",
  FALSE
};

static const GDBusMethodInfo * const _xdp_impl_dynamic_launcher_method_info_pointers[] =
{
  &_xdp_impl_dynamic_launcher_method_info_prepare_install.parent_struct,
  &_xdp_impl_dynamic_launcher_method_info_request_install_token.parent_struct,
  NULL
};

static const _ExtendedGDBusPropertyInfo _xdp_impl_dynamic_launcher_property_info_supported_launcher_types =
{
  {
    -1,
    (gchar *) "SupportedLauncherTypes",
    (gchar *) "u",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "supported-launcher-types",
  FALSE,
  TRUE
};

static const _ExtendedGDBusPropertyInfo _xdp_impl_dynamic_launcher_property_info_version =
{
  {
    -1,
    (gchar *) "version",
    (gchar *) "u",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "version",
  FALSE,
  TRUE
};

static const GDBusPropertyInfo * const _xdp_impl_dynamic_launcher_property_info_pointers[] =
{
  &_xdp_impl_dynamic_launcher_property_info_supported_launcher_types.parent_struct,
  &_xdp_impl_dynamic_launcher_property_info_version.parent_struct,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _xdp_impl_dynamic_launcher_interface_info =
{
  {
    -1,
    (gchar *) "org.freedesktop.impl.portal.DynamicLauncher",
    (GDBusMethodInfo **) &_xdp_impl_dynamic_launcher_method_info_pointers,
    NULL,
    (GDBusPropertyInfo **) &_xdp_impl_dynamic_launcher_property_info_pointers,
    NULL
  },
  "dynamic-launcher",
};


/**
 * xdp_impl_dynamic_launcher_interface_info:
 *
 * Gets a machine-readable description of the <link linkend="gdbus-interface-org-freedesktop-impl-portal-DynamicLauncher.top_of_page">org.freedesktop.impl.portal.DynamicLauncher</link> D-Bus interface.
 *
 * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
 */
GDBusInterfaceInfo *
xdp_impl_dynamic_launcher_interface_info (void)
{
  return (GDBusInterfaceInfo *) &_xdp_impl_dynamic_launcher_interface_info.parent_struct;
}

/**
 * xdp_impl_dynamic_launcher_override_properties:
 * @klass: The class structure for a #GObject derived class.
 * @property_id_begin: The property id to assign to the first overridden property.
 *
 * Overrides all #GObject properties in the #XdpImplDynamicLauncher interface for a concrete class.
 * The properties are overridden in the order they are defined.
 *
 * Returns: The last property id.
 */
guint
xdp_impl_dynamic_launcher_override_properties (GObjectClass *klass, guint property_id_begin)
{
  g_object_class_override_property (klass, property_id_begin++, "supported-launcher-types");
  g_object_class_override_property (klass, property_id_begin++, "version");
  return property_id_begin - 1;
}


inline static void
xdp_impl_dynamic_launcher_method_marshal_prepare_install (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  _g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_STRING_STRING_STRING_VARIANT_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_impl_dynamic_launcher_method_marshal_request_install_token (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  _g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}


/**
 * XdpImplDynamicLauncher:
 *
 * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-DynamicLauncher.top_of_page">org.freedesktop.impl.portal.DynamicLauncher</link>.
 */

/**
 * XdpImplDynamicLauncherIface:
 * @parent_iface: The parent interface.
 * @handle_prepare_install: Handler for the #XdpImplDynamicLauncher::handle-prepare-install signal.
 * @handle_request_install_token: Handler for the #XdpImplDynamicLauncher::handle-request-install-token signal.
 * @get_supported_launcher_types: Getter for the #XdpImplDynamicLauncher:supported-launcher-types property.
 * @get_version: Getter for the #XdpImplDynamicLauncher:version property.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-DynamicLauncher.top_of_page">org.freedesktop.impl.portal.DynamicLauncher</link>.
 */

typedef XdpImplDynamicLauncherIface XdpImplDynamicLauncherInterface;
G_DEFINE_INTERFACE (XdpImplDynamicLauncher, xdp_impl_dynamic_launcher, G_TYPE_OBJECT)

static void
xdp_impl_dynamic_launcher_default_init (XdpImplDynamicLauncherIface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * XdpImplDynamicLauncher::handle-prepare-install:
   * @object: A #XdpImplDynamicLauncher.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_handle: Argument passed by remote caller.
   * @arg_app_id: Argument passed by remote caller.
   * @arg_parent_window: Argument passed by remote caller.
   * @arg_name: Argument passed by remote caller.
   * @arg_icon_v: Argument passed by remote caller.
   * @arg_options: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-impl-portal-DynamicLauncher.PrepareInstall">PrepareInstall()</link> 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 xdp_impl_dynamic_launcher_complete_prepare_install() 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.
   *
   * 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.
   */
  g_signal_new ("handle-prepare-install",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpImplDynamicLauncherIface, handle_prepare_install),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_impl_dynamic_launcher_method_marshal_prepare_install,
    G_TYPE_BOOLEAN,
    7,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_VARIANT, G_TYPE_VARIANT);

  /**
   * XdpImplDynamicLauncher::handle-request-install-token:
   * @object: A #XdpImplDynamicLauncher.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_app_id: Argument passed by remote caller.
   * @arg_options: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-impl-portal-DynamicLauncher.RequestInstallToken">RequestInstallToken()</link> 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 xdp_impl_dynamic_launcher_complete_request_install_token() 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.
   *
   * 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.
   */
  g_signal_new ("handle-request-install-token",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpImplDynamicLauncherIface, handle_request_install_token),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_impl_dynamic_launcher_method_marshal_request_install_token,
    G_TYPE_BOOLEAN,
    3,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_VARIANT);

  /* GObject properties for D-Bus properties: */
  /**
   * XdpImplDynamicLauncher:supported-launcher-types:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-impl-portal-DynamicLauncher.SupportedLauncherTypes">"SupportedLauncherTypes"</link>.
   *
   * 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.
   */
  g_object_interface_install_property (iface,
    g_param_spec_uint ("supported-launcher-types", "SupportedLauncherTypes", "SupportedLauncherTypes", 0, G_MAXUINT32, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * XdpImplDynamicLauncher:version:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-impl-portal-DynamicLauncher.version">"version"</link>.
   *
   * 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.
   */
  g_object_interface_install_property (iface,
    g_param_spec_uint ("version", "version", "version", 0, G_MAXUINT32, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
}

/**
 * xdp_impl_dynamic_launcher_get_supported_launcher_types: (skip)
 * @object: A #XdpImplDynamicLauncher.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-impl-portal-DynamicLauncher.SupportedLauncherTypes">"SupportedLauncherTypes"</link> D-Bus property.
 *
 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
 *
 * Returns: The property value.
 */
guint 
xdp_impl_dynamic_launcher_get_supported_launcher_types (XdpImplDynamicLauncher *object)
{
  g_return_val_if_fail (XDP_IMPL_IS_DYNAMIC_LAUNCHER (object), 0);

  return XDP_IMPL_DYNAMIC_LAUNCHER_GET_IFACE (object)->get_supported_launcher_types (object);
}

/**
 * xdp_impl_dynamic_launcher_set_supported_launcher_types: (skip)
 * @object: A #XdpImplDynamicLauncher.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-freedesktop-impl-portal-DynamicLauncher.SupportedLauncherTypes">"SupportedLauncherTypes"</link> 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.
 */
void
xdp_impl_dynamic_launcher_set_supported_launcher_types (XdpImplDynamicLauncher *object, guint value)
{
  g_object_set (G_OBJECT (object), "supported-launcher-types", value, NULL);
}

/**
 * xdp_impl_dynamic_launcher_get_version: (skip)
 * @object: A #XdpImplDynamicLauncher.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-impl-portal-DynamicLauncher.version">"version"</link> D-Bus property.
 *
 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
 *
 * Returns: The property value.
 */
guint 
xdp_impl_dynamic_launcher_get_version (XdpImplDynamicLauncher *object)
{
  g_return_val_if_fail (XDP_IMPL_IS_DYNAMIC_LAUNCHER (object), 0);

  return XDP_IMPL_DYNAMIC_LAUNCHER_GET_IFACE (object)->get_version (object);
}

/**
 * xdp_impl_dynamic_launcher_set_version: (skip)
 * @object: A #XdpImplDynamicLauncher.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-freedesktop-impl-portal-DynamicLauncher.version">"version"</link> 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.
 */
void
xdp_impl_dynamic_launcher_set_version (XdpImplDynamicLauncher *object, guint value)
{
  g_object_set (G_OBJECT (object), "version", value, NULL);
}

/**
 * xdp_impl_dynamic_launcher_call_prepare_install:
 * @proxy: A #XdpImplDynamicLauncherProxy.
 * @arg_handle: Argument to pass with the method invocation.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_parent_window: Argument to pass with the method invocation.
 * @arg_name: Argument to pass with the method invocation.
 * @arg_icon_v: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-DynamicLauncher.PrepareInstall">PrepareInstall()</link> 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 xdp_impl_dynamic_launcher_call_prepare_install_finish() to get the result of the operation.
 *
 * See xdp_impl_dynamic_launcher_call_prepare_install_sync() for the synchronous, blocking version of this method.
 */
void
xdp_impl_dynamic_launcher_call_prepare_install (
    XdpImplDynamicLauncher *proxy,
    const gchar *arg_handle,
    const gchar *arg_app_id,
    const gchar *arg_parent_window,
    const gchar *arg_name,
    GVariant *arg_icon_v,
    GVariant *arg_options,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "PrepareInstall",
    g_variant_new ("(osss@v@a{sv})",
                   arg_handle,
                   arg_app_id,
                   arg_parent_window,
                   arg_name,
                   arg_icon_v,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_impl_dynamic_launcher_call_prepare_install_finish:
 * @proxy: A #XdpImplDynamicLauncherProxy.
 * @out_response: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_results: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_dynamic_launcher_call_prepare_install().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_impl_dynamic_launcher_call_prepare_install().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_dynamic_launcher_call_prepare_install_finish (
    XdpImplDynamicLauncher *proxy,
    guint* out_response,
    GVariant ** out_results,
    GAsyncResult *res,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(u@a{sv})",
                 out_response,
                 out_results);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_dynamic_launcher_call_prepare_install_sync:
 * @proxy: A #XdpImplDynamicLauncherProxy.
 * @arg_handle: Argument to pass with the method invocation.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_parent_window: Argument to pass with the method invocation.
 * @arg_name: Argument to pass with the method invocation.
 * @arg_icon_v: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @out_response: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_results: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-DynamicLauncher.PrepareInstall">PrepareInstall()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_dynamic_launcher_call_prepare_install() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_dynamic_launcher_call_prepare_install_sync (
    XdpImplDynamicLauncher *proxy,
    const gchar *arg_handle,
    const gchar *arg_app_id,
    const gchar *arg_parent_window,
    const gchar *arg_name,
    GVariant *arg_icon_v,
    GVariant *arg_options,
    guint* out_response,
    GVariant ** out_results,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "PrepareInstall",
    g_variant_new ("(osss@v@a{sv})",
                   arg_handle,
                   arg_app_id,
                   arg_parent_window,
                   arg_name,
                   arg_icon_v,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(u@a{sv})",
                 out_response,
                 out_results);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_dynamic_launcher_call_request_install_token:
 * @proxy: A #XdpImplDynamicLauncherProxy.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-DynamicLauncher.RequestInstallToken">RequestInstallToken()</link> 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 xdp_impl_dynamic_launcher_call_request_install_token_finish() to get the result of the operation.
 *
 * See xdp_impl_dynamic_launcher_call_request_install_token_sync() for the synchronous, blocking version of this method.
 */
void
xdp_impl_dynamic_launcher_call_request_install_token (
    XdpImplDynamicLauncher *proxy,
    const gchar *arg_app_id,
    GVariant *arg_options,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "RequestInstallToken",
    g_variant_new ("(s@a{sv})",
                   arg_app_id,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_impl_dynamic_launcher_call_request_install_token_finish:
 * @proxy: A #XdpImplDynamicLauncherProxy.
 * @out_response: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_dynamic_launcher_call_request_install_token().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_impl_dynamic_launcher_call_request_install_token().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_dynamic_launcher_call_request_install_token_finish (
    XdpImplDynamicLauncher *proxy,
    guint* out_response,
    GAsyncResult *res,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(u)",
                 out_response);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_dynamic_launcher_call_request_install_token_sync:
 * @proxy: A #XdpImplDynamicLauncherProxy.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @out_response: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-DynamicLauncher.RequestInstallToken">RequestInstallToken()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_dynamic_launcher_call_request_install_token() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_dynamic_launcher_call_request_install_token_sync (
    XdpImplDynamicLauncher *proxy,
    const gchar *arg_app_id,
    GVariant *arg_options,
    guint* out_response,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "RequestInstallToken",
    g_variant_new ("(s@a{sv})",
                   arg_app_id,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(u)",
                 out_response);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_dynamic_launcher_complete_prepare_install:
 * @object: A #XdpImplDynamicLauncher.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @response: Parameter to return.
 * @results: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-impl-portal-DynamicLauncher.PrepareInstall">PrepareInstall()</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
xdp_impl_dynamic_launcher_complete_prepare_install (
    XdpImplDynamicLauncher *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    guint response,
    GVariant *results)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(u@a{sv})",
                   response,
                   results));
}

/**
 * xdp_impl_dynamic_launcher_complete_request_install_token:
 * @object: A #XdpImplDynamicLauncher.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @response: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-impl-portal-DynamicLauncher.RequestInstallToken">RequestInstallToken()</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
xdp_impl_dynamic_launcher_complete_request_install_token (
    XdpImplDynamicLauncher *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    guint response)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(u)",
                   response));
}

/* ------------------------------------------------------------------------ */

/**
 * XdpImplDynamicLauncherProxy:
 *
 * The #XdpImplDynamicLauncherProxy structure contains only private data and should only be accessed using the provided API.
 */

/**
 * XdpImplDynamicLauncherProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpImplDynamicLauncherProxy.
 */

struct _XdpImplDynamicLauncherProxyPrivate
{
  GData *qdata;
};

static void xdp_impl_dynamic_launcher_proxy_iface_init (XdpImplDynamicLauncherIface *iface);

#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpImplDynamicLauncherProxy, xdp_impl_dynamic_launcher_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (XdpImplDynamicLauncherProxy)
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_DYNAMIC_LAUNCHER, xdp_impl_dynamic_launcher_proxy_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpImplDynamicLauncherProxy, xdp_impl_dynamic_launcher_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_DYNAMIC_LAUNCHER, xdp_impl_dynamic_launcher_proxy_iface_init))

#endif
static void
xdp_impl_dynamic_launcher_proxy_finalize (GObject *object)
{
  XdpImplDynamicLauncherProxy *proxy = XDP_IMPL_DYNAMIC_LAUNCHER_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (xdp_impl_dynamic_launcher_proxy_parent_class)->finalize (object);
}

static void
xdp_impl_dynamic_launcher_proxy_get_property (GObject      *object,
  guint         prop_id,
  GValue       *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  const _ExtendedGDBusPropertyInfo *info;
  GVariant *variant;
  g_assert (prop_id != 0 && prop_id - 1 < 2);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_impl_dynamic_launcher_property_info_pointers[prop_id - 1];
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), info->parent_struct.name);
  if (info->use_gvariant)
    {
      g_value_set_variant (value, variant);
    }
  else
    {
      if (variant != NULL)
        g_dbus_gvariant_to_gvalue (variant, value);
    }
  if (variant != NULL)
    g_variant_unref (variant);
}

static void
xdp_impl_dynamic_launcher_proxy_set_property_cb (GDBusProxy *proxy,
  GAsyncResult *res,
  gpointer      user_data)
{
  const _ExtendedGDBusPropertyInfo *info = user_data;
  GError *error;
  GVariant *_ret;
  error = NULL;
  _ret = g_dbus_proxy_call_finish (proxy, res, &error);
  if (!_ret)
    {
      g_warning ("Error setting property '%s' on interface org.freedesktop.impl.portal.DynamicLauncher: %s (%s, %d)",
                 info->parent_struct.name, 
                 error->message, g_quark_to_string (error->domain), error->code);
      g_error_free (error);
    }
  else
    {
      g_variant_unref (_ret);
    }
}

static void
xdp_impl_dynamic_launcher_proxy_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  const _ExtendedGDBusPropertyInfo *info;
  GVariant *variant;
  g_assert (prop_id != 0 && prop_id - 1 < 2);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_impl_dynamic_launcher_property_info_pointers[prop_id - 1];
  variant = g_dbus_gvalue_to_gvariant (value, G_VARIANT_TYPE (info->parent_struct.signature));
  g_dbus_proxy_call (G_DBUS_PROXY (object),
    "org.freedesktop.DBus.Properties.Set",
    g_variant_new ("(ssv)", "org.freedesktop.impl.portal.DynamicLauncher", info->parent_struct.name, variant),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    NULL, (GAsyncReadyCallback) xdp_impl_dynamic_launcher_proxy_set_property_cb, (GDBusPropertyInfo *) &info->parent_struct);
  g_variant_unref (variant);
}

static void
xdp_impl_dynamic_launcher_proxy_g_signal (GDBusProxy *proxy,
  const gchar *sender_name G_GNUC_UNUSED,
  const gchar *signal_name,
  GVariant *parameters)
{
  _ExtendedGDBusSignalInfo *info;
  GVariantIter iter;
  GVariant *child;
  GValue *paramv;
  gsize num_params;
  gsize n;
  guint signal_id;
  info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_xdp_impl_dynamic_launcher_interface_info.parent_struct, signal_name);
  if (info == NULL)
    return;
  num_params = g_variant_n_children (parameters);
  paramv = g_new0 (GValue, num_params + 1);
  g_value_init (&paramv[0], XDP_IMPL_TYPE_DYNAMIC_LAUNCHER);
  g_value_set_object (&paramv[0], proxy);
  g_variant_iter_init (&iter, parameters);
  n = 1;
  while ((child = g_variant_iter_next_value (&iter)) != NULL)
    {
      _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1];
      if (arg_info->use_gvariant)
        {
          g_value_init (&paramv[n], G_TYPE_VARIANT);
          g_value_set_variant (&paramv[n], child);
          n++;
        }
      else
        g_dbus_gvariant_to_gvalue (child, &paramv[n++]);
      g_variant_unref (child);
    }
  signal_id = g_signal_lookup (info->signal_name, XDP_IMPL_TYPE_DYNAMIC_LAUNCHER);
  g_signal_emitv (paramv, signal_id, 0, NULL);
  for (n = 0; n < num_params + 1; n++)
    g_value_unset (&paramv[n]);
  g_free (paramv);
}

static void
xdp_impl_dynamic_launcher_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  XdpImplDynamicLauncherProxy *proxy = XDP_IMPL_DYNAMIC_LAUNCHER_PROXY (_proxy);
  guint n;
  const gchar *key;
  GVariantIter *iter;
  _ExtendedGDBusPropertyInfo *info;
  g_variant_get (changed_properties, "a{sv}", &iter);
  while (g_variant_iter_next (iter, "{&sv}", &key, NULL))
    {
      info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_dynamic_launcher_interface_info.parent_struct, key);
      g_datalist_remove_data (&proxy->priv->qdata, key);
      if (info != NULL)
        g_object_notify (G_OBJECT (proxy), info->hyphen_name);
    }
  g_variant_iter_free (iter);
  for (n = 0; invalidated_properties[n] != NULL; n++)
    {
      info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_dynamic_launcher_interface_info.parent_struct, invalidated_properties[n]);
      g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]);
      if (info != NULL)
        g_object_notify (G_OBJECT (proxy), info->hyphen_name);
    }
}

static guint 
xdp_impl_dynamic_launcher_proxy_get_supported_launcher_types (XdpImplDynamicLauncher *object)
{
  XdpImplDynamicLauncherProxy *proxy = XDP_IMPL_DYNAMIC_LAUNCHER_PROXY (object);
  GVariant *variant;
  guint value = 0;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "SupportedLauncherTypes");
  if (variant != NULL)
    {
      value = g_variant_get_uint32 (variant);
      g_variant_unref (variant);
    }
  return value;
}

static guint 
xdp_impl_dynamic_launcher_proxy_get_version (XdpImplDynamicLauncher *object)
{
  XdpImplDynamicLauncherProxy *proxy = XDP_IMPL_DYNAMIC_LAUNCHER_PROXY (object);
  GVariant *variant;
  guint value = 0;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "version");
  if (variant != NULL)
    {
      value = g_variant_get_uint32 (variant);
      g_variant_unref (variant);
    }
  return value;
}

static void
xdp_impl_dynamic_launcher_proxy_init (XdpImplDynamicLauncherProxy *proxy)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  proxy->priv = xdp_impl_dynamic_launcher_proxy_get_instance_private (proxy);
#else
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, XDP_IMPL_TYPE_DYNAMIC_LAUNCHER_PROXY, XdpImplDynamicLauncherProxyPrivate);
#endif

  g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), xdp_impl_dynamic_launcher_interface_info ());
}

static void
xdp_impl_dynamic_launcher_proxy_class_init (XdpImplDynamicLauncherProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = xdp_impl_dynamic_launcher_proxy_finalize;
  gobject_class->get_property = xdp_impl_dynamic_launcher_proxy_get_property;
  gobject_class->set_property = xdp_impl_dynamic_launcher_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = xdp_impl_dynamic_launcher_proxy_g_signal;
  proxy_class->g_properties_changed = xdp_impl_dynamic_launcher_proxy_g_properties_changed;

  xdp_impl_dynamic_launcher_override_properties (gobject_class, 1);

#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
  g_type_class_add_private (klass, sizeof (XdpImplDynamicLauncherProxyPrivate));
#endif
}

static void
xdp_impl_dynamic_launcher_proxy_iface_init (XdpImplDynamicLauncherIface *iface)
{
  iface->get_supported_launcher_types = xdp_impl_dynamic_launcher_proxy_get_supported_launcher_types;
  iface->get_version = xdp_impl_dynamic_launcher_proxy_get_version;
}

/**
 * xdp_impl_dynamic_launcher_proxy_new:
 * @connection: A #GDBusConnection.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-DynamicLauncher.top_of_page">org.freedesktop.impl.portal.DynamicLauncher</link>. 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 xdp_impl_dynamic_launcher_proxy_new_finish() to get the result of the operation.
 *
 * See xdp_impl_dynamic_launcher_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_impl_dynamic_launcher_proxy_new (
    GDBusConnection     *connection,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GAsyncReadyCallback  callback,
    gpointer             user_data)
{
  g_async_initable_new_async (XDP_IMPL_TYPE_DYNAMIC_LAUNCHER_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.DynamicLauncher", NULL);
}

/**
 * xdp_impl_dynamic_launcher_proxy_new_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_dynamic_launcher_proxy_new().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_impl_dynamic_launcher_proxy_new().
 *
 * Returns: (transfer full) (type XdpImplDynamicLauncherProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplDynamicLauncher *
xdp_impl_dynamic_launcher_proxy_new_finish (
    GAsyncResult        *res,
    GError             **error)
{
  GObject *ret;
  GObject *source_object;
  source_object = g_async_result_get_source_object (res);
  ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
  g_object_unref (source_object);
  if (ret != NULL)
    return XDP_IMPL_DYNAMIC_LAUNCHER (ret);
  else
    return NULL;
}

/**
 * xdp_impl_dynamic_launcher_proxy_new_sync:
 * @connection: A #GDBusConnection.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL
 *
 * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-DynamicLauncher.top_of_page">org.freedesktop.impl.portal.DynamicLauncher</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_dynamic_launcher_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpImplDynamicLauncherProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplDynamicLauncher *
xdp_impl_dynamic_launcher_proxy_new_sync (
    GDBusConnection     *connection,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GError             **error)
{
  GInitable *ret;
  ret = g_initable_new (XDP_IMPL_TYPE_DYNAMIC_LAUNCHER_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.DynamicLauncher", NULL);
  if (ret != NULL)
    return XDP_IMPL_DYNAMIC_LAUNCHER (ret);
  else
    return NULL;
}


/**
 * xdp_impl_dynamic_launcher_proxy_new_for_bus:
 * @bus_type: A #GBusType.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: A bus name (well-known or unique).
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
 * @user_data: User data to pass to @callback.
 *
 * Like xdp_impl_dynamic_launcher_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 xdp_impl_dynamic_launcher_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See xdp_impl_dynamic_launcher_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_impl_dynamic_launcher_proxy_new_for_bus (
    GBusType             bus_type,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GAsyncReadyCallback  callback,
    gpointer             user_data)
{
  g_async_initable_new_async (XDP_IMPL_TYPE_DYNAMIC_LAUNCHER_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.DynamicLauncher", NULL);
}

/**
 * xdp_impl_dynamic_launcher_proxy_new_for_bus_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_dynamic_launcher_proxy_new_for_bus().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_impl_dynamic_launcher_proxy_new_for_bus().
 *
 * Returns: (transfer full) (type XdpImplDynamicLauncherProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplDynamicLauncher *
xdp_impl_dynamic_launcher_proxy_new_for_bus_finish (
    GAsyncResult        *res,
    GError             **error)
{
  GObject *ret;
  GObject *source_object;
  source_object = g_async_result_get_source_object (res);
  ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
  g_object_unref (source_object);
  if (ret != NULL)
    return XDP_IMPL_DYNAMIC_LAUNCHER (ret);
  else
    return NULL;
}

/**
 * xdp_impl_dynamic_launcher_proxy_new_for_bus_sync:
 * @bus_type: A #GBusType.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: A bus name (well-known or unique).
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL
 *
 * Like xdp_impl_dynamic_launcher_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_dynamic_launcher_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpImplDynamicLauncherProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplDynamicLauncher *
xdp_impl_dynamic_launcher_proxy_new_for_bus_sync (
    GBusType             bus_type,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GError             **error)
{
  GInitable *ret;
  ret = g_initable_new (XDP_IMPL_TYPE_DYNAMIC_LAUNCHER_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.DynamicLauncher", NULL);
  if (ret != NULL)
    return XDP_IMPL_DYNAMIC_LAUNCHER (ret);
  else
    return NULL;
}


/* ------------------------------------------------------------------------ */

/**
 * XdpImplDynamicLauncherSkeleton:
 *
 * The #XdpImplDynamicLauncherSkeleton structure contains only private data and should only be accessed using the provided API.
 */

/**
 * XdpImplDynamicLauncherSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpImplDynamicLauncherSkeleton.
 */

struct _XdpImplDynamicLauncherSkeletonPrivate
{
  GValue *properties;
  GList *changed_properties;
  GSource *changed_properties_idle_source;
  GMainContext *context;
  GMutex lock;
};

static void
_xdp_impl_dynamic_launcher_skeleton_handle_method_call (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name,
  const gchar *method_name,
  GVariant *parameters,
  GDBusMethodInvocation *invocation,
  gpointer user_data)
{
  XdpImplDynamicLauncherSkeleton *skeleton = XDP_IMPL_DYNAMIC_LAUNCHER_SKELETON (user_data);
  _ExtendedGDBusMethodInfo *info;
  GVariantIter iter;
  GVariant *child;
  GValue *paramv;
  gsize num_params;
  guint num_extra;
  gsize n;
  guint signal_id;
  GValue return_value = G_VALUE_INIT;
  info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
  g_assert (info != NULL);
  num_params = g_variant_n_children (parameters);
  num_extra = info->pass_fdlist ? 3 : 2;  paramv = g_new0 (GValue, num_params + num_extra);
  n = 0;
  g_value_init (&paramv[n], XDP_IMPL_TYPE_DYNAMIC_LAUNCHER);
  g_value_set_object (&paramv[n++], skeleton);
  g_value_init (&paramv[n], G_TYPE_DBUS_METHOD_INVOCATION);
  g_value_set_object (&paramv[n++], invocation);
  if (info->pass_fdlist)
    {
#ifdef G_OS_UNIX
      g_value_init (&paramv[n], G_TYPE_UNIX_FD_LIST);
      g_value_set_object (&paramv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation)));
#else
      g_assert_not_reached ();
#endif
    }
  g_variant_iter_init (&iter, parameters);
  while ((child = g_variant_iter_next_value (&iter)) != NULL)
    {
      _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra];
      if (arg_info->use_gvariant)
        {
          g_value_init (&paramv[n], G_TYPE_VARIANT);
          g_value_set_variant (&paramv[n], child);
          n++;
        }
      else
        g_dbus_gvariant_to_gvalue (child, &paramv[n++]);
      g_variant_unref (child);
    }
  signal_id = g_signal_lookup (info->signal_name, XDP_IMPL_TYPE_DYNAMIC_LAUNCHER);
  g_value_init (&return_value, G_TYPE_BOOLEAN);
  g_signal_emitv (paramv, signal_id, 0, &return_value);
  if (!g_value_get_boolean (&return_value))
    g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD, "Method %s is not implemented on interface %s", method_name, interface_name);
  g_value_unset (&return_value);
  for (n = 0; n < num_params + num_extra; n++)
    g_value_unset (&paramv[n]);
  g_free (paramv);
}

static GVariant *
_xdp_impl_dynamic_launcher_skeleton_handle_get_property (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name G_GNUC_UNUSED,
  const gchar *property_name,
  GError **error,
  gpointer user_data)
{
  XdpImplDynamicLauncherSkeleton *skeleton = XDP_IMPL_DYNAMIC_LAUNCHER_SKELETON (user_data);
  GValue value = G_VALUE_INIT;
  GParamSpec *pspec;
  _ExtendedGDBusPropertyInfo *info;
  GVariant *ret;
  ret = NULL;
  info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_dynamic_launcher_interface_info.parent_struct, property_name);
  g_assert (info != NULL);
  pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
  if (pspec == NULL)
    {
      g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
    }
  else
    {
      g_value_init (&value, pspec->value_type);
      g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value);
      ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature));
      g_value_unset (&value);
    }
  return ret;
}

static gboolean
_xdp_impl_dynamic_launcher_skeleton_handle_set_property (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name G_GNUC_UNUSED,
  const gchar *property_name,
  GVariant *variant,
  GError **error,
  gpointer user_data)
{
  XdpImplDynamicLauncherSkeleton *skeleton = XDP_IMPL_DYNAMIC_LAUNCHER_SKELETON (user_data);
  GValue value = G_VALUE_INIT;
  GParamSpec *pspec;
  _ExtendedGDBusPropertyInfo *info;
  gboolean ret;
  ret = FALSE;
  info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_dynamic_launcher_interface_info.parent_struct, property_name);
  g_assert (info != NULL);
  pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
  if (pspec == NULL)
    {
      g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
    }
  else
    {
      if (info->use_gvariant)
        g_value_set_variant (&value, variant);
      else
        g_dbus_gvariant_to_gvalue (variant, &value);
      g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value);
      g_value_unset (&value);
      ret = TRUE;
    }
  return ret;
}

static const GDBusInterfaceVTable _xdp_impl_dynamic_launcher_skeleton_vtable =
{
  _xdp_impl_dynamic_launcher_skeleton_handle_method_call,
  _xdp_impl_dynamic_launcher_skeleton_handle_get_property,
  _xdp_impl_dynamic_launcher_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
xdp_impl_dynamic_launcher_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return xdp_impl_dynamic_launcher_interface_info ();
}

static GDBusInterfaceVTable *
xdp_impl_dynamic_launcher_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_xdp_impl_dynamic_launcher_skeleton_vtable;
}

static GVariant *
xdp_impl_dynamic_launcher_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  XdpImplDynamicLauncherSkeleton *skeleton = XDP_IMPL_DYNAMIC_LAUNCHER_SKELETON (_skeleton);

  GVariantBuilder builder;
  guint n;
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_84
  g_variant_builder_init_static (&builder, G_VARIANT_TYPE ("a{sv}"));
#else
  g_variant_builder_init(&builder, G_VARIANT_TYPE ("a{sv}"));
#endif
  if (_xdp_impl_dynamic_launcher_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _xdp_impl_dynamic_launcher_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _xdp_impl_dynamic_launcher_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _xdp_impl_dynamic_launcher_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.impl.portal.DynamicLauncher", info->name, NULL, skeleton);
          if (value != NULL)
            {
              g_variant_take_ref (value);
              g_variant_builder_add (&builder, "{sv}", info->name, value);
              g_variant_unref (value);
            }
        }
    }
out:
  return g_variant_builder_end (&builder);
}

static gboolean _xdp_impl_dynamic_launcher_emit_changed (gpointer user_data);

static void
xdp_impl_dynamic_launcher_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
{
  XdpImplDynamicLauncherSkeleton *skeleton = XDP_IMPL_DYNAMIC_LAUNCHER_SKELETON (_skeleton);
  gboolean emit_changed = FALSE;

  g_mutex_lock (&skeleton->priv->lock);
  if (skeleton->priv->changed_properties_idle_source != NULL)
    {
      g_source_destroy (skeleton->priv->changed_properties_idle_source);
      skeleton->priv->changed_properties_idle_source = NULL;
      emit_changed = TRUE;
    }
  g_mutex_unlock (&skeleton->priv->lock);

  if (emit_changed)
    _xdp_impl_dynamic_launcher_emit_changed (skeleton);
}

static void xdp_impl_dynamic_launcher_skeleton_iface_init (XdpImplDynamicLauncherIface *iface);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpImplDynamicLauncherSkeleton, xdp_impl_dynamic_launcher_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (XdpImplDynamicLauncherSkeleton)
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_DYNAMIC_LAUNCHER, xdp_impl_dynamic_launcher_skeleton_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpImplDynamicLauncherSkeleton, xdp_impl_dynamic_launcher_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_DYNAMIC_LAUNCHER, xdp_impl_dynamic_launcher_skeleton_iface_init))

#endif
static void
xdp_impl_dynamic_launcher_skeleton_finalize (GObject *object)
{
  XdpImplDynamicLauncherSkeleton *skeleton = XDP_IMPL_DYNAMIC_LAUNCHER_SKELETON (object);
  guint n;
  for (n = 0; n < 2; n++)
    g_value_unset (&skeleton->priv->properties[n]);
  g_free (skeleton->priv->properties);
  g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  /* coverity[missing_lock : SUPPRESS] */
  g_clear_pointer (&skeleton->priv->changed_properties_idle_source, g_source_destroy);
#else
  if (skeleton->priv->changed_properties_idle_source != NULL)
    g_source_destroy (skeleton->priv->changed_properties_idle_source);
skeleton->priv->changed_properties_idle_source = NULL;
#endif
  g_main_context_unref (skeleton->priv->context);
  g_mutex_clear (&skeleton->priv->lock);
  G_OBJECT_CLASS (xdp_impl_dynamic_launcher_skeleton_parent_class)->finalize (object);
}

static void
xdp_impl_dynamic_launcher_skeleton_get_property (GObject      *object,
  guint         prop_id,
  GValue       *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  XdpImplDynamicLauncherSkeleton *skeleton = XDP_IMPL_DYNAMIC_LAUNCHER_SKELETON (object);
  g_assert (prop_id != 0 && prop_id - 1 < 2);
  g_mutex_lock (&skeleton->priv->lock);
  g_value_copy (&skeleton->priv->properties[prop_id - 1], value);
  g_mutex_unlock (&skeleton->priv->lock);
}

static gboolean
_xdp_impl_dynamic_launcher_emit_changed (gpointer user_data)
{
  XdpImplDynamicLauncherSkeleton *skeleton = XDP_IMPL_DYNAMIC_LAUNCHER_SKELETON (user_data);
  GList *l;
  GVariantBuilder builder;
  GVariantBuilder invalidated_builder;
  guint num_changes;

  g_mutex_lock (&skeleton->priv->lock);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_84
  g_variant_builder_init_static (&builder, G_VARIANT_TYPE ("a{sv}"));
  g_variant_builder_init_static (&invalidated_builder, G_VARIANT_TYPE ("as"));
#else
  g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
  g_variant_builder_init (&invalidated_builder, G_VARIANT_TYPE ("as"));
#endif
  for (l = skeleton->priv->changed_properties, num_changes = 0; l != NULL; l = l->next)
    {
      ChangedProperty *cp = l->data;
      GVariant *variant;
      const GValue *cur_value;

      cur_value = &skeleton->priv->properties[cp->prop_id - 1];
      if (!_g_value_equal (cur_value, &cp->orig_value))
        {
          variant = g_dbus_gvalue_to_gvariant (cur_value, G_VARIANT_TYPE (cp->info->parent_struct.signature));
          g_variant_builder_add (&builder, "{sv}", cp->info->parent_struct.name, variant);
          g_variant_unref (variant);
          num_changes++;
        }
    }
  if (num_changes > 0)
    {
      GList *connections, *ll;
      GVariant *signal_variant;
      signal_variant = g_variant_ref_sink (g_variant_new ("(sa{sv}as)", "org.freedesktop.impl.portal.DynamicLauncher",
                                           &builder, &invalidated_builder));
      connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
      for (ll = connections; ll != NULL; ll = ll->next)
        {
          GDBusConnection *connection = ll->data;

          g_dbus_connection_emit_signal (connection,
                                         NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)),
                                         "org.freedesktop.DBus.Properties",
                                         "PropertiesChanged",
                                         signal_variant,
                                         NULL);
        }
      g_variant_unref (signal_variant);
      g_list_free_full (connections, g_object_unref);
    }
  else
    {
      g_variant_builder_clear (&builder);
      g_variant_builder_clear (&invalidated_builder);
    }
  g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
  skeleton->priv->changed_properties = NULL;
  skeleton->priv->changed_properties_idle_source = NULL;
  g_mutex_unlock (&skeleton->priv->lock);
  return FALSE;
}

static void
_xdp_impl_dynamic_launcher_schedule_emit_changed (XdpImplDynamicLauncherSkeleton *skeleton, const _ExtendedGDBusPropertyInfo *info, guint prop_id, const GValue *orig_value)
{
  ChangedProperty *cp;
  GList *l;
  cp = NULL;
  for (l = skeleton->priv->changed_properties; l != NULL; l = l->next)
    {
      ChangedProperty *i_cp = l->data;
      if (i_cp->info == info)
        {
          cp = i_cp;
          break;
        }
    }
  if (cp == NULL)
    {
      cp = g_new0 (ChangedProperty, 1);
      cp->prop_id = prop_id;
      cp->info = info;
      skeleton->priv->changed_properties = g_list_prepend (skeleton->priv->changed_properties, cp);
      g_value_init (&cp->orig_value, G_VALUE_TYPE (orig_value));
      g_value_copy (orig_value, &cp->orig_value);
    }
}

static void
xdp_impl_dynamic_launcher_skeleton_notify (GObject      *object,
  GParamSpec *pspec G_GNUC_UNUSED)
{
  XdpImplDynamicLauncherSkeleton *skeleton = XDP_IMPL_DYNAMIC_LAUNCHER_SKELETON (object);
  g_mutex_lock (&skeleton->priv->lock);
  if (skeleton->priv->changed_properties != NULL &&
      skeleton->priv->changed_properties_idle_source == NULL)
    {
      skeleton->priv->changed_properties_idle_source = g_idle_source_new ();
      g_source_set_priority (skeleton->priv->changed_properties_idle_source, G_PRIORITY_DEFAULT);
      g_source_set_callback (skeleton->priv->changed_properties_idle_source, _xdp_impl_dynamic_launcher_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
      g_source_set_name (skeleton->priv->changed_properties_idle_source, "[generated] _xdp_impl_dynamic_launcher_emit_changed");
      g_source_attach (skeleton->priv->changed_properties_idle_source, skeleton->priv->context);
      g_source_unref (skeleton->priv->changed_properties_idle_source);
    }
  g_mutex_unlock (&skeleton->priv->lock);
}

static void
xdp_impl_dynamic_launcher_skeleton_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec)
{
  const _ExtendedGDBusPropertyInfo *info;
  XdpImplDynamicLauncherSkeleton *skeleton = XDP_IMPL_DYNAMIC_LAUNCHER_SKELETON (object);
  g_assert (prop_id != 0 && prop_id - 1 < 2);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_impl_dynamic_launcher_property_info_pointers[prop_id - 1];
  g_mutex_lock (&skeleton->priv->lock);
  g_object_freeze_notify (object);
  if (!_g_value_equal (value, &skeleton->priv->properties[prop_id - 1]))
    {
      if (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)) != NULL &&
          info->emits_changed_signal)
        _xdp_impl_dynamic_launcher_schedule_emit_changed (skeleton, info, prop_id, &skeleton->priv->properties[prop_id - 1]);
      g_value_copy (value, &skeleton->priv->properties[prop_id - 1]);
      g_object_notify_by_pspec (object, pspec);
    }
  g_mutex_unlock (&skeleton->priv->lock);
  g_object_thaw_notify (object);
}

static void
xdp_impl_dynamic_launcher_skeleton_init (XdpImplDynamicLauncherSkeleton *skeleton)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  skeleton->priv = xdp_impl_dynamic_launcher_skeleton_get_instance_private (skeleton);
#else
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, XDP_IMPL_TYPE_DYNAMIC_LAUNCHER_SKELETON, XdpImplDynamicLauncherSkeletonPrivate);
#endif

  g_mutex_init (&skeleton->priv->lock);
  skeleton->priv->context = g_main_context_ref_thread_default ();
  skeleton->priv->properties = g_new0 (GValue, 2);
  g_value_init (&skeleton->priv->properties[0], G_TYPE_UINT);
  g_value_init (&skeleton->priv->properties[1], G_TYPE_UINT);
}

static guint 
xdp_impl_dynamic_launcher_skeleton_get_supported_launcher_types (XdpImplDynamicLauncher *object)
{
  XdpImplDynamicLauncherSkeleton *skeleton = XDP_IMPL_DYNAMIC_LAUNCHER_SKELETON (object);
  guint value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_marshal_value_peek_uint (&(skeleton->priv->properties[0]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static guint 
xdp_impl_dynamic_launcher_skeleton_get_version (XdpImplDynamicLauncher *object)
{
  XdpImplDynamicLauncherSkeleton *skeleton = XDP_IMPL_DYNAMIC_LAUNCHER_SKELETON (object);
  guint value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_marshal_value_peek_uint (&(skeleton->priv->properties[1]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static void
xdp_impl_dynamic_launcher_skeleton_class_init (XdpImplDynamicLauncherSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize = xdp_impl_dynamic_launcher_skeleton_finalize;
  gobject_class->get_property = xdp_impl_dynamic_launcher_skeleton_get_property;
  gobject_class->set_property = xdp_impl_dynamic_launcher_skeleton_set_property;
  gobject_class->notify       = xdp_impl_dynamic_launcher_skeleton_notify;


  xdp_impl_dynamic_launcher_override_properties (gobject_class, 1);

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = xdp_impl_dynamic_launcher_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = xdp_impl_dynamic_launcher_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = xdp_impl_dynamic_launcher_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = xdp_impl_dynamic_launcher_skeleton_dbus_interface_get_vtable;

#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
  g_type_class_add_private (klass, sizeof (XdpImplDynamicLauncherSkeletonPrivate));
#endif
}

static void
xdp_impl_dynamic_launcher_skeleton_iface_init (XdpImplDynamicLauncherIface *iface)
{
  iface->get_supported_launcher_types = xdp_impl_dynamic_launcher_skeleton_get_supported_launcher_types;
  iface->get_version = xdp_impl_dynamic_launcher_skeleton_get_version;
}

/**
 * xdp_impl_dynamic_launcher_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-DynamicLauncher.top_of_page">org.freedesktop.impl.portal.DynamicLauncher</link>.
 *
 * Returns: (transfer full) (type XdpImplDynamicLauncherSkeleton): The skeleton object.
 */
XdpImplDynamicLauncher *
xdp_impl_dynamic_launcher_skeleton_new (void)
{
  return XDP_IMPL_DYNAMIC_LAUNCHER (g_object_new (XDP_IMPL_TYPE_DYNAMIC_LAUNCHER_SKELETON, NULL));
}

/* ------------------------------------------------------------------------
 * Code for interface org.freedesktop.impl.portal.FileChooser
 * ------------------------------------------------------------------------
 */

/**
 * SECTION:XdpImplFileChooser
 * @title: XdpImplFileChooser
 * @short_description: Generated C code for the org.freedesktop.impl.portal.FileChooser D-Bus interface
 *
 * This section contains code for working with the <link linkend="gdbus-interface-org-freedesktop-impl-portal-FileChooser.top_of_page">org.freedesktop.impl.portal.FileChooser</link> D-Bus interface in C.
 */

/* ---- Introspection data for org.freedesktop.impl.portal.FileChooser ---- */

static const _ExtendedGDBusArgInfo _xdp_impl_file_chooser_method_info_open_file_IN_ARG_handle =
{
  {
    -1,
    (gchar *) "handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_file_chooser_method_info_open_file_IN_ARG_app_id =
{
  {
    -1,
    (gchar *) "app_id",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_file_chooser_method_info_open_file_IN_ARG_parent_window =
{
  {
    -1,
    (gchar *) "parent_window",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_file_chooser_method_info_open_file_IN_ARG_title =
{
  {
    -1,
    (gchar *) "title",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_file_chooser_method_info_open_file_IN_ARG_options =
{
  {
    -1,
    (gchar *) "options",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_file_chooser_method_info_open_file_IN_ARG_pointers[] =
{
  &_xdp_impl_file_chooser_method_info_open_file_IN_ARG_handle.parent_struct,
  &_xdp_impl_file_chooser_method_info_open_file_IN_ARG_app_id.parent_struct,
  &_xdp_impl_file_chooser_method_info_open_file_IN_ARG_parent_window.parent_struct,
  &_xdp_impl_file_chooser_method_info_open_file_IN_ARG_title.parent_struct,
  &_xdp_impl_file_chooser_method_info_open_file_IN_ARG_options.parent_struct,
  NULL
};

static const _ExtendedGDBusArgInfo _xdp_impl_file_chooser_method_info_open_file_OUT_ARG_response =
{
  {
    -1,
    (gchar *) "response",
    (gchar *) "u",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_file_chooser_method_info_open_file_OUT_ARG_results =
{
  {
    -1,
    (gchar *) "results",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_file_chooser_method_info_open_file_OUT_ARG_pointers[] =
{
  &_xdp_impl_file_chooser_method_info_open_file_OUT_ARG_response.parent_struct,
  &_xdp_impl_file_chooser_method_info_open_file_OUT_ARG_results.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_file_chooser_method_open_file_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.In4",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_file_chooser_method_open_file_annotation_info_1 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.Out1",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo * const _xdp_impl_file_chooser_method_open_file_annotation_info_pointers[] =
{
  &_xdp_impl_file_chooser_method_open_file_annotation_info_0,
  &_xdp_impl_file_chooser_method_open_file_annotation_info_1,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_impl_file_chooser_method_info_open_file =
{
  {
    -1,
    (gchar *) "OpenFile",
    (GDBusArgInfo **) &_xdp_impl_file_chooser_method_info_open_file_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_impl_file_chooser_method_info_open_file_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_impl_file_chooser_method_open_file_annotation_info_pointers
  },
  "handle-open-file",
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_file_chooser_method_info_save_file_IN_ARG_handle =
{
  {
    -1,
    (gchar *) "handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_file_chooser_method_info_save_file_IN_ARG_app_id =
{
  {
    -1,
    (gchar *) "app_id",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_file_chooser_method_info_save_file_IN_ARG_parent_window =
{
  {
    -1,
    (gchar *) "parent_window",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_file_chooser_method_info_save_file_IN_ARG_title =
{
  {
    -1,
    (gchar *) "title",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_file_chooser_method_info_save_file_IN_ARG_options =
{
  {
    -1,
    (gchar *) "options",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_file_chooser_method_info_save_file_IN_ARG_pointers[] =
{
  &_xdp_impl_file_chooser_method_info_save_file_IN_ARG_handle.parent_struct,
  &_xdp_impl_file_chooser_method_info_save_file_IN_ARG_app_id.parent_struct,
  &_xdp_impl_file_chooser_method_info_save_file_IN_ARG_parent_window.parent_struct,
  &_xdp_impl_file_chooser_method_info_save_file_IN_ARG_title.parent_struct,
  &_xdp_impl_file_chooser_method_info_save_file_IN_ARG_options.parent_struct,
  NULL
};

static const _ExtendedGDBusArgInfo _xdp_impl_file_chooser_method_info_save_file_OUT_ARG_response =
{
  {
    -1,
    (gchar *) "response",
    (gchar *) "u",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_file_chooser_method_info_save_file_OUT_ARG_results =
{
  {
    -1,
    (gchar *) "results",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_file_chooser_method_info_save_file_OUT_ARG_pointers[] =
{
  &_xdp_impl_file_chooser_method_info_save_file_OUT_ARG_response.parent_struct,
  &_xdp_impl_file_chooser_method_info_save_file_OUT_ARG_results.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_file_chooser_method_save_file_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.In4",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_file_chooser_method_save_file_annotation_info_1 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.Out1",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo * const _xdp_impl_file_chooser_method_save_file_annotation_info_pointers[] =
{
  &_xdp_impl_file_chooser_method_save_file_annotation_info_0,
  &_xdp_impl_file_chooser_method_save_file_annotation_info_1,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_impl_file_chooser_method_info_save_file =
{
  {
    -1,
    (gchar *) "SaveFile",
    (GDBusArgInfo **) &_xdp_impl_file_chooser_method_info_save_file_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_impl_file_chooser_method_info_save_file_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_impl_file_chooser_method_save_file_annotation_info_pointers
  },
  "handle-save-file",
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_file_chooser_method_info_save_files_IN_ARG_handle =
{
  {
    -1,
    (gchar *) "handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_file_chooser_method_info_save_files_IN_ARG_app_id =
{
  {
    -1,
    (gchar *) "app_id",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_file_chooser_method_info_save_files_IN_ARG_parent_window =
{
  {
    -1,
    (gchar *) "parent_window",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_file_chooser_method_info_save_files_IN_ARG_title =
{
  {
    -1,
    (gchar *) "title",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_file_chooser_method_info_save_files_IN_ARG_options =
{
  {
    -1,
    (gchar *) "options",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_file_chooser_method_info_save_files_IN_ARG_pointers[] =
{
  &_xdp_impl_file_chooser_method_info_save_files_IN_ARG_handle.parent_struct,
  &_xdp_impl_file_chooser_method_info_save_files_IN_ARG_app_id.parent_struct,
  &_xdp_impl_file_chooser_method_info_save_files_IN_ARG_parent_window.parent_struct,
  &_xdp_impl_file_chooser_method_info_save_files_IN_ARG_title.parent_struct,
  &_xdp_impl_file_chooser_method_info_save_files_IN_ARG_options.parent_struct,
  NULL
};

static const _ExtendedGDBusArgInfo _xdp_impl_file_chooser_method_info_save_files_OUT_ARG_response =
{
  {
    -1,
    (gchar *) "response",
    (gchar *) "u",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_file_chooser_method_info_save_files_OUT_ARG_results =
{
  {
    -1,
    (gchar *) "results",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_file_chooser_method_info_save_files_OUT_ARG_pointers[] =
{
  &_xdp_impl_file_chooser_method_info_save_files_OUT_ARG_response.parent_struct,
  &_xdp_impl_file_chooser_method_info_save_files_OUT_ARG_results.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_file_chooser_method_save_files_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.In4",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_file_chooser_method_save_files_annotation_info_1 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.Out1",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo * const _xdp_impl_file_chooser_method_save_files_annotation_info_pointers[] =
{
  &_xdp_impl_file_chooser_method_save_files_annotation_info_0,
  &_xdp_impl_file_chooser_method_save_files_annotation_info_1,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_impl_file_chooser_method_info_save_files =
{
  {
    -1,
    (gchar *) "SaveFiles",
    (GDBusArgInfo **) &_xdp_impl_file_chooser_method_info_save_files_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_impl_file_chooser_method_info_save_files_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_impl_file_chooser_method_save_files_annotation_info_pointers
  },
  "handle-save-files",
  FALSE
};

static const GDBusMethodInfo * const _xdp_impl_file_chooser_method_info_pointers[] =
{
  &_xdp_impl_file_chooser_method_info_open_file.parent_struct,
  &_xdp_impl_file_chooser_method_info_save_file.parent_struct,
  &_xdp_impl_file_chooser_method_info_save_files.parent_struct,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _xdp_impl_file_chooser_interface_info =
{
  {
    -1,
    (gchar *) "org.freedesktop.impl.portal.FileChooser",
    (GDBusMethodInfo **) &_xdp_impl_file_chooser_method_info_pointers,
    NULL,
    NULL,
    NULL
  },
  "file-chooser",
};


/**
 * xdp_impl_file_chooser_interface_info:
 *
 * Gets a machine-readable description of the <link linkend="gdbus-interface-org-freedesktop-impl-portal-FileChooser.top_of_page">org.freedesktop.impl.portal.FileChooser</link> D-Bus interface.
 *
 * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
 */
GDBusInterfaceInfo *
xdp_impl_file_chooser_interface_info (void)
{
  return (GDBusInterfaceInfo *) &_xdp_impl_file_chooser_interface_info.parent_struct;
}

/**
 * xdp_impl_file_chooser_override_properties:
 * @klass: The class structure for a #GObject derived class.
 * @property_id_begin: The property id to assign to the first overridden property.
 *
 * Overrides all #GObject properties in the #XdpImplFileChooser interface for a concrete class.
 * The properties are overridden in the order they are defined.
 *
 * Returns: The last property id.
 */
guint
xdp_impl_file_chooser_override_properties (GObjectClass *klass G_GNUC_UNUSED, guint property_id_begin)
{
  return property_id_begin - 1;
}


inline static void
xdp_impl_file_chooser_method_marshal_open_file (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  _g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_STRING_STRING_STRING_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_impl_file_chooser_method_marshal_save_file (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  _g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_STRING_STRING_STRING_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_impl_file_chooser_method_marshal_save_files (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  _g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_STRING_STRING_STRING_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}


/**
 * XdpImplFileChooser:
 *
 * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-FileChooser.top_of_page">org.freedesktop.impl.portal.FileChooser</link>.
 */

/**
 * XdpImplFileChooserIface:
 * @parent_iface: The parent interface.
 * @handle_open_file: Handler for the #XdpImplFileChooser::handle-open-file signal.
 * @handle_save_file: Handler for the #XdpImplFileChooser::handle-save-file signal.
 * @handle_save_files: Handler for the #XdpImplFileChooser::handle-save-files signal.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-FileChooser.top_of_page">org.freedesktop.impl.portal.FileChooser</link>.
 */

typedef XdpImplFileChooserIface XdpImplFileChooserInterface;
G_DEFINE_INTERFACE (XdpImplFileChooser, xdp_impl_file_chooser, G_TYPE_OBJECT)

static void
xdp_impl_file_chooser_default_init (XdpImplFileChooserIface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * XdpImplFileChooser::handle-open-file:
   * @object: A #XdpImplFileChooser.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_handle: Argument passed by remote caller.
   * @arg_app_id: Argument passed by remote caller.
   * @arg_parent_window: Argument passed by remote caller.
   * @arg_title: Argument passed by remote caller.
   * @arg_options: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-impl-portal-FileChooser.OpenFile">OpenFile()</link> 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 xdp_impl_file_chooser_complete_open_file() 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.
   *
   * 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.
   */
  g_signal_new ("handle-open-file",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpImplFileChooserIface, handle_open_file),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_impl_file_chooser_method_marshal_open_file,
    G_TYPE_BOOLEAN,
    6,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_VARIANT);

  /**
   * XdpImplFileChooser::handle-save-file:
   * @object: A #XdpImplFileChooser.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_handle: Argument passed by remote caller.
   * @arg_app_id: Argument passed by remote caller.
   * @arg_parent_window: Argument passed by remote caller.
   * @arg_title: Argument passed by remote caller.
   * @arg_options: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-impl-portal-FileChooser.SaveFile">SaveFile()</link> 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 xdp_impl_file_chooser_complete_save_file() 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.
   *
   * 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.
   */
  g_signal_new ("handle-save-file",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpImplFileChooserIface, handle_save_file),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_impl_file_chooser_method_marshal_save_file,
    G_TYPE_BOOLEAN,
    6,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_VARIANT);

  /**
   * XdpImplFileChooser::handle-save-files:
   * @object: A #XdpImplFileChooser.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_handle: Argument passed by remote caller.
   * @arg_app_id: Argument passed by remote caller.
   * @arg_parent_window: Argument passed by remote caller.
   * @arg_title: Argument passed by remote caller.
   * @arg_options: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-impl-portal-FileChooser.SaveFiles">SaveFiles()</link> 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 xdp_impl_file_chooser_complete_save_files() 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.
   *
   * 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.
   */
  g_signal_new ("handle-save-files",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpImplFileChooserIface, handle_save_files),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_impl_file_chooser_method_marshal_save_files,
    G_TYPE_BOOLEAN,
    6,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_VARIANT);

}

/**
 * xdp_impl_file_chooser_call_open_file:
 * @proxy: A #XdpImplFileChooserProxy.
 * @arg_handle: Argument to pass with the method invocation.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_parent_window: Argument to pass with the method invocation.
 * @arg_title: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-FileChooser.OpenFile">OpenFile()</link> 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 xdp_impl_file_chooser_call_open_file_finish() to get the result of the operation.
 *
 * See xdp_impl_file_chooser_call_open_file_sync() for the synchronous, blocking version of this method.
 */
void
xdp_impl_file_chooser_call_open_file (
    XdpImplFileChooser *proxy,
    const gchar *arg_handle,
    const gchar *arg_app_id,
    const gchar *arg_parent_window,
    const gchar *arg_title,
    GVariant *arg_options,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "OpenFile",
    g_variant_new ("(osss@a{sv})",
                   arg_handle,
                   arg_app_id,
                   arg_parent_window,
                   arg_title,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_impl_file_chooser_call_open_file_finish:
 * @proxy: A #XdpImplFileChooserProxy.
 * @out_response: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_results: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_file_chooser_call_open_file().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_impl_file_chooser_call_open_file().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_file_chooser_call_open_file_finish (
    XdpImplFileChooser *proxy,
    guint* out_response,
    GVariant ** out_results,
    GAsyncResult *res,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(u@a{sv})",
                 out_response,
                 out_results);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_file_chooser_call_open_file_sync:
 * @proxy: A #XdpImplFileChooserProxy.
 * @arg_handle: Argument to pass with the method invocation.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_parent_window: Argument to pass with the method invocation.
 * @arg_title: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @out_response: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_results: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-FileChooser.OpenFile">OpenFile()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_file_chooser_call_open_file() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_file_chooser_call_open_file_sync (
    XdpImplFileChooser *proxy,
    const gchar *arg_handle,
    const gchar *arg_app_id,
    const gchar *arg_parent_window,
    const gchar *arg_title,
    GVariant *arg_options,
    guint* out_response,
    GVariant ** out_results,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "OpenFile",
    g_variant_new ("(osss@a{sv})",
                   arg_handle,
                   arg_app_id,
                   arg_parent_window,
                   arg_title,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(u@a{sv})",
                 out_response,
                 out_results);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_file_chooser_call_save_file:
 * @proxy: A #XdpImplFileChooserProxy.
 * @arg_handle: Argument to pass with the method invocation.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_parent_window: Argument to pass with the method invocation.
 * @arg_title: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-FileChooser.SaveFile">SaveFile()</link> 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 xdp_impl_file_chooser_call_save_file_finish() to get the result of the operation.
 *
 * See xdp_impl_file_chooser_call_save_file_sync() for the synchronous, blocking version of this method.
 */
void
xdp_impl_file_chooser_call_save_file (
    XdpImplFileChooser *proxy,
    const gchar *arg_handle,
    const gchar *arg_app_id,
    const gchar *arg_parent_window,
    const gchar *arg_title,
    GVariant *arg_options,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "SaveFile",
    g_variant_new ("(osss@a{sv})",
                   arg_handle,
                   arg_app_id,
                   arg_parent_window,
                   arg_title,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_impl_file_chooser_call_save_file_finish:
 * @proxy: A #XdpImplFileChooserProxy.
 * @out_response: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_results: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_file_chooser_call_save_file().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_impl_file_chooser_call_save_file().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_file_chooser_call_save_file_finish (
    XdpImplFileChooser *proxy,
    guint* out_response,
    GVariant ** out_results,
    GAsyncResult *res,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(u@a{sv})",
                 out_response,
                 out_results);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_file_chooser_call_save_file_sync:
 * @proxy: A #XdpImplFileChooserProxy.
 * @arg_handle: Argument to pass with the method invocation.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_parent_window: Argument to pass with the method invocation.
 * @arg_title: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @out_response: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_results: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-FileChooser.SaveFile">SaveFile()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_file_chooser_call_save_file() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_file_chooser_call_save_file_sync (
    XdpImplFileChooser *proxy,
    const gchar *arg_handle,
    const gchar *arg_app_id,
    const gchar *arg_parent_window,
    const gchar *arg_title,
    GVariant *arg_options,
    guint* out_response,
    GVariant ** out_results,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "SaveFile",
    g_variant_new ("(osss@a{sv})",
                   arg_handle,
                   arg_app_id,
                   arg_parent_window,
                   arg_title,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(u@a{sv})",
                 out_response,
                 out_results);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_file_chooser_call_save_files:
 * @proxy: A #XdpImplFileChooserProxy.
 * @arg_handle: Argument to pass with the method invocation.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_parent_window: Argument to pass with the method invocation.
 * @arg_title: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-FileChooser.SaveFiles">SaveFiles()</link> 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 xdp_impl_file_chooser_call_save_files_finish() to get the result of the operation.
 *
 * See xdp_impl_file_chooser_call_save_files_sync() for the synchronous, blocking version of this method.
 */
void
xdp_impl_file_chooser_call_save_files (
    XdpImplFileChooser *proxy,
    const gchar *arg_handle,
    const gchar *arg_app_id,
    const gchar *arg_parent_window,
    const gchar *arg_title,
    GVariant *arg_options,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "SaveFiles",
    g_variant_new ("(osss@a{sv})",
                   arg_handle,
                   arg_app_id,
                   arg_parent_window,
                   arg_title,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_impl_file_chooser_call_save_files_finish:
 * @proxy: A #XdpImplFileChooserProxy.
 * @out_response: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_results: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_file_chooser_call_save_files().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_impl_file_chooser_call_save_files().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_file_chooser_call_save_files_finish (
    XdpImplFileChooser *proxy,
    guint* out_response,
    GVariant ** out_results,
    GAsyncResult *res,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(u@a{sv})",
                 out_response,
                 out_results);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_file_chooser_call_save_files_sync:
 * @proxy: A #XdpImplFileChooserProxy.
 * @arg_handle: Argument to pass with the method invocation.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_parent_window: Argument to pass with the method invocation.
 * @arg_title: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @out_response: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_results: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-FileChooser.SaveFiles">SaveFiles()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_file_chooser_call_save_files() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_file_chooser_call_save_files_sync (
    XdpImplFileChooser *proxy,
    const gchar *arg_handle,
    const gchar *arg_app_id,
    const gchar *arg_parent_window,
    const gchar *arg_title,
    GVariant *arg_options,
    guint* out_response,
    GVariant ** out_results,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "SaveFiles",
    g_variant_new ("(osss@a{sv})",
                   arg_handle,
                   arg_app_id,
                   arg_parent_window,
                   arg_title,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(u@a{sv})",
                 out_response,
                 out_results);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_file_chooser_complete_open_file:
 * @object: A #XdpImplFileChooser.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @response: Parameter to return.
 * @results: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-impl-portal-FileChooser.OpenFile">OpenFile()</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
xdp_impl_file_chooser_complete_open_file (
    XdpImplFileChooser *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    guint response,
    GVariant *results)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(u@a{sv})",
                   response,
                   results));
}

/**
 * xdp_impl_file_chooser_complete_save_file:
 * @object: A #XdpImplFileChooser.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @response: Parameter to return.
 * @results: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-impl-portal-FileChooser.SaveFile">SaveFile()</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
xdp_impl_file_chooser_complete_save_file (
    XdpImplFileChooser *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    guint response,
    GVariant *results)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(u@a{sv})",
                   response,
                   results));
}

/**
 * xdp_impl_file_chooser_complete_save_files:
 * @object: A #XdpImplFileChooser.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @response: Parameter to return.
 * @results: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-impl-portal-FileChooser.SaveFiles">SaveFiles()</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
xdp_impl_file_chooser_complete_save_files (
    XdpImplFileChooser *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    guint response,
    GVariant *results)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(u@a{sv})",
                   response,
                   results));
}

/* ------------------------------------------------------------------------ */

/**
 * XdpImplFileChooserProxy:
 *
 * The #XdpImplFileChooserProxy structure contains only private data and should only be accessed using the provided API.
 */

/**
 * XdpImplFileChooserProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpImplFileChooserProxy.
 */

struct _XdpImplFileChooserProxyPrivate
{
  GData *qdata;
};

static void xdp_impl_file_chooser_proxy_iface_init (XdpImplFileChooserIface *iface);

#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpImplFileChooserProxy, xdp_impl_file_chooser_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (XdpImplFileChooserProxy)
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_FILE_CHOOSER, xdp_impl_file_chooser_proxy_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpImplFileChooserProxy, xdp_impl_file_chooser_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_FILE_CHOOSER, xdp_impl_file_chooser_proxy_iface_init))

#endif
static void
xdp_impl_file_chooser_proxy_finalize (GObject *object)
{
  XdpImplFileChooserProxy *proxy = XDP_IMPL_FILE_CHOOSER_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (xdp_impl_file_chooser_proxy_parent_class)->finalize (object);
}

static void
xdp_impl_file_chooser_proxy_get_property (GObject      *object G_GNUC_UNUSED,
  guint         prop_id G_GNUC_UNUSED,
  GValue       *value G_GNUC_UNUSED,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
}

static void
xdp_impl_file_chooser_proxy_set_property (GObject      *object G_GNUC_UNUSED,
  guint         prop_id G_GNUC_UNUSED,
  const GValue *value G_GNUC_UNUSED,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
}

static void
xdp_impl_file_chooser_proxy_g_signal (GDBusProxy *proxy,
  const gchar *sender_name G_GNUC_UNUSED,
  const gchar *signal_name,
  GVariant *parameters)
{
  _ExtendedGDBusSignalInfo *info;
  GVariantIter iter;
  GVariant *child;
  GValue *paramv;
  gsize num_params;
  gsize n;
  guint signal_id;
  info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_xdp_impl_file_chooser_interface_info.parent_struct, signal_name);
  if (info == NULL)
    return;
  num_params = g_variant_n_children (parameters);
  paramv = g_new0 (GValue, num_params + 1);
  g_value_init (&paramv[0], XDP_IMPL_TYPE_FILE_CHOOSER);
  g_value_set_object (&paramv[0], proxy);
  g_variant_iter_init (&iter, parameters);
  n = 1;
  while ((child = g_variant_iter_next_value (&iter)) != NULL)
    {
      _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1];
      if (arg_info->use_gvariant)
        {
          g_value_init (&paramv[n], G_TYPE_VARIANT);
          g_value_set_variant (&paramv[n], child);
          n++;
        }
      else
        g_dbus_gvariant_to_gvalue (child, &paramv[n++]);
      g_variant_unref (child);
    }
  signal_id = g_signal_lookup (info->signal_name, XDP_IMPL_TYPE_FILE_CHOOSER);
  g_signal_emitv (paramv, signal_id, 0, NULL);
  for (n = 0; n < num_params + 1; n++)
    g_value_unset (&paramv[n]);
  g_free (paramv);
}

static void
xdp_impl_file_chooser_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  XdpImplFileChooserProxy *proxy = XDP_IMPL_FILE_CHOOSER_PROXY (_proxy);
  guint n;
  const gchar *key;
  GVariantIter *iter;
  _ExtendedGDBusPropertyInfo *info;
  g_variant_get (changed_properties, "a{sv}", &iter);
  while (g_variant_iter_next (iter, "{&sv}", &key, NULL))
    {
      info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_file_chooser_interface_info.parent_struct, key);
      g_datalist_remove_data (&proxy->priv->qdata, key);
      if (info != NULL)
        g_object_notify (G_OBJECT (proxy), info->hyphen_name);
    }
  g_variant_iter_free (iter);
  for (n = 0; invalidated_properties[n] != NULL; n++)
    {
      info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_file_chooser_interface_info.parent_struct, invalidated_properties[n]);
      g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]);
      if (info != NULL)
        g_object_notify (G_OBJECT (proxy), info->hyphen_name);
    }
}

static void
xdp_impl_file_chooser_proxy_init (XdpImplFileChooserProxy *proxy)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  proxy->priv = xdp_impl_file_chooser_proxy_get_instance_private (proxy);
#else
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, XDP_IMPL_TYPE_FILE_CHOOSER_PROXY, XdpImplFileChooserProxyPrivate);
#endif

  g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), xdp_impl_file_chooser_interface_info ());
}

static void
xdp_impl_file_chooser_proxy_class_init (XdpImplFileChooserProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = xdp_impl_file_chooser_proxy_finalize;
  gobject_class->get_property = xdp_impl_file_chooser_proxy_get_property;
  gobject_class->set_property = xdp_impl_file_chooser_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = xdp_impl_file_chooser_proxy_g_signal;
  proxy_class->g_properties_changed = xdp_impl_file_chooser_proxy_g_properties_changed;

#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
  g_type_class_add_private (klass, sizeof (XdpImplFileChooserProxyPrivate));
#endif
}

static void
xdp_impl_file_chooser_proxy_iface_init (XdpImplFileChooserIface *iface G_GNUC_UNUSED)
{
}

/**
 * xdp_impl_file_chooser_proxy_new:
 * @connection: A #GDBusConnection.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-FileChooser.top_of_page">org.freedesktop.impl.portal.FileChooser</link>. 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 xdp_impl_file_chooser_proxy_new_finish() to get the result of the operation.
 *
 * See xdp_impl_file_chooser_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_impl_file_chooser_proxy_new (
    GDBusConnection     *connection,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GAsyncReadyCallback  callback,
    gpointer             user_data)
{
  g_async_initable_new_async (XDP_IMPL_TYPE_FILE_CHOOSER_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.FileChooser", NULL);
}

/**
 * xdp_impl_file_chooser_proxy_new_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_file_chooser_proxy_new().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_impl_file_chooser_proxy_new().
 *
 * Returns: (transfer full) (type XdpImplFileChooserProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplFileChooser *
xdp_impl_file_chooser_proxy_new_finish (
    GAsyncResult        *res,
    GError             **error)
{
  GObject *ret;
  GObject *source_object;
  source_object = g_async_result_get_source_object (res);
  ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
  g_object_unref (source_object);
  if (ret != NULL)
    return XDP_IMPL_FILE_CHOOSER (ret);
  else
    return NULL;
}

/**
 * xdp_impl_file_chooser_proxy_new_sync:
 * @connection: A #GDBusConnection.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL
 *
 * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-FileChooser.top_of_page">org.freedesktop.impl.portal.FileChooser</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_file_chooser_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpImplFileChooserProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplFileChooser *
xdp_impl_file_chooser_proxy_new_sync (
    GDBusConnection     *connection,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GError             **error)
{
  GInitable *ret;
  ret = g_initable_new (XDP_IMPL_TYPE_FILE_CHOOSER_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.FileChooser", NULL);
  if (ret != NULL)
    return XDP_IMPL_FILE_CHOOSER (ret);
  else
    return NULL;
}


/**
 * xdp_impl_file_chooser_proxy_new_for_bus:
 * @bus_type: A #GBusType.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: A bus name (well-known or unique).
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
 * @user_data: User data to pass to @callback.
 *
 * Like xdp_impl_file_chooser_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 xdp_impl_file_chooser_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See xdp_impl_file_chooser_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_impl_file_chooser_proxy_new_for_bus (
    GBusType             bus_type,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GAsyncReadyCallback  callback,
    gpointer             user_data)
{
  g_async_initable_new_async (XDP_IMPL_TYPE_FILE_CHOOSER_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.FileChooser", NULL);
}

/**
 * xdp_impl_file_chooser_proxy_new_for_bus_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_file_chooser_proxy_new_for_bus().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_impl_file_chooser_proxy_new_for_bus().
 *
 * Returns: (transfer full) (type XdpImplFileChooserProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplFileChooser *
xdp_impl_file_chooser_proxy_new_for_bus_finish (
    GAsyncResult        *res,
    GError             **error)
{
  GObject *ret;
  GObject *source_object;
  source_object = g_async_result_get_source_object (res);
  ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
  g_object_unref (source_object);
  if (ret != NULL)
    return XDP_IMPL_FILE_CHOOSER (ret);
  else
    return NULL;
}

/**
 * xdp_impl_file_chooser_proxy_new_for_bus_sync:
 * @bus_type: A #GBusType.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: A bus name (well-known or unique).
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL
 *
 * Like xdp_impl_file_chooser_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_file_chooser_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpImplFileChooserProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplFileChooser *
xdp_impl_file_chooser_proxy_new_for_bus_sync (
    GBusType             bus_type,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GError             **error)
{
  GInitable *ret;
  ret = g_initable_new (XDP_IMPL_TYPE_FILE_CHOOSER_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.FileChooser", NULL);
  if (ret != NULL)
    return XDP_IMPL_FILE_CHOOSER (ret);
  else
    return NULL;
}


/* ------------------------------------------------------------------------ */

/**
 * XdpImplFileChooserSkeleton:
 *
 * The #XdpImplFileChooserSkeleton structure contains only private data and should only be accessed using the provided API.
 */

/**
 * XdpImplFileChooserSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpImplFileChooserSkeleton.
 */

struct _XdpImplFileChooserSkeletonPrivate
{
  GValue *properties;
  GList *changed_properties;
  GSource *changed_properties_idle_source;
  GMainContext *context;
  GMutex lock;
};

static void
_xdp_impl_file_chooser_skeleton_handle_method_call (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name,
  const gchar *method_name,
  GVariant *parameters,
  GDBusMethodInvocation *invocation,
  gpointer user_data)
{
  XdpImplFileChooserSkeleton *skeleton = XDP_IMPL_FILE_CHOOSER_SKELETON (user_data);
  _ExtendedGDBusMethodInfo *info;
  GVariantIter iter;
  GVariant *child;
  GValue *paramv;
  gsize num_params;
  guint num_extra;
  gsize n;
  guint signal_id;
  GValue return_value = G_VALUE_INIT;
  info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
  g_assert (info != NULL);
  num_params = g_variant_n_children (parameters);
  num_extra = info->pass_fdlist ? 3 : 2;  paramv = g_new0 (GValue, num_params + num_extra);
  n = 0;
  g_value_init (&paramv[n], XDP_IMPL_TYPE_FILE_CHOOSER);
  g_value_set_object (&paramv[n++], skeleton);
  g_value_init (&paramv[n], G_TYPE_DBUS_METHOD_INVOCATION);
  g_value_set_object (&paramv[n++], invocation);
  if (info->pass_fdlist)
    {
#ifdef G_OS_UNIX
      g_value_init (&paramv[n], G_TYPE_UNIX_FD_LIST);
      g_value_set_object (&paramv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation)));
#else
      g_assert_not_reached ();
#endif
    }
  g_variant_iter_init (&iter, parameters);
  while ((child = g_variant_iter_next_value (&iter)) != NULL)
    {
      _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra];
      if (arg_info->use_gvariant)
        {
          g_value_init (&paramv[n], G_TYPE_VARIANT);
          g_value_set_variant (&paramv[n], child);
          n++;
        }
      else
        g_dbus_gvariant_to_gvalue (child, &paramv[n++]);
      g_variant_unref (child);
    }
  signal_id = g_signal_lookup (info->signal_name, XDP_IMPL_TYPE_FILE_CHOOSER);
  g_value_init (&return_value, G_TYPE_BOOLEAN);
  g_signal_emitv (paramv, signal_id, 0, &return_value);
  if (!g_value_get_boolean (&return_value))
    g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD, "Method %s is not implemented on interface %s", method_name, interface_name);
  g_value_unset (&return_value);
  for (n = 0; n < num_params + num_extra; n++)
    g_value_unset (&paramv[n]);
  g_free (paramv);
}

static GVariant *
_xdp_impl_file_chooser_skeleton_handle_get_property (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name G_GNUC_UNUSED,
  const gchar *property_name,
  GError **error,
  gpointer user_data)
{
  XdpImplFileChooserSkeleton *skeleton = XDP_IMPL_FILE_CHOOSER_SKELETON (user_data);
  GValue value = G_VALUE_INIT;
  GParamSpec *pspec;
  _ExtendedGDBusPropertyInfo *info;
  GVariant *ret;
  ret = NULL;
  info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_file_chooser_interface_info.parent_struct, property_name);
  g_assert (info != NULL);
  pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
  if (pspec == NULL)
    {
      g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
    }
  else
    {
      g_value_init (&value, pspec->value_type);
      g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value);
      ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature));
      g_value_unset (&value);
    }
  return ret;
}

static gboolean
_xdp_impl_file_chooser_skeleton_handle_set_property (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name G_GNUC_UNUSED,
  const gchar *property_name,
  GVariant *variant,
  GError **error,
  gpointer user_data)
{
  XdpImplFileChooserSkeleton *skeleton = XDP_IMPL_FILE_CHOOSER_SKELETON (user_data);
  GValue value = G_VALUE_INIT;
  GParamSpec *pspec;
  _ExtendedGDBusPropertyInfo *info;
  gboolean ret;
  ret = FALSE;
  info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_file_chooser_interface_info.parent_struct, property_name);
  g_assert (info != NULL);
  pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
  if (pspec == NULL)
    {
      g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
    }
  else
    {
      if (info->use_gvariant)
        g_value_set_variant (&value, variant);
      else
        g_dbus_gvariant_to_gvalue (variant, &value);
      g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value);
      g_value_unset (&value);
      ret = TRUE;
    }
  return ret;
}

static const GDBusInterfaceVTable _xdp_impl_file_chooser_skeleton_vtable =
{
  _xdp_impl_file_chooser_skeleton_handle_method_call,
  _xdp_impl_file_chooser_skeleton_handle_get_property,
  _xdp_impl_file_chooser_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
xdp_impl_file_chooser_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return xdp_impl_file_chooser_interface_info ();
}

static GDBusInterfaceVTable *
xdp_impl_file_chooser_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_xdp_impl_file_chooser_skeleton_vtable;
}

static GVariant *
xdp_impl_file_chooser_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  XdpImplFileChooserSkeleton *skeleton = XDP_IMPL_FILE_CHOOSER_SKELETON (_skeleton);

  GVariantBuilder builder;
  guint n;
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_84
  g_variant_builder_init_static (&builder, G_VARIANT_TYPE ("a{sv}"));
#else
  g_variant_builder_init(&builder, G_VARIANT_TYPE ("a{sv}"));
#endif
  if (_xdp_impl_file_chooser_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _xdp_impl_file_chooser_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _xdp_impl_file_chooser_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _xdp_impl_file_chooser_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.impl.portal.FileChooser", info->name, NULL, skeleton);
          if (value != NULL)
            {
              g_variant_take_ref (value);
              g_variant_builder_add (&builder, "{sv}", info->name, value);
              g_variant_unref (value);
            }
        }
    }
out:
  return g_variant_builder_end (&builder);
}

static void
xdp_impl_file_chooser_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton G_GNUC_UNUSED)
{
}

static void xdp_impl_file_chooser_skeleton_iface_init (XdpImplFileChooserIface *iface);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpImplFileChooserSkeleton, xdp_impl_file_chooser_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (XdpImplFileChooserSkeleton)
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_FILE_CHOOSER, xdp_impl_file_chooser_skeleton_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpImplFileChooserSkeleton, xdp_impl_file_chooser_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_FILE_CHOOSER, xdp_impl_file_chooser_skeleton_iface_init))

#endif
static void
xdp_impl_file_chooser_skeleton_finalize (GObject *object)
{
  XdpImplFileChooserSkeleton *skeleton = XDP_IMPL_FILE_CHOOSER_SKELETON (object);
  g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  /* coverity[missing_lock : SUPPRESS] */
  g_clear_pointer (&skeleton->priv->changed_properties_idle_source, g_source_destroy);
#else
  if (skeleton->priv->changed_properties_idle_source != NULL)
    g_source_destroy (skeleton->priv->changed_properties_idle_source);
skeleton->priv->changed_properties_idle_source = NULL;
#endif
  g_main_context_unref (skeleton->priv->context);
  g_mutex_clear (&skeleton->priv->lock);
  G_OBJECT_CLASS (xdp_impl_file_chooser_skeleton_parent_class)->finalize (object);
}

static void
xdp_impl_file_chooser_skeleton_init (XdpImplFileChooserSkeleton *skeleton)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  skeleton->priv = xdp_impl_file_chooser_skeleton_get_instance_private (skeleton);
#else
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, XDP_IMPL_TYPE_FILE_CHOOSER_SKELETON, XdpImplFileChooserSkeletonPrivate);
#endif

  g_mutex_init (&skeleton->priv->lock);
  skeleton->priv->context = g_main_context_ref_thread_default ();
}

static void
xdp_impl_file_chooser_skeleton_class_init (XdpImplFileChooserSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize = xdp_impl_file_chooser_skeleton_finalize;

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = xdp_impl_file_chooser_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = xdp_impl_file_chooser_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = xdp_impl_file_chooser_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = xdp_impl_file_chooser_skeleton_dbus_interface_get_vtable;

#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
  g_type_class_add_private (klass, sizeof (XdpImplFileChooserSkeletonPrivate));
#endif
}

static void
xdp_impl_file_chooser_skeleton_iface_init (XdpImplFileChooserIface *iface G_GNUC_UNUSED)
{
}

/**
 * xdp_impl_file_chooser_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-FileChooser.top_of_page">org.freedesktop.impl.portal.FileChooser</link>.
 *
 * Returns: (transfer full) (type XdpImplFileChooserSkeleton): The skeleton object.
 */
XdpImplFileChooser *
xdp_impl_file_chooser_skeleton_new (void)
{
  return XDP_IMPL_FILE_CHOOSER (g_object_new (XDP_IMPL_TYPE_FILE_CHOOSER_SKELETON, NULL));
}

/* ------------------------------------------------------------------------
 * Code for interface org.freedesktop.impl.portal.GlobalShortcuts
 * ------------------------------------------------------------------------
 */

/**
 * SECTION:XdpImplGlobalShortcuts
 * @title: XdpImplGlobalShortcuts
 * @short_description: Generated C code for the org.freedesktop.impl.portal.GlobalShortcuts D-Bus interface
 *
 * This section contains code for working with the <link linkend="gdbus-interface-org-freedesktop-impl-portal-GlobalShortcuts.top_of_page">org.freedesktop.impl.portal.GlobalShortcuts</link> D-Bus interface in C.
 */

enum
{
  XDP_IMPL__GLOBAL_SHORTCUTS_ACTIVATED,
  XDP_IMPL__GLOBAL_SHORTCUTS_DEACTIVATED,
  XDP_IMPL__GLOBAL_SHORTCUTS_SHORTCUTS_CHANGED,
};

static unsigned XDP_IMPL__GLOBAL_SHORTCUTS_SIGNALS[3] = { 0 };

/* ---- Introspection data for org.freedesktop.impl.portal.GlobalShortcuts ---- */

static const _ExtendedGDBusArgInfo _xdp_impl_global_shortcuts_method_info_create_session_IN_ARG_handle =
{
  {
    -1,
    (gchar *) "handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_global_shortcuts_method_info_create_session_IN_ARG_session_handle =
{
  {
    -1,
    (gchar *) "session_handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_global_shortcuts_method_info_create_session_IN_ARG_app_id =
{
  {
    -1,
    (gchar *) "app_id",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_global_shortcuts_method_info_create_session_IN_ARG_options =
{
  {
    -1,
    (gchar *) "options",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_global_shortcuts_method_info_create_session_IN_ARG_pointers[] =
{
  &_xdp_impl_global_shortcuts_method_info_create_session_IN_ARG_handle.parent_struct,
  &_xdp_impl_global_shortcuts_method_info_create_session_IN_ARG_session_handle.parent_struct,
  &_xdp_impl_global_shortcuts_method_info_create_session_IN_ARG_app_id.parent_struct,
  &_xdp_impl_global_shortcuts_method_info_create_session_IN_ARG_options.parent_struct,
  NULL
};

static const _ExtendedGDBusArgInfo _xdp_impl_global_shortcuts_method_info_create_session_OUT_ARG_response =
{
  {
    -1,
    (gchar *) "response",
    (gchar *) "u",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_global_shortcuts_method_info_create_session_OUT_ARG_results =
{
  {
    -1,
    (gchar *) "results",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_global_shortcuts_method_info_create_session_OUT_ARG_pointers[] =
{
  &_xdp_impl_global_shortcuts_method_info_create_session_OUT_ARG_response.parent_struct,
  &_xdp_impl_global_shortcuts_method_info_create_session_OUT_ARG_results.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_global_shortcuts_method_create_session_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.In3",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_global_shortcuts_method_create_session_annotation_info_1 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.Out1",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo * const _xdp_impl_global_shortcuts_method_create_session_annotation_info_pointers[] =
{
  &_xdp_impl_global_shortcuts_method_create_session_annotation_info_0,
  &_xdp_impl_global_shortcuts_method_create_session_annotation_info_1,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_impl_global_shortcuts_method_info_create_session =
{
  {
    -1,
    (gchar *) "CreateSession",
    (GDBusArgInfo **) &_xdp_impl_global_shortcuts_method_info_create_session_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_impl_global_shortcuts_method_info_create_session_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_impl_global_shortcuts_method_create_session_annotation_info_pointers
  },
  "handle-create-session",
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_global_shortcuts_method_info_bind_shortcuts_IN_ARG_handle =
{
  {
    -1,
    (gchar *) "handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_global_shortcuts_method_info_bind_shortcuts_IN_ARG_session_handle =
{
  {
    -1,
    (gchar *) "session_handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_global_shortcuts_method_info_bind_shortcuts_IN_ARG_shortcuts =
{
  {
    -1,
    (gchar *) "shortcuts",
    (gchar *) "a(sa{sv})",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_global_shortcuts_method_info_bind_shortcuts_IN_ARG_parent_window =
{
  {
    -1,
    (gchar *) "parent_window",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_global_shortcuts_method_info_bind_shortcuts_IN_ARG_options =
{
  {
    -1,
    (gchar *) "options",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_global_shortcuts_method_info_bind_shortcuts_IN_ARG_pointers[] =
{
  &_xdp_impl_global_shortcuts_method_info_bind_shortcuts_IN_ARG_handle.parent_struct,
  &_xdp_impl_global_shortcuts_method_info_bind_shortcuts_IN_ARG_session_handle.parent_struct,
  &_xdp_impl_global_shortcuts_method_info_bind_shortcuts_IN_ARG_shortcuts.parent_struct,
  &_xdp_impl_global_shortcuts_method_info_bind_shortcuts_IN_ARG_parent_window.parent_struct,
  &_xdp_impl_global_shortcuts_method_info_bind_shortcuts_IN_ARG_options.parent_struct,
  NULL
};

static const _ExtendedGDBusArgInfo _xdp_impl_global_shortcuts_method_info_bind_shortcuts_OUT_ARG_response =
{
  {
    -1,
    (gchar *) "response",
    (gchar *) "u",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_global_shortcuts_method_info_bind_shortcuts_OUT_ARG_results =
{
  {
    -1,
    (gchar *) "results",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_global_shortcuts_method_info_bind_shortcuts_OUT_ARG_pointers[] =
{
  &_xdp_impl_global_shortcuts_method_info_bind_shortcuts_OUT_ARG_response.parent_struct,
  &_xdp_impl_global_shortcuts_method_info_bind_shortcuts_OUT_ARG_results.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_global_shortcuts_method_bind_shortcuts_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.In2",
  (gchar *) "QList<QPair<QString,QVariantMap>>",
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_global_shortcuts_method_bind_shortcuts_annotation_info_1 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.In3",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_global_shortcuts_method_bind_shortcuts_annotation_info_2 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.In4",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_global_shortcuts_method_bind_shortcuts_annotation_info_3 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.Out1",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo * const _xdp_impl_global_shortcuts_method_bind_shortcuts_annotation_info_pointers[] =
{
  &_xdp_impl_global_shortcuts_method_bind_shortcuts_annotation_info_0,
  &_xdp_impl_global_shortcuts_method_bind_shortcuts_annotation_info_1,
  &_xdp_impl_global_shortcuts_method_bind_shortcuts_annotation_info_2,
  &_xdp_impl_global_shortcuts_method_bind_shortcuts_annotation_info_3,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_impl_global_shortcuts_method_info_bind_shortcuts =
{
  {
    -1,
    (gchar *) "BindShortcuts",
    (GDBusArgInfo **) &_xdp_impl_global_shortcuts_method_info_bind_shortcuts_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_impl_global_shortcuts_method_info_bind_shortcuts_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_impl_global_shortcuts_method_bind_shortcuts_annotation_info_pointers
  },
  "handle-bind-shortcuts",
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_global_shortcuts_method_info_list_shortcuts_IN_ARG_handle =
{
  {
    -1,
    (gchar *) "handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_global_shortcuts_method_info_list_shortcuts_IN_ARG_session_handle =
{
  {
    -1,
    (gchar *) "session_handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_global_shortcuts_method_info_list_shortcuts_IN_ARG_pointers[] =
{
  &_xdp_impl_global_shortcuts_method_info_list_shortcuts_IN_ARG_handle.parent_struct,
  &_xdp_impl_global_shortcuts_method_info_list_shortcuts_IN_ARG_session_handle.parent_struct,
  NULL
};

static const _ExtendedGDBusArgInfo _xdp_impl_global_shortcuts_method_info_list_shortcuts_OUT_ARG_response =
{
  {
    -1,
    (gchar *) "response",
    (gchar *) "u",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_global_shortcuts_method_info_list_shortcuts_OUT_ARG_results =
{
  {
    -1,
    (gchar *) "results",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_global_shortcuts_method_info_list_shortcuts_OUT_ARG_pointers[] =
{
  &_xdp_impl_global_shortcuts_method_info_list_shortcuts_OUT_ARG_response.parent_struct,
  &_xdp_impl_global_shortcuts_method_info_list_shortcuts_OUT_ARG_results.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_global_shortcuts_method_list_shortcuts_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.Out1",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo * const _xdp_impl_global_shortcuts_method_list_shortcuts_annotation_info_pointers[] =
{
  &_xdp_impl_global_shortcuts_method_list_shortcuts_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_impl_global_shortcuts_method_info_list_shortcuts =
{
  {
    -1,
    (gchar *) "ListShortcuts",
    (GDBusArgInfo **) &_xdp_impl_global_shortcuts_method_info_list_shortcuts_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_impl_global_shortcuts_method_info_list_shortcuts_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_impl_global_shortcuts_method_list_shortcuts_annotation_info_pointers
  },
  "handle-list-shortcuts",
  FALSE
};

static const GDBusMethodInfo * const _xdp_impl_global_shortcuts_method_info_pointers[] =
{
  &_xdp_impl_global_shortcuts_method_info_create_session.parent_struct,
  &_xdp_impl_global_shortcuts_method_info_bind_shortcuts.parent_struct,
  &_xdp_impl_global_shortcuts_method_info_list_shortcuts.parent_struct,
  NULL
};

static const _ExtendedGDBusArgInfo _xdp_impl_global_shortcuts_signal_info_activated_ARG_session_handle =
{
  {
    -1,
    (gchar *) "session_handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_global_shortcuts_signal_info_activated_ARG_shortcut_id =
{
  {
    -1,
    (gchar *) "shortcut_id",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_global_shortcuts_signal_info_activated_ARG_timestamp =
{
  {
    -1,
    (gchar *) "timestamp",
    (gchar *) "t",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_global_shortcuts_signal_info_activated_ARG_options =
{
  {
    -1,
    (gchar *) "options",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_global_shortcuts_signal_info_activated_ARG_pointers[] =
{
  &_xdp_impl_global_shortcuts_signal_info_activated_ARG_session_handle.parent_struct,
  &_xdp_impl_global_shortcuts_signal_info_activated_ARG_shortcut_id.parent_struct,
  &_xdp_impl_global_shortcuts_signal_info_activated_ARG_timestamp.parent_struct,
  &_xdp_impl_global_shortcuts_signal_info_activated_ARG_options.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_global_shortcuts_signal_activated_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.Out3",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo * const _xdp_impl_global_shortcuts_signal_activated_annotation_info_pointers[] =
{
  &_xdp_impl_global_shortcuts_signal_activated_annotation_info_0,
  NULL
};

static const _ExtendedGDBusSignalInfo _xdp_impl_global_shortcuts_signal_info_activated =
{
  {
    -1,
    (gchar *) "Activated",
    (GDBusArgInfo **) &_xdp_impl_global_shortcuts_signal_info_activated_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_impl_global_shortcuts_signal_activated_annotation_info_pointers
  },
  "activated"
};

static const _ExtendedGDBusArgInfo _xdp_impl_global_shortcuts_signal_info_deactivated_ARG_session_handle =
{
  {
    -1,
    (gchar *) "session_handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_global_shortcuts_signal_info_deactivated_ARG_shortcut_id =
{
  {
    -1,
    (gchar *) "shortcut_id",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_global_shortcuts_signal_info_deactivated_ARG_timestamp =
{
  {
    -1,
    (gchar *) "timestamp",
    (gchar *) "t",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_global_shortcuts_signal_info_deactivated_ARG_options =
{
  {
    -1,
    (gchar *) "options",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_global_shortcuts_signal_info_deactivated_ARG_pointers[] =
{
  &_xdp_impl_global_shortcuts_signal_info_deactivated_ARG_session_handle.parent_struct,
  &_xdp_impl_global_shortcuts_signal_info_deactivated_ARG_shortcut_id.parent_struct,
  &_xdp_impl_global_shortcuts_signal_info_deactivated_ARG_timestamp.parent_struct,
  &_xdp_impl_global_shortcuts_signal_info_deactivated_ARG_options.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_global_shortcuts_signal_deactivated_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.Out3",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo * const _xdp_impl_global_shortcuts_signal_deactivated_annotation_info_pointers[] =
{
  &_xdp_impl_global_shortcuts_signal_deactivated_annotation_info_0,
  NULL
};

static const _ExtendedGDBusSignalInfo _xdp_impl_global_shortcuts_signal_info_deactivated =
{
  {
    -1,
    (gchar *) "Deactivated",
    (GDBusArgInfo **) &_xdp_impl_global_shortcuts_signal_info_deactivated_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_impl_global_shortcuts_signal_deactivated_annotation_info_pointers
  },
  "deactivated"
};

static const _ExtendedGDBusArgInfo _xdp_impl_global_shortcuts_signal_info_shortcuts_changed_ARG_session_handle =
{
  {
    -1,
    (gchar *) "session_handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_global_shortcuts_signal_info_shortcuts_changed_ARG_shortcuts =
{
  {
    -1,
    (gchar *) "shortcuts",
    (gchar *) "a(sa{sv})",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_global_shortcuts_signal_info_shortcuts_changed_ARG_pointers[] =
{
  &_xdp_impl_global_shortcuts_signal_info_shortcuts_changed_ARG_session_handle.parent_struct,
  &_xdp_impl_global_shortcuts_signal_info_shortcuts_changed_ARG_shortcuts.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_global_shortcuts_signal_shortcuts_changed_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.Out1",
  (gchar *) "QList<QPair<QString,QVariantMap>>",
  NULL
};

static const GDBusAnnotationInfo * const _xdp_impl_global_shortcuts_signal_shortcuts_changed_annotation_info_pointers[] =
{
  &_xdp_impl_global_shortcuts_signal_shortcuts_changed_annotation_info_0,
  NULL
};

static const _ExtendedGDBusSignalInfo _xdp_impl_global_shortcuts_signal_info_shortcuts_changed =
{
  {
    -1,
    (gchar *) "ShortcutsChanged",
    (GDBusArgInfo **) &_xdp_impl_global_shortcuts_signal_info_shortcuts_changed_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_impl_global_shortcuts_signal_shortcuts_changed_annotation_info_pointers
  },
  "shortcuts-changed"
};

static const GDBusSignalInfo * const _xdp_impl_global_shortcuts_signal_info_pointers[] =
{
  &_xdp_impl_global_shortcuts_signal_info_activated.parent_struct,
  &_xdp_impl_global_shortcuts_signal_info_deactivated.parent_struct,
  &_xdp_impl_global_shortcuts_signal_info_shortcuts_changed.parent_struct,
  NULL
};

static const _ExtendedGDBusPropertyInfo _xdp_impl_global_shortcuts_property_info_version =
{
  {
    -1,
    (gchar *) "version",
    (gchar *) "u",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "version",
  FALSE,
  TRUE
};

static const GDBusPropertyInfo * const _xdp_impl_global_shortcuts_property_info_pointers[] =
{
  &_xdp_impl_global_shortcuts_property_info_version.parent_struct,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _xdp_impl_global_shortcuts_interface_info =
{
  {
    -1,
    (gchar *) "org.freedesktop.impl.portal.GlobalShortcuts",
    (GDBusMethodInfo **) &_xdp_impl_global_shortcuts_method_info_pointers,
    (GDBusSignalInfo **) &_xdp_impl_global_shortcuts_signal_info_pointers,
    (GDBusPropertyInfo **) &_xdp_impl_global_shortcuts_property_info_pointers,
    NULL
  },
  "global-shortcuts",
};


/**
 * xdp_impl_global_shortcuts_interface_info:
 *
 * Gets a machine-readable description of the <link linkend="gdbus-interface-org-freedesktop-impl-portal-GlobalShortcuts.top_of_page">org.freedesktop.impl.portal.GlobalShortcuts</link> D-Bus interface.
 *
 * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
 */
GDBusInterfaceInfo *
xdp_impl_global_shortcuts_interface_info (void)
{
  return (GDBusInterfaceInfo *) &_xdp_impl_global_shortcuts_interface_info.parent_struct;
}

/**
 * xdp_impl_global_shortcuts_override_properties:
 * @klass: The class structure for a #GObject derived class.
 * @property_id_begin: The property id to assign to the first overridden property.
 *
 * Overrides all #GObject properties in the #XdpImplGlobalShortcuts interface for a concrete class.
 * The properties are overridden in the order they are defined.
 *
 * Returns: The last property id.
 */
guint
xdp_impl_global_shortcuts_override_properties (GObjectClass *klass, guint property_id_begin)
{
  g_object_class_override_property (klass, property_id_begin++, "version");
  return property_id_begin - 1;
}


inline static void
xdp_impl_global_shortcuts_signal_marshal_activated (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  _g_dbus_codegen_marshal_VOID__STRING_STRING_UINT64_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_impl_global_shortcuts_signal_marshal_deactivated (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  _g_dbus_codegen_marshal_VOID__STRING_STRING_UINT64_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_impl_global_shortcuts_signal_marshal_shortcuts_changed (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  _g_dbus_codegen_marshal_VOID__STRING_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_impl_global_shortcuts_method_marshal_create_session (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  _g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_STRING_STRING_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_impl_global_shortcuts_method_marshal_bind_shortcuts (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  _g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_STRING_VARIANT_STRING_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_impl_global_shortcuts_method_marshal_list_shortcuts (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  _g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_STRING (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}


/**
 * XdpImplGlobalShortcuts:
 *
 * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-GlobalShortcuts.top_of_page">org.freedesktop.impl.portal.GlobalShortcuts</link>.
 */

/**
 * XdpImplGlobalShortcutsIface:
 * @parent_iface: The parent interface.
 * @handle_bind_shortcuts: Handler for the #XdpImplGlobalShortcuts::handle-bind-shortcuts signal.
 * @handle_create_session: Handler for the #XdpImplGlobalShortcuts::handle-create-session signal.
 * @handle_list_shortcuts: Handler for the #XdpImplGlobalShortcuts::handle-list-shortcuts signal.
 * @get_version: Getter for the #XdpImplGlobalShortcuts:version property.
 * @activated: Handler for the #XdpImplGlobalShortcuts::activated signal.
 * @deactivated: Handler for the #XdpImplGlobalShortcuts::deactivated signal.
 * @shortcuts_changed: Handler for the #XdpImplGlobalShortcuts::shortcuts-changed signal.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-GlobalShortcuts.top_of_page">org.freedesktop.impl.portal.GlobalShortcuts</link>.
 */

typedef XdpImplGlobalShortcutsIface XdpImplGlobalShortcutsInterface;
G_DEFINE_INTERFACE (XdpImplGlobalShortcuts, xdp_impl_global_shortcuts, G_TYPE_OBJECT)

static void
xdp_impl_global_shortcuts_default_init (XdpImplGlobalShortcutsIface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * XdpImplGlobalShortcuts::handle-create-session:
   * @object: A #XdpImplGlobalShortcuts.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_handle: Argument passed by remote caller.
   * @arg_session_handle: Argument passed by remote caller.
   * @arg_app_id: Argument passed by remote caller.
   * @arg_options: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-impl-portal-GlobalShortcuts.CreateSession">CreateSession()</link> 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 xdp_impl_global_shortcuts_complete_create_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.
   *
   * 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.
   */
  g_signal_new ("handle-create-session",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpImplGlobalShortcutsIface, handle_create_session),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_impl_global_shortcuts_method_marshal_create_session,
    G_TYPE_BOOLEAN,
    5,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_VARIANT);

  /**
   * XdpImplGlobalShortcuts::handle-bind-shortcuts:
   * @object: A #XdpImplGlobalShortcuts.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_handle: Argument passed by remote caller.
   * @arg_session_handle: Argument passed by remote caller.
   * @arg_shortcuts: Argument passed by remote caller.
   * @arg_parent_window: Argument passed by remote caller.
   * @arg_options: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-impl-portal-GlobalShortcuts.BindShortcuts">BindShortcuts()</link> 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 xdp_impl_global_shortcuts_complete_bind_shortcuts() 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.
   *
   * 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.
   */
  g_signal_new ("handle-bind-shortcuts",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpImplGlobalShortcutsIface, handle_bind_shortcuts),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_impl_global_shortcuts_method_marshal_bind_shortcuts,
    G_TYPE_BOOLEAN,
    6,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_VARIANT, G_TYPE_STRING, G_TYPE_VARIANT);

  /**
   * XdpImplGlobalShortcuts::handle-list-shortcuts:
   * @object: A #XdpImplGlobalShortcuts.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_handle: Argument passed by remote caller.
   * @arg_session_handle: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-impl-portal-GlobalShortcuts.ListShortcuts">ListShortcuts()</link> 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 xdp_impl_global_shortcuts_complete_list_shortcuts() 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.
   *
   * 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.
   */
  g_signal_new ("handle-list-shortcuts",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpImplGlobalShortcutsIface, handle_list_shortcuts),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_impl_global_shortcuts_method_marshal_list_shortcuts,
    G_TYPE_BOOLEAN,
    3,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_STRING);

  /* GObject signals for received D-Bus signals: */
  /**
   * XdpImplGlobalShortcuts::activated:
   * @object: A #XdpImplGlobalShortcuts.
   * @arg_session_handle: Argument.
   * @arg_shortcut_id: Argument.
   * @arg_timestamp: Argument.
   * @arg_options: Argument.
   *
   * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-freedesktop-impl-portal-GlobalShortcuts.Activated">"Activated"</link> 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.
   */
  XDP_IMPL__GLOBAL_SHORTCUTS_SIGNALS[XDP_IMPL__GLOBAL_SHORTCUTS_ACTIVATED] =
    g_signal_new ("activated",
      G_TYPE_FROM_INTERFACE (iface),
      G_SIGNAL_RUN_LAST,
      G_STRUCT_OFFSET (XdpImplGlobalShortcutsIface, activated),
      NULL,
      NULL,
      xdp_impl_global_shortcuts_signal_marshal_activated,
      G_TYPE_NONE,
      4, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_UINT64, G_TYPE_VARIANT);

  /**
   * XdpImplGlobalShortcuts::deactivated:
   * @object: A #XdpImplGlobalShortcuts.
   * @arg_session_handle: Argument.
   * @arg_shortcut_id: Argument.
   * @arg_timestamp: Argument.
   * @arg_options: Argument.
   *
   * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-freedesktop-impl-portal-GlobalShortcuts.Deactivated">"Deactivated"</link> 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.
   */
  XDP_IMPL__GLOBAL_SHORTCUTS_SIGNALS[XDP_IMPL__GLOBAL_SHORTCUTS_DEACTIVATED] =
    g_signal_new ("deactivated",
      G_TYPE_FROM_INTERFACE (iface),
      G_SIGNAL_RUN_LAST,
      G_STRUCT_OFFSET (XdpImplGlobalShortcutsIface, deactivated),
      NULL,
      NULL,
      xdp_impl_global_shortcuts_signal_marshal_deactivated,
      G_TYPE_NONE,
      4, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_UINT64, G_TYPE_VARIANT);

  /**
   * XdpImplGlobalShortcuts::shortcuts-changed:
   * @object: A #XdpImplGlobalShortcuts.
   * @arg_session_handle: Argument.
   * @arg_shortcuts: Argument.
   *
   * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-freedesktop-impl-portal-GlobalShortcuts.ShortcutsChanged">"ShortcutsChanged"</link> 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.
   */
  XDP_IMPL__GLOBAL_SHORTCUTS_SIGNALS[XDP_IMPL__GLOBAL_SHORTCUTS_SHORTCUTS_CHANGED] =
    g_signal_new ("shortcuts-changed",
      G_TYPE_FROM_INTERFACE (iface),
      G_SIGNAL_RUN_LAST,
      G_STRUCT_OFFSET (XdpImplGlobalShortcutsIface, shortcuts_changed),
      NULL,
      NULL,
      xdp_impl_global_shortcuts_signal_marshal_shortcuts_changed,
      G_TYPE_NONE,
      2, G_TYPE_STRING, G_TYPE_VARIANT);

  /* GObject properties for D-Bus properties: */
  /**
   * XdpImplGlobalShortcuts:version:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-impl-portal-GlobalShortcuts.version">"version"</link>.
   *
   * 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.
   */
  g_object_interface_install_property (iface,
    g_param_spec_uint ("version", "version", "version", 0, G_MAXUINT32, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
}

/**
 * xdp_impl_global_shortcuts_get_version: (skip)
 * @object: A #XdpImplGlobalShortcuts.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-impl-portal-GlobalShortcuts.version">"version"</link> D-Bus property.
 *
 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
 *
 * Returns: The property value.
 */
guint 
xdp_impl_global_shortcuts_get_version (XdpImplGlobalShortcuts *object)
{
  g_return_val_if_fail (XDP_IMPL_IS_GLOBAL_SHORTCUTS (object), 0);

  return XDP_IMPL_GLOBAL_SHORTCUTS_GET_IFACE (object)->get_version (object);
}

/**
 * xdp_impl_global_shortcuts_set_version: (skip)
 * @object: A #XdpImplGlobalShortcuts.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-freedesktop-impl-portal-GlobalShortcuts.version">"version"</link> 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.
 */
void
xdp_impl_global_shortcuts_set_version (XdpImplGlobalShortcuts *object, guint value)
{
  g_object_set (G_OBJECT (object), "version", value, NULL);
}

/**
 * xdp_impl_global_shortcuts_emit_activated:
 * @object: A #XdpImplGlobalShortcuts.
 * @arg_session_handle: Argument to pass with the signal.
 * @arg_shortcut_id: Argument to pass with the signal.
 * @arg_timestamp: Argument to pass with the signal.
 * @arg_options: Argument to pass with the signal.
 *
 * Emits the <link linkend="gdbus-signal-org-freedesktop-impl-portal-GlobalShortcuts.Activated">"Activated"</link> D-Bus signal.
 */
void
xdp_impl_global_shortcuts_emit_activated (
    XdpImplGlobalShortcuts *object,
    const gchar *arg_session_handle,
    const gchar *arg_shortcut_id,
    guint64 arg_timestamp,
    GVariant *arg_options)
{
  g_signal_emit (object, XDP_IMPL__GLOBAL_SHORTCUTS_SIGNALS[XDP_IMPL__GLOBAL_SHORTCUTS_ACTIVATED], 0, arg_session_handle, arg_shortcut_id, arg_timestamp, arg_options);
}

/**
 * xdp_impl_global_shortcuts_emit_deactivated:
 * @object: A #XdpImplGlobalShortcuts.
 * @arg_session_handle: Argument to pass with the signal.
 * @arg_shortcut_id: Argument to pass with the signal.
 * @arg_timestamp: Argument to pass with the signal.
 * @arg_options: Argument to pass with the signal.
 *
 * Emits the <link linkend="gdbus-signal-org-freedesktop-impl-portal-GlobalShortcuts.Deactivated">"Deactivated"</link> D-Bus signal.
 */
void
xdp_impl_global_shortcuts_emit_deactivated (
    XdpImplGlobalShortcuts *object,
    const gchar *arg_session_handle,
    const gchar *arg_shortcut_id,
    guint64 arg_timestamp,
    GVariant *arg_options)
{
  g_signal_emit (object, XDP_IMPL__GLOBAL_SHORTCUTS_SIGNALS[XDP_IMPL__GLOBAL_SHORTCUTS_DEACTIVATED], 0, arg_session_handle, arg_shortcut_id, arg_timestamp, arg_options);
}

/**
 * xdp_impl_global_shortcuts_emit_shortcuts_changed:
 * @object: A #XdpImplGlobalShortcuts.
 * @arg_session_handle: Argument to pass with the signal.
 * @arg_shortcuts: Argument to pass with the signal.
 *
 * Emits the <link linkend="gdbus-signal-org-freedesktop-impl-portal-GlobalShortcuts.ShortcutsChanged">"ShortcutsChanged"</link> D-Bus signal.
 */
void
xdp_impl_global_shortcuts_emit_shortcuts_changed (
    XdpImplGlobalShortcuts *object,
    const gchar *arg_session_handle,
    GVariant *arg_shortcuts)
{
  g_signal_emit (object, XDP_IMPL__GLOBAL_SHORTCUTS_SIGNALS[XDP_IMPL__GLOBAL_SHORTCUTS_SHORTCUTS_CHANGED], 0, arg_session_handle, arg_shortcuts);
}

/**
 * xdp_impl_global_shortcuts_call_create_session:
 * @proxy: A #XdpImplGlobalShortcutsProxy.
 * @arg_handle: Argument to pass with the method invocation.
 * @arg_session_handle: Argument to pass with the method invocation.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-GlobalShortcuts.CreateSession">CreateSession()</link> 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 xdp_impl_global_shortcuts_call_create_session_finish() to get the result of the operation.
 *
 * See xdp_impl_global_shortcuts_call_create_session_sync() for the synchronous, blocking version of this method.
 */
void
xdp_impl_global_shortcuts_call_create_session (
    XdpImplGlobalShortcuts *proxy,
    const gchar *arg_handle,
    const gchar *arg_session_handle,
    const gchar *arg_app_id,
    GVariant *arg_options,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "CreateSession",
    g_variant_new ("(oos@a{sv})",
                   arg_handle,
                   arg_session_handle,
                   arg_app_id,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_impl_global_shortcuts_call_create_session_finish:
 * @proxy: A #XdpImplGlobalShortcutsProxy.
 * @out_response: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_results: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_global_shortcuts_call_create_session().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_impl_global_shortcuts_call_create_session().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_global_shortcuts_call_create_session_finish (
    XdpImplGlobalShortcuts *proxy,
    guint* out_response,
    GVariant ** out_results,
    GAsyncResult *res,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(u@a{sv})",
                 out_response,
                 out_results);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_global_shortcuts_call_create_session_sync:
 * @proxy: A #XdpImplGlobalShortcutsProxy.
 * @arg_handle: Argument to pass with the method invocation.
 * @arg_session_handle: Argument to pass with the method invocation.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @out_response: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_results: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-GlobalShortcuts.CreateSession">CreateSession()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_global_shortcuts_call_create_session() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_global_shortcuts_call_create_session_sync (
    XdpImplGlobalShortcuts *proxy,
    const gchar *arg_handle,
    const gchar *arg_session_handle,
    const gchar *arg_app_id,
    GVariant *arg_options,
    guint* out_response,
    GVariant ** out_results,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "CreateSession",
    g_variant_new ("(oos@a{sv})",
                   arg_handle,
                   arg_session_handle,
                   arg_app_id,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(u@a{sv})",
                 out_response,
                 out_results);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_global_shortcuts_call_bind_shortcuts:
 * @proxy: A #XdpImplGlobalShortcutsProxy.
 * @arg_handle: Argument to pass with the method invocation.
 * @arg_session_handle: Argument to pass with the method invocation.
 * @arg_shortcuts: Argument to pass with the method invocation.
 * @arg_parent_window: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-GlobalShortcuts.BindShortcuts">BindShortcuts()</link> 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 xdp_impl_global_shortcuts_call_bind_shortcuts_finish() to get the result of the operation.
 *
 * See xdp_impl_global_shortcuts_call_bind_shortcuts_sync() for the synchronous, blocking version of this method.
 */
void
xdp_impl_global_shortcuts_call_bind_shortcuts (
    XdpImplGlobalShortcuts *proxy,
    const gchar *arg_handle,
    const gchar *arg_session_handle,
    GVariant *arg_shortcuts,
    const gchar *arg_parent_window,
    GVariant *arg_options,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "BindShortcuts",
    g_variant_new ("(oo@a(sa{sv})s@a{sv})",
                   arg_handle,
                   arg_session_handle,
                   arg_shortcuts,
                   arg_parent_window,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_impl_global_shortcuts_call_bind_shortcuts_finish:
 * @proxy: A #XdpImplGlobalShortcutsProxy.
 * @out_response: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_results: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_global_shortcuts_call_bind_shortcuts().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_impl_global_shortcuts_call_bind_shortcuts().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_global_shortcuts_call_bind_shortcuts_finish (
    XdpImplGlobalShortcuts *proxy,
    guint* out_response,
    GVariant ** out_results,
    GAsyncResult *res,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(u@a{sv})",
                 out_response,
                 out_results);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_global_shortcuts_call_bind_shortcuts_sync:
 * @proxy: A #XdpImplGlobalShortcutsProxy.
 * @arg_handle: Argument to pass with the method invocation.
 * @arg_session_handle: Argument to pass with the method invocation.
 * @arg_shortcuts: Argument to pass with the method invocation.
 * @arg_parent_window: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @out_response: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_results: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-GlobalShortcuts.BindShortcuts">BindShortcuts()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_global_shortcuts_call_bind_shortcuts() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_global_shortcuts_call_bind_shortcuts_sync (
    XdpImplGlobalShortcuts *proxy,
    const gchar *arg_handle,
    const gchar *arg_session_handle,
    GVariant *arg_shortcuts,
    const gchar *arg_parent_window,
    GVariant *arg_options,
    guint* out_response,
    GVariant ** out_results,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "BindShortcuts",
    g_variant_new ("(oo@a(sa{sv})s@a{sv})",
                   arg_handle,
                   arg_session_handle,
                   arg_shortcuts,
                   arg_parent_window,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(u@a{sv})",
                 out_response,
                 out_results);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_global_shortcuts_call_list_shortcuts:
 * @proxy: A #XdpImplGlobalShortcutsProxy.
 * @arg_handle: Argument to pass with the method invocation.
 * @arg_session_handle: Argument to pass with the method invocation.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-GlobalShortcuts.ListShortcuts">ListShortcuts()</link> 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 xdp_impl_global_shortcuts_call_list_shortcuts_finish() to get the result of the operation.
 *
 * See xdp_impl_global_shortcuts_call_list_shortcuts_sync() for the synchronous, blocking version of this method.
 */
void
xdp_impl_global_shortcuts_call_list_shortcuts (
    XdpImplGlobalShortcuts *proxy,
    const gchar *arg_handle,
    const gchar *arg_session_handle,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "ListShortcuts",
    g_variant_new ("(oo)",
                   arg_handle,
                   arg_session_handle),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_impl_global_shortcuts_call_list_shortcuts_finish:
 * @proxy: A #XdpImplGlobalShortcutsProxy.
 * @out_response: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_results: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_global_shortcuts_call_list_shortcuts().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_impl_global_shortcuts_call_list_shortcuts().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_global_shortcuts_call_list_shortcuts_finish (
    XdpImplGlobalShortcuts *proxy,
    guint* out_response,
    GVariant ** out_results,
    GAsyncResult *res,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(u@a{sv})",
                 out_response,
                 out_results);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_global_shortcuts_call_list_shortcuts_sync:
 * @proxy: A #XdpImplGlobalShortcutsProxy.
 * @arg_handle: Argument to pass with the method invocation.
 * @arg_session_handle: Argument to pass with the method invocation.
 * @out_response: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_results: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-GlobalShortcuts.ListShortcuts">ListShortcuts()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_global_shortcuts_call_list_shortcuts() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_global_shortcuts_call_list_shortcuts_sync (
    XdpImplGlobalShortcuts *proxy,
    const gchar *arg_handle,
    const gchar *arg_session_handle,
    guint* out_response,
    GVariant ** out_results,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "ListShortcuts",
    g_variant_new ("(oo)",
                   arg_handle,
                   arg_session_handle),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(u@a{sv})",
                 out_response,
                 out_results);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_global_shortcuts_complete_create_session:
 * @object: A #XdpImplGlobalShortcuts.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @response: Parameter to return.
 * @results: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-impl-portal-GlobalShortcuts.CreateSession">CreateSession()</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
xdp_impl_global_shortcuts_complete_create_session (
    XdpImplGlobalShortcuts *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    guint response,
    GVariant *results)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(u@a{sv})",
                   response,
                   results));
}

/**
 * xdp_impl_global_shortcuts_complete_bind_shortcuts:
 * @object: A #XdpImplGlobalShortcuts.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @response: Parameter to return.
 * @results: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-impl-portal-GlobalShortcuts.BindShortcuts">BindShortcuts()</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
xdp_impl_global_shortcuts_complete_bind_shortcuts (
    XdpImplGlobalShortcuts *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    guint response,
    GVariant *results)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(u@a{sv})",
                   response,
                   results));
}

/**
 * xdp_impl_global_shortcuts_complete_list_shortcuts:
 * @object: A #XdpImplGlobalShortcuts.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @response: Parameter to return.
 * @results: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-impl-portal-GlobalShortcuts.ListShortcuts">ListShortcuts()</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
xdp_impl_global_shortcuts_complete_list_shortcuts (
    XdpImplGlobalShortcuts *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    guint response,
    GVariant *results)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(u@a{sv})",
                   response,
                   results));
}

/* ------------------------------------------------------------------------ */

/**
 * XdpImplGlobalShortcutsProxy:
 *
 * The #XdpImplGlobalShortcutsProxy structure contains only private data and should only be accessed using the provided API.
 */

/**
 * XdpImplGlobalShortcutsProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpImplGlobalShortcutsProxy.
 */

struct _XdpImplGlobalShortcutsProxyPrivate
{
  GData *qdata;
};

static void xdp_impl_global_shortcuts_proxy_iface_init (XdpImplGlobalShortcutsIface *iface);

#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpImplGlobalShortcutsProxy, xdp_impl_global_shortcuts_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (XdpImplGlobalShortcutsProxy)
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_GLOBAL_SHORTCUTS, xdp_impl_global_shortcuts_proxy_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpImplGlobalShortcutsProxy, xdp_impl_global_shortcuts_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_GLOBAL_SHORTCUTS, xdp_impl_global_shortcuts_proxy_iface_init))

#endif
static void
xdp_impl_global_shortcuts_proxy_finalize (GObject *object)
{
  XdpImplGlobalShortcutsProxy *proxy = XDP_IMPL_GLOBAL_SHORTCUTS_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (xdp_impl_global_shortcuts_proxy_parent_class)->finalize (object);
}

static void
xdp_impl_global_shortcuts_proxy_get_property (GObject      *object,
  guint         prop_id,
  GValue       *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  const _ExtendedGDBusPropertyInfo *info;
  GVariant *variant;
  g_assert (prop_id != 0 && prop_id - 1 < 1);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_impl_global_shortcuts_property_info_pointers[prop_id - 1];
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), info->parent_struct.name);
  if (info->use_gvariant)
    {
      g_value_set_variant (value, variant);
    }
  else
    {
      if (variant != NULL)
        g_dbus_gvariant_to_gvalue (variant, value);
    }
  if (variant != NULL)
    g_variant_unref (variant);
}

static void
xdp_impl_global_shortcuts_proxy_set_property_cb (GDBusProxy *proxy,
  GAsyncResult *res,
  gpointer      user_data)
{
  const _ExtendedGDBusPropertyInfo *info = user_data;
  GError *error;
  GVariant *_ret;
  error = NULL;
  _ret = g_dbus_proxy_call_finish (proxy, res, &error);
  if (!_ret)
    {
      g_warning ("Error setting property '%s' on interface org.freedesktop.impl.portal.GlobalShortcuts: %s (%s, %d)",
                 info->parent_struct.name, 
                 error->message, g_quark_to_string (error->domain), error->code);
      g_error_free (error);
    }
  else
    {
      g_variant_unref (_ret);
    }
}

static void
xdp_impl_global_shortcuts_proxy_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  const _ExtendedGDBusPropertyInfo *info;
  GVariant *variant;
  g_assert (prop_id != 0 && prop_id - 1 < 1);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_impl_global_shortcuts_property_info_pointers[prop_id - 1];
  variant = g_dbus_gvalue_to_gvariant (value, G_VARIANT_TYPE (info->parent_struct.signature));
  g_dbus_proxy_call (G_DBUS_PROXY (object),
    "org.freedesktop.DBus.Properties.Set",
    g_variant_new ("(ssv)", "org.freedesktop.impl.portal.GlobalShortcuts", info->parent_struct.name, variant),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    NULL, (GAsyncReadyCallback) xdp_impl_global_shortcuts_proxy_set_property_cb, (GDBusPropertyInfo *) &info->parent_struct);
  g_variant_unref (variant);
}

static void
xdp_impl_global_shortcuts_proxy_g_signal (GDBusProxy *proxy,
  const gchar *sender_name G_GNUC_UNUSED,
  const gchar *signal_name,
  GVariant *parameters)
{
  _ExtendedGDBusSignalInfo *info;
  GVariantIter iter;
  GVariant *child;
  GValue *paramv;
  gsize num_params;
  gsize n;
  guint signal_id;
  info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_xdp_impl_global_shortcuts_interface_info.parent_struct, signal_name);
  if (info == NULL)
    return;
  num_params = g_variant_n_children (parameters);
  paramv = g_new0 (GValue, num_params + 1);
  g_value_init (&paramv[0], XDP_IMPL_TYPE_GLOBAL_SHORTCUTS);
  g_value_set_object (&paramv[0], proxy);
  g_variant_iter_init (&iter, parameters);
  n = 1;
  while ((child = g_variant_iter_next_value (&iter)) != NULL)
    {
      _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1];
      if (arg_info->use_gvariant)
        {
          g_value_init (&paramv[n], G_TYPE_VARIANT);
          g_value_set_variant (&paramv[n], child);
          n++;
        }
      else
        g_dbus_gvariant_to_gvalue (child, &paramv[n++]);
      g_variant_unref (child);
    }
  signal_id = g_signal_lookup (info->signal_name, XDP_IMPL_TYPE_GLOBAL_SHORTCUTS);
  g_signal_emitv (paramv, signal_id, 0, NULL);
  for (n = 0; n < num_params + 1; n++)
    g_value_unset (&paramv[n]);
  g_free (paramv);
}

static void
xdp_impl_global_shortcuts_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  XdpImplGlobalShortcutsProxy *proxy = XDP_IMPL_GLOBAL_SHORTCUTS_PROXY (_proxy);
  guint n;
  const gchar *key;
  GVariantIter *iter;
  _ExtendedGDBusPropertyInfo *info;
  g_variant_get (changed_properties, "a{sv}", &iter);
  while (g_variant_iter_next (iter, "{&sv}", &key, NULL))
    {
      info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_global_shortcuts_interface_info.parent_struct, key);
      g_datalist_remove_data (&proxy->priv->qdata, key);
      if (info != NULL)
        g_object_notify (G_OBJECT (proxy), info->hyphen_name);
    }
  g_variant_iter_free (iter);
  for (n = 0; invalidated_properties[n] != NULL; n++)
    {
      info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_global_shortcuts_interface_info.parent_struct, invalidated_properties[n]);
      g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]);
      if (info != NULL)
        g_object_notify (G_OBJECT (proxy), info->hyphen_name);
    }
}

static guint 
xdp_impl_global_shortcuts_proxy_get_version (XdpImplGlobalShortcuts *object)
{
  XdpImplGlobalShortcutsProxy *proxy = XDP_IMPL_GLOBAL_SHORTCUTS_PROXY (object);
  GVariant *variant;
  guint value = 0;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "version");
  if (variant != NULL)
    {
      value = g_variant_get_uint32 (variant);
      g_variant_unref (variant);
    }
  return value;
}

static void
xdp_impl_global_shortcuts_proxy_init (XdpImplGlobalShortcutsProxy *proxy)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  proxy->priv = xdp_impl_global_shortcuts_proxy_get_instance_private (proxy);
#else
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, XDP_IMPL_TYPE_GLOBAL_SHORTCUTS_PROXY, XdpImplGlobalShortcutsProxyPrivate);
#endif

  g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), xdp_impl_global_shortcuts_interface_info ());
}

static void
xdp_impl_global_shortcuts_proxy_class_init (XdpImplGlobalShortcutsProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = xdp_impl_global_shortcuts_proxy_finalize;
  gobject_class->get_property = xdp_impl_global_shortcuts_proxy_get_property;
  gobject_class->set_property = xdp_impl_global_shortcuts_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = xdp_impl_global_shortcuts_proxy_g_signal;
  proxy_class->g_properties_changed = xdp_impl_global_shortcuts_proxy_g_properties_changed;

  xdp_impl_global_shortcuts_override_properties (gobject_class, 1);

#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
  g_type_class_add_private (klass, sizeof (XdpImplGlobalShortcutsProxyPrivate));
#endif
}

static void
xdp_impl_global_shortcuts_proxy_iface_init (XdpImplGlobalShortcutsIface *iface)
{
  iface->get_version = xdp_impl_global_shortcuts_proxy_get_version;
}

/**
 * xdp_impl_global_shortcuts_proxy_new:
 * @connection: A #GDBusConnection.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-GlobalShortcuts.top_of_page">org.freedesktop.impl.portal.GlobalShortcuts</link>. 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 xdp_impl_global_shortcuts_proxy_new_finish() to get the result of the operation.
 *
 * See xdp_impl_global_shortcuts_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_impl_global_shortcuts_proxy_new (
    GDBusConnection     *connection,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GAsyncReadyCallback  callback,
    gpointer             user_data)
{
  g_async_initable_new_async (XDP_IMPL_TYPE_GLOBAL_SHORTCUTS_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.GlobalShortcuts", NULL);
}

/**
 * xdp_impl_global_shortcuts_proxy_new_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_global_shortcuts_proxy_new().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_impl_global_shortcuts_proxy_new().
 *
 * Returns: (transfer full) (type XdpImplGlobalShortcutsProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplGlobalShortcuts *
xdp_impl_global_shortcuts_proxy_new_finish (
    GAsyncResult        *res,
    GError             **error)
{
  GObject *ret;
  GObject *source_object;
  source_object = g_async_result_get_source_object (res);
  ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
  g_object_unref (source_object);
  if (ret != NULL)
    return XDP_IMPL_GLOBAL_SHORTCUTS (ret);
  else
    return NULL;
}

/**
 * xdp_impl_global_shortcuts_proxy_new_sync:
 * @connection: A #GDBusConnection.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL
 *
 * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-GlobalShortcuts.top_of_page">org.freedesktop.impl.portal.GlobalShortcuts</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_global_shortcuts_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpImplGlobalShortcutsProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplGlobalShortcuts *
xdp_impl_global_shortcuts_proxy_new_sync (
    GDBusConnection     *connection,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GError             **error)
{
  GInitable *ret;
  ret = g_initable_new (XDP_IMPL_TYPE_GLOBAL_SHORTCUTS_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.GlobalShortcuts", NULL);
  if (ret != NULL)
    return XDP_IMPL_GLOBAL_SHORTCUTS (ret);
  else
    return NULL;
}


/**
 * xdp_impl_global_shortcuts_proxy_new_for_bus:
 * @bus_type: A #GBusType.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: A bus name (well-known or unique).
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
 * @user_data: User data to pass to @callback.
 *
 * Like xdp_impl_global_shortcuts_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 xdp_impl_global_shortcuts_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See xdp_impl_global_shortcuts_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_impl_global_shortcuts_proxy_new_for_bus (
    GBusType             bus_type,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GAsyncReadyCallback  callback,
    gpointer             user_data)
{
  g_async_initable_new_async (XDP_IMPL_TYPE_GLOBAL_SHORTCUTS_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.GlobalShortcuts", NULL);
}

/**
 * xdp_impl_global_shortcuts_proxy_new_for_bus_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_global_shortcuts_proxy_new_for_bus().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_impl_global_shortcuts_proxy_new_for_bus().
 *
 * Returns: (transfer full) (type XdpImplGlobalShortcutsProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplGlobalShortcuts *
xdp_impl_global_shortcuts_proxy_new_for_bus_finish (
    GAsyncResult        *res,
    GError             **error)
{
  GObject *ret;
  GObject *source_object;
  source_object = g_async_result_get_source_object (res);
  ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
  g_object_unref (source_object);
  if (ret != NULL)
    return XDP_IMPL_GLOBAL_SHORTCUTS (ret);
  else
    return NULL;
}

/**
 * xdp_impl_global_shortcuts_proxy_new_for_bus_sync:
 * @bus_type: A #GBusType.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: A bus name (well-known or unique).
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL
 *
 * Like xdp_impl_global_shortcuts_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_global_shortcuts_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpImplGlobalShortcutsProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplGlobalShortcuts *
xdp_impl_global_shortcuts_proxy_new_for_bus_sync (
    GBusType             bus_type,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GError             **error)
{
  GInitable *ret;
  ret = g_initable_new (XDP_IMPL_TYPE_GLOBAL_SHORTCUTS_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.GlobalShortcuts", NULL);
  if (ret != NULL)
    return XDP_IMPL_GLOBAL_SHORTCUTS (ret);
  else
    return NULL;
}


/* ------------------------------------------------------------------------ */

/**
 * XdpImplGlobalShortcutsSkeleton:
 *
 * The #XdpImplGlobalShortcutsSkeleton structure contains only private data and should only be accessed using the provided API.
 */

/**
 * XdpImplGlobalShortcutsSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpImplGlobalShortcutsSkeleton.
 */

struct _XdpImplGlobalShortcutsSkeletonPrivate
{
  GValue *properties;
  GList *changed_properties;
  GSource *changed_properties_idle_source;
  GMainContext *context;
  GMutex lock;
};

static void
_xdp_impl_global_shortcuts_skeleton_handle_method_call (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name,
  const gchar *method_name,
  GVariant *parameters,
  GDBusMethodInvocation *invocation,
  gpointer user_data)
{
  XdpImplGlobalShortcutsSkeleton *skeleton = XDP_IMPL_GLOBAL_SHORTCUTS_SKELETON (user_data);
  _ExtendedGDBusMethodInfo *info;
  GVariantIter iter;
  GVariant *child;
  GValue *paramv;
  gsize num_params;
  guint num_extra;
  gsize n;
  guint signal_id;
  GValue return_value = G_VALUE_INIT;
  info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
  g_assert (info != NULL);
  num_params = g_variant_n_children (parameters);
  num_extra = info->pass_fdlist ? 3 : 2;  paramv = g_new0 (GValue, num_params + num_extra);
  n = 0;
  g_value_init (&paramv[n], XDP_IMPL_TYPE_GLOBAL_SHORTCUTS);
  g_value_set_object (&paramv[n++], skeleton);
  g_value_init (&paramv[n], G_TYPE_DBUS_METHOD_INVOCATION);
  g_value_set_object (&paramv[n++], invocation);
  if (info->pass_fdlist)
    {
#ifdef G_OS_UNIX
      g_value_init (&paramv[n], G_TYPE_UNIX_FD_LIST);
      g_value_set_object (&paramv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation)));
#else
      g_assert_not_reached ();
#endif
    }
  g_variant_iter_init (&iter, parameters);
  while ((child = g_variant_iter_next_value (&iter)) != NULL)
    {
      _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra];
      if (arg_info->use_gvariant)
        {
          g_value_init (&paramv[n], G_TYPE_VARIANT);
          g_value_set_variant (&paramv[n], child);
          n++;
        }
      else
        g_dbus_gvariant_to_gvalue (child, &paramv[n++]);
      g_variant_unref (child);
    }
  signal_id = g_signal_lookup (info->signal_name, XDP_IMPL_TYPE_GLOBAL_SHORTCUTS);
  g_value_init (&return_value, G_TYPE_BOOLEAN);
  g_signal_emitv (paramv, signal_id, 0, &return_value);
  if (!g_value_get_boolean (&return_value))
    g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD, "Method %s is not implemented on interface %s", method_name, interface_name);
  g_value_unset (&return_value);
  for (n = 0; n < num_params + num_extra; n++)
    g_value_unset (&paramv[n]);
  g_free (paramv);
}

static GVariant *
_xdp_impl_global_shortcuts_skeleton_handle_get_property (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name G_GNUC_UNUSED,
  const gchar *property_name,
  GError **error,
  gpointer user_data)
{
  XdpImplGlobalShortcutsSkeleton *skeleton = XDP_IMPL_GLOBAL_SHORTCUTS_SKELETON (user_data);
  GValue value = G_VALUE_INIT;
  GParamSpec *pspec;
  _ExtendedGDBusPropertyInfo *info;
  GVariant *ret;
  ret = NULL;
  info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_global_shortcuts_interface_info.parent_struct, property_name);
  g_assert (info != NULL);
  pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
  if (pspec == NULL)
    {
      g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
    }
  else
    {
      g_value_init (&value, pspec->value_type);
      g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value);
      ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature));
      g_value_unset (&value);
    }
  return ret;
}

static gboolean
_xdp_impl_global_shortcuts_skeleton_handle_set_property (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name G_GNUC_UNUSED,
  const gchar *property_name,
  GVariant *variant,
  GError **error,
  gpointer user_data)
{
  XdpImplGlobalShortcutsSkeleton *skeleton = XDP_IMPL_GLOBAL_SHORTCUTS_SKELETON (user_data);
  GValue value = G_VALUE_INIT;
  GParamSpec *pspec;
  _ExtendedGDBusPropertyInfo *info;
  gboolean ret;
  ret = FALSE;
  info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_global_shortcuts_interface_info.parent_struct, property_name);
  g_assert (info != NULL);
  pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
  if (pspec == NULL)
    {
      g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
    }
  else
    {
      if (info->use_gvariant)
        g_value_set_variant (&value, variant);
      else
        g_dbus_gvariant_to_gvalue (variant, &value);
      g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value);
      g_value_unset (&value);
      ret = TRUE;
    }
  return ret;
}

static const GDBusInterfaceVTable _xdp_impl_global_shortcuts_skeleton_vtable =
{
  _xdp_impl_global_shortcuts_skeleton_handle_method_call,
  _xdp_impl_global_shortcuts_skeleton_handle_get_property,
  _xdp_impl_global_shortcuts_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
xdp_impl_global_shortcuts_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return xdp_impl_global_shortcuts_interface_info ();
}

static GDBusInterfaceVTable *
xdp_impl_global_shortcuts_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_xdp_impl_global_shortcuts_skeleton_vtable;
}

static GVariant *
xdp_impl_global_shortcuts_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  XdpImplGlobalShortcutsSkeleton *skeleton = XDP_IMPL_GLOBAL_SHORTCUTS_SKELETON (_skeleton);

  GVariantBuilder builder;
  guint n;
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_84
  g_variant_builder_init_static (&builder, G_VARIANT_TYPE ("a{sv}"));
#else
  g_variant_builder_init(&builder, G_VARIANT_TYPE ("a{sv}"));
#endif
  if (_xdp_impl_global_shortcuts_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _xdp_impl_global_shortcuts_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _xdp_impl_global_shortcuts_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _xdp_impl_global_shortcuts_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.impl.portal.GlobalShortcuts", info->name, NULL, skeleton);
          if (value != NULL)
            {
              g_variant_take_ref (value);
              g_variant_builder_add (&builder, "{sv}", info->name, value);
              g_variant_unref (value);
            }
        }
    }
out:
  return g_variant_builder_end (&builder);
}

static gboolean _xdp_impl_global_shortcuts_emit_changed (gpointer user_data);

static void
xdp_impl_global_shortcuts_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
{
  XdpImplGlobalShortcutsSkeleton *skeleton = XDP_IMPL_GLOBAL_SHORTCUTS_SKELETON (_skeleton);
  gboolean emit_changed = FALSE;

  g_mutex_lock (&skeleton->priv->lock);
  if (skeleton->priv->changed_properties_idle_source != NULL)
    {
      g_source_destroy (skeleton->priv->changed_properties_idle_source);
      skeleton->priv->changed_properties_idle_source = NULL;
      emit_changed = TRUE;
    }
  g_mutex_unlock (&skeleton->priv->lock);

  if (emit_changed)
    _xdp_impl_global_shortcuts_emit_changed (skeleton);
}

static void
_xdp_impl_global_shortcuts_on_signal_activated (
    XdpImplGlobalShortcuts *object,
    const gchar *arg_session_handle,
    const gchar *arg_shortcut_id,
    guint64 arg_timestamp,
    GVariant *arg_options)
{
  XdpImplGlobalShortcutsSkeleton *skeleton = XDP_IMPL_GLOBAL_SHORTCUTS_SKELETON (object);

  GList      *connections, *l;
  GVariant   *signal_variant;
  connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));

  signal_variant = g_variant_ref_sink (g_variant_new ("(ost@a{sv})",
                   arg_session_handle,
                   arg_shortcut_id,
                   arg_timestamp,
                   arg_options));
  for (l = connections; l != NULL; l = l->next)
    {
      GDBusConnection *connection = l->data;
      g_dbus_connection_emit_signal (connection,
        NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.impl.portal.GlobalShortcuts", "Activated",
        signal_variant, NULL);
    }
  g_variant_unref (signal_variant);
  g_list_free_full (connections, g_object_unref);
}

static void
_xdp_impl_global_shortcuts_on_signal_deactivated (
    XdpImplGlobalShortcuts *object,
    const gchar *arg_session_handle,
    const gchar *arg_shortcut_id,
    guint64 arg_timestamp,
    GVariant *arg_options)
{
  XdpImplGlobalShortcutsSkeleton *skeleton = XDP_IMPL_GLOBAL_SHORTCUTS_SKELETON (object);

  GList      *connections, *l;
  GVariant   *signal_variant;
  connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));

  signal_variant = g_variant_ref_sink (g_variant_new ("(ost@a{sv})",
                   arg_session_handle,
                   arg_shortcut_id,
                   arg_timestamp,
                   arg_options));
  for (l = connections; l != NULL; l = l->next)
    {
      GDBusConnection *connection = l->data;
      g_dbus_connection_emit_signal (connection,
        NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.impl.portal.GlobalShortcuts", "Deactivated",
        signal_variant, NULL);
    }
  g_variant_unref (signal_variant);
  g_list_free_full (connections, g_object_unref);
}

static void
_xdp_impl_global_shortcuts_on_signal_shortcuts_changed (
    XdpImplGlobalShortcuts *object,
    const gchar *arg_session_handle,
    GVariant *arg_shortcuts)
{
  XdpImplGlobalShortcutsSkeleton *skeleton = XDP_IMPL_GLOBAL_SHORTCUTS_SKELETON (object);

  GList      *connections, *l;
  GVariant   *signal_variant;
  connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));

  signal_variant = g_variant_ref_sink (g_variant_new ("(o@a(sa{sv}))",
                   arg_session_handle,
                   arg_shortcuts));
  for (l = connections; l != NULL; l = l->next)
    {
      GDBusConnection *connection = l->data;
      g_dbus_connection_emit_signal (connection,
        NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.impl.portal.GlobalShortcuts", "ShortcutsChanged",
        signal_variant, NULL);
    }
  g_variant_unref (signal_variant);
  g_list_free_full (connections, g_object_unref);
}

static void xdp_impl_global_shortcuts_skeleton_iface_init (XdpImplGlobalShortcutsIface *iface);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpImplGlobalShortcutsSkeleton, xdp_impl_global_shortcuts_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (XdpImplGlobalShortcutsSkeleton)
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_GLOBAL_SHORTCUTS, xdp_impl_global_shortcuts_skeleton_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpImplGlobalShortcutsSkeleton, xdp_impl_global_shortcuts_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_GLOBAL_SHORTCUTS, xdp_impl_global_shortcuts_skeleton_iface_init))

#endif
static void
xdp_impl_global_shortcuts_skeleton_finalize (GObject *object)
{
  XdpImplGlobalShortcutsSkeleton *skeleton = XDP_IMPL_GLOBAL_SHORTCUTS_SKELETON (object);
  guint n;
  for (n = 0; n < 1; n++)
    g_value_unset (&skeleton->priv->properties[n]);
  g_free (skeleton->priv->properties);
  g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  /* coverity[missing_lock : SUPPRESS] */
  g_clear_pointer (&skeleton->priv->changed_properties_idle_source, g_source_destroy);
#else
  if (skeleton->priv->changed_properties_idle_source != NULL)
    g_source_destroy (skeleton->priv->changed_properties_idle_source);
skeleton->priv->changed_properties_idle_source = NULL;
#endif
  g_main_context_unref (skeleton->priv->context);
  g_mutex_clear (&skeleton->priv->lock);
  G_OBJECT_CLASS (xdp_impl_global_shortcuts_skeleton_parent_class)->finalize (object);
}

static void
xdp_impl_global_shortcuts_skeleton_get_property (GObject      *object,
  guint         prop_id,
  GValue       *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  XdpImplGlobalShortcutsSkeleton *skeleton = XDP_IMPL_GLOBAL_SHORTCUTS_SKELETON (object);
  g_assert (prop_id != 0 && prop_id - 1 < 1);
  g_mutex_lock (&skeleton->priv->lock);
  g_value_copy (&skeleton->priv->properties[prop_id - 1], value);
  g_mutex_unlock (&skeleton->priv->lock);
}

static gboolean
_xdp_impl_global_shortcuts_emit_changed (gpointer user_data)
{
  XdpImplGlobalShortcutsSkeleton *skeleton = XDP_IMPL_GLOBAL_SHORTCUTS_SKELETON (user_data);
  GList *l;
  GVariantBuilder builder;
  GVariantBuilder invalidated_builder;
  guint num_changes;

  g_mutex_lock (&skeleton->priv->lock);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_84
  g_variant_builder_init_static (&builder, G_VARIANT_TYPE ("a{sv}"));
  g_variant_builder_init_static (&invalidated_builder, G_VARIANT_TYPE ("as"));
#else
  g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
  g_variant_builder_init (&invalidated_builder, G_VARIANT_TYPE ("as"));
#endif
  for (l = skeleton->priv->changed_properties, num_changes = 0; l != NULL; l = l->next)
    {
      ChangedProperty *cp = l->data;
      GVariant *variant;
      const GValue *cur_value;

      cur_value = &skeleton->priv->properties[cp->prop_id - 1];
      if (!_g_value_equal (cur_value, &cp->orig_value))
        {
          variant = g_dbus_gvalue_to_gvariant (cur_value, G_VARIANT_TYPE (cp->info->parent_struct.signature));
          g_variant_builder_add (&builder, "{sv}", cp->info->parent_struct.name, variant);
          g_variant_unref (variant);
          num_changes++;
        }
    }
  if (num_changes > 0)
    {
      GList *connections, *ll;
      GVariant *signal_variant;
      signal_variant = g_variant_ref_sink (g_variant_new ("(sa{sv}as)", "org.freedesktop.impl.portal.GlobalShortcuts",
                                           &builder, &invalidated_builder));
      connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
      for (ll = connections; ll != NULL; ll = ll->next)
        {
          GDBusConnection *connection = ll->data;

          g_dbus_connection_emit_signal (connection,
                                         NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)),
                                         "org.freedesktop.DBus.Properties",
                                         "PropertiesChanged",
                                         signal_variant,
                                         NULL);
        }
      g_variant_unref (signal_variant);
      g_list_free_full (connections, g_object_unref);
    }
  else
    {
      g_variant_builder_clear (&builder);
      g_variant_builder_clear (&invalidated_builder);
    }
  g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
  skeleton->priv->changed_properties = NULL;
  skeleton->priv->changed_properties_idle_source = NULL;
  g_mutex_unlock (&skeleton->priv->lock);
  return FALSE;
}

static void
_xdp_impl_global_shortcuts_schedule_emit_changed (XdpImplGlobalShortcutsSkeleton *skeleton, const _ExtendedGDBusPropertyInfo *info, guint prop_id, const GValue *orig_value)
{
  ChangedProperty *cp;
  GList *l;
  cp = NULL;
  for (l = skeleton->priv->changed_properties; l != NULL; l = l->next)
    {
      ChangedProperty *i_cp = l->data;
      if (i_cp->info == info)
        {
          cp = i_cp;
          break;
        }
    }
  if (cp == NULL)
    {
      cp = g_new0 (ChangedProperty, 1);
      cp->prop_id = prop_id;
      cp->info = info;
      skeleton->priv->changed_properties = g_list_prepend (skeleton->priv->changed_properties, cp);
      g_value_init (&cp->orig_value, G_VALUE_TYPE (orig_value));
      g_value_copy (orig_value, &cp->orig_value);
    }
}

static void
xdp_impl_global_shortcuts_skeleton_notify (GObject      *object,
  GParamSpec *pspec G_GNUC_UNUSED)
{
  XdpImplGlobalShortcutsSkeleton *skeleton = XDP_IMPL_GLOBAL_SHORTCUTS_SKELETON (object);
  g_mutex_lock (&skeleton->priv->lock);
  if (skeleton->priv->changed_properties != NULL &&
      skeleton->priv->changed_properties_idle_source == NULL)
    {
      skeleton->priv->changed_properties_idle_source = g_idle_source_new ();
      g_source_set_priority (skeleton->priv->changed_properties_idle_source, G_PRIORITY_DEFAULT);
      g_source_set_callback (skeleton->priv->changed_properties_idle_source, _xdp_impl_global_shortcuts_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
      g_source_set_name (skeleton->priv->changed_properties_idle_source, "[generated] _xdp_impl_global_shortcuts_emit_changed");
      g_source_attach (skeleton->priv->changed_properties_idle_source, skeleton->priv->context);
      g_source_unref (skeleton->priv->changed_properties_idle_source);
    }
  g_mutex_unlock (&skeleton->priv->lock);
}

static void
xdp_impl_global_shortcuts_skeleton_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec)
{
  const _ExtendedGDBusPropertyInfo *info;
  XdpImplGlobalShortcutsSkeleton *skeleton = XDP_IMPL_GLOBAL_SHORTCUTS_SKELETON (object);
  g_assert (prop_id != 0 && prop_id - 1 < 1);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_impl_global_shortcuts_property_info_pointers[prop_id - 1];
  g_mutex_lock (&skeleton->priv->lock);
  g_object_freeze_notify (object);
  if (!_g_value_equal (value, &skeleton->priv->properties[prop_id - 1]))
    {
      if (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)) != NULL &&
          info->emits_changed_signal)
        _xdp_impl_global_shortcuts_schedule_emit_changed (skeleton, info, prop_id, &skeleton->priv->properties[prop_id - 1]);
      g_value_copy (value, &skeleton->priv->properties[prop_id - 1]);
      g_object_notify_by_pspec (object, pspec);
    }
  g_mutex_unlock (&skeleton->priv->lock);
  g_object_thaw_notify (object);
}

static void
xdp_impl_global_shortcuts_skeleton_init (XdpImplGlobalShortcutsSkeleton *skeleton)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  skeleton->priv = xdp_impl_global_shortcuts_skeleton_get_instance_private (skeleton);
#else
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, XDP_IMPL_TYPE_GLOBAL_SHORTCUTS_SKELETON, XdpImplGlobalShortcutsSkeletonPrivate);
#endif

  g_mutex_init (&skeleton->priv->lock);
  skeleton->priv->context = g_main_context_ref_thread_default ();
  skeleton->priv->properties = g_new0 (GValue, 1);
  g_value_init (&skeleton->priv->properties[0], G_TYPE_UINT);
}

static guint 
xdp_impl_global_shortcuts_skeleton_get_version (XdpImplGlobalShortcuts *object)
{
  XdpImplGlobalShortcutsSkeleton *skeleton = XDP_IMPL_GLOBAL_SHORTCUTS_SKELETON (object);
  guint value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_marshal_value_peek_uint (&(skeleton->priv->properties[0]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static void
xdp_impl_global_shortcuts_skeleton_class_init (XdpImplGlobalShortcutsSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize = xdp_impl_global_shortcuts_skeleton_finalize;
  gobject_class->get_property = xdp_impl_global_shortcuts_skeleton_get_property;
  gobject_class->set_property = xdp_impl_global_shortcuts_skeleton_set_property;
  gobject_class->notify       = xdp_impl_global_shortcuts_skeleton_notify;


  xdp_impl_global_shortcuts_override_properties (gobject_class, 1);

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = xdp_impl_global_shortcuts_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = xdp_impl_global_shortcuts_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = xdp_impl_global_shortcuts_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = xdp_impl_global_shortcuts_skeleton_dbus_interface_get_vtable;

#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
  g_type_class_add_private (klass, sizeof (XdpImplGlobalShortcutsSkeletonPrivate));
#endif
}

static void
xdp_impl_global_shortcuts_skeleton_iface_init (XdpImplGlobalShortcutsIface *iface)
{
  iface->activated = _xdp_impl_global_shortcuts_on_signal_activated;
  iface->deactivated = _xdp_impl_global_shortcuts_on_signal_deactivated;
  iface->shortcuts_changed = _xdp_impl_global_shortcuts_on_signal_shortcuts_changed;
  iface->get_version = xdp_impl_global_shortcuts_skeleton_get_version;
}

/**
 * xdp_impl_global_shortcuts_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-GlobalShortcuts.top_of_page">org.freedesktop.impl.portal.GlobalShortcuts</link>.
 *
 * Returns: (transfer full) (type XdpImplGlobalShortcutsSkeleton): The skeleton object.
 */
XdpImplGlobalShortcuts *
xdp_impl_global_shortcuts_skeleton_new (void)
{
  return XDP_IMPL_GLOBAL_SHORTCUTS (g_object_new (XDP_IMPL_TYPE_GLOBAL_SHORTCUTS_SKELETON, NULL));
}

/* ------------------------------------------------------------------------
 * Code for interface org.freedesktop.impl.portal.InputCapture
 * ------------------------------------------------------------------------
 */

/**
 * SECTION:XdpImplInputCapture
 * @title: XdpImplInputCapture
 * @short_description: Generated C code for the org.freedesktop.impl.portal.InputCapture D-Bus interface
 *
 * This section contains code for working with the <link linkend="gdbus-interface-org-freedesktop-impl-portal-InputCapture.top_of_page">org.freedesktop.impl.portal.InputCapture</link> D-Bus interface in C.
 */

enum
{
  XDP_IMPL__INPUT_CAPTURE_DISABLED,
  XDP_IMPL__INPUT_CAPTURE_ACTIVATED,
  XDP_IMPL__INPUT_CAPTURE_DEACTIVATED,
  XDP_IMPL__INPUT_CAPTURE_ZONES_CHANGED,
};

static unsigned XDP_IMPL__INPUT_CAPTURE_SIGNALS[4] = { 0 };

/* ---- Introspection data for org.freedesktop.impl.portal.InputCapture ---- */

static const _ExtendedGDBusArgInfo _xdp_impl_input_capture_method_info_create_session_IN_ARG_handle =
{
  {
    -1,
    (gchar *) "handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_input_capture_method_info_create_session_IN_ARG_session_handle =
{
  {
    -1,
    (gchar *) "session_handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_input_capture_method_info_create_session_IN_ARG_app_id =
{
  {
    -1,
    (gchar *) "app_id",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_input_capture_method_info_create_session_IN_ARG_parent_window =
{
  {
    -1,
    (gchar *) "parent_window",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_input_capture_method_info_create_session_IN_ARG_options =
{
  {
    -1,
    (gchar *) "options",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_input_capture_method_info_create_session_IN_ARG_pointers[] =
{
  &_xdp_impl_input_capture_method_info_create_session_IN_ARG_handle.parent_struct,
  &_xdp_impl_input_capture_method_info_create_session_IN_ARG_session_handle.parent_struct,
  &_xdp_impl_input_capture_method_info_create_session_IN_ARG_app_id.parent_struct,
  &_xdp_impl_input_capture_method_info_create_session_IN_ARG_parent_window.parent_struct,
  &_xdp_impl_input_capture_method_info_create_session_IN_ARG_options.parent_struct,
  NULL
};

static const _ExtendedGDBusArgInfo _xdp_impl_input_capture_method_info_create_session_OUT_ARG_response =
{
  {
    -1,
    (gchar *) "response",
    (gchar *) "u",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_input_capture_method_info_create_session_OUT_ARG_results =
{
  {
    -1,
    (gchar *) "results",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_input_capture_method_info_create_session_OUT_ARG_pointers[] =
{
  &_xdp_impl_input_capture_method_info_create_session_OUT_ARG_response.parent_struct,
  &_xdp_impl_input_capture_method_info_create_session_OUT_ARG_results.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_input_capture_method_create_session_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.In4",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_input_capture_method_create_session_annotation_info_1 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.Out1",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo * const _xdp_impl_input_capture_method_create_session_annotation_info_pointers[] =
{
  &_xdp_impl_input_capture_method_create_session_annotation_info_0,
  &_xdp_impl_input_capture_method_create_session_annotation_info_1,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_impl_input_capture_method_info_create_session =
{
  {
    -1,
    (gchar *) "CreateSession",
    (GDBusArgInfo **) &_xdp_impl_input_capture_method_info_create_session_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_impl_input_capture_method_info_create_session_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_impl_input_capture_method_create_session_annotation_info_pointers
  },
  "handle-create-session",
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_input_capture_method_info_get_zones_IN_ARG_handle =
{
  {
    -1,
    (gchar *) "handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_input_capture_method_info_get_zones_IN_ARG_session_handle =
{
  {
    -1,
    (gchar *) "session_handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_input_capture_method_info_get_zones_IN_ARG_app_id =
{
  {
    -1,
    (gchar *) "app_id",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_input_capture_method_info_get_zones_IN_ARG_options =
{
  {
    -1,
    (gchar *) "options",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_input_capture_method_info_get_zones_IN_ARG_pointers[] =
{
  &_xdp_impl_input_capture_method_info_get_zones_IN_ARG_handle.parent_struct,
  &_xdp_impl_input_capture_method_info_get_zones_IN_ARG_session_handle.parent_struct,
  &_xdp_impl_input_capture_method_info_get_zones_IN_ARG_app_id.parent_struct,
  &_xdp_impl_input_capture_method_info_get_zones_IN_ARG_options.parent_struct,
  NULL
};

static const _ExtendedGDBusArgInfo _xdp_impl_input_capture_method_info_get_zones_OUT_ARG_response =
{
  {
    -1,
    (gchar *) "response",
    (gchar *) "u",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_input_capture_method_info_get_zones_OUT_ARG_results =
{
  {
    -1,
    (gchar *) "results",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_input_capture_method_info_get_zones_OUT_ARG_pointers[] =
{
  &_xdp_impl_input_capture_method_info_get_zones_OUT_ARG_response.parent_struct,
  &_xdp_impl_input_capture_method_info_get_zones_OUT_ARG_results.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_input_capture_method_get_zones_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.In3",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_input_capture_method_get_zones_annotation_info_1 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.Out1",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo * const _xdp_impl_input_capture_method_get_zones_annotation_info_pointers[] =
{
  &_xdp_impl_input_capture_method_get_zones_annotation_info_0,
  &_xdp_impl_input_capture_method_get_zones_annotation_info_1,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_impl_input_capture_method_info_get_zones =
{
  {
    -1,
    (gchar *) "GetZones",
    (GDBusArgInfo **) &_xdp_impl_input_capture_method_info_get_zones_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_impl_input_capture_method_info_get_zones_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_impl_input_capture_method_get_zones_annotation_info_pointers
  },
  "handle-get-zones",
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_input_capture_method_info_set_pointer_barriers_IN_ARG_handle =
{
  {
    -1,
    (gchar *) "handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_input_capture_method_info_set_pointer_barriers_IN_ARG_session_handle =
{
  {
    -1,
    (gchar *) "session_handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_input_capture_method_info_set_pointer_barriers_IN_ARG_app_id =
{
  {
    -1,
    (gchar *) "app_id",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_input_capture_method_info_set_pointer_barriers_IN_ARG_options =
{
  {
    -1,
    (gchar *) "options",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_input_capture_method_info_set_pointer_barriers_IN_ARG_barriers =
{
  {
    -1,
    (gchar *) "barriers",
    (gchar *) "aa{sv}",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_input_capture_method_info_set_pointer_barriers_IN_ARG_zone_set =
{
  {
    -1,
    (gchar *) "zone_set",
    (gchar *) "u",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_input_capture_method_info_set_pointer_barriers_IN_ARG_pointers[] =
{
  &_xdp_impl_input_capture_method_info_set_pointer_barriers_IN_ARG_handle.parent_struct,
  &_xdp_impl_input_capture_method_info_set_pointer_barriers_IN_ARG_session_handle.parent_struct,
  &_xdp_impl_input_capture_method_info_set_pointer_barriers_IN_ARG_app_id.parent_struct,
  &_xdp_impl_input_capture_method_info_set_pointer_barriers_IN_ARG_options.parent_struct,
  &_xdp_impl_input_capture_method_info_set_pointer_barriers_IN_ARG_barriers.parent_struct,
  &_xdp_impl_input_capture_method_info_set_pointer_barriers_IN_ARG_zone_set.parent_struct,
  NULL
};

static const _ExtendedGDBusArgInfo _xdp_impl_input_capture_method_info_set_pointer_barriers_OUT_ARG_response =
{
  {
    -1,
    (gchar *) "response",
    (gchar *) "u",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_input_capture_method_info_set_pointer_barriers_OUT_ARG_results =
{
  {
    -1,
    (gchar *) "results",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_input_capture_method_info_set_pointer_barriers_OUT_ARG_pointers[] =
{
  &_xdp_impl_input_capture_method_info_set_pointer_barriers_OUT_ARG_response.parent_struct,
  &_xdp_impl_input_capture_method_info_set_pointer_barriers_OUT_ARG_results.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_input_capture_method_set_pointer_barriers_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.In3",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_input_capture_method_set_pointer_barriers_annotation_info_1 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.In4",
  (gchar *) "QList<QVariantMap>",
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_input_capture_method_set_pointer_barriers_annotation_info_2 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.Out1",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo * const _xdp_impl_input_capture_method_set_pointer_barriers_annotation_info_pointers[] =
{
  &_xdp_impl_input_capture_method_set_pointer_barriers_annotation_info_0,
  &_xdp_impl_input_capture_method_set_pointer_barriers_annotation_info_1,
  &_xdp_impl_input_capture_method_set_pointer_barriers_annotation_info_2,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_impl_input_capture_method_info_set_pointer_barriers =
{
  {
    -1,
    (gchar *) "SetPointerBarriers",
    (GDBusArgInfo **) &_xdp_impl_input_capture_method_info_set_pointer_barriers_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_impl_input_capture_method_info_set_pointer_barriers_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_impl_input_capture_method_set_pointer_barriers_annotation_info_pointers
  },
  "handle-set-pointer-barriers",
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_input_capture_method_info_enable_IN_ARG_session_handle =
{
  {
    -1,
    (gchar *) "session_handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_input_capture_method_info_enable_IN_ARG_app_id =
{
  {
    -1,
    (gchar *) "app_id",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_input_capture_method_info_enable_IN_ARG_options =
{
  {
    -1,
    (gchar *) "options",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_input_capture_method_info_enable_IN_ARG_pointers[] =
{
  &_xdp_impl_input_capture_method_info_enable_IN_ARG_session_handle.parent_struct,
  &_xdp_impl_input_capture_method_info_enable_IN_ARG_app_id.parent_struct,
  &_xdp_impl_input_capture_method_info_enable_IN_ARG_options.parent_struct,
  NULL
};

static const _ExtendedGDBusArgInfo _xdp_impl_input_capture_method_info_enable_OUT_ARG_response =
{
  {
    -1,
    (gchar *) "response",
    (gchar *) "u",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_input_capture_method_info_enable_OUT_ARG_results =
{
  {
    -1,
    (gchar *) "results",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_input_capture_method_info_enable_OUT_ARG_pointers[] =
{
  &_xdp_impl_input_capture_method_info_enable_OUT_ARG_response.parent_struct,
  &_xdp_impl_input_capture_method_info_enable_OUT_ARG_results.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_input_capture_method_enable_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.In2",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_input_capture_method_enable_annotation_info_1 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.Out1",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo * const _xdp_impl_input_capture_method_enable_annotation_info_pointers[] =
{
  &_xdp_impl_input_capture_method_enable_annotation_info_0,
  &_xdp_impl_input_capture_method_enable_annotation_info_1,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_impl_input_capture_method_info_enable =
{
  {
    -1,
    (gchar *) "Enable",
    (GDBusArgInfo **) &_xdp_impl_input_capture_method_info_enable_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_impl_input_capture_method_info_enable_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_impl_input_capture_method_enable_annotation_info_pointers
  },
  "handle-enable",
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_input_capture_method_info_disable_IN_ARG_session_handle =
{
  {
    -1,
    (gchar *) "session_handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_input_capture_method_info_disable_IN_ARG_app_id =
{
  {
    -1,
    (gchar *) "app_id",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_input_capture_method_info_disable_IN_ARG_options =
{
  {
    -1,
    (gchar *) "options",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_input_capture_method_info_disable_IN_ARG_pointers[] =
{
  &_xdp_impl_input_capture_method_info_disable_IN_ARG_session_handle.parent_struct,
  &_xdp_impl_input_capture_method_info_disable_IN_ARG_app_id.parent_struct,
  &_xdp_impl_input_capture_method_info_disable_IN_ARG_options.parent_struct,
  NULL
};

static const _ExtendedGDBusArgInfo _xdp_impl_input_capture_method_info_disable_OUT_ARG_response =
{
  {
    -1,
    (gchar *) "response",
    (gchar *) "u",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_input_capture_method_info_disable_OUT_ARG_results =
{
  {
    -1,
    (gchar *) "results",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_input_capture_method_info_disable_OUT_ARG_pointers[] =
{
  &_xdp_impl_input_capture_method_info_disable_OUT_ARG_response.parent_struct,
  &_xdp_impl_input_capture_method_info_disable_OUT_ARG_results.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_input_capture_method_disable_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.In2",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_input_capture_method_disable_annotation_info_1 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.Out1",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo * const _xdp_impl_input_capture_method_disable_annotation_info_pointers[] =
{
  &_xdp_impl_input_capture_method_disable_annotation_info_0,
  &_xdp_impl_input_capture_method_disable_annotation_info_1,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_impl_input_capture_method_info_disable =
{
  {
    -1,
    (gchar *) "Disable",
    (GDBusArgInfo **) &_xdp_impl_input_capture_method_info_disable_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_impl_input_capture_method_info_disable_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_impl_input_capture_method_disable_annotation_info_pointers
  },
  "handle-disable",
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_input_capture_method_info_release_IN_ARG_session_handle =
{
  {
    -1,
    (gchar *) "session_handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_input_capture_method_info_release_IN_ARG_app_id =
{
  {
    -1,
    (gchar *) "app_id",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_input_capture_method_info_release_IN_ARG_options =
{
  {
    -1,
    (gchar *) "options",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_input_capture_method_info_release_IN_ARG_pointers[] =
{
  &_xdp_impl_input_capture_method_info_release_IN_ARG_session_handle.parent_struct,
  &_xdp_impl_input_capture_method_info_release_IN_ARG_app_id.parent_struct,
  &_xdp_impl_input_capture_method_info_release_IN_ARG_options.parent_struct,
  NULL
};

static const _ExtendedGDBusArgInfo _xdp_impl_input_capture_method_info_release_OUT_ARG_response =
{
  {
    -1,
    (gchar *) "response",
    (gchar *) "u",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_input_capture_method_info_release_OUT_ARG_results =
{
  {
    -1,
    (gchar *) "results",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_input_capture_method_info_release_OUT_ARG_pointers[] =
{
  &_xdp_impl_input_capture_method_info_release_OUT_ARG_response.parent_struct,
  &_xdp_impl_input_capture_method_info_release_OUT_ARG_results.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_input_capture_method_release_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.In2",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_input_capture_method_release_annotation_info_1 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.Out1",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo * const _xdp_impl_input_capture_method_release_annotation_info_pointers[] =
{
  &_xdp_impl_input_capture_method_release_annotation_info_0,
  &_xdp_impl_input_capture_method_release_annotation_info_1,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_impl_input_capture_method_info_release =
{
  {
    -1,
    (gchar *) "Release",
    (GDBusArgInfo **) &_xdp_impl_input_capture_method_info_release_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_impl_input_capture_method_info_release_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_impl_input_capture_method_release_annotation_info_pointers
  },
  "handle-release",
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_input_capture_method_info_connect_to_eis_IN_ARG_session_handle =
{
  {
    -1,
    (gchar *) "session_handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_input_capture_method_info_connect_to_eis_IN_ARG_app_id =
{
  {
    -1,
    (gchar *) "app_id",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_input_capture_method_info_connect_to_eis_IN_ARG_options =
{
  {
    -1,
    (gchar *) "options",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_input_capture_method_info_connect_to_eis_IN_ARG_pointers[] =
{
  &_xdp_impl_input_capture_method_info_connect_to_eis_IN_ARG_session_handle.parent_struct,
  &_xdp_impl_input_capture_method_info_connect_to_eis_IN_ARG_app_id.parent_struct,
  &_xdp_impl_input_capture_method_info_connect_to_eis_IN_ARG_options.parent_struct,
  NULL
};

static const _ExtendedGDBusArgInfo _xdp_impl_input_capture_method_info_connect_to_eis_OUT_ARG_fd =
{
  {
    -1,
    (gchar *) "fd",
    (gchar *) "h",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_input_capture_method_info_connect_to_eis_OUT_ARG_pointers[] =
{
  &_xdp_impl_input_capture_method_info_connect_to_eis_OUT_ARG_fd.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_input_capture_method_connect_to_eis_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.In2",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo * const _xdp_impl_input_capture_method_connect_to_eis_annotation_info_pointers[] =
{
  &_xdp_impl_input_capture_method_connect_to_eis_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_impl_input_capture_method_info_connect_to_eis =
{
  {
    -1,
    (gchar *) "ConnectToEIS",
    (GDBusArgInfo **) &_xdp_impl_input_capture_method_info_connect_to_eis_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_impl_input_capture_method_info_connect_to_eis_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_impl_input_capture_method_connect_to_eis_annotation_info_pointers
  },
  "handle-connect-to-eis",
  TRUE
};

static const GDBusMethodInfo * const _xdp_impl_input_capture_method_info_pointers[] =
{
  &_xdp_impl_input_capture_method_info_create_session.parent_struct,
  &_xdp_impl_input_capture_method_info_get_zones.parent_struct,
  &_xdp_impl_input_capture_method_info_set_pointer_barriers.parent_struct,
  &_xdp_impl_input_capture_method_info_enable.parent_struct,
  &_xdp_impl_input_capture_method_info_disable.parent_struct,
  &_xdp_impl_input_capture_method_info_release.parent_struct,
  &_xdp_impl_input_capture_method_info_connect_to_eis.parent_struct,
  NULL
};

static const _ExtendedGDBusArgInfo _xdp_impl_input_capture_signal_info_disabled_ARG_session_handle =
{
  {
    -1,
    (gchar *) "session_handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_input_capture_signal_info_disabled_ARG_options =
{
  {
    -1,
    (gchar *) "options",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_input_capture_signal_info_disabled_ARG_pointers[] =
{
  &_xdp_impl_input_capture_signal_info_disabled_ARG_session_handle.parent_struct,
  &_xdp_impl_input_capture_signal_info_disabled_ARG_options.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_input_capture_signal_disabled_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.Out1",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo * const _xdp_impl_input_capture_signal_disabled_annotation_info_pointers[] =
{
  &_xdp_impl_input_capture_signal_disabled_annotation_info_0,
  NULL
};

static const _ExtendedGDBusSignalInfo _xdp_impl_input_capture_signal_info_disabled =
{
  {
    -1,
    (gchar *) "Disabled",
    (GDBusArgInfo **) &_xdp_impl_input_capture_signal_info_disabled_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_impl_input_capture_signal_disabled_annotation_info_pointers
  },
  "disabled"
};

static const _ExtendedGDBusArgInfo _xdp_impl_input_capture_signal_info_activated_ARG_session_handle =
{
  {
    -1,
    (gchar *) "session_handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_input_capture_signal_info_activated_ARG_options =
{
  {
    -1,
    (gchar *) "options",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_input_capture_signal_info_activated_ARG_pointers[] =
{
  &_xdp_impl_input_capture_signal_info_activated_ARG_session_handle.parent_struct,
  &_xdp_impl_input_capture_signal_info_activated_ARG_options.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_input_capture_signal_activated_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.Out1",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo * const _xdp_impl_input_capture_signal_activated_annotation_info_pointers[] =
{
  &_xdp_impl_input_capture_signal_activated_annotation_info_0,
  NULL
};

static const _ExtendedGDBusSignalInfo _xdp_impl_input_capture_signal_info_activated =
{
  {
    -1,
    (gchar *) "Activated",
    (GDBusArgInfo **) &_xdp_impl_input_capture_signal_info_activated_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_impl_input_capture_signal_activated_annotation_info_pointers
  },
  "activated"
};

static const _ExtendedGDBusArgInfo _xdp_impl_input_capture_signal_info_deactivated_ARG_session_handle =
{
  {
    -1,
    (gchar *) "session_handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_input_capture_signal_info_deactivated_ARG_options =
{
  {
    -1,
    (gchar *) "options",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_input_capture_signal_info_deactivated_ARG_pointers[] =
{
  &_xdp_impl_input_capture_signal_info_deactivated_ARG_session_handle.parent_struct,
  &_xdp_impl_input_capture_signal_info_deactivated_ARG_options.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_input_capture_signal_deactivated_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.Out1",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo * const _xdp_impl_input_capture_signal_deactivated_annotation_info_pointers[] =
{
  &_xdp_impl_input_capture_signal_deactivated_annotation_info_0,
  NULL
};

static const _ExtendedGDBusSignalInfo _xdp_impl_input_capture_signal_info_deactivated =
{
  {
    -1,
    (gchar *) "Deactivated",
    (GDBusArgInfo **) &_xdp_impl_input_capture_signal_info_deactivated_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_impl_input_capture_signal_deactivated_annotation_info_pointers
  },
  "deactivated"
};

static const _ExtendedGDBusArgInfo _xdp_impl_input_capture_signal_info_zones_changed_ARG_session_handle =
{
  {
    -1,
    (gchar *) "session_handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_input_capture_signal_info_zones_changed_ARG_options =
{
  {
    -1,
    (gchar *) "options",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_input_capture_signal_info_zones_changed_ARG_pointers[] =
{
  &_xdp_impl_input_capture_signal_info_zones_changed_ARG_session_handle.parent_struct,
  &_xdp_impl_input_capture_signal_info_zones_changed_ARG_options.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_input_capture_signal_zones_changed_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.Out1",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo * const _xdp_impl_input_capture_signal_zones_changed_annotation_info_pointers[] =
{
  &_xdp_impl_input_capture_signal_zones_changed_annotation_info_0,
  NULL
};

static const _ExtendedGDBusSignalInfo _xdp_impl_input_capture_signal_info_zones_changed =
{
  {
    -1,
    (gchar *) "ZonesChanged",
    (GDBusArgInfo **) &_xdp_impl_input_capture_signal_info_zones_changed_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_impl_input_capture_signal_zones_changed_annotation_info_pointers
  },
  "zones-changed"
};

static const GDBusSignalInfo * const _xdp_impl_input_capture_signal_info_pointers[] =
{
  &_xdp_impl_input_capture_signal_info_disabled.parent_struct,
  &_xdp_impl_input_capture_signal_info_activated.parent_struct,
  &_xdp_impl_input_capture_signal_info_deactivated.parent_struct,
  &_xdp_impl_input_capture_signal_info_zones_changed.parent_struct,
  NULL
};

static const _ExtendedGDBusPropertyInfo _xdp_impl_input_capture_property_info_supported_capabilities =
{
  {
    -1,
    (gchar *) "SupportedCapabilities",
    (gchar *) "u",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "supported-capabilities",
  FALSE,
  TRUE
};

static const _ExtendedGDBusPropertyInfo _xdp_impl_input_capture_property_info_version =
{
  {
    -1,
    (gchar *) "version",
    (gchar *) "u",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "version",
  FALSE,
  TRUE
};

static const GDBusPropertyInfo * const _xdp_impl_input_capture_property_info_pointers[] =
{
  &_xdp_impl_input_capture_property_info_supported_capabilities.parent_struct,
  &_xdp_impl_input_capture_property_info_version.parent_struct,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _xdp_impl_input_capture_interface_info =
{
  {
    -1,
    (gchar *) "org.freedesktop.impl.portal.InputCapture",
    (GDBusMethodInfo **) &_xdp_impl_input_capture_method_info_pointers,
    (GDBusSignalInfo **) &_xdp_impl_input_capture_signal_info_pointers,
    (GDBusPropertyInfo **) &_xdp_impl_input_capture_property_info_pointers,
    NULL
  },
  "input-capture",
};


/**
 * xdp_impl_input_capture_interface_info:
 *
 * Gets a machine-readable description of the <link linkend="gdbus-interface-org-freedesktop-impl-portal-InputCapture.top_of_page">org.freedesktop.impl.portal.InputCapture</link> D-Bus interface.
 *
 * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
 */
GDBusInterfaceInfo *
xdp_impl_input_capture_interface_info (void)
{
  return (GDBusInterfaceInfo *) &_xdp_impl_input_capture_interface_info.parent_struct;
}

/**
 * xdp_impl_input_capture_override_properties:
 * @klass: The class structure for a #GObject derived class.
 * @property_id_begin: The property id to assign to the first overridden property.
 *
 * Overrides all #GObject properties in the #XdpImplInputCapture interface for a concrete class.
 * The properties are overridden in the order they are defined.
 *
 * Returns: The last property id.
 */
guint
xdp_impl_input_capture_override_properties (GObjectClass *klass, guint property_id_begin)
{
  g_object_class_override_property (klass, property_id_begin++, "supported-capabilities");
  g_object_class_override_property (klass, property_id_begin++, "version");
  return property_id_begin - 1;
}


inline static void
xdp_impl_input_capture_signal_marshal_disabled (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  _g_dbus_codegen_marshal_VOID__STRING_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_impl_input_capture_signal_marshal_activated (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  _g_dbus_codegen_marshal_VOID__STRING_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_impl_input_capture_signal_marshal_deactivated (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  _g_dbus_codegen_marshal_VOID__STRING_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_impl_input_capture_signal_marshal_zones_changed (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  _g_dbus_codegen_marshal_VOID__STRING_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_impl_input_capture_method_marshal_create_session (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  _g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_STRING_STRING_STRING_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_impl_input_capture_method_marshal_get_zones (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  _g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_STRING_STRING_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_impl_input_capture_method_marshal_set_pointer_barriers (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  _g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_STRING_STRING_VARIANT_VARIANT_UINT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_impl_input_capture_method_marshal_enable (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  _g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_STRING_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_impl_input_capture_method_marshal_disable (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  _g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_STRING_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_impl_input_capture_method_marshal_release (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  _g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_STRING_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_impl_input_capture_method_marshal_connect_to_eis (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  _g_dbus_codegen_marshal_BOOLEAN__OBJECT_OBJECT_STRING_STRING_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}


/**
 * XdpImplInputCapture:
 *
 * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-InputCapture.top_of_page">org.freedesktop.impl.portal.InputCapture</link>.
 */

/**
 * XdpImplInputCaptureIface:
 * @parent_iface: The parent interface.
 * @handle_connect_to_eis: Handler for the #XdpImplInputCapture::handle-connect-to-eis signal.
 * @handle_create_session: Handler for the #XdpImplInputCapture::handle-create-session signal.
 * @handle_disable: Handler for the #XdpImplInputCapture::handle-disable signal.
 * @handle_enable: Handler for the #XdpImplInputCapture::handle-enable signal.
 * @handle_get_zones: Handler for the #XdpImplInputCapture::handle-get-zones signal.
 * @handle_release: Handler for the #XdpImplInputCapture::handle-release signal.
 * @handle_set_pointer_barriers: Handler for the #XdpImplInputCapture::handle-set-pointer-barriers signal.
 * @get_supported_capabilities: Getter for the #XdpImplInputCapture:supported-capabilities property.
 * @get_version: Getter for the #XdpImplInputCapture:version property.
 * @activated: Handler for the #XdpImplInputCapture::activated signal.
 * @deactivated: Handler for the #XdpImplInputCapture::deactivated signal.
 * @disabled: Handler for the #XdpImplInputCapture::disabled signal.
 * @zones_changed: Handler for the #XdpImplInputCapture::zones-changed signal.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-InputCapture.top_of_page">org.freedesktop.impl.portal.InputCapture</link>.
 */

typedef XdpImplInputCaptureIface XdpImplInputCaptureInterface;
G_DEFINE_INTERFACE (XdpImplInputCapture, xdp_impl_input_capture, G_TYPE_OBJECT)

static void
xdp_impl_input_capture_default_init (XdpImplInputCaptureIface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * XdpImplInputCapture::handle-create-session:
   * @object: A #XdpImplInputCapture.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_handle: Argument passed by remote caller.
   * @arg_session_handle: Argument passed by remote caller.
   * @arg_app_id: Argument passed by remote caller.
   * @arg_parent_window: Argument passed by remote caller.
   * @arg_options: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-impl-portal-InputCapture.CreateSession">CreateSession()</link> 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 xdp_impl_input_capture_complete_create_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.
   *
   * 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.
   */
  g_signal_new ("handle-create-session",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpImplInputCaptureIface, handle_create_session),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_impl_input_capture_method_marshal_create_session,
    G_TYPE_BOOLEAN,
    6,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_VARIANT);

  /**
   * XdpImplInputCapture::handle-get-zones:
   * @object: A #XdpImplInputCapture.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_handle: Argument passed by remote caller.
   * @arg_session_handle: Argument passed by remote caller.
   * @arg_app_id: Argument passed by remote caller.
   * @arg_options: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-impl-portal-InputCapture.GetZones">GetZones()</link> 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 xdp_impl_input_capture_complete_get_zones() 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.
   *
   * 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.
   */
  g_signal_new ("handle-get-zones",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpImplInputCaptureIface, handle_get_zones),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_impl_input_capture_method_marshal_get_zones,
    G_TYPE_BOOLEAN,
    5,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_VARIANT);

  /**
   * XdpImplInputCapture::handle-set-pointer-barriers:
   * @object: A #XdpImplInputCapture.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_handle: Argument passed by remote caller.
   * @arg_session_handle: Argument passed by remote caller.
   * @arg_app_id: Argument passed by remote caller.
   * @arg_options: Argument passed by remote caller.
   * @arg_barriers: Argument passed by remote caller.
   * @arg_zone_set: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-impl-portal-InputCapture.SetPointerBarriers">SetPointerBarriers()</link> 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 xdp_impl_input_capture_complete_set_pointer_barriers() 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.
   *
   * 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.
   */
  g_signal_new ("handle-set-pointer-barriers",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpImplInputCaptureIface, handle_set_pointer_barriers),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_impl_input_capture_method_marshal_set_pointer_barriers,
    G_TYPE_BOOLEAN,
    7,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_VARIANT, G_TYPE_VARIANT, G_TYPE_UINT);

  /**
   * XdpImplInputCapture::handle-enable:
   * @object: A #XdpImplInputCapture.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_session_handle: Argument passed by remote caller.
   * @arg_app_id: Argument passed by remote caller.
   * @arg_options: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-impl-portal-InputCapture.Enable">Enable()</link> 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 xdp_impl_input_capture_complete_enable() 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.
   *
   * 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.
   */
  g_signal_new ("handle-enable",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpImplInputCaptureIface, handle_enable),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_impl_input_capture_method_marshal_enable,
    G_TYPE_BOOLEAN,
    4,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_VARIANT);

  /**
   * XdpImplInputCapture::handle-disable:
   * @object: A #XdpImplInputCapture.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_session_handle: Argument passed by remote caller.
   * @arg_app_id: Argument passed by remote caller.
   * @arg_options: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-impl-portal-InputCapture.Disable">Disable()</link> 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 xdp_impl_input_capture_complete_disable() 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.
   *
   * 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.
   */
  g_signal_new ("handle-disable",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpImplInputCaptureIface, handle_disable),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_impl_input_capture_method_marshal_disable,
    G_TYPE_BOOLEAN,
    4,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_VARIANT);

  /**
   * XdpImplInputCapture::handle-release:
   * @object: A #XdpImplInputCapture.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_session_handle: Argument passed by remote caller.
   * @arg_app_id: Argument passed by remote caller.
   * @arg_options: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-impl-portal-InputCapture.Release">Release()</link> 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 xdp_impl_input_capture_complete_release() 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.
   *
   * 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.
   */
  g_signal_new ("handle-release",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpImplInputCaptureIface, handle_release),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_impl_input_capture_method_marshal_release,
    G_TYPE_BOOLEAN,
    4,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_VARIANT);

  /**
   * XdpImplInputCapture::handle-connect-to-eis:
   * @object: A #XdpImplInputCapture.
   * @invocation: A #GDBusMethodInvocation.
   * @fd_list: (nullable): A #GUnixFDList or %NULL.
   * @arg_session_handle: Argument passed by remote caller.
   * @arg_app_id: Argument passed by remote caller.
   * @arg_options: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-impl-portal-InputCapture.ConnectToEIS">ConnectToEIS()</link> 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 xdp_impl_input_capture_complete_connect_to_eis() 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.
   *
   * 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.
   */
  g_signal_new ("handle-connect-to-eis",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpImplInputCaptureIface, handle_connect_to_eis),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_impl_input_capture_method_marshal_connect_to_eis,
    G_TYPE_BOOLEAN,
    5,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UNIX_FD_LIST, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_VARIANT);

  /* GObject signals for received D-Bus signals: */
  /**
   * XdpImplInputCapture::disabled:
   * @object: A #XdpImplInputCapture.
   * @arg_session_handle: Argument.
   * @arg_options: Argument.
   *
   * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-freedesktop-impl-portal-InputCapture.Disabled">"Disabled"</link> 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.
   */
  XDP_IMPL__INPUT_CAPTURE_SIGNALS[XDP_IMPL__INPUT_CAPTURE_DISABLED] =
    g_signal_new ("disabled",
      G_TYPE_FROM_INTERFACE (iface),
      G_SIGNAL_RUN_LAST,
      G_STRUCT_OFFSET (XdpImplInputCaptureIface, disabled),
      NULL,
      NULL,
      xdp_impl_input_capture_signal_marshal_disabled,
      G_TYPE_NONE,
      2, G_TYPE_STRING, G_TYPE_VARIANT);

  /**
   * XdpImplInputCapture::activated:
   * @object: A #XdpImplInputCapture.
   * @arg_session_handle: Argument.
   * @arg_options: Argument.
   *
   * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-freedesktop-impl-portal-InputCapture.Activated">"Activated"</link> 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.
   */
  XDP_IMPL__INPUT_CAPTURE_SIGNALS[XDP_IMPL__INPUT_CAPTURE_ACTIVATED] =
    g_signal_new ("activated",
      G_TYPE_FROM_INTERFACE (iface),
      G_SIGNAL_RUN_LAST,
      G_STRUCT_OFFSET (XdpImplInputCaptureIface, activated),
      NULL,
      NULL,
      xdp_impl_input_capture_signal_marshal_activated,
      G_TYPE_NONE,
      2, G_TYPE_STRING, G_TYPE_VARIANT);

  /**
   * XdpImplInputCapture::deactivated:
   * @object: A #XdpImplInputCapture.
   * @arg_session_handle: Argument.
   * @arg_options: Argument.
   *
   * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-freedesktop-impl-portal-InputCapture.Deactivated">"Deactivated"</link> 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.
   */
  XDP_IMPL__INPUT_CAPTURE_SIGNALS[XDP_IMPL__INPUT_CAPTURE_DEACTIVATED] =
    g_signal_new ("deactivated",
      G_TYPE_FROM_INTERFACE (iface),
      G_SIGNAL_RUN_LAST,
      G_STRUCT_OFFSET (XdpImplInputCaptureIface, deactivated),
      NULL,
      NULL,
      xdp_impl_input_capture_signal_marshal_deactivated,
      G_TYPE_NONE,
      2, G_TYPE_STRING, G_TYPE_VARIANT);

  /**
   * XdpImplInputCapture::zones-changed:
   * @object: A #XdpImplInputCapture.
   * @arg_session_handle: Argument.
   * @arg_options: Argument.
   *
   * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-freedesktop-impl-portal-InputCapture.ZonesChanged">"ZonesChanged"</link> 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.
   */
  XDP_IMPL__INPUT_CAPTURE_SIGNALS[XDP_IMPL__INPUT_CAPTURE_ZONES_CHANGED] =
    g_signal_new ("zones-changed",
      G_TYPE_FROM_INTERFACE (iface),
      G_SIGNAL_RUN_LAST,
      G_STRUCT_OFFSET (XdpImplInputCaptureIface, zones_changed),
      NULL,
      NULL,
      xdp_impl_input_capture_signal_marshal_zones_changed,
      G_TYPE_NONE,
      2, G_TYPE_STRING, G_TYPE_VARIANT);

  /* GObject properties for D-Bus properties: */
  /**
   * XdpImplInputCapture:supported-capabilities:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-impl-portal-InputCapture.SupportedCapabilities">"SupportedCapabilities"</link>.
   *
   * 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.
   */
  g_object_interface_install_property (iface,
    g_param_spec_uint ("supported-capabilities", "SupportedCapabilities", "SupportedCapabilities", 0, G_MAXUINT32, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * XdpImplInputCapture:version:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-impl-portal-InputCapture.version">"version"</link>.
   *
   * 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.
   */
  g_object_interface_install_property (iface,
    g_param_spec_uint ("version", "version", "version", 0, G_MAXUINT32, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
}

/**
 * xdp_impl_input_capture_get_supported_capabilities: (skip)
 * @object: A #XdpImplInputCapture.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-impl-portal-InputCapture.SupportedCapabilities">"SupportedCapabilities"</link> D-Bus property.
 *
 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
 *
 * Returns: The property value.
 */
guint 
xdp_impl_input_capture_get_supported_capabilities (XdpImplInputCapture *object)
{
  g_return_val_if_fail (XDP_IMPL_IS_INPUT_CAPTURE (object), 0);

  return XDP_IMPL_INPUT_CAPTURE_GET_IFACE (object)->get_supported_capabilities (object);
}

/**
 * xdp_impl_input_capture_set_supported_capabilities: (skip)
 * @object: A #XdpImplInputCapture.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-freedesktop-impl-portal-InputCapture.SupportedCapabilities">"SupportedCapabilities"</link> 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.
 */
void
xdp_impl_input_capture_set_supported_capabilities (XdpImplInputCapture *object, guint value)
{
  g_object_set (G_OBJECT (object), "supported-capabilities", value, NULL);
}

/**
 * xdp_impl_input_capture_get_version: (skip)
 * @object: A #XdpImplInputCapture.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-impl-portal-InputCapture.version">"version"</link> D-Bus property.
 *
 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
 *
 * Returns: The property value.
 */
guint 
xdp_impl_input_capture_get_version (XdpImplInputCapture *object)
{
  g_return_val_if_fail (XDP_IMPL_IS_INPUT_CAPTURE (object), 0);

  return XDP_IMPL_INPUT_CAPTURE_GET_IFACE (object)->get_version (object);
}

/**
 * xdp_impl_input_capture_set_version: (skip)
 * @object: A #XdpImplInputCapture.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-freedesktop-impl-portal-InputCapture.version">"version"</link> 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.
 */
void
xdp_impl_input_capture_set_version (XdpImplInputCapture *object, guint value)
{
  g_object_set (G_OBJECT (object), "version", value, NULL);
}

/**
 * xdp_impl_input_capture_emit_disabled:
 * @object: A #XdpImplInputCapture.
 * @arg_session_handle: Argument to pass with the signal.
 * @arg_options: Argument to pass with the signal.
 *
 * Emits the <link linkend="gdbus-signal-org-freedesktop-impl-portal-InputCapture.Disabled">"Disabled"</link> D-Bus signal.
 */
void
xdp_impl_input_capture_emit_disabled (
    XdpImplInputCapture *object,
    const gchar *arg_session_handle,
    GVariant *arg_options)
{
  g_signal_emit (object, XDP_IMPL__INPUT_CAPTURE_SIGNALS[XDP_IMPL__INPUT_CAPTURE_DISABLED], 0, arg_session_handle, arg_options);
}

/**
 * xdp_impl_input_capture_emit_activated:
 * @object: A #XdpImplInputCapture.
 * @arg_session_handle: Argument to pass with the signal.
 * @arg_options: Argument to pass with the signal.
 *
 * Emits the <link linkend="gdbus-signal-org-freedesktop-impl-portal-InputCapture.Activated">"Activated"</link> D-Bus signal.
 */
void
xdp_impl_input_capture_emit_activated (
    XdpImplInputCapture *object,
    const gchar *arg_session_handle,
    GVariant *arg_options)
{
  g_signal_emit (object, XDP_IMPL__INPUT_CAPTURE_SIGNALS[XDP_IMPL__INPUT_CAPTURE_ACTIVATED], 0, arg_session_handle, arg_options);
}

/**
 * xdp_impl_input_capture_emit_deactivated:
 * @object: A #XdpImplInputCapture.
 * @arg_session_handle: Argument to pass with the signal.
 * @arg_options: Argument to pass with the signal.
 *
 * Emits the <link linkend="gdbus-signal-org-freedesktop-impl-portal-InputCapture.Deactivated">"Deactivated"</link> D-Bus signal.
 */
void
xdp_impl_input_capture_emit_deactivated (
    XdpImplInputCapture *object,
    const gchar *arg_session_handle,
    GVariant *arg_options)
{
  g_signal_emit (object, XDP_IMPL__INPUT_CAPTURE_SIGNALS[XDP_IMPL__INPUT_CAPTURE_DEACTIVATED], 0, arg_session_handle, arg_options);
}

/**
 * xdp_impl_input_capture_emit_zones_changed:
 * @object: A #XdpImplInputCapture.
 * @arg_session_handle: Argument to pass with the signal.
 * @arg_options: Argument to pass with the signal.
 *
 * Emits the <link linkend="gdbus-signal-org-freedesktop-impl-portal-InputCapture.ZonesChanged">"ZonesChanged"</link> D-Bus signal.
 */
void
xdp_impl_input_capture_emit_zones_changed (
    XdpImplInputCapture *object,
    const gchar *arg_session_handle,
    GVariant *arg_options)
{
  g_signal_emit (object, XDP_IMPL__INPUT_CAPTURE_SIGNALS[XDP_IMPL__INPUT_CAPTURE_ZONES_CHANGED], 0, arg_session_handle, arg_options);
}

/**
 * xdp_impl_input_capture_call_create_session:
 * @proxy: A #XdpImplInputCaptureProxy.
 * @arg_handle: Argument to pass with the method invocation.
 * @arg_session_handle: Argument to pass with the method invocation.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_parent_window: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-InputCapture.CreateSession">CreateSession()</link> 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 xdp_impl_input_capture_call_create_session_finish() to get the result of the operation.
 *
 * See xdp_impl_input_capture_call_create_session_sync() for the synchronous, blocking version of this method.
 */
void
xdp_impl_input_capture_call_create_session (
    XdpImplInputCapture *proxy,
    const gchar *arg_handle,
    const gchar *arg_session_handle,
    const gchar *arg_app_id,
    const gchar *arg_parent_window,
    GVariant *arg_options,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "CreateSession",
    g_variant_new ("(ooss@a{sv})",
                   arg_handle,
                   arg_session_handle,
                   arg_app_id,
                   arg_parent_window,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_impl_input_capture_call_create_session_finish:
 * @proxy: A #XdpImplInputCaptureProxy.
 * @out_response: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_results: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_input_capture_call_create_session().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_impl_input_capture_call_create_session().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_input_capture_call_create_session_finish (
    XdpImplInputCapture *proxy,
    guint* out_response,
    GVariant ** out_results,
    GAsyncResult *res,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(u@a{sv})",
                 out_response,
                 out_results);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_input_capture_call_create_session_sync:
 * @proxy: A #XdpImplInputCaptureProxy.
 * @arg_handle: Argument to pass with the method invocation.
 * @arg_session_handle: Argument to pass with the method invocation.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_parent_window: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @out_response: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_results: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-InputCapture.CreateSession">CreateSession()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_input_capture_call_create_session() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_input_capture_call_create_session_sync (
    XdpImplInputCapture *proxy,
    const gchar *arg_handle,
    const gchar *arg_session_handle,
    const gchar *arg_app_id,
    const gchar *arg_parent_window,
    GVariant *arg_options,
    guint* out_response,
    GVariant ** out_results,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "CreateSession",
    g_variant_new ("(ooss@a{sv})",
                   arg_handle,
                   arg_session_handle,
                   arg_app_id,
                   arg_parent_window,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(u@a{sv})",
                 out_response,
                 out_results);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_input_capture_call_get_zones:
 * @proxy: A #XdpImplInputCaptureProxy.
 * @arg_handle: Argument to pass with the method invocation.
 * @arg_session_handle: Argument to pass with the method invocation.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-InputCapture.GetZones">GetZones()</link> 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 xdp_impl_input_capture_call_get_zones_finish() to get the result of the operation.
 *
 * See xdp_impl_input_capture_call_get_zones_sync() for the synchronous, blocking version of this method.
 */
void
xdp_impl_input_capture_call_get_zones (
    XdpImplInputCapture *proxy,
    const gchar *arg_handle,
    const gchar *arg_session_handle,
    const gchar *arg_app_id,
    GVariant *arg_options,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "GetZones",
    g_variant_new ("(oos@a{sv})",
                   arg_handle,
                   arg_session_handle,
                   arg_app_id,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_impl_input_capture_call_get_zones_finish:
 * @proxy: A #XdpImplInputCaptureProxy.
 * @out_response: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_results: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_input_capture_call_get_zones().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_impl_input_capture_call_get_zones().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_input_capture_call_get_zones_finish (
    XdpImplInputCapture *proxy,
    guint* out_response,
    GVariant ** out_results,
    GAsyncResult *res,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(u@a{sv})",
                 out_response,
                 out_results);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_input_capture_call_get_zones_sync:
 * @proxy: A #XdpImplInputCaptureProxy.
 * @arg_handle: Argument to pass with the method invocation.
 * @arg_session_handle: Argument to pass with the method invocation.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @out_response: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_results: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-InputCapture.GetZones">GetZones()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_input_capture_call_get_zones() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_input_capture_call_get_zones_sync (
    XdpImplInputCapture *proxy,
    const gchar *arg_handle,
    const gchar *arg_session_handle,
    const gchar *arg_app_id,
    GVariant *arg_options,
    guint* out_response,
    GVariant ** out_results,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "GetZones",
    g_variant_new ("(oos@a{sv})",
                   arg_handle,
                   arg_session_handle,
                   arg_app_id,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(u@a{sv})",
                 out_response,
                 out_results);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_input_capture_call_set_pointer_barriers:
 * @proxy: A #XdpImplInputCaptureProxy.
 * @arg_handle: Argument to pass with the method invocation.
 * @arg_session_handle: Argument to pass with the method invocation.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @arg_barriers: Argument to pass with the method invocation.
 * @arg_zone_set: Argument to pass with the method invocation.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-InputCapture.SetPointerBarriers">SetPointerBarriers()</link> 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 xdp_impl_input_capture_call_set_pointer_barriers_finish() to get the result of the operation.
 *
 * See xdp_impl_input_capture_call_set_pointer_barriers_sync() for the synchronous, blocking version of this method.
 */
void
xdp_impl_input_capture_call_set_pointer_barriers (
    XdpImplInputCapture *proxy,
    const gchar *arg_handle,
    const gchar *arg_session_handle,
    const gchar *arg_app_id,
    GVariant *arg_options,
    GVariant *arg_barriers,
    guint arg_zone_set,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "SetPointerBarriers",
    g_variant_new ("(oos@a{sv}@aa{sv}u)",
                   arg_handle,
                   arg_session_handle,
                   arg_app_id,
                   arg_options,
                   arg_barriers,
                   arg_zone_set),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_impl_input_capture_call_set_pointer_barriers_finish:
 * @proxy: A #XdpImplInputCaptureProxy.
 * @out_response: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_results: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_input_capture_call_set_pointer_barriers().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_impl_input_capture_call_set_pointer_barriers().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_input_capture_call_set_pointer_barriers_finish (
    XdpImplInputCapture *proxy,
    guint* out_response,
    GVariant ** out_results,
    GAsyncResult *res,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(u@a{sv})",
                 out_response,
                 out_results);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_input_capture_call_set_pointer_barriers_sync:
 * @proxy: A #XdpImplInputCaptureProxy.
 * @arg_handle: Argument to pass with the method invocation.
 * @arg_session_handle: Argument to pass with the method invocation.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @arg_barriers: Argument to pass with the method invocation.
 * @arg_zone_set: Argument to pass with the method invocation.
 * @out_response: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_results: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-InputCapture.SetPointerBarriers">SetPointerBarriers()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_input_capture_call_set_pointer_barriers() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_input_capture_call_set_pointer_barriers_sync (
    XdpImplInputCapture *proxy,
    const gchar *arg_handle,
    const gchar *arg_session_handle,
    const gchar *arg_app_id,
    GVariant *arg_options,
    GVariant *arg_barriers,
    guint arg_zone_set,
    guint* out_response,
    GVariant ** out_results,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "SetPointerBarriers",
    g_variant_new ("(oos@a{sv}@aa{sv}u)",
                   arg_handle,
                   arg_session_handle,
                   arg_app_id,
                   arg_options,
                   arg_barriers,
                   arg_zone_set),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(u@a{sv})",
                 out_response,
                 out_results);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_input_capture_call_enable:
 * @proxy: A #XdpImplInputCaptureProxy.
 * @arg_session_handle: Argument to pass with the method invocation.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-InputCapture.Enable">Enable()</link> 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 xdp_impl_input_capture_call_enable_finish() to get the result of the operation.
 *
 * See xdp_impl_input_capture_call_enable_sync() for the synchronous, blocking version of this method.
 */
void
xdp_impl_input_capture_call_enable (
    XdpImplInputCapture *proxy,
    const gchar *arg_session_handle,
    const gchar *arg_app_id,
    GVariant *arg_options,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "Enable",
    g_variant_new ("(os@a{sv})",
                   arg_session_handle,
                   arg_app_id,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_impl_input_capture_call_enable_finish:
 * @proxy: A #XdpImplInputCaptureProxy.
 * @out_response: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_results: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_input_capture_call_enable().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_impl_input_capture_call_enable().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_input_capture_call_enable_finish (
    XdpImplInputCapture *proxy,
    guint* out_response,
    GVariant ** out_results,
    GAsyncResult *res,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(u@a{sv})",
                 out_response,
                 out_results);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_input_capture_call_enable_sync:
 * @proxy: A #XdpImplInputCaptureProxy.
 * @arg_session_handle: Argument to pass with the method invocation.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @out_response: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_results: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-InputCapture.Enable">Enable()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_input_capture_call_enable() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_input_capture_call_enable_sync (
    XdpImplInputCapture *proxy,
    const gchar *arg_session_handle,
    const gchar *arg_app_id,
    GVariant *arg_options,
    guint* out_response,
    GVariant ** out_results,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "Enable",
    g_variant_new ("(os@a{sv})",
                   arg_session_handle,
                   arg_app_id,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(u@a{sv})",
                 out_response,
                 out_results);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_input_capture_call_disable:
 * @proxy: A #XdpImplInputCaptureProxy.
 * @arg_session_handle: Argument to pass with the method invocation.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-InputCapture.Disable">Disable()</link> 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 xdp_impl_input_capture_call_disable_finish() to get the result of the operation.
 *
 * See xdp_impl_input_capture_call_disable_sync() for the synchronous, blocking version of this method.
 */
void
xdp_impl_input_capture_call_disable (
    XdpImplInputCapture *proxy,
    const gchar *arg_session_handle,
    const gchar *arg_app_id,
    GVariant *arg_options,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "Disable",
    g_variant_new ("(os@a{sv})",
                   arg_session_handle,
                   arg_app_id,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_impl_input_capture_call_disable_finish:
 * @proxy: A #XdpImplInputCaptureProxy.
 * @out_response: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_results: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_input_capture_call_disable().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_impl_input_capture_call_disable().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_input_capture_call_disable_finish (
    XdpImplInputCapture *proxy,
    guint* out_response,
    GVariant ** out_results,
    GAsyncResult *res,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(u@a{sv})",
                 out_response,
                 out_results);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_input_capture_call_disable_sync:
 * @proxy: A #XdpImplInputCaptureProxy.
 * @arg_session_handle: Argument to pass with the method invocation.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @out_response: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_results: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-InputCapture.Disable">Disable()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_input_capture_call_disable() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_input_capture_call_disable_sync (
    XdpImplInputCapture *proxy,
    const gchar *arg_session_handle,
    const gchar *arg_app_id,
    GVariant *arg_options,
    guint* out_response,
    GVariant ** out_results,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "Disable",
    g_variant_new ("(os@a{sv})",
                   arg_session_handle,
                   arg_app_id,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(u@a{sv})",
                 out_response,
                 out_results);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_input_capture_call_release:
 * @proxy: A #XdpImplInputCaptureProxy.
 * @arg_session_handle: Argument to pass with the method invocation.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-InputCapture.Release">Release()</link> 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 xdp_impl_input_capture_call_release_finish() to get the result of the operation.
 *
 * See xdp_impl_input_capture_call_release_sync() for the synchronous, blocking version of this method.
 */
void
xdp_impl_input_capture_call_release (
    XdpImplInputCapture *proxy,
    const gchar *arg_session_handle,
    const gchar *arg_app_id,
    GVariant *arg_options,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "Release",
    g_variant_new ("(os@a{sv})",
                   arg_session_handle,
                   arg_app_id,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_impl_input_capture_call_release_finish:
 * @proxy: A #XdpImplInputCaptureProxy.
 * @out_response: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_results: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_input_capture_call_release().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_impl_input_capture_call_release().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_input_capture_call_release_finish (
    XdpImplInputCapture *proxy,
    guint* out_response,
    GVariant ** out_results,
    GAsyncResult *res,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(u@a{sv})",
                 out_response,
                 out_results);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_input_capture_call_release_sync:
 * @proxy: A #XdpImplInputCaptureProxy.
 * @arg_session_handle: Argument to pass with the method invocation.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @out_response: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_results: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-InputCapture.Release">Release()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_input_capture_call_release() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_input_capture_call_release_sync (
    XdpImplInputCapture *proxy,
    const gchar *arg_session_handle,
    const gchar *arg_app_id,
    GVariant *arg_options,
    guint* out_response,
    GVariant ** out_results,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "Release",
    g_variant_new ("(os@a{sv})",
                   arg_session_handle,
                   arg_app_id,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(u@a{sv})",
                 out_response,
                 out_results);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_input_capture_call_connect_to_eis:
 * @proxy: A #XdpImplInputCaptureProxy.
 * @arg_session_handle: Argument to pass with the method invocation.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @fd_list: (nullable): A #GUnixFDList or %NULL.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-InputCapture.ConnectToEIS">ConnectToEIS()</link> 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 xdp_impl_input_capture_call_connect_to_eis_finish() to get the result of the operation.
 *
 * See xdp_impl_input_capture_call_connect_to_eis_sync() for the synchronous, blocking version of this method.
 */
void
xdp_impl_input_capture_call_connect_to_eis (
    XdpImplInputCapture *proxy,
    const gchar *arg_session_handle,
    const gchar *arg_app_id,
    GVariant *arg_options,
    GUnixFDList *fd_list,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call_with_unix_fd_list (G_DBUS_PROXY (proxy),
    "ConnectToEIS",
    g_variant_new ("(os@a{sv})",
                   arg_session_handle,
                   arg_app_id,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    fd_list,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_impl_input_capture_call_connect_to_eis_finish:
 * @proxy: A #XdpImplInputCaptureProxy.
 * @out_fd: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_fd_list: (out) (optional) (nullable): Return location for a #GUnixFDList or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_input_capture_call_connect_to_eis().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_impl_input_capture_call_connect_to_eis().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_input_capture_call_connect_to_eis_finish (
    XdpImplInputCapture *proxy,
    GVariant ** out_fd,
    GUnixFDList **out_fd_list,
    GAsyncResult *res,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_with_unix_fd_list_finish (G_DBUS_PROXY (proxy), out_fd_list, res, error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(@h)",
                 out_fd);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_input_capture_call_connect_to_eis_sync:
 * @proxy: A #XdpImplInputCaptureProxy.
 * @arg_session_handle: Argument to pass with the method invocation.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @fd_list: (nullable): A #GUnixFDList or %NULL.
 * @out_fd: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_fd_list: (out) (optional) (nullable): Return location for a #GUnixFDList or %NULL.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-InputCapture.ConnectToEIS">ConnectToEIS()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_input_capture_call_connect_to_eis() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_input_capture_call_connect_to_eis_sync (
    XdpImplInputCapture *proxy,
    const gchar *arg_session_handle,
    const gchar *arg_app_id,
    GVariant *arg_options,
    GUnixFDList  *fd_list,
    GVariant ** out_fd,
    GUnixFDList **out_fd_list,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_with_unix_fd_list_sync (G_DBUS_PROXY (proxy),
    "ConnectToEIS",
    g_variant_new ("(os@a{sv})",
                   arg_session_handle,
                   arg_app_id,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    fd_list,
    out_fd_list,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(@h)",
                 out_fd);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_input_capture_complete_create_session:
 * @object: A #XdpImplInputCapture.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @response: Parameter to return.
 * @results: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-impl-portal-InputCapture.CreateSession">CreateSession()</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
xdp_impl_input_capture_complete_create_session (
    XdpImplInputCapture *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    guint response,
    GVariant *results)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(u@a{sv})",
                   response,
                   results));
}

/**
 * xdp_impl_input_capture_complete_get_zones:
 * @object: A #XdpImplInputCapture.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @response: Parameter to return.
 * @results: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-impl-portal-InputCapture.GetZones">GetZones()</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
xdp_impl_input_capture_complete_get_zones (
    XdpImplInputCapture *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    guint response,
    GVariant *results)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(u@a{sv})",
                   response,
                   results));
}

/**
 * xdp_impl_input_capture_complete_set_pointer_barriers:
 * @object: A #XdpImplInputCapture.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @response: Parameter to return.
 * @results: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-impl-portal-InputCapture.SetPointerBarriers">SetPointerBarriers()</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
xdp_impl_input_capture_complete_set_pointer_barriers (
    XdpImplInputCapture *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    guint response,
    GVariant *results)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(u@a{sv})",
                   response,
                   results));
}

/**
 * xdp_impl_input_capture_complete_enable:
 * @object: A #XdpImplInputCapture.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @response: Parameter to return.
 * @results: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-impl-portal-InputCapture.Enable">Enable()</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
xdp_impl_input_capture_complete_enable (
    XdpImplInputCapture *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    guint response,
    GVariant *results)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(u@a{sv})",
                   response,
                   results));
}

/**
 * xdp_impl_input_capture_complete_disable:
 * @object: A #XdpImplInputCapture.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @response: Parameter to return.
 * @results: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-impl-portal-InputCapture.Disable">Disable()</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
xdp_impl_input_capture_complete_disable (
    XdpImplInputCapture *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    guint response,
    GVariant *results)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(u@a{sv})",
                   response,
                   results));
}

/**
 * xdp_impl_input_capture_complete_release:
 * @object: A #XdpImplInputCapture.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @response: Parameter to return.
 * @results: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-impl-portal-InputCapture.Release">Release()</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
xdp_impl_input_capture_complete_release (
    XdpImplInputCapture *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    guint response,
    GVariant *results)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(u@a{sv})",
                   response,
                   results));
}

/**
 * xdp_impl_input_capture_complete_connect_to_eis:
 * @object: A #XdpImplInputCapture.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @fd_list: (nullable): A #GUnixFDList or %NULL.
 * @fd: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-impl-portal-InputCapture.ConnectToEIS">ConnectToEIS()</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
xdp_impl_input_capture_complete_connect_to_eis (
    XdpImplInputCapture *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    GUnixFDList *fd_list,
    GVariant *fd)
{
  g_dbus_method_invocation_return_value_with_unix_fd_list (invocation,
    g_variant_new ("(@h)",
                   fd),
    fd_list);
}

/* ------------------------------------------------------------------------ */

/**
 * XdpImplInputCaptureProxy:
 *
 * The #XdpImplInputCaptureProxy structure contains only private data and should only be accessed using the provided API.
 */

/**
 * XdpImplInputCaptureProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpImplInputCaptureProxy.
 */

struct _XdpImplInputCaptureProxyPrivate
{
  GData *qdata;
};

static void xdp_impl_input_capture_proxy_iface_init (XdpImplInputCaptureIface *iface);

#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpImplInputCaptureProxy, xdp_impl_input_capture_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (XdpImplInputCaptureProxy)
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_INPUT_CAPTURE, xdp_impl_input_capture_proxy_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpImplInputCaptureProxy, xdp_impl_input_capture_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_INPUT_CAPTURE, xdp_impl_input_capture_proxy_iface_init))

#endif
static void
xdp_impl_input_capture_proxy_finalize (GObject *object)
{
  XdpImplInputCaptureProxy *proxy = XDP_IMPL_INPUT_CAPTURE_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (xdp_impl_input_capture_proxy_parent_class)->finalize (object);
}

static void
xdp_impl_input_capture_proxy_get_property (GObject      *object,
  guint         prop_id,
  GValue       *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  const _ExtendedGDBusPropertyInfo *info;
  GVariant *variant;
  g_assert (prop_id != 0 && prop_id - 1 < 2);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_impl_input_capture_property_info_pointers[prop_id - 1];
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), info->parent_struct.name);
  if (info->use_gvariant)
    {
      g_value_set_variant (value, variant);
    }
  else
    {
      if (variant != NULL)
        g_dbus_gvariant_to_gvalue (variant, value);
    }
  if (variant != NULL)
    g_variant_unref (variant);
}

static void
xdp_impl_input_capture_proxy_set_property_cb (GDBusProxy *proxy,
  GAsyncResult *res,
  gpointer      user_data)
{
  const _ExtendedGDBusPropertyInfo *info = user_data;
  GError *error;
  GVariant *_ret;
  error = NULL;
  _ret = g_dbus_proxy_call_finish (proxy, res, &error);
  if (!_ret)
    {
      g_warning ("Error setting property '%s' on interface org.freedesktop.impl.portal.InputCapture: %s (%s, %d)",
                 info->parent_struct.name, 
                 error->message, g_quark_to_string (error->domain), error->code);
      g_error_free (error);
    }
  else
    {
      g_variant_unref (_ret);
    }
}

static void
xdp_impl_input_capture_proxy_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  const _ExtendedGDBusPropertyInfo *info;
  GVariant *variant;
  g_assert (prop_id != 0 && prop_id - 1 < 2);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_impl_input_capture_property_info_pointers[prop_id - 1];
  variant = g_dbus_gvalue_to_gvariant (value, G_VARIANT_TYPE (info->parent_struct.signature));
  g_dbus_proxy_call (G_DBUS_PROXY (object),
    "org.freedesktop.DBus.Properties.Set",
    g_variant_new ("(ssv)", "org.freedesktop.impl.portal.InputCapture", info->parent_struct.name, variant),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    NULL, (GAsyncReadyCallback) xdp_impl_input_capture_proxy_set_property_cb, (GDBusPropertyInfo *) &info->parent_struct);
  g_variant_unref (variant);
}

static void
xdp_impl_input_capture_proxy_g_signal (GDBusProxy *proxy,
  const gchar *sender_name G_GNUC_UNUSED,
  const gchar *signal_name,
  GVariant *parameters)
{
  _ExtendedGDBusSignalInfo *info;
  GVariantIter iter;
  GVariant *child;
  GValue *paramv;
  gsize num_params;
  gsize n;
  guint signal_id;
  info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_xdp_impl_input_capture_interface_info.parent_struct, signal_name);
  if (info == NULL)
    return;
  num_params = g_variant_n_children (parameters);
  paramv = g_new0 (GValue, num_params + 1);
  g_value_init (&paramv[0], XDP_IMPL_TYPE_INPUT_CAPTURE);
  g_value_set_object (&paramv[0], proxy);
  g_variant_iter_init (&iter, parameters);
  n = 1;
  while ((child = g_variant_iter_next_value (&iter)) != NULL)
    {
      _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1];
      if (arg_info->use_gvariant)
        {
          g_value_init (&paramv[n], G_TYPE_VARIANT);
          g_value_set_variant (&paramv[n], child);
          n++;
        }
      else
        g_dbus_gvariant_to_gvalue (child, &paramv[n++]);
      g_variant_unref (child);
    }
  signal_id = g_signal_lookup (info->signal_name, XDP_IMPL_TYPE_INPUT_CAPTURE);
  g_signal_emitv (paramv, signal_id, 0, NULL);
  for (n = 0; n < num_params + 1; n++)
    g_value_unset (&paramv[n]);
  g_free (paramv);
}

static void
xdp_impl_input_capture_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  XdpImplInputCaptureProxy *proxy = XDP_IMPL_INPUT_CAPTURE_PROXY (_proxy);
  guint n;
  const gchar *key;
  GVariantIter *iter;
  _ExtendedGDBusPropertyInfo *info;
  g_variant_get (changed_properties, "a{sv}", &iter);
  while (g_variant_iter_next (iter, "{&sv}", &key, NULL))
    {
      info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_input_capture_interface_info.parent_struct, key);
      g_datalist_remove_data (&proxy->priv->qdata, key);
      if (info != NULL)
        g_object_notify (G_OBJECT (proxy), info->hyphen_name);
    }
  g_variant_iter_free (iter);
  for (n = 0; invalidated_properties[n] != NULL; n++)
    {
      info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_input_capture_interface_info.parent_struct, invalidated_properties[n]);
      g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]);
      if (info != NULL)
        g_object_notify (G_OBJECT (proxy), info->hyphen_name);
    }
}

static guint 
xdp_impl_input_capture_proxy_get_supported_capabilities (XdpImplInputCapture *object)
{
  XdpImplInputCaptureProxy *proxy = XDP_IMPL_INPUT_CAPTURE_PROXY (object);
  GVariant *variant;
  guint value = 0;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "SupportedCapabilities");
  if (variant != NULL)
    {
      value = g_variant_get_uint32 (variant);
      g_variant_unref (variant);
    }
  return value;
}

static guint 
xdp_impl_input_capture_proxy_get_version (XdpImplInputCapture *object)
{
  XdpImplInputCaptureProxy *proxy = XDP_IMPL_INPUT_CAPTURE_PROXY (object);
  GVariant *variant;
  guint value = 0;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "version");
  if (variant != NULL)
    {
      value = g_variant_get_uint32 (variant);
      g_variant_unref (variant);
    }
  return value;
}

static void
xdp_impl_input_capture_proxy_init (XdpImplInputCaptureProxy *proxy)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  proxy->priv = xdp_impl_input_capture_proxy_get_instance_private (proxy);
#else
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, XDP_IMPL_TYPE_INPUT_CAPTURE_PROXY, XdpImplInputCaptureProxyPrivate);
#endif

  g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), xdp_impl_input_capture_interface_info ());
}

static void
xdp_impl_input_capture_proxy_class_init (XdpImplInputCaptureProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = xdp_impl_input_capture_proxy_finalize;
  gobject_class->get_property = xdp_impl_input_capture_proxy_get_property;
  gobject_class->set_property = xdp_impl_input_capture_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = xdp_impl_input_capture_proxy_g_signal;
  proxy_class->g_properties_changed = xdp_impl_input_capture_proxy_g_properties_changed;

  xdp_impl_input_capture_override_properties (gobject_class, 1);

#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
  g_type_class_add_private (klass, sizeof (XdpImplInputCaptureProxyPrivate));
#endif
}

static void
xdp_impl_input_capture_proxy_iface_init (XdpImplInputCaptureIface *iface)
{
  iface->get_supported_capabilities = xdp_impl_input_capture_proxy_get_supported_capabilities;
  iface->get_version = xdp_impl_input_capture_proxy_get_version;
}

/**
 * xdp_impl_input_capture_proxy_new:
 * @connection: A #GDBusConnection.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-InputCapture.top_of_page">org.freedesktop.impl.portal.InputCapture</link>. 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 xdp_impl_input_capture_proxy_new_finish() to get the result of the operation.
 *
 * See xdp_impl_input_capture_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_impl_input_capture_proxy_new (
    GDBusConnection     *connection,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GAsyncReadyCallback  callback,
    gpointer             user_data)
{
  g_async_initable_new_async (XDP_IMPL_TYPE_INPUT_CAPTURE_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.InputCapture", NULL);
}

/**
 * xdp_impl_input_capture_proxy_new_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_input_capture_proxy_new().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_impl_input_capture_proxy_new().
 *
 * Returns: (transfer full) (type XdpImplInputCaptureProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplInputCapture *
xdp_impl_input_capture_proxy_new_finish (
    GAsyncResult        *res,
    GError             **error)
{
  GObject *ret;
  GObject *source_object;
  source_object = g_async_result_get_source_object (res);
  ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
  g_object_unref (source_object);
  if (ret != NULL)
    return XDP_IMPL_INPUT_CAPTURE (ret);
  else
    return NULL;
}

/**
 * xdp_impl_input_capture_proxy_new_sync:
 * @connection: A #GDBusConnection.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL
 *
 * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-InputCapture.top_of_page">org.freedesktop.impl.portal.InputCapture</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_input_capture_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpImplInputCaptureProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplInputCapture *
xdp_impl_input_capture_proxy_new_sync (
    GDBusConnection     *connection,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GError             **error)
{
  GInitable *ret;
  ret = g_initable_new (XDP_IMPL_TYPE_INPUT_CAPTURE_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.InputCapture", NULL);
  if (ret != NULL)
    return XDP_IMPL_INPUT_CAPTURE (ret);
  else
    return NULL;
}


/**
 * xdp_impl_input_capture_proxy_new_for_bus:
 * @bus_type: A #GBusType.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: A bus name (well-known or unique).
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
 * @user_data: User data to pass to @callback.
 *
 * Like xdp_impl_input_capture_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 xdp_impl_input_capture_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See xdp_impl_input_capture_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_impl_input_capture_proxy_new_for_bus (
    GBusType             bus_type,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GAsyncReadyCallback  callback,
    gpointer             user_data)
{
  g_async_initable_new_async (XDP_IMPL_TYPE_INPUT_CAPTURE_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.InputCapture", NULL);
}

/**
 * xdp_impl_input_capture_proxy_new_for_bus_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_input_capture_proxy_new_for_bus().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_impl_input_capture_proxy_new_for_bus().
 *
 * Returns: (transfer full) (type XdpImplInputCaptureProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplInputCapture *
xdp_impl_input_capture_proxy_new_for_bus_finish (
    GAsyncResult        *res,
    GError             **error)
{
  GObject *ret;
  GObject *source_object;
  source_object = g_async_result_get_source_object (res);
  ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
  g_object_unref (source_object);
  if (ret != NULL)
    return XDP_IMPL_INPUT_CAPTURE (ret);
  else
    return NULL;
}

/**
 * xdp_impl_input_capture_proxy_new_for_bus_sync:
 * @bus_type: A #GBusType.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: A bus name (well-known or unique).
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL
 *
 * Like xdp_impl_input_capture_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_input_capture_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpImplInputCaptureProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplInputCapture *
xdp_impl_input_capture_proxy_new_for_bus_sync (
    GBusType             bus_type,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GError             **error)
{
  GInitable *ret;
  ret = g_initable_new (XDP_IMPL_TYPE_INPUT_CAPTURE_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.InputCapture", NULL);
  if (ret != NULL)
    return XDP_IMPL_INPUT_CAPTURE (ret);
  else
    return NULL;
}


/* ------------------------------------------------------------------------ */

/**
 * XdpImplInputCaptureSkeleton:
 *
 * The #XdpImplInputCaptureSkeleton structure contains only private data and should only be accessed using the provided API.
 */

/**
 * XdpImplInputCaptureSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpImplInputCaptureSkeleton.
 */

struct _XdpImplInputCaptureSkeletonPrivate
{
  GValue *properties;
  GList *changed_properties;
  GSource *changed_properties_idle_source;
  GMainContext *context;
  GMutex lock;
};

static void
_xdp_impl_input_capture_skeleton_handle_method_call (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name,
  const gchar *method_name,
  GVariant *parameters,
  GDBusMethodInvocation *invocation,
  gpointer user_data)
{
  XdpImplInputCaptureSkeleton *skeleton = XDP_IMPL_INPUT_CAPTURE_SKELETON (user_data);
  _ExtendedGDBusMethodInfo *info;
  GVariantIter iter;
  GVariant *child;
  GValue *paramv;
  gsize num_params;
  guint num_extra;
  gsize n;
  guint signal_id;
  GValue return_value = G_VALUE_INIT;
  info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
  g_assert (info != NULL);
  num_params = g_variant_n_children (parameters);
  num_extra = info->pass_fdlist ? 3 : 2;  paramv = g_new0 (GValue, num_params + num_extra);
  n = 0;
  g_value_init (&paramv[n], XDP_IMPL_TYPE_INPUT_CAPTURE);
  g_value_set_object (&paramv[n++], skeleton);
  g_value_init (&paramv[n], G_TYPE_DBUS_METHOD_INVOCATION);
  g_value_set_object (&paramv[n++], invocation);
  if (info->pass_fdlist)
    {
#ifdef G_OS_UNIX
      g_value_init (&paramv[n], G_TYPE_UNIX_FD_LIST);
      g_value_set_object (&paramv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation)));
#else
      g_assert_not_reached ();
#endif
    }
  g_variant_iter_init (&iter, parameters);
  while ((child = g_variant_iter_next_value (&iter)) != NULL)
    {
      _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra];
      if (arg_info->use_gvariant)
        {
          g_value_init (&paramv[n], G_TYPE_VARIANT);
          g_value_set_variant (&paramv[n], child);
          n++;
        }
      else
        g_dbus_gvariant_to_gvalue (child, &paramv[n++]);
      g_variant_unref (child);
    }
  signal_id = g_signal_lookup (info->signal_name, XDP_IMPL_TYPE_INPUT_CAPTURE);
  g_value_init (&return_value, G_TYPE_BOOLEAN);
  g_signal_emitv (paramv, signal_id, 0, &return_value);
  if (!g_value_get_boolean (&return_value))
    g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD, "Method %s is not implemented on interface %s", method_name, interface_name);
  g_value_unset (&return_value);
  for (n = 0; n < num_params + num_extra; n++)
    g_value_unset (&paramv[n]);
  g_free (paramv);
}

static GVariant *
_xdp_impl_input_capture_skeleton_handle_get_property (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name G_GNUC_UNUSED,
  const gchar *property_name,
  GError **error,
  gpointer user_data)
{
  XdpImplInputCaptureSkeleton *skeleton = XDP_IMPL_INPUT_CAPTURE_SKELETON (user_data);
  GValue value = G_VALUE_INIT;
  GParamSpec *pspec;
  _ExtendedGDBusPropertyInfo *info;
  GVariant *ret;
  ret = NULL;
  info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_input_capture_interface_info.parent_struct, property_name);
  g_assert (info != NULL);
  pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
  if (pspec == NULL)
    {
      g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
    }
  else
    {
      g_value_init (&value, pspec->value_type);
      g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value);
      ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature));
      g_value_unset (&value);
    }
  return ret;
}

static gboolean
_xdp_impl_input_capture_skeleton_handle_set_property (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name G_GNUC_UNUSED,
  const gchar *property_name,
  GVariant *variant,
  GError **error,
  gpointer user_data)
{
  XdpImplInputCaptureSkeleton *skeleton = XDP_IMPL_INPUT_CAPTURE_SKELETON (user_data);
  GValue value = G_VALUE_INIT;
  GParamSpec *pspec;
  _ExtendedGDBusPropertyInfo *info;
  gboolean ret;
  ret = FALSE;
  info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_input_capture_interface_info.parent_struct, property_name);
  g_assert (info != NULL);
  pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
  if (pspec == NULL)
    {
      g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
    }
  else
    {
      if (info->use_gvariant)
        g_value_set_variant (&value, variant);
      else
        g_dbus_gvariant_to_gvalue (variant, &value);
      g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value);
      g_value_unset (&value);
      ret = TRUE;
    }
  return ret;
}

static const GDBusInterfaceVTable _xdp_impl_input_capture_skeleton_vtable =
{
  _xdp_impl_input_capture_skeleton_handle_method_call,
  _xdp_impl_input_capture_skeleton_handle_get_property,
  _xdp_impl_input_capture_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
xdp_impl_input_capture_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return xdp_impl_input_capture_interface_info ();
}

static GDBusInterfaceVTable *
xdp_impl_input_capture_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_xdp_impl_input_capture_skeleton_vtable;
}

static GVariant *
xdp_impl_input_capture_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  XdpImplInputCaptureSkeleton *skeleton = XDP_IMPL_INPUT_CAPTURE_SKELETON (_skeleton);

  GVariantBuilder builder;
  guint n;
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_84
  g_variant_builder_init_static (&builder, G_VARIANT_TYPE ("a{sv}"));
#else
  g_variant_builder_init(&builder, G_VARIANT_TYPE ("a{sv}"));
#endif
  if (_xdp_impl_input_capture_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _xdp_impl_input_capture_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _xdp_impl_input_capture_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _xdp_impl_input_capture_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.impl.portal.InputCapture", info->name, NULL, skeleton);
          if (value != NULL)
            {
              g_variant_take_ref (value);
              g_variant_builder_add (&builder, "{sv}", info->name, value);
              g_variant_unref (value);
            }
        }
    }
out:
  return g_variant_builder_end (&builder);
}

static gboolean _xdp_impl_input_capture_emit_changed (gpointer user_data);

static void
xdp_impl_input_capture_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
{
  XdpImplInputCaptureSkeleton *skeleton = XDP_IMPL_INPUT_CAPTURE_SKELETON (_skeleton);
  gboolean emit_changed = FALSE;

  g_mutex_lock (&skeleton->priv->lock);
  if (skeleton->priv->changed_properties_idle_source != NULL)
    {
      g_source_destroy (skeleton->priv->changed_properties_idle_source);
      skeleton->priv->changed_properties_idle_source = NULL;
      emit_changed = TRUE;
    }
  g_mutex_unlock (&skeleton->priv->lock);

  if (emit_changed)
    _xdp_impl_input_capture_emit_changed (skeleton);
}

static void
_xdp_impl_input_capture_on_signal_disabled (
    XdpImplInputCapture *object,
    const gchar *arg_session_handle,
    GVariant *arg_options)
{
  XdpImplInputCaptureSkeleton *skeleton = XDP_IMPL_INPUT_CAPTURE_SKELETON (object);

  GList      *connections, *l;
  GVariant   *signal_variant;
  connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));

  signal_variant = g_variant_ref_sink (g_variant_new ("(o@a{sv})",
                   arg_session_handle,
                   arg_options));
  for (l = connections; l != NULL; l = l->next)
    {
      GDBusConnection *connection = l->data;
      g_dbus_connection_emit_signal (connection,
        NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.impl.portal.InputCapture", "Disabled",
        signal_variant, NULL);
    }
  g_variant_unref (signal_variant);
  g_list_free_full (connections, g_object_unref);
}

static void
_xdp_impl_input_capture_on_signal_activated (
    XdpImplInputCapture *object,
    const gchar *arg_session_handle,
    GVariant *arg_options)
{
  XdpImplInputCaptureSkeleton *skeleton = XDP_IMPL_INPUT_CAPTURE_SKELETON (object);

  GList      *connections, *l;
  GVariant   *signal_variant;
  connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));

  signal_variant = g_variant_ref_sink (g_variant_new ("(o@a{sv})",
                   arg_session_handle,
                   arg_options));
  for (l = connections; l != NULL; l = l->next)
    {
      GDBusConnection *connection = l->data;
      g_dbus_connection_emit_signal (connection,
        NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.impl.portal.InputCapture", "Activated",
        signal_variant, NULL);
    }
  g_variant_unref (signal_variant);
  g_list_free_full (connections, g_object_unref);
}

static void
_xdp_impl_input_capture_on_signal_deactivated (
    XdpImplInputCapture *object,
    const gchar *arg_session_handle,
    GVariant *arg_options)
{
  XdpImplInputCaptureSkeleton *skeleton = XDP_IMPL_INPUT_CAPTURE_SKELETON (object);

  GList      *connections, *l;
  GVariant   *signal_variant;
  connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));

  signal_variant = g_variant_ref_sink (g_variant_new ("(o@a{sv})",
                   arg_session_handle,
                   arg_options));
  for (l = connections; l != NULL; l = l->next)
    {
      GDBusConnection *connection = l->data;
      g_dbus_connection_emit_signal (connection,
        NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.impl.portal.InputCapture", "Deactivated",
        signal_variant, NULL);
    }
  g_variant_unref (signal_variant);
  g_list_free_full (connections, g_object_unref);
}

static void
_xdp_impl_input_capture_on_signal_zones_changed (
    XdpImplInputCapture *object,
    const gchar *arg_session_handle,
    GVariant *arg_options)
{
  XdpImplInputCaptureSkeleton *skeleton = XDP_IMPL_INPUT_CAPTURE_SKELETON (object);

  GList      *connections, *l;
  GVariant   *signal_variant;
  connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));

  signal_variant = g_variant_ref_sink (g_variant_new ("(o@a{sv})",
                   arg_session_handle,
                   arg_options));
  for (l = connections; l != NULL; l = l->next)
    {
      GDBusConnection *connection = l->data;
      g_dbus_connection_emit_signal (connection,
        NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.impl.portal.InputCapture", "ZonesChanged",
        signal_variant, NULL);
    }
  g_variant_unref (signal_variant);
  g_list_free_full (connections, g_object_unref);
}

static void xdp_impl_input_capture_skeleton_iface_init (XdpImplInputCaptureIface *iface);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpImplInputCaptureSkeleton, xdp_impl_input_capture_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (XdpImplInputCaptureSkeleton)
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_INPUT_CAPTURE, xdp_impl_input_capture_skeleton_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpImplInputCaptureSkeleton, xdp_impl_input_capture_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_INPUT_CAPTURE, xdp_impl_input_capture_skeleton_iface_init))

#endif
static void
xdp_impl_input_capture_skeleton_finalize (GObject *object)
{
  XdpImplInputCaptureSkeleton *skeleton = XDP_IMPL_INPUT_CAPTURE_SKELETON (object);
  guint n;
  for (n = 0; n < 2; n++)
    g_value_unset (&skeleton->priv->properties[n]);
  g_free (skeleton->priv->properties);
  g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  /* coverity[missing_lock : SUPPRESS] */
  g_clear_pointer (&skeleton->priv->changed_properties_idle_source, g_source_destroy);
#else
  if (skeleton->priv->changed_properties_idle_source != NULL)
    g_source_destroy (skeleton->priv->changed_properties_idle_source);
skeleton->priv->changed_properties_idle_source = NULL;
#endif
  g_main_context_unref (skeleton->priv->context);
  g_mutex_clear (&skeleton->priv->lock);
  G_OBJECT_CLASS (xdp_impl_input_capture_skeleton_parent_class)->finalize (object);
}

static void
xdp_impl_input_capture_skeleton_get_property (GObject      *object,
  guint         prop_id,
  GValue       *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  XdpImplInputCaptureSkeleton *skeleton = XDP_IMPL_INPUT_CAPTURE_SKELETON (object);
  g_assert (prop_id != 0 && prop_id - 1 < 2);
  g_mutex_lock (&skeleton->priv->lock);
  g_value_copy (&skeleton->priv->properties[prop_id - 1], value);
  g_mutex_unlock (&skeleton->priv->lock);
}

static gboolean
_xdp_impl_input_capture_emit_changed (gpointer user_data)
{
  XdpImplInputCaptureSkeleton *skeleton = XDP_IMPL_INPUT_CAPTURE_SKELETON (user_data);
  GList *l;
  GVariantBuilder builder;
  GVariantBuilder invalidated_builder;
  guint num_changes;

  g_mutex_lock (&skeleton->priv->lock);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_84
  g_variant_builder_init_static (&builder, G_VARIANT_TYPE ("a{sv}"));
  g_variant_builder_init_static (&invalidated_builder, G_VARIANT_TYPE ("as"));
#else
  g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
  g_variant_builder_init (&invalidated_builder, G_VARIANT_TYPE ("as"));
#endif
  for (l = skeleton->priv->changed_properties, num_changes = 0; l != NULL; l = l->next)
    {
      ChangedProperty *cp = l->data;
      GVariant *variant;
      const GValue *cur_value;

      cur_value = &skeleton->priv->properties[cp->prop_id - 1];
      if (!_g_value_equal (cur_value, &cp->orig_value))
        {
          variant = g_dbus_gvalue_to_gvariant (cur_value, G_VARIANT_TYPE (cp->info->parent_struct.signature));
          g_variant_builder_add (&builder, "{sv}", cp->info->parent_struct.name, variant);
          g_variant_unref (variant);
          num_changes++;
        }
    }
  if (num_changes > 0)
    {
      GList *connections, *ll;
      GVariant *signal_variant;
      signal_variant = g_variant_ref_sink (g_variant_new ("(sa{sv}as)", "org.freedesktop.impl.portal.InputCapture",
                                           &builder, &invalidated_builder));
      connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
      for (ll = connections; ll != NULL; ll = ll->next)
        {
          GDBusConnection *connection = ll->data;

          g_dbus_connection_emit_signal (connection,
                                         NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)),
                                         "org.freedesktop.DBus.Properties",
                                         "PropertiesChanged",
                                         signal_variant,
                                         NULL);
        }
      g_variant_unref (signal_variant);
      g_list_free_full (connections, g_object_unref);
    }
  else
    {
      g_variant_builder_clear (&builder);
      g_variant_builder_clear (&invalidated_builder);
    }
  g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
  skeleton->priv->changed_properties = NULL;
  skeleton->priv->changed_properties_idle_source = NULL;
  g_mutex_unlock (&skeleton->priv->lock);
  return FALSE;
}

static void
_xdp_impl_input_capture_schedule_emit_changed (XdpImplInputCaptureSkeleton *skeleton, const _ExtendedGDBusPropertyInfo *info, guint prop_id, const GValue *orig_value)
{
  ChangedProperty *cp;
  GList *l;
  cp = NULL;
  for (l = skeleton->priv->changed_properties; l != NULL; l = l->next)
    {
      ChangedProperty *i_cp = l->data;
      if (i_cp->info == info)
        {
          cp = i_cp;
          break;
        }
    }
  if (cp == NULL)
    {
      cp = g_new0 (ChangedProperty, 1);
      cp->prop_id = prop_id;
      cp->info = info;
      skeleton->priv->changed_properties = g_list_prepend (skeleton->priv->changed_properties, cp);
      g_value_init (&cp->orig_value, G_VALUE_TYPE (orig_value));
      g_value_copy (orig_value, &cp->orig_value);
    }
}

static void
xdp_impl_input_capture_skeleton_notify (GObject      *object,
  GParamSpec *pspec G_GNUC_UNUSED)
{
  XdpImplInputCaptureSkeleton *skeleton = XDP_IMPL_INPUT_CAPTURE_SKELETON (object);
  g_mutex_lock (&skeleton->priv->lock);
  if (skeleton->priv->changed_properties != NULL &&
      skeleton->priv->changed_properties_idle_source == NULL)
    {
      skeleton->priv->changed_properties_idle_source = g_idle_source_new ();
      g_source_set_priority (skeleton->priv->changed_properties_idle_source, G_PRIORITY_DEFAULT);
      g_source_set_callback (skeleton->priv->changed_properties_idle_source, _xdp_impl_input_capture_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
      g_source_set_name (skeleton->priv->changed_properties_idle_source, "[generated] _xdp_impl_input_capture_emit_changed");
      g_source_attach (skeleton->priv->changed_properties_idle_source, skeleton->priv->context);
      g_source_unref (skeleton->priv->changed_properties_idle_source);
    }
  g_mutex_unlock (&skeleton->priv->lock);
}

static void
xdp_impl_input_capture_skeleton_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec)
{
  const _ExtendedGDBusPropertyInfo *info;
  XdpImplInputCaptureSkeleton *skeleton = XDP_IMPL_INPUT_CAPTURE_SKELETON (object);
  g_assert (prop_id != 0 && prop_id - 1 < 2);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_impl_input_capture_property_info_pointers[prop_id - 1];
  g_mutex_lock (&skeleton->priv->lock);
  g_object_freeze_notify (object);
  if (!_g_value_equal (value, &skeleton->priv->properties[prop_id - 1]))
    {
      if (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)) != NULL &&
          info->emits_changed_signal)
        _xdp_impl_input_capture_schedule_emit_changed (skeleton, info, prop_id, &skeleton->priv->properties[prop_id - 1]);
      g_value_copy (value, &skeleton->priv->properties[prop_id - 1]);
      g_object_notify_by_pspec (object, pspec);
    }
  g_mutex_unlock (&skeleton->priv->lock);
  g_object_thaw_notify (object);
}

static void
xdp_impl_input_capture_skeleton_init (XdpImplInputCaptureSkeleton *skeleton)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  skeleton->priv = xdp_impl_input_capture_skeleton_get_instance_private (skeleton);
#else
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, XDP_IMPL_TYPE_INPUT_CAPTURE_SKELETON, XdpImplInputCaptureSkeletonPrivate);
#endif

  g_mutex_init (&skeleton->priv->lock);
  skeleton->priv->context = g_main_context_ref_thread_default ();
  skeleton->priv->properties = g_new0 (GValue, 2);
  g_value_init (&skeleton->priv->properties[0], G_TYPE_UINT);
  g_value_init (&skeleton->priv->properties[1], G_TYPE_UINT);
}

static guint 
xdp_impl_input_capture_skeleton_get_supported_capabilities (XdpImplInputCapture *object)
{
  XdpImplInputCaptureSkeleton *skeleton = XDP_IMPL_INPUT_CAPTURE_SKELETON (object);
  guint value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_marshal_value_peek_uint (&(skeleton->priv->properties[0]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static guint 
xdp_impl_input_capture_skeleton_get_version (XdpImplInputCapture *object)
{
  XdpImplInputCaptureSkeleton *skeleton = XDP_IMPL_INPUT_CAPTURE_SKELETON (object);
  guint value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_marshal_value_peek_uint (&(skeleton->priv->properties[1]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static void
xdp_impl_input_capture_skeleton_class_init (XdpImplInputCaptureSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize = xdp_impl_input_capture_skeleton_finalize;
  gobject_class->get_property = xdp_impl_input_capture_skeleton_get_property;
  gobject_class->set_property = xdp_impl_input_capture_skeleton_set_property;
  gobject_class->notify       = xdp_impl_input_capture_skeleton_notify;


  xdp_impl_input_capture_override_properties (gobject_class, 1);

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = xdp_impl_input_capture_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = xdp_impl_input_capture_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = xdp_impl_input_capture_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = xdp_impl_input_capture_skeleton_dbus_interface_get_vtable;

#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
  g_type_class_add_private (klass, sizeof (XdpImplInputCaptureSkeletonPrivate));
#endif
}

static void
xdp_impl_input_capture_skeleton_iface_init (XdpImplInputCaptureIface *iface)
{
  iface->disabled = _xdp_impl_input_capture_on_signal_disabled;
  iface->activated = _xdp_impl_input_capture_on_signal_activated;
  iface->deactivated = _xdp_impl_input_capture_on_signal_deactivated;
  iface->zones_changed = _xdp_impl_input_capture_on_signal_zones_changed;
  iface->get_supported_capabilities = xdp_impl_input_capture_skeleton_get_supported_capabilities;
  iface->get_version = xdp_impl_input_capture_skeleton_get_version;
}

/**
 * xdp_impl_input_capture_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-InputCapture.top_of_page">org.freedesktop.impl.portal.InputCapture</link>.
 *
 * Returns: (transfer full) (type XdpImplInputCaptureSkeleton): The skeleton object.
 */
XdpImplInputCapture *
xdp_impl_input_capture_skeleton_new (void)
{
  return XDP_IMPL_INPUT_CAPTURE (g_object_new (XDP_IMPL_TYPE_INPUT_CAPTURE_SKELETON, NULL));
}

/* ------------------------------------------------------------------------
 * Code for interface org.freedesktop.impl.portal.Lockdown
 * ------------------------------------------------------------------------
 */

/**
 * SECTION:XdpImplLockdown
 * @title: XdpImplLockdown
 * @short_description: Generated C code for the org.freedesktop.impl.portal.Lockdown D-Bus interface
 *
 * This section contains code for working with the <link linkend="gdbus-interface-org-freedesktop-impl-portal-Lockdown.top_of_page">org.freedesktop.impl.portal.Lockdown</link> D-Bus interface in C.
 */

/* ---- Introspection data for org.freedesktop.impl.portal.Lockdown ---- */

static const _ExtendedGDBusPropertyInfo _xdp_impl_lockdown_property_info_disable_printing =
{
  {
    -1,
    (gchar *) "disable-printing",
    (gchar *) "b",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
    NULL
  },
  "disable-printing",
  FALSE,
  TRUE
};

static const _ExtendedGDBusPropertyInfo _xdp_impl_lockdown_property_info_disable_save_to_disk =
{
  {
    -1,
    (gchar *) "disable-save-to-disk",
    (gchar *) "b",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
    NULL
  },
  "disable-save-to-disk",
  FALSE,
  TRUE
};

static const _ExtendedGDBusPropertyInfo _xdp_impl_lockdown_property_info_disable_application_handlers =
{
  {
    -1,
    (gchar *) "disable-application-handlers",
    (gchar *) "b",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
    NULL
  },
  "disable-application-handlers",
  FALSE,
  TRUE
};

static const _ExtendedGDBusPropertyInfo _xdp_impl_lockdown_property_info_disable_location =
{
  {
    -1,
    (gchar *) "disable-location",
    (gchar *) "b",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
    NULL
  },
  "disable-location",
  FALSE,
  TRUE
};

static const _ExtendedGDBusPropertyInfo _xdp_impl_lockdown_property_info_disable_camera =
{
  {
    -1,
    (gchar *) "disable-camera",
    (gchar *) "b",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
    NULL
  },
  "disable-camera",
  FALSE,
  TRUE
};

static const _ExtendedGDBusPropertyInfo _xdp_impl_lockdown_property_info_disable_microphone =
{
  {
    -1,
    (gchar *) "disable-microphone",
    (gchar *) "b",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
    NULL
  },
  "disable-microphone",
  FALSE,
  TRUE
};

static const _ExtendedGDBusPropertyInfo _xdp_impl_lockdown_property_info_disable_sound_output =
{
  {
    -1,
    (gchar *) "disable-sound-output",
    (gchar *) "b",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
    NULL
  },
  "disable-sound-output",
  FALSE,
  TRUE
};

static const GDBusPropertyInfo * const _xdp_impl_lockdown_property_info_pointers[] =
{
  &_xdp_impl_lockdown_property_info_disable_printing.parent_struct,
  &_xdp_impl_lockdown_property_info_disable_save_to_disk.parent_struct,
  &_xdp_impl_lockdown_property_info_disable_application_handlers.parent_struct,
  &_xdp_impl_lockdown_property_info_disable_location.parent_struct,
  &_xdp_impl_lockdown_property_info_disable_camera.parent_struct,
  &_xdp_impl_lockdown_property_info_disable_microphone.parent_struct,
  &_xdp_impl_lockdown_property_info_disable_sound_output.parent_struct,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _xdp_impl_lockdown_interface_info =
{
  {
    -1,
    (gchar *) "org.freedesktop.impl.portal.Lockdown",
    NULL,
    NULL,
    (GDBusPropertyInfo **) &_xdp_impl_lockdown_property_info_pointers,
    NULL
  },
  "lockdown",
};


/**
 * xdp_impl_lockdown_interface_info:
 *
 * Gets a machine-readable description of the <link linkend="gdbus-interface-org-freedesktop-impl-portal-Lockdown.top_of_page">org.freedesktop.impl.portal.Lockdown</link> D-Bus interface.
 *
 * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
 */
GDBusInterfaceInfo *
xdp_impl_lockdown_interface_info (void)
{
  return (GDBusInterfaceInfo *) &_xdp_impl_lockdown_interface_info.parent_struct;
}

/**
 * xdp_impl_lockdown_override_properties:
 * @klass: The class structure for a #GObject derived class.
 * @property_id_begin: The property id to assign to the first overridden property.
 *
 * Overrides all #GObject properties in the #XdpImplLockdown interface for a concrete class.
 * The properties are overridden in the order they are defined.
 *
 * Returns: The last property id.
 */
guint
xdp_impl_lockdown_override_properties (GObjectClass *klass, guint property_id_begin)
{
  g_object_class_override_property (klass, property_id_begin++, "disable-printing");
  g_object_class_override_property (klass, property_id_begin++, "disable-save-to-disk");
  g_object_class_override_property (klass, property_id_begin++, "disable-application-handlers");
  g_object_class_override_property (klass, property_id_begin++, "disable-location");
  g_object_class_override_property (klass, property_id_begin++, "disable-camera");
  g_object_class_override_property (klass, property_id_begin++, "disable-microphone");
  g_object_class_override_property (klass, property_id_begin++, "disable-sound-output");
  return property_id_begin - 1;
}



/**
 * XdpImplLockdown:
 *
 * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-Lockdown.top_of_page">org.freedesktop.impl.portal.Lockdown</link>.
 */

/**
 * XdpImplLockdownIface:
 * @parent_iface: The parent interface.
 * @get_disable_application_handlers: Getter for the #XdpImplLockdown:disable-application-handlers property.
 * @get_disable_camera: Getter for the #XdpImplLockdown:disable-camera property.
 * @get_disable_location: Getter for the #XdpImplLockdown:disable-location property.
 * @get_disable_microphone: Getter for the #XdpImplLockdown:disable-microphone property.
 * @get_disable_printing: Getter for the #XdpImplLockdown:disable-printing property.
 * @get_disable_save_to_disk: Getter for the #XdpImplLockdown:disable-save-to-disk property.
 * @get_disable_sound_output: Getter for the #XdpImplLockdown:disable-sound-output property.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-Lockdown.top_of_page">org.freedesktop.impl.portal.Lockdown</link>.
 */

typedef XdpImplLockdownIface XdpImplLockdownInterface;
G_DEFINE_INTERFACE (XdpImplLockdown, xdp_impl_lockdown, G_TYPE_OBJECT)

static void
xdp_impl_lockdown_default_init (XdpImplLockdownIface *iface)
{
  /* GObject properties for D-Bus properties: */
  /**
   * XdpImplLockdown:disable-printing:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-impl-portal-Lockdown.disable-printing">"disable-printing"</link>.
   *
   * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side.
   */
  g_object_interface_install_property (iface,
    g_param_spec_boolean ("disable-printing", "disable-printing", "disable-printing", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * XdpImplLockdown:disable-save-to-disk:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-impl-portal-Lockdown.disable-save-to-disk">"disable-save-to-disk"</link>.
   *
   * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side.
   */
  g_object_interface_install_property (iface,
    g_param_spec_boolean ("disable-save-to-disk", "disable-save-to-disk", "disable-save-to-disk", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * XdpImplLockdown:disable-application-handlers:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-impl-portal-Lockdown.disable-application-handlers">"disable-application-handlers"</link>.
   *
   * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side.
   */
  g_object_interface_install_property (iface,
    g_param_spec_boolean ("disable-application-handlers", "disable-application-handlers", "disable-application-handlers", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * XdpImplLockdown:disable-location:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-impl-portal-Lockdown.disable-location">"disable-location"</link>.
   *
   * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side.
   */
  g_object_interface_install_property (iface,
    g_param_spec_boolean ("disable-location", "disable-location", "disable-location", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * XdpImplLockdown:disable-camera:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-impl-portal-Lockdown.disable-camera">"disable-camera"</link>.
   *
   * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side.
   */
  g_object_interface_install_property (iface,
    g_param_spec_boolean ("disable-camera", "disable-camera", "disable-camera", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * XdpImplLockdown:disable-microphone:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-impl-portal-Lockdown.disable-microphone">"disable-microphone"</link>.
   *
   * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side.
   */
  g_object_interface_install_property (iface,
    g_param_spec_boolean ("disable-microphone", "disable-microphone", "disable-microphone", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * XdpImplLockdown:disable-sound-output:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-impl-portal-Lockdown.disable-sound-output">"disable-sound-output"</link>.
   *
   * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side.
   */
  g_object_interface_install_property (iface,
    g_param_spec_boolean ("disable-sound-output", "disable-sound-output", "disable-sound-output", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
}

/**
 * xdp_impl_lockdown_get_disable_printing: (skip)
 * @object: A #XdpImplLockdown.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-impl-portal-Lockdown.disable-printing">"disable-printing"</link> D-Bus property.
 *
 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
 *
 * Returns: The property value.
 */
gboolean 
xdp_impl_lockdown_get_disable_printing (XdpImplLockdown *object)
{
  g_return_val_if_fail (XDP_IMPL_IS_LOCKDOWN (object), FALSE);

  return XDP_IMPL_LOCKDOWN_GET_IFACE (object)->get_disable_printing (object);
}

/**
 * xdp_impl_lockdown_set_disable_printing: (skip)
 * @object: A #XdpImplLockdown.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-freedesktop-impl-portal-Lockdown.disable-printing">"disable-printing"</link> D-Bus property to @value.
 *
 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
 */
void
xdp_impl_lockdown_set_disable_printing (XdpImplLockdown *object, gboolean value)
{
  g_object_set (G_OBJECT (object), "disable-printing", value, NULL);
}

/**
 * xdp_impl_lockdown_get_disable_save_to_disk: (skip)
 * @object: A #XdpImplLockdown.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-impl-portal-Lockdown.disable-save-to-disk">"disable-save-to-disk"</link> D-Bus property.
 *
 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
 *
 * Returns: The property value.
 */
gboolean 
xdp_impl_lockdown_get_disable_save_to_disk (XdpImplLockdown *object)
{
  g_return_val_if_fail (XDP_IMPL_IS_LOCKDOWN (object), FALSE);

  return XDP_IMPL_LOCKDOWN_GET_IFACE (object)->get_disable_save_to_disk (object);
}

/**
 * xdp_impl_lockdown_set_disable_save_to_disk: (skip)
 * @object: A #XdpImplLockdown.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-freedesktop-impl-portal-Lockdown.disable-save-to-disk">"disable-save-to-disk"</link> D-Bus property to @value.
 *
 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
 */
void
xdp_impl_lockdown_set_disable_save_to_disk (XdpImplLockdown *object, gboolean value)
{
  g_object_set (G_OBJECT (object), "disable-save-to-disk", value, NULL);
}

/**
 * xdp_impl_lockdown_get_disable_application_handlers: (skip)
 * @object: A #XdpImplLockdown.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-impl-portal-Lockdown.disable-application-handlers">"disable-application-handlers"</link> D-Bus property.
 *
 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
 *
 * Returns: The property value.
 */
gboolean 
xdp_impl_lockdown_get_disable_application_handlers (XdpImplLockdown *object)
{
  g_return_val_if_fail (XDP_IMPL_IS_LOCKDOWN (object), FALSE);

  return XDP_IMPL_LOCKDOWN_GET_IFACE (object)->get_disable_application_handlers (object);
}

/**
 * xdp_impl_lockdown_set_disable_application_handlers: (skip)
 * @object: A #XdpImplLockdown.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-freedesktop-impl-portal-Lockdown.disable-application-handlers">"disable-application-handlers"</link> D-Bus property to @value.
 *
 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
 */
void
xdp_impl_lockdown_set_disable_application_handlers (XdpImplLockdown *object, gboolean value)
{
  g_object_set (G_OBJECT (object), "disable-application-handlers", value, NULL);
}

/**
 * xdp_impl_lockdown_get_disable_location: (skip)
 * @object: A #XdpImplLockdown.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-impl-portal-Lockdown.disable-location">"disable-location"</link> D-Bus property.
 *
 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
 *
 * Returns: The property value.
 */
gboolean 
xdp_impl_lockdown_get_disable_location (XdpImplLockdown *object)
{
  g_return_val_if_fail (XDP_IMPL_IS_LOCKDOWN (object), FALSE);

  return XDP_IMPL_LOCKDOWN_GET_IFACE (object)->get_disable_location (object);
}

/**
 * xdp_impl_lockdown_set_disable_location: (skip)
 * @object: A #XdpImplLockdown.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-freedesktop-impl-portal-Lockdown.disable-location">"disable-location"</link> D-Bus property to @value.
 *
 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
 */
void
xdp_impl_lockdown_set_disable_location (XdpImplLockdown *object, gboolean value)
{
  g_object_set (G_OBJECT (object), "disable-location", value, NULL);
}

/**
 * xdp_impl_lockdown_get_disable_camera: (skip)
 * @object: A #XdpImplLockdown.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-impl-portal-Lockdown.disable-camera">"disable-camera"</link> D-Bus property.
 *
 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
 *
 * Returns: The property value.
 */
gboolean 
xdp_impl_lockdown_get_disable_camera (XdpImplLockdown *object)
{
  g_return_val_if_fail (XDP_IMPL_IS_LOCKDOWN (object), FALSE);

  return XDP_IMPL_LOCKDOWN_GET_IFACE (object)->get_disable_camera (object);
}

/**
 * xdp_impl_lockdown_set_disable_camera: (skip)
 * @object: A #XdpImplLockdown.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-freedesktop-impl-portal-Lockdown.disable-camera">"disable-camera"</link> D-Bus property to @value.
 *
 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
 */
void
xdp_impl_lockdown_set_disable_camera (XdpImplLockdown *object, gboolean value)
{
  g_object_set (G_OBJECT (object), "disable-camera", value, NULL);
}

/**
 * xdp_impl_lockdown_get_disable_microphone: (skip)
 * @object: A #XdpImplLockdown.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-impl-portal-Lockdown.disable-microphone">"disable-microphone"</link> D-Bus property.
 *
 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
 *
 * Returns: The property value.
 */
gboolean 
xdp_impl_lockdown_get_disable_microphone (XdpImplLockdown *object)
{
  g_return_val_if_fail (XDP_IMPL_IS_LOCKDOWN (object), FALSE);

  return XDP_IMPL_LOCKDOWN_GET_IFACE (object)->get_disable_microphone (object);
}

/**
 * xdp_impl_lockdown_set_disable_microphone: (skip)
 * @object: A #XdpImplLockdown.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-freedesktop-impl-portal-Lockdown.disable-microphone">"disable-microphone"</link> D-Bus property to @value.
 *
 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
 */
void
xdp_impl_lockdown_set_disable_microphone (XdpImplLockdown *object, gboolean value)
{
  g_object_set (G_OBJECT (object), "disable-microphone", value, NULL);
}

/**
 * xdp_impl_lockdown_get_disable_sound_output: (skip)
 * @object: A #XdpImplLockdown.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-impl-portal-Lockdown.disable-sound-output">"disable-sound-output"</link> D-Bus property.
 *
 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
 *
 * Returns: The property value.
 */
gboolean 
xdp_impl_lockdown_get_disable_sound_output (XdpImplLockdown *object)
{
  g_return_val_if_fail (XDP_IMPL_IS_LOCKDOWN (object), FALSE);

  return XDP_IMPL_LOCKDOWN_GET_IFACE (object)->get_disable_sound_output (object);
}

/**
 * xdp_impl_lockdown_set_disable_sound_output: (skip)
 * @object: A #XdpImplLockdown.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-freedesktop-impl-portal-Lockdown.disable-sound-output">"disable-sound-output"</link> D-Bus property to @value.
 *
 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
 */
void
xdp_impl_lockdown_set_disable_sound_output (XdpImplLockdown *object, gboolean value)
{
  g_object_set (G_OBJECT (object), "disable-sound-output", value, NULL);
}

/* ------------------------------------------------------------------------ */

/**
 * XdpImplLockdownProxy:
 *
 * The #XdpImplLockdownProxy structure contains only private data and should only be accessed using the provided API.
 */

/**
 * XdpImplLockdownProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpImplLockdownProxy.
 */

struct _XdpImplLockdownProxyPrivate
{
  GData *qdata;
};

static void xdp_impl_lockdown_proxy_iface_init (XdpImplLockdownIface *iface);

#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpImplLockdownProxy, xdp_impl_lockdown_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (XdpImplLockdownProxy)
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_LOCKDOWN, xdp_impl_lockdown_proxy_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpImplLockdownProxy, xdp_impl_lockdown_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_LOCKDOWN, xdp_impl_lockdown_proxy_iface_init))

#endif
static void
xdp_impl_lockdown_proxy_finalize (GObject *object)
{
  XdpImplLockdownProxy *proxy = XDP_IMPL_LOCKDOWN_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (xdp_impl_lockdown_proxy_parent_class)->finalize (object);
}

static void
xdp_impl_lockdown_proxy_get_property (GObject      *object,
  guint         prop_id,
  GValue       *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  const _ExtendedGDBusPropertyInfo *info;
  GVariant *variant;
  g_assert (prop_id != 0 && prop_id - 1 < 7);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_impl_lockdown_property_info_pointers[prop_id - 1];
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), info->parent_struct.name);
  if (info->use_gvariant)
    {
      g_value_set_variant (value, variant);
    }
  else
    {
      if (variant != NULL)
        g_dbus_gvariant_to_gvalue (variant, value);
    }
  if (variant != NULL)
    g_variant_unref (variant);
}

static void
xdp_impl_lockdown_proxy_set_property_cb (GDBusProxy *proxy,
  GAsyncResult *res,
  gpointer      user_data)
{
  const _ExtendedGDBusPropertyInfo *info = user_data;
  GError *error;
  GVariant *_ret;
  error = NULL;
  _ret = g_dbus_proxy_call_finish (proxy, res, &error);
  if (!_ret)
    {
      g_warning ("Error setting property '%s' on interface org.freedesktop.impl.portal.Lockdown: %s (%s, %d)",
                 info->parent_struct.name, 
                 error->message, g_quark_to_string (error->domain), error->code);
      g_error_free (error);
    }
  else
    {
      g_variant_unref (_ret);
    }
}

static void
xdp_impl_lockdown_proxy_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  const _ExtendedGDBusPropertyInfo *info;
  GVariant *variant;
  g_assert (prop_id != 0 && prop_id - 1 < 7);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_impl_lockdown_property_info_pointers[prop_id - 1];
  variant = g_dbus_gvalue_to_gvariant (value, G_VARIANT_TYPE (info->parent_struct.signature));
  g_dbus_proxy_call (G_DBUS_PROXY (object),
    "org.freedesktop.DBus.Properties.Set",
    g_variant_new ("(ssv)", "org.freedesktop.impl.portal.Lockdown", info->parent_struct.name, variant),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    NULL, (GAsyncReadyCallback) xdp_impl_lockdown_proxy_set_property_cb, (GDBusPropertyInfo *) &info->parent_struct);
  g_variant_unref (variant);
}

static void
xdp_impl_lockdown_proxy_g_signal (GDBusProxy *proxy,
  const gchar *sender_name G_GNUC_UNUSED,
  const gchar *signal_name,
  GVariant *parameters)
{
  _ExtendedGDBusSignalInfo *info;
  GVariantIter iter;
  GVariant *child;
  GValue *paramv;
  gsize num_params;
  gsize n;
  guint signal_id;
  info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_xdp_impl_lockdown_interface_info.parent_struct, signal_name);
  if (info == NULL)
    return;
  num_params = g_variant_n_children (parameters);
  paramv = g_new0 (GValue, num_params + 1);
  g_value_init (&paramv[0], XDP_IMPL_TYPE_LOCKDOWN);
  g_value_set_object (&paramv[0], proxy);
  g_variant_iter_init (&iter, parameters);
  n = 1;
  while ((child = g_variant_iter_next_value (&iter)) != NULL)
    {
      _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1];
      if (arg_info->use_gvariant)
        {
          g_value_init (&paramv[n], G_TYPE_VARIANT);
          g_value_set_variant (&paramv[n], child);
          n++;
        }
      else
        g_dbus_gvariant_to_gvalue (child, &paramv[n++]);
      g_variant_unref (child);
    }
  signal_id = g_signal_lookup (info->signal_name, XDP_IMPL_TYPE_LOCKDOWN);
  g_signal_emitv (paramv, signal_id, 0, NULL);
  for (n = 0; n < num_params + 1; n++)
    g_value_unset (&paramv[n]);
  g_free (paramv);
}

static void
xdp_impl_lockdown_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  XdpImplLockdownProxy *proxy = XDP_IMPL_LOCKDOWN_PROXY (_proxy);
  guint n;
  const gchar *key;
  GVariantIter *iter;
  _ExtendedGDBusPropertyInfo *info;
  g_variant_get (changed_properties, "a{sv}", &iter);
  while (g_variant_iter_next (iter, "{&sv}", &key, NULL))
    {
      info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_lockdown_interface_info.parent_struct, key);
      g_datalist_remove_data (&proxy->priv->qdata, key);
      if (info != NULL)
        g_object_notify (G_OBJECT (proxy), info->hyphen_name);
    }
  g_variant_iter_free (iter);
  for (n = 0; invalidated_properties[n] != NULL; n++)
    {
      info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_lockdown_interface_info.parent_struct, invalidated_properties[n]);
      g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]);
      if (info != NULL)
        g_object_notify (G_OBJECT (proxy), info->hyphen_name);
    }
}

static gboolean 
xdp_impl_lockdown_proxy_get_disable_printing (XdpImplLockdown *object)
{
  XdpImplLockdownProxy *proxy = XDP_IMPL_LOCKDOWN_PROXY (object);
  GVariant *variant;
  gboolean value = FALSE;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "disable-printing");
  if (variant != NULL)
    {
      value = g_variant_get_boolean (variant);
      g_variant_unref (variant);
    }
  return value;
}

static gboolean 
xdp_impl_lockdown_proxy_get_disable_save_to_disk (XdpImplLockdown *object)
{
  XdpImplLockdownProxy *proxy = XDP_IMPL_LOCKDOWN_PROXY (object);
  GVariant *variant;
  gboolean value = FALSE;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "disable-save-to-disk");
  if (variant != NULL)
    {
      value = g_variant_get_boolean (variant);
      g_variant_unref (variant);
    }
  return value;
}

static gboolean 
xdp_impl_lockdown_proxy_get_disable_application_handlers (XdpImplLockdown *object)
{
  XdpImplLockdownProxy *proxy = XDP_IMPL_LOCKDOWN_PROXY (object);
  GVariant *variant;
  gboolean value = FALSE;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "disable-application-handlers");
  if (variant != NULL)
    {
      value = g_variant_get_boolean (variant);
      g_variant_unref (variant);
    }
  return value;
}

static gboolean 
xdp_impl_lockdown_proxy_get_disable_location (XdpImplLockdown *object)
{
  XdpImplLockdownProxy *proxy = XDP_IMPL_LOCKDOWN_PROXY (object);
  GVariant *variant;
  gboolean value = FALSE;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "disable-location");
  if (variant != NULL)
    {
      value = g_variant_get_boolean (variant);
      g_variant_unref (variant);
    }
  return value;
}

static gboolean 
xdp_impl_lockdown_proxy_get_disable_camera (XdpImplLockdown *object)
{
  XdpImplLockdownProxy *proxy = XDP_IMPL_LOCKDOWN_PROXY (object);
  GVariant *variant;
  gboolean value = FALSE;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "disable-camera");
  if (variant != NULL)
    {
      value = g_variant_get_boolean (variant);
      g_variant_unref (variant);
    }
  return value;
}

static gboolean 
xdp_impl_lockdown_proxy_get_disable_microphone (XdpImplLockdown *object)
{
  XdpImplLockdownProxy *proxy = XDP_IMPL_LOCKDOWN_PROXY (object);
  GVariant *variant;
  gboolean value = FALSE;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "disable-microphone");
  if (variant != NULL)
    {
      value = g_variant_get_boolean (variant);
      g_variant_unref (variant);
    }
  return value;
}

static gboolean 
xdp_impl_lockdown_proxy_get_disable_sound_output (XdpImplLockdown *object)
{
  XdpImplLockdownProxy *proxy = XDP_IMPL_LOCKDOWN_PROXY (object);
  GVariant *variant;
  gboolean value = FALSE;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "disable-sound-output");
  if (variant != NULL)
    {
      value = g_variant_get_boolean (variant);
      g_variant_unref (variant);
    }
  return value;
}

static void
xdp_impl_lockdown_proxy_init (XdpImplLockdownProxy *proxy)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  proxy->priv = xdp_impl_lockdown_proxy_get_instance_private (proxy);
#else
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, XDP_IMPL_TYPE_LOCKDOWN_PROXY, XdpImplLockdownProxyPrivate);
#endif

  g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), xdp_impl_lockdown_interface_info ());
}

static void
xdp_impl_lockdown_proxy_class_init (XdpImplLockdownProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = xdp_impl_lockdown_proxy_finalize;
  gobject_class->get_property = xdp_impl_lockdown_proxy_get_property;
  gobject_class->set_property = xdp_impl_lockdown_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = xdp_impl_lockdown_proxy_g_signal;
  proxy_class->g_properties_changed = xdp_impl_lockdown_proxy_g_properties_changed;

  xdp_impl_lockdown_override_properties (gobject_class, 1);

#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
  g_type_class_add_private (klass, sizeof (XdpImplLockdownProxyPrivate));
#endif
}

static void
xdp_impl_lockdown_proxy_iface_init (XdpImplLockdownIface *iface)
{
  iface->get_disable_printing = xdp_impl_lockdown_proxy_get_disable_printing;
  iface->get_disable_save_to_disk = xdp_impl_lockdown_proxy_get_disable_save_to_disk;
  iface->get_disable_application_handlers = xdp_impl_lockdown_proxy_get_disable_application_handlers;
  iface->get_disable_location = xdp_impl_lockdown_proxy_get_disable_location;
  iface->get_disable_camera = xdp_impl_lockdown_proxy_get_disable_camera;
  iface->get_disable_microphone = xdp_impl_lockdown_proxy_get_disable_microphone;
  iface->get_disable_sound_output = xdp_impl_lockdown_proxy_get_disable_sound_output;
}

/**
 * xdp_impl_lockdown_proxy_new:
 * @connection: A #GDBusConnection.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-Lockdown.top_of_page">org.freedesktop.impl.portal.Lockdown</link>. 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 xdp_impl_lockdown_proxy_new_finish() to get the result of the operation.
 *
 * See xdp_impl_lockdown_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_impl_lockdown_proxy_new (
    GDBusConnection     *connection,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GAsyncReadyCallback  callback,
    gpointer             user_data)
{
  g_async_initable_new_async (XDP_IMPL_TYPE_LOCKDOWN_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.Lockdown", NULL);
}

/**
 * xdp_impl_lockdown_proxy_new_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_lockdown_proxy_new().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_impl_lockdown_proxy_new().
 *
 * Returns: (transfer full) (type XdpImplLockdownProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplLockdown *
xdp_impl_lockdown_proxy_new_finish (
    GAsyncResult        *res,
    GError             **error)
{
  GObject *ret;
  GObject *source_object;
  source_object = g_async_result_get_source_object (res);
  ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
  g_object_unref (source_object);
  if (ret != NULL)
    return XDP_IMPL_LOCKDOWN (ret);
  else
    return NULL;
}

/**
 * xdp_impl_lockdown_proxy_new_sync:
 * @connection: A #GDBusConnection.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL
 *
 * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-Lockdown.top_of_page">org.freedesktop.impl.portal.Lockdown</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_lockdown_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpImplLockdownProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplLockdown *
xdp_impl_lockdown_proxy_new_sync (
    GDBusConnection     *connection,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GError             **error)
{
  GInitable *ret;
  ret = g_initable_new (XDP_IMPL_TYPE_LOCKDOWN_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.Lockdown", NULL);
  if (ret != NULL)
    return XDP_IMPL_LOCKDOWN (ret);
  else
    return NULL;
}


/**
 * xdp_impl_lockdown_proxy_new_for_bus:
 * @bus_type: A #GBusType.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: A bus name (well-known or unique).
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
 * @user_data: User data to pass to @callback.
 *
 * Like xdp_impl_lockdown_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 xdp_impl_lockdown_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See xdp_impl_lockdown_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_impl_lockdown_proxy_new_for_bus (
    GBusType             bus_type,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GAsyncReadyCallback  callback,
    gpointer             user_data)
{
  g_async_initable_new_async (XDP_IMPL_TYPE_LOCKDOWN_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.Lockdown", NULL);
}

/**
 * xdp_impl_lockdown_proxy_new_for_bus_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_lockdown_proxy_new_for_bus().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_impl_lockdown_proxy_new_for_bus().
 *
 * Returns: (transfer full) (type XdpImplLockdownProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplLockdown *
xdp_impl_lockdown_proxy_new_for_bus_finish (
    GAsyncResult        *res,
    GError             **error)
{
  GObject *ret;
  GObject *source_object;
  source_object = g_async_result_get_source_object (res);
  ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
  g_object_unref (source_object);
  if (ret != NULL)
    return XDP_IMPL_LOCKDOWN (ret);
  else
    return NULL;
}

/**
 * xdp_impl_lockdown_proxy_new_for_bus_sync:
 * @bus_type: A #GBusType.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: A bus name (well-known or unique).
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL
 *
 * Like xdp_impl_lockdown_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_lockdown_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpImplLockdownProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplLockdown *
xdp_impl_lockdown_proxy_new_for_bus_sync (
    GBusType             bus_type,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GError             **error)
{
  GInitable *ret;
  ret = g_initable_new (XDP_IMPL_TYPE_LOCKDOWN_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.Lockdown", NULL);
  if (ret != NULL)
    return XDP_IMPL_LOCKDOWN (ret);
  else
    return NULL;
}


/* ------------------------------------------------------------------------ */

/**
 * XdpImplLockdownSkeleton:
 *
 * The #XdpImplLockdownSkeleton structure contains only private data and should only be accessed using the provided API.
 */

/**
 * XdpImplLockdownSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpImplLockdownSkeleton.
 */

struct _XdpImplLockdownSkeletonPrivate
{
  GValue *properties;
  GList *changed_properties;
  GSource *changed_properties_idle_source;
  GMainContext *context;
  GMutex lock;
};

static void
_xdp_impl_lockdown_skeleton_handle_method_call (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name,
  const gchar *method_name,
  GVariant *parameters,
  GDBusMethodInvocation *invocation,
  gpointer user_data)
{
  XdpImplLockdownSkeleton *skeleton = XDP_IMPL_LOCKDOWN_SKELETON (user_data);
  _ExtendedGDBusMethodInfo *info;
  GVariantIter iter;
  GVariant *child;
  GValue *paramv;
  gsize num_params;
  guint num_extra;
  gsize n;
  guint signal_id;
  GValue return_value = G_VALUE_INIT;
  info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
  g_assert (info != NULL);
  num_params = g_variant_n_children (parameters);
  num_extra = info->pass_fdlist ? 3 : 2;  paramv = g_new0 (GValue, num_params + num_extra);
  n = 0;
  g_value_init (&paramv[n], XDP_IMPL_TYPE_LOCKDOWN);
  g_value_set_object (&paramv[n++], skeleton);
  g_value_init (&paramv[n], G_TYPE_DBUS_METHOD_INVOCATION);
  g_value_set_object (&paramv[n++], invocation);
  if (info->pass_fdlist)
    {
#ifdef G_OS_UNIX
      g_value_init (&paramv[n], G_TYPE_UNIX_FD_LIST);
      g_value_set_object (&paramv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation)));
#else
      g_assert_not_reached ();
#endif
    }
  g_variant_iter_init (&iter, parameters);
  while ((child = g_variant_iter_next_value (&iter)) != NULL)
    {
      _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra];
      if (arg_info->use_gvariant)
        {
          g_value_init (&paramv[n], G_TYPE_VARIANT);
          g_value_set_variant (&paramv[n], child);
          n++;
        }
      else
        g_dbus_gvariant_to_gvalue (child, &paramv[n++]);
      g_variant_unref (child);
    }
  signal_id = g_signal_lookup (info->signal_name, XDP_IMPL_TYPE_LOCKDOWN);
  g_value_init (&return_value, G_TYPE_BOOLEAN);
  g_signal_emitv (paramv, signal_id, 0, &return_value);
  if (!g_value_get_boolean (&return_value))
    g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD, "Method %s is not implemented on interface %s", method_name, interface_name);
  g_value_unset (&return_value);
  for (n = 0; n < num_params + num_extra; n++)
    g_value_unset (&paramv[n]);
  g_free (paramv);
}

static GVariant *
_xdp_impl_lockdown_skeleton_handle_get_property (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name G_GNUC_UNUSED,
  const gchar *property_name,
  GError **error,
  gpointer user_data)
{
  XdpImplLockdownSkeleton *skeleton = XDP_IMPL_LOCKDOWN_SKELETON (user_data);
  GValue value = G_VALUE_INIT;
  GParamSpec *pspec;
  _ExtendedGDBusPropertyInfo *info;
  GVariant *ret;
  ret = NULL;
  info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_lockdown_interface_info.parent_struct, property_name);
  g_assert (info != NULL);
  pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
  if (pspec == NULL)
    {
      g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
    }
  else
    {
      g_value_init (&value, pspec->value_type);
      g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value);
      ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature));
      g_value_unset (&value);
    }
  return ret;
}

static gboolean
_xdp_impl_lockdown_skeleton_handle_set_property (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name G_GNUC_UNUSED,
  const gchar *property_name,
  GVariant *variant,
  GError **error,
  gpointer user_data)
{
  XdpImplLockdownSkeleton *skeleton = XDP_IMPL_LOCKDOWN_SKELETON (user_data);
  GValue value = G_VALUE_INIT;
  GParamSpec *pspec;
  _ExtendedGDBusPropertyInfo *info;
  gboolean ret;
  ret = FALSE;
  info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_lockdown_interface_info.parent_struct, property_name);
  g_assert (info != NULL);
  pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
  if (pspec == NULL)
    {
      g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
    }
  else
    {
      if (info->use_gvariant)
        g_value_set_variant (&value, variant);
      else
        g_dbus_gvariant_to_gvalue (variant, &value);
      g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value);
      g_value_unset (&value);
      ret = TRUE;
    }
  return ret;
}

static const GDBusInterfaceVTable _xdp_impl_lockdown_skeleton_vtable =
{
  _xdp_impl_lockdown_skeleton_handle_method_call,
  _xdp_impl_lockdown_skeleton_handle_get_property,
  _xdp_impl_lockdown_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
xdp_impl_lockdown_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return xdp_impl_lockdown_interface_info ();
}

static GDBusInterfaceVTable *
xdp_impl_lockdown_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_xdp_impl_lockdown_skeleton_vtable;
}

static GVariant *
xdp_impl_lockdown_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  XdpImplLockdownSkeleton *skeleton = XDP_IMPL_LOCKDOWN_SKELETON (_skeleton);

  GVariantBuilder builder;
  guint n;
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_84
  g_variant_builder_init_static (&builder, G_VARIANT_TYPE ("a{sv}"));
#else
  g_variant_builder_init(&builder, G_VARIANT_TYPE ("a{sv}"));
#endif
  if (_xdp_impl_lockdown_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _xdp_impl_lockdown_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _xdp_impl_lockdown_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _xdp_impl_lockdown_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.impl.portal.Lockdown", info->name, NULL, skeleton);
          if (value != NULL)
            {
              g_variant_take_ref (value);
              g_variant_builder_add (&builder, "{sv}", info->name, value);
              g_variant_unref (value);
            }
        }
    }
out:
  return g_variant_builder_end (&builder);
}

static gboolean _xdp_impl_lockdown_emit_changed (gpointer user_data);

static void
xdp_impl_lockdown_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
{
  XdpImplLockdownSkeleton *skeleton = XDP_IMPL_LOCKDOWN_SKELETON (_skeleton);
  gboolean emit_changed = FALSE;

  g_mutex_lock (&skeleton->priv->lock);
  if (skeleton->priv->changed_properties_idle_source != NULL)
    {
      g_source_destroy (skeleton->priv->changed_properties_idle_source);
      skeleton->priv->changed_properties_idle_source = NULL;
      emit_changed = TRUE;
    }
  g_mutex_unlock (&skeleton->priv->lock);

  if (emit_changed)
    _xdp_impl_lockdown_emit_changed (skeleton);
}

static void xdp_impl_lockdown_skeleton_iface_init (XdpImplLockdownIface *iface);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpImplLockdownSkeleton, xdp_impl_lockdown_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (XdpImplLockdownSkeleton)
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_LOCKDOWN, xdp_impl_lockdown_skeleton_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpImplLockdownSkeleton, xdp_impl_lockdown_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_LOCKDOWN, xdp_impl_lockdown_skeleton_iface_init))

#endif
static void
xdp_impl_lockdown_skeleton_finalize (GObject *object)
{
  XdpImplLockdownSkeleton *skeleton = XDP_IMPL_LOCKDOWN_SKELETON (object);
  guint n;
  for (n = 0; n < 7; n++)
    g_value_unset (&skeleton->priv->properties[n]);
  g_free (skeleton->priv->properties);
  g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  /* coverity[missing_lock : SUPPRESS] */
  g_clear_pointer (&skeleton->priv->changed_properties_idle_source, g_source_destroy);
#else
  if (skeleton->priv->changed_properties_idle_source != NULL)
    g_source_destroy (skeleton->priv->changed_properties_idle_source);
skeleton->priv->changed_properties_idle_source = NULL;
#endif
  g_main_context_unref (skeleton->priv->context);
  g_mutex_clear (&skeleton->priv->lock);
  G_OBJECT_CLASS (xdp_impl_lockdown_skeleton_parent_class)->finalize (object);
}

static void
xdp_impl_lockdown_skeleton_get_property (GObject      *object,
  guint         prop_id,
  GValue       *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  XdpImplLockdownSkeleton *skeleton = XDP_IMPL_LOCKDOWN_SKELETON (object);
  g_assert (prop_id != 0 && prop_id - 1 < 7);
  g_mutex_lock (&skeleton->priv->lock);
  g_value_copy (&skeleton->priv->properties[prop_id - 1], value);
  g_mutex_unlock (&skeleton->priv->lock);
}

static gboolean
_xdp_impl_lockdown_emit_changed (gpointer user_data)
{
  XdpImplLockdownSkeleton *skeleton = XDP_IMPL_LOCKDOWN_SKELETON (user_data);
  GList *l;
  GVariantBuilder builder;
  GVariantBuilder invalidated_builder;
  guint num_changes;

  g_mutex_lock (&skeleton->priv->lock);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_84
  g_variant_builder_init_static (&builder, G_VARIANT_TYPE ("a{sv}"));
  g_variant_builder_init_static (&invalidated_builder, G_VARIANT_TYPE ("as"));
#else
  g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
  g_variant_builder_init (&invalidated_builder, G_VARIANT_TYPE ("as"));
#endif
  for (l = skeleton->priv->changed_properties, num_changes = 0; l != NULL; l = l->next)
    {
      ChangedProperty *cp = l->data;
      GVariant *variant;
      const GValue *cur_value;

      cur_value = &skeleton->priv->properties[cp->prop_id - 1];
      if (!_g_value_equal (cur_value, &cp->orig_value))
        {
          variant = g_dbus_gvalue_to_gvariant (cur_value, G_VARIANT_TYPE (cp->info->parent_struct.signature));
          g_variant_builder_add (&builder, "{sv}", cp->info->parent_struct.name, variant);
          g_variant_unref (variant);
          num_changes++;
        }
    }
  if (num_changes > 0)
    {
      GList *connections, *ll;
      GVariant *signal_variant;
      signal_variant = g_variant_ref_sink (g_variant_new ("(sa{sv}as)", "org.freedesktop.impl.portal.Lockdown",
                                           &builder, &invalidated_builder));
      connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
      for (ll = connections; ll != NULL; ll = ll->next)
        {
          GDBusConnection *connection = ll->data;

          g_dbus_connection_emit_signal (connection,
                                         NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)),
                                         "org.freedesktop.DBus.Properties",
                                         "PropertiesChanged",
                                         signal_variant,
                                         NULL);
        }
      g_variant_unref (signal_variant);
      g_list_free_full (connections, g_object_unref);
    }
  else
    {
      g_variant_builder_clear (&builder);
      g_variant_builder_clear (&invalidated_builder);
    }
  g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
  skeleton->priv->changed_properties = NULL;
  skeleton->priv->changed_properties_idle_source = NULL;
  g_mutex_unlock (&skeleton->priv->lock);
  return FALSE;
}

static void
_xdp_impl_lockdown_schedule_emit_changed (XdpImplLockdownSkeleton *skeleton, const _ExtendedGDBusPropertyInfo *info, guint prop_id, const GValue *orig_value)
{
  ChangedProperty *cp;
  GList *l;
  cp = NULL;
  for (l = skeleton->priv->changed_properties; l != NULL; l = l->next)
    {
      ChangedProperty *i_cp = l->data;
      if (i_cp->info == info)
        {
          cp = i_cp;
          break;
        }
    }
  if (cp == NULL)
    {
      cp = g_new0 (ChangedProperty, 1);
      cp->prop_id = prop_id;
      cp->info = info;
      skeleton->priv->changed_properties = g_list_prepend (skeleton->priv->changed_properties, cp);
      g_value_init (&cp->orig_value, G_VALUE_TYPE (orig_value));
      g_value_copy (orig_value, &cp->orig_value);
    }
}

static void
xdp_impl_lockdown_skeleton_notify (GObject      *object,
  GParamSpec *pspec G_GNUC_UNUSED)
{
  XdpImplLockdownSkeleton *skeleton = XDP_IMPL_LOCKDOWN_SKELETON (object);
  g_mutex_lock (&skeleton->priv->lock);
  if (skeleton->priv->changed_properties != NULL &&
      skeleton->priv->changed_properties_idle_source == NULL)
    {
      skeleton->priv->changed_properties_idle_source = g_idle_source_new ();
      g_source_set_priority (skeleton->priv->changed_properties_idle_source, G_PRIORITY_DEFAULT);
      g_source_set_callback (skeleton->priv->changed_properties_idle_source, _xdp_impl_lockdown_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
      g_source_set_name (skeleton->priv->changed_properties_idle_source, "[generated] _xdp_impl_lockdown_emit_changed");
      g_source_attach (skeleton->priv->changed_properties_idle_source, skeleton->priv->context);
      g_source_unref (skeleton->priv->changed_properties_idle_source);
    }
  g_mutex_unlock (&skeleton->priv->lock);
}

static void
xdp_impl_lockdown_skeleton_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec)
{
  const _ExtendedGDBusPropertyInfo *info;
  XdpImplLockdownSkeleton *skeleton = XDP_IMPL_LOCKDOWN_SKELETON (object);
  g_assert (prop_id != 0 && prop_id - 1 < 7);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_impl_lockdown_property_info_pointers[prop_id - 1];
  g_mutex_lock (&skeleton->priv->lock);
  g_object_freeze_notify (object);
  if (!_g_value_equal (value, &skeleton->priv->properties[prop_id - 1]))
    {
      if (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)) != NULL &&
          info->emits_changed_signal)
        _xdp_impl_lockdown_schedule_emit_changed (skeleton, info, prop_id, &skeleton->priv->properties[prop_id - 1]);
      g_value_copy (value, &skeleton->priv->properties[prop_id - 1]);
      g_object_notify_by_pspec (object, pspec);
    }
  g_mutex_unlock (&skeleton->priv->lock);
  g_object_thaw_notify (object);
}

static void
xdp_impl_lockdown_skeleton_init (XdpImplLockdownSkeleton *skeleton)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  skeleton->priv = xdp_impl_lockdown_skeleton_get_instance_private (skeleton);
#else
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, XDP_IMPL_TYPE_LOCKDOWN_SKELETON, XdpImplLockdownSkeletonPrivate);
#endif

  g_mutex_init (&skeleton->priv->lock);
  skeleton->priv->context = g_main_context_ref_thread_default ();
  skeleton->priv->properties = g_new0 (GValue, 7);
  g_value_init (&skeleton->priv->properties[0], G_TYPE_BOOLEAN);
  g_value_init (&skeleton->priv->properties[1], G_TYPE_BOOLEAN);
  g_value_init (&skeleton->priv->properties[2], G_TYPE_BOOLEAN);
  g_value_init (&skeleton->priv->properties[3], G_TYPE_BOOLEAN);
  g_value_init (&skeleton->priv->properties[4], G_TYPE_BOOLEAN);
  g_value_init (&skeleton->priv->properties[5], G_TYPE_BOOLEAN);
  g_value_init (&skeleton->priv->properties[6], G_TYPE_BOOLEAN);
}

static gboolean 
xdp_impl_lockdown_skeleton_get_disable_printing (XdpImplLockdown *object)
{
  XdpImplLockdownSkeleton *skeleton = XDP_IMPL_LOCKDOWN_SKELETON (object);
  gboolean value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_marshal_value_peek_boolean (&(skeleton->priv->properties[0]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static gboolean 
xdp_impl_lockdown_skeleton_get_disable_save_to_disk (XdpImplLockdown *object)
{
  XdpImplLockdownSkeleton *skeleton = XDP_IMPL_LOCKDOWN_SKELETON (object);
  gboolean value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_marshal_value_peek_boolean (&(skeleton->priv->properties[1]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static gboolean 
xdp_impl_lockdown_skeleton_get_disable_application_handlers (XdpImplLockdown *object)
{
  XdpImplLockdownSkeleton *skeleton = XDP_IMPL_LOCKDOWN_SKELETON (object);
  gboolean value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_marshal_value_peek_boolean (&(skeleton->priv->properties[2]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static gboolean 
xdp_impl_lockdown_skeleton_get_disable_location (XdpImplLockdown *object)
{
  XdpImplLockdownSkeleton *skeleton = XDP_IMPL_LOCKDOWN_SKELETON (object);
  gboolean value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_marshal_value_peek_boolean (&(skeleton->priv->properties[3]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static gboolean 
xdp_impl_lockdown_skeleton_get_disable_camera (XdpImplLockdown *object)
{
  XdpImplLockdownSkeleton *skeleton = XDP_IMPL_LOCKDOWN_SKELETON (object);
  gboolean value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_marshal_value_peek_boolean (&(skeleton->priv->properties[4]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static gboolean 
xdp_impl_lockdown_skeleton_get_disable_microphone (XdpImplLockdown *object)
{
  XdpImplLockdownSkeleton *skeleton = XDP_IMPL_LOCKDOWN_SKELETON (object);
  gboolean value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_marshal_value_peek_boolean (&(skeleton->priv->properties[5]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static gboolean 
xdp_impl_lockdown_skeleton_get_disable_sound_output (XdpImplLockdown *object)
{
  XdpImplLockdownSkeleton *skeleton = XDP_IMPL_LOCKDOWN_SKELETON (object);
  gboolean value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_marshal_value_peek_boolean (&(skeleton->priv->properties[6]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static void
xdp_impl_lockdown_skeleton_class_init (XdpImplLockdownSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize = xdp_impl_lockdown_skeleton_finalize;
  gobject_class->get_property = xdp_impl_lockdown_skeleton_get_property;
  gobject_class->set_property = xdp_impl_lockdown_skeleton_set_property;
  gobject_class->notify       = xdp_impl_lockdown_skeleton_notify;


  xdp_impl_lockdown_override_properties (gobject_class, 1);

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = xdp_impl_lockdown_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = xdp_impl_lockdown_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = xdp_impl_lockdown_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = xdp_impl_lockdown_skeleton_dbus_interface_get_vtable;

#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
  g_type_class_add_private (klass, sizeof (XdpImplLockdownSkeletonPrivate));
#endif
}

static void
xdp_impl_lockdown_skeleton_iface_init (XdpImplLockdownIface *iface)
{
  iface->get_disable_printing = xdp_impl_lockdown_skeleton_get_disable_printing;
  iface->get_disable_save_to_disk = xdp_impl_lockdown_skeleton_get_disable_save_to_disk;
  iface->get_disable_application_handlers = xdp_impl_lockdown_skeleton_get_disable_application_handlers;
  iface->get_disable_location = xdp_impl_lockdown_skeleton_get_disable_location;
  iface->get_disable_camera = xdp_impl_lockdown_skeleton_get_disable_camera;
  iface->get_disable_microphone = xdp_impl_lockdown_skeleton_get_disable_microphone;
  iface->get_disable_sound_output = xdp_impl_lockdown_skeleton_get_disable_sound_output;
}

/**
 * xdp_impl_lockdown_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-Lockdown.top_of_page">org.freedesktop.impl.portal.Lockdown</link>.
 *
 * Returns: (transfer full) (type XdpImplLockdownSkeleton): The skeleton object.
 */
XdpImplLockdown *
xdp_impl_lockdown_skeleton_new (void)
{
  return XDP_IMPL_LOCKDOWN (g_object_new (XDP_IMPL_TYPE_LOCKDOWN_SKELETON, NULL));
}

/* ------------------------------------------------------------------------
 * Code for interface org.freedesktop.impl.portal.Notification
 * ------------------------------------------------------------------------
 */

/**
 * SECTION:XdpImplNotification
 * @title: XdpImplNotification
 * @short_description: Generated C code for the org.freedesktop.impl.portal.Notification D-Bus interface
 *
 * This section contains code for working with the <link linkend="gdbus-interface-org-freedesktop-impl-portal-Notification.top_of_page">org.freedesktop.impl.portal.Notification</link> D-Bus interface in C.
 */

enum
{
  XDP_IMPL__NOTIFICATION_ACTION_INVOKED,
};

static unsigned XDP_IMPL__NOTIFICATION_SIGNALS[1] = { 0 };

/* ---- Introspection data for org.freedesktop.impl.portal.Notification ---- */

static const _ExtendedGDBusArgInfo _xdp_impl_notification_method_info_add_notification_IN_ARG_app_id =
{
  {
    -1,
    (gchar *) "app_id",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_notification_method_info_add_notification_IN_ARG_id =
{
  {
    -1,
    (gchar *) "id",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_notification_method_info_add_notification_IN_ARG_notification =
{
  {
    -1,
    (gchar *) "notification",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_notification_method_info_add_notification_IN_ARG_pointers[] =
{
  &_xdp_impl_notification_method_info_add_notification_IN_ARG_app_id.parent_struct,
  &_xdp_impl_notification_method_info_add_notification_IN_ARG_id.parent_struct,
  &_xdp_impl_notification_method_info_add_notification_IN_ARG_notification.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_notification_method_add_notification_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.In2",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo * const _xdp_impl_notification_method_add_notification_annotation_info_pointers[] =
{
  &_xdp_impl_notification_method_add_notification_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_impl_notification_method_info_add_notification =
{
  {
    -1,
    (gchar *) "AddNotification",
    (GDBusArgInfo **) &_xdp_impl_notification_method_info_add_notification_IN_ARG_pointers,
    NULL,
    (GDBusAnnotationInfo **) &_xdp_impl_notification_method_add_notification_annotation_info_pointers
  },
  "handle-add-notification",
  TRUE
};

static const _ExtendedGDBusArgInfo _xdp_impl_notification_method_info_remove_notification_IN_ARG_app_id =
{
  {
    -1,
    (gchar *) "app_id",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_notification_method_info_remove_notification_IN_ARG_id =
{
  {
    -1,
    (gchar *) "id",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_notification_method_info_remove_notification_IN_ARG_pointers[] =
{
  &_xdp_impl_notification_method_info_remove_notification_IN_ARG_app_id.parent_struct,
  &_xdp_impl_notification_method_info_remove_notification_IN_ARG_id.parent_struct,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_impl_notification_method_info_remove_notification =
{
  {
    -1,
    (gchar *) "RemoveNotification",
    (GDBusArgInfo **) &_xdp_impl_notification_method_info_remove_notification_IN_ARG_pointers,
    NULL,
    NULL
  },
  "handle-remove-notification",
  FALSE
};

static const GDBusMethodInfo * const _xdp_impl_notification_method_info_pointers[] =
{
  &_xdp_impl_notification_method_info_add_notification.parent_struct,
  &_xdp_impl_notification_method_info_remove_notification.parent_struct,
  NULL
};

static const _ExtendedGDBusArgInfo _xdp_impl_notification_signal_info_action_invoked_ARG_app_id =
{
  {
    -1,
    (gchar *) "app_id",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_notification_signal_info_action_invoked_ARG_id =
{
  {
    -1,
    (gchar *) "id",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_notification_signal_info_action_invoked_ARG_action =
{
  {
    -1,
    (gchar *) "action",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_notification_signal_info_action_invoked_ARG_parameter =
{
  {
    -1,
    (gchar *) "parameter",
    (gchar *) "av",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_notification_signal_info_action_invoked_ARG_pointers[] =
{
  &_xdp_impl_notification_signal_info_action_invoked_ARG_app_id.parent_struct,
  &_xdp_impl_notification_signal_info_action_invoked_ARG_id.parent_struct,
  &_xdp_impl_notification_signal_info_action_invoked_ARG_action.parent_struct,
  &_xdp_impl_notification_signal_info_action_invoked_ARG_parameter.parent_struct,
  NULL
};

static const _ExtendedGDBusSignalInfo _xdp_impl_notification_signal_info_action_invoked =
{
  {
    -1,
    (gchar *) "ActionInvoked",
    (GDBusArgInfo **) &_xdp_impl_notification_signal_info_action_invoked_ARG_pointers,
    NULL
  },
  "action-invoked"
};

static const GDBusSignalInfo * const _xdp_impl_notification_signal_info_pointers[] =
{
  &_xdp_impl_notification_signal_info_action_invoked.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_notification_property_supported_options_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo * const _xdp_impl_notification_property_supported_options_annotation_info_pointers[] =
{
  &_xdp_impl_notification_property_supported_options_annotation_info_0,
  NULL
};

static const _ExtendedGDBusPropertyInfo _xdp_impl_notification_property_info_supported_options =
{
  {
    -1,
    (gchar *) "SupportedOptions",
    (gchar *) "a{sv}",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    (GDBusAnnotationInfo **) &_xdp_impl_notification_property_supported_options_annotation_info_pointers
  },
  "supported-options",
  FALSE,
  TRUE
};

static const _ExtendedGDBusPropertyInfo _xdp_impl_notification_property_info_version =
{
  {
    -1,
    (gchar *) "version",
    (gchar *) "u",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "version",
  FALSE,
  TRUE
};

static const GDBusPropertyInfo * const _xdp_impl_notification_property_info_pointers[] =
{
  &_xdp_impl_notification_property_info_supported_options.parent_struct,
  &_xdp_impl_notification_property_info_version.parent_struct,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _xdp_impl_notification_interface_info =
{
  {
    -1,
    (gchar *) "org.freedesktop.impl.portal.Notification",
    (GDBusMethodInfo **) &_xdp_impl_notification_method_info_pointers,
    (GDBusSignalInfo **) &_xdp_impl_notification_signal_info_pointers,
    (GDBusPropertyInfo **) &_xdp_impl_notification_property_info_pointers,
    NULL
  },
  "notification",
};


/**
 * xdp_impl_notification_interface_info:
 *
 * Gets a machine-readable description of the <link linkend="gdbus-interface-org-freedesktop-impl-portal-Notification.top_of_page">org.freedesktop.impl.portal.Notification</link> D-Bus interface.
 *
 * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
 */
GDBusInterfaceInfo *
xdp_impl_notification_interface_info (void)
{
  return (GDBusInterfaceInfo *) &_xdp_impl_notification_interface_info.parent_struct;
}

/**
 * xdp_impl_notification_override_properties:
 * @klass: The class structure for a #GObject derived class.
 * @property_id_begin: The property id to assign to the first overridden property.
 *
 * Overrides all #GObject properties in the #XdpImplNotification interface for a concrete class.
 * The properties are overridden in the order they are defined.
 *
 * Returns: The last property id.
 */
guint
xdp_impl_notification_override_properties (GObjectClass *klass, guint property_id_begin)
{
  g_object_class_override_property (klass, property_id_begin++, "supported-options");
  g_object_class_override_property (klass, property_id_begin++, "version");
  return property_id_begin - 1;
}


inline static void
xdp_impl_notification_signal_marshal_action_invoked (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  _g_dbus_codegen_marshal_VOID__STRING_STRING_STRING_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_impl_notification_method_marshal_add_notification (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  _g_dbus_codegen_marshal_BOOLEAN__OBJECT_OBJECT_STRING_STRING_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_impl_notification_method_marshal_remove_notification (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  _g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_STRING (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}


/**
 * XdpImplNotification:
 *
 * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-Notification.top_of_page">org.freedesktop.impl.portal.Notification</link>.
 */

/**
 * XdpImplNotificationIface:
 * @parent_iface: The parent interface.
 * @handle_add_notification: Handler for the #XdpImplNotification::handle-add-notification signal.
 * @handle_remove_notification: Handler for the #XdpImplNotification::handle-remove-notification signal.
 * @get_supported_options: Getter for the #XdpImplNotification:supported-options property.
 * @get_version: Getter for the #XdpImplNotification:version property.
 * @action_invoked: Handler for the #XdpImplNotification::action-invoked signal.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-Notification.top_of_page">org.freedesktop.impl.portal.Notification</link>.
 */

typedef XdpImplNotificationIface XdpImplNotificationInterface;
G_DEFINE_INTERFACE (XdpImplNotification, xdp_impl_notification, G_TYPE_OBJECT)

static void
xdp_impl_notification_default_init (XdpImplNotificationIface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * XdpImplNotification::handle-add-notification:
   * @object: A #XdpImplNotification.
   * @invocation: A #GDBusMethodInvocation.
   * @fd_list: (nullable): A #GUnixFDList or %NULL.
   * @arg_app_id: Argument passed by remote caller.
   * @arg_id: Argument passed by remote caller.
   * @arg_notification: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-impl-portal-Notification.AddNotification">AddNotification()</link> 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 xdp_impl_notification_complete_add_notification() 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.
   *
   * 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.
   */
  g_signal_new ("handle-add-notification",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpImplNotificationIface, handle_add_notification),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_impl_notification_method_marshal_add_notification,
    G_TYPE_BOOLEAN,
    5,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UNIX_FD_LIST, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_VARIANT);

  /**
   * XdpImplNotification::handle-remove-notification:
   * @object: A #XdpImplNotification.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_app_id: Argument passed by remote caller.
   * @arg_id: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-impl-portal-Notification.RemoveNotification">RemoveNotification()</link> 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 xdp_impl_notification_complete_remove_notification() 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.
   *
   * 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.
   */
  g_signal_new ("handle-remove-notification",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpImplNotificationIface, handle_remove_notification),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_impl_notification_method_marshal_remove_notification,
    G_TYPE_BOOLEAN,
    3,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_STRING);

  /* GObject signals for received D-Bus signals: */
  /**
   * XdpImplNotification::action-invoked:
   * @object: A #XdpImplNotification.
   * @arg_app_id: Argument.
   * @arg_id: Argument.
   * @arg_action: Argument.
   * @arg_parameter: Argument.
   *
   * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-freedesktop-impl-portal-Notification.ActionInvoked">"ActionInvoked"</link> 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.
   */
  XDP_IMPL__NOTIFICATION_SIGNALS[XDP_IMPL__NOTIFICATION_ACTION_INVOKED] =
    g_signal_new ("action-invoked",
      G_TYPE_FROM_INTERFACE (iface),
      G_SIGNAL_RUN_LAST,
      G_STRUCT_OFFSET (XdpImplNotificationIface, action_invoked),
      NULL,
      NULL,
      xdp_impl_notification_signal_marshal_action_invoked,
      G_TYPE_NONE,
      4, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_VARIANT);

  /* GObject properties for D-Bus properties: */
  /**
   * XdpImplNotification:supported-options:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-impl-portal-Notification.SupportedOptions">"SupportedOptions"</link>.
   *
   * 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.
   */
  g_object_interface_install_property (iface,
    g_param_spec_variant ("supported-options", "SupportedOptions", "SupportedOptions", G_VARIANT_TYPE ("a{sv}"), NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * XdpImplNotification:version:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-impl-portal-Notification.version">"version"</link>.
   *
   * 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.
   */
  g_object_interface_install_property (iface,
    g_param_spec_uint ("version", "version", "version", 0, G_MAXUINT32, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
}

/**
 * xdp_impl_notification_get_supported_options: (skip)
 * @object: A #XdpImplNotification.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-impl-portal-Notification.SupportedOptions">"SupportedOptions"</link> D-Bus property.
 *
 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
 *
 * The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use xdp_impl_notification_dup_supported_options() if on another thread.
 *
 * Returns: (transfer none) (nullable): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
 */
GVariant *
xdp_impl_notification_get_supported_options (XdpImplNotification *object)
{
  g_return_val_if_fail (XDP_IMPL_IS_NOTIFICATION (object), NULL);

  return XDP_IMPL_NOTIFICATION_GET_IFACE (object)->get_supported_options (object);
}

/**
 * xdp_impl_notification_dup_supported_options: (skip)
 * @object: A #XdpImplNotification.
 *
 * Gets a copy of the <link linkend="gdbus-property-org-freedesktop-impl-portal-Notification.SupportedOptions">"SupportedOptions"</link> D-Bus property.
 *
 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
 *
 * Returns: (transfer full) (nullable): The property value or %NULL if the property is not set. The returned value should be freed with g_variant_unref().
 */
GVariant *
xdp_impl_notification_dup_supported_options (XdpImplNotification *object)
{
  GVariant *value;
  g_object_get (G_OBJECT (object), "supported-options", &value, NULL);
  return value;
}

/**
 * xdp_impl_notification_set_supported_options: (skip)
 * @object: A #XdpImplNotification.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-freedesktop-impl-portal-Notification.SupportedOptions">"SupportedOptions"</link> 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.
 */
void
xdp_impl_notification_set_supported_options (XdpImplNotification *object, GVariant *value)
{
  g_object_set (G_OBJECT (object), "supported-options", value, NULL);
}

/**
 * xdp_impl_notification_get_version: (skip)
 * @object: A #XdpImplNotification.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-impl-portal-Notification.version">"version"</link> D-Bus property.
 *
 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
 *
 * Returns: The property value.
 */
guint 
xdp_impl_notification_get_version (XdpImplNotification *object)
{
  g_return_val_if_fail (XDP_IMPL_IS_NOTIFICATION (object), 0);

  return XDP_IMPL_NOTIFICATION_GET_IFACE (object)->get_version (object);
}

/**
 * xdp_impl_notification_set_version: (skip)
 * @object: A #XdpImplNotification.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-freedesktop-impl-portal-Notification.version">"version"</link> 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.
 */
void
xdp_impl_notification_set_version (XdpImplNotification *object, guint value)
{
  g_object_set (G_OBJECT (object), "version", value, NULL);
}

/**
 * xdp_impl_notification_emit_action_invoked:
 * @object: A #XdpImplNotification.
 * @arg_app_id: Argument to pass with the signal.
 * @arg_id: Argument to pass with the signal.
 * @arg_action: Argument to pass with the signal.
 * @arg_parameter: Argument to pass with the signal.
 *
 * Emits the <link linkend="gdbus-signal-org-freedesktop-impl-portal-Notification.ActionInvoked">"ActionInvoked"</link> D-Bus signal.
 */
void
xdp_impl_notification_emit_action_invoked (
    XdpImplNotification *object,
    const gchar *arg_app_id,
    const gchar *arg_id,
    const gchar *arg_action,
    GVariant *arg_parameter)
{
  g_signal_emit (object, XDP_IMPL__NOTIFICATION_SIGNALS[XDP_IMPL__NOTIFICATION_ACTION_INVOKED], 0, arg_app_id, arg_id, arg_action, arg_parameter);
}

/**
 * xdp_impl_notification_call_add_notification:
 * @proxy: A #XdpImplNotificationProxy.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_id: Argument to pass with the method invocation.
 * @arg_notification: Argument to pass with the method invocation.
 * @fd_list: (nullable): A #GUnixFDList or %NULL.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-Notification.AddNotification">AddNotification()</link> 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 xdp_impl_notification_call_add_notification_finish() to get the result of the operation.
 *
 * See xdp_impl_notification_call_add_notification_sync() for the synchronous, blocking version of this method.
 */
void
xdp_impl_notification_call_add_notification (
    XdpImplNotification *proxy,
    const gchar *arg_app_id,
    const gchar *arg_id,
    GVariant *arg_notification,
    GUnixFDList *fd_list,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call_with_unix_fd_list (G_DBUS_PROXY (proxy),
    "AddNotification",
    g_variant_new ("(ss@a{sv})",
                   arg_app_id,
                   arg_id,
                   arg_notification),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    fd_list,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_impl_notification_call_add_notification_finish:
 * @proxy: A #XdpImplNotificationProxy.
 * @out_fd_list: (out) (optional) (nullable): Return location for a #GUnixFDList or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_notification_call_add_notification().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_impl_notification_call_add_notification().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_notification_call_add_notification_finish (
    XdpImplNotification *proxy,
    GUnixFDList **out_fd_list,
    GAsyncResult *res,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_with_unix_fd_list_finish (G_DBUS_PROXY (proxy), out_fd_list, res, error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "()");
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_notification_call_add_notification_sync:
 * @proxy: A #XdpImplNotificationProxy.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_id: Argument to pass with the method invocation.
 * @arg_notification: Argument to pass with the method invocation.
 * @fd_list: (nullable): A #GUnixFDList or %NULL.
 * @out_fd_list: (out) (optional) (nullable): Return location for a #GUnixFDList or %NULL.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-Notification.AddNotification">AddNotification()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_notification_call_add_notification() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_notification_call_add_notification_sync (
    XdpImplNotification *proxy,
    const gchar *arg_app_id,
    const gchar *arg_id,
    GVariant *arg_notification,
    GUnixFDList  *fd_list,
    GUnixFDList **out_fd_list,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_with_unix_fd_list_sync (G_DBUS_PROXY (proxy),
    "AddNotification",
    g_variant_new ("(ss@a{sv})",
                   arg_app_id,
                   arg_id,
                   arg_notification),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    fd_list,
    out_fd_list,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "()");
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_notification_call_remove_notification:
 * @proxy: A #XdpImplNotificationProxy.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_id: Argument to pass with the method invocation.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-Notification.RemoveNotification">RemoveNotification()</link> 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 xdp_impl_notification_call_remove_notification_finish() to get the result of the operation.
 *
 * See xdp_impl_notification_call_remove_notification_sync() for the synchronous, blocking version of this method.
 */
void
xdp_impl_notification_call_remove_notification (
    XdpImplNotification *proxy,
    const gchar *arg_app_id,
    const gchar *arg_id,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "RemoveNotification",
    g_variant_new ("(ss)",
                   arg_app_id,
                   arg_id),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_impl_notification_call_remove_notification_finish:
 * @proxy: A #XdpImplNotificationProxy.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_notification_call_remove_notification().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_impl_notification_call_remove_notification().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_notification_call_remove_notification_finish (
    XdpImplNotification *proxy,
    GAsyncResult *res,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "()");
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_notification_call_remove_notification_sync:
 * @proxy: A #XdpImplNotificationProxy.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_id: Argument to pass with the method invocation.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-Notification.RemoveNotification">RemoveNotification()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_notification_call_remove_notification() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_notification_call_remove_notification_sync (
    XdpImplNotification *proxy,
    const gchar *arg_app_id,
    const gchar *arg_id,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "RemoveNotification",
    g_variant_new ("(ss)",
                   arg_app_id,
                   arg_id),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "()");
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_notification_complete_add_notification:
 * @object: A #XdpImplNotification.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @fd_list: (nullable): A #GUnixFDList or %NULL.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-impl-portal-Notification.AddNotification">AddNotification()</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
xdp_impl_notification_complete_add_notification (
    XdpImplNotification *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    GUnixFDList *fd_list)
{
  g_dbus_method_invocation_return_value_with_unix_fd_list (invocation,
    g_variant_new ("()"),
    fd_list);
}

/**
 * xdp_impl_notification_complete_remove_notification:
 * @object: A #XdpImplNotification.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-impl-portal-Notification.RemoveNotification">RemoveNotification()</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
xdp_impl_notification_complete_remove_notification (
    XdpImplNotification *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("()"));
}

/* ------------------------------------------------------------------------ */

/**
 * XdpImplNotificationProxy:
 *
 * The #XdpImplNotificationProxy structure contains only private data and should only be accessed using the provided API.
 */

/**
 * XdpImplNotificationProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpImplNotificationProxy.
 */

struct _XdpImplNotificationProxyPrivate
{
  GData *qdata;
};

static void xdp_impl_notification_proxy_iface_init (XdpImplNotificationIface *iface);

#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpImplNotificationProxy, xdp_impl_notification_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (XdpImplNotificationProxy)
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_NOTIFICATION, xdp_impl_notification_proxy_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpImplNotificationProxy, xdp_impl_notification_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_NOTIFICATION, xdp_impl_notification_proxy_iface_init))

#endif
static void
xdp_impl_notification_proxy_finalize (GObject *object)
{
  XdpImplNotificationProxy *proxy = XDP_IMPL_NOTIFICATION_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (xdp_impl_notification_proxy_parent_class)->finalize (object);
}

static void
xdp_impl_notification_proxy_get_property (GObject      *object,
  guint         prop_id,
  GValue       *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  const _ExtendedGDBusPropertyInfo *info;
  GVariant *variant;
  g_assert (prop_id != 0 && prop_id - 1 < 2);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_impl_notification_property_info_pointers[prop_id - 1];
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), info->parent_struct.name);
  if (info->use_gvariant)
    {
      g_value_set_variant (value, variant);
    }
  else
    {
      if (variant != NULL)
        g_dbus_gvariant_to_gvalue (variant, value);
    }
  if (variant != NULL)
    g_variant_unref (variant);
}

static void
xdp_impl_notification_proxy_set_property_cb (GDBusProxy *proxy,
  GAsyncResult *res,
  gpointer      user_data)
{
  const _ExtendedGDBusPropertyInfo *info = user_data;
  GError *error;
  GVariant *_ret;
  error = NULL;
  _ret = g_dbus_proxy_call_finish (proxy, res, &error);
  if (!_ret)
    {
      g_warning ("Error setting property '%s' on interface org.freedesktop.impl.portal.Notification: %s (%s, %d)",
                 info->parent_struct.name, 
                 error->message, g_quark_to_string (error->domain), error->code);
      g_error_free (error);
    }
  else
    {
      g_variant_unref (_ret);
    }
}

static void
xdp_impl_notification_proxy_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  const _ExtendedGDBusPropertyInfo *info;
  GVariant *variant;
  g_assert (prop_id != 0 && prop_id - 1 < 2);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_impl_notification_property_info_pointers[prop_id - 1];
  variant = g_dbus_gvalue_to_gvariant (value, G_VARIANT_TYPE (info->parent_struct.signature));
  g_dbus_proxy_call (G_DBUS_PROXY (object),
    "org.freedesktop.DBus.Properties.Set",
    g_variant_new ("(ssv)", "org.freedesktop.impl.portal.Notification", info->parent_struct.name, variant),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    NULL, (GAsyncReadyCallback) xdp_impl_notification_proxy_set_property_cb, (GDBusPropertyInfo *) &info->parent_struct);
  g_variant_unref (variant);
}

static void
xdp_impl_notification_proxy_g_signal (GDBusProxy *proxy,
  const gchar *sender_name G_GNUC_UNUSED,
  const gchar *signal_name,
  GVariant *parameters)
{
  _ExtendedGDBusSignalInfo *info;
  GVariantIter iter;
  GVariant *child;
  GValue *paramv;
  gsize num_params;
  gsize n;
  guint signal_id;
  info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_xdp_impl_notification_interface_info.parent_struct, signal_name);
  if (info == NULL)
    return;
  num_params = g_variant_n_children (parameters);
  paramv = g_new0 (GValue, num_params + 1);
  g_value_init (&paramv[0], XDP_IMPL_TYPE_NOTIFICATION);
  g_value_set_object (&paramv[0], proxy);
  g_variant_iter_init (&iter, parameters);
  n = 1;
  while ((child = g_variant_iter_next_value (&iter)) != NULL)
    {
      _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1];
      if (arg_info->use_gvariant)
        {
          g_value_init (&paramv[n], G_TYPE_VARIANT);
          g_value_set_variant (&paramv[n], child);
          n++;
        }
      else
        g_dbus_gvariant_to_gvalue (child, &paramv[n++]);
      g_variant_unref (child);
    }
  signal_id = g_signal_lookup (info->signal_name, XDP_IMPL_TYPE_NOTIFICATION);
  g_signal_emitv (paramv, signal_id, 0, NULL);
  for (n = 0; n < num_params + 1; n++)
    g_value_unset (&paramv[n]);
  g_free (paramv);
}

static void
xdp_impl_notification_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  XdpImplNotificationProxy *proxy = XDP_IMPL_NOTIFICATION_PROXY (_proxy);
  guint n;
  const gchar *key;
  GVariantIter *iter;
  _ExtendedGDBusPropertyInfo *info;
  g_variant_get (changed_properties, "a{sv}", &iter);
  while (g_variant_iter_next (iter, "{&sv}", &key, NULL))
    {
      info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_notification_interface_info.parent_struct, key);
      g_datalist_remove_data (&proxy->priv->qdata, key);
      if (info != NULL)
        g_object_notify (G_OBJECT (proxy), info->hyphen_name);
    }
  g_variant_iter_free (iter);
  for (n = 0; invalidated_properties[n] != NULL; n++)
    {
      info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_notification_interface_info.parent_struct, invalidated_properties[n]);
      g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]);
      if (info != NULL)
        g_object_notify (G_OBJECT (proxy), info->hyphen_name);
    }
}

static GVariant *
xdp_impl_notification_proxy_get_supported_options (XdpImplNotification *object)
{
  XdpImplNotificationProxy *proxy = XDP_IMPL_NOTIFICATION_PROXY (object);
  GVariant *variant;
  GVariant *value = NULL;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "SupportedOptions");
  value = variant;
  if (variant != NULL)
    g_variant_unref (variant);
  return value;
}

static guint 
xdp_impl_notification_proxy_get_version (XdpImplNotification *object)
{
  XdpImplNotificationProxy *proxy = XDP_IMPL_NOTIFICATION_PROXY (object);
  GVariant *variant;
  guint value = 0;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "version");
  if (variant != NULL)
    {
      value = g_variant_get_uint32 (variant);
      g_variant_unref (variant);
    }
  return value;
}

static void
xdp_impl_notification_proxy_init (XdpImplNotificationProxy *proxy)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  proxy->priv = xdp_impl_notification_proxy_get_instance_private (proxy);
#else
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, XDP_IMPL_TYPE_NOTIFICATION_PROXY, XdpImplNotificationProxyPrivate);
#endif

  g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), xdp_impl_notification_interface_info ());
}

static void
xdp_impl_notification_proxy_class_init (XdpImplNotificationProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = xdp_impl_notification_proxy_finalize;
  gobject_class->get_property = xdp_impl_notification_proxy_get_property;
  gobject_class->set_property = xdp_impl_notification_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = xdp_impl_notification_proxy_g_signal;
  proxy_class->g_properties_changed = xdp_impl_notification_proxy_g_properties_changed;

  xdp_impl_notification_override_properties (gobject_class, 1);

#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
  g_type_class_add_private (klass, sizeof (XdpImplNotificationProxyPrivate));
#endif
}

static void
xdp_impl_notification_proxy_iface_init (XdpImplNotificationIface *iface)
{
  iface->get_supported_options = xdp_impl_notification_proxy_get_supported_options;
  iface->get_version = xdp_impl_notification_proxy_get_version;
}

/**
 * xdp_impl_notification_proxy_new:
 * @connection: A #GDBusConnection.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-Notification.top_of_page">org.freedesktop.impl.portal.Notification</link>. 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 xdp_impl_notification_proxy_new_finish() to get the result of the operation.
 *
 * See xdp_impl_notification_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_impl_notification_proxy_new (
    GDBusConnection     *connection,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GAsyncReadyCallback  callback,
    gpointer             user_data)
{
  g_async_initable_new_async (XDP_IMPL_TYPE_NOTIFICATION_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.Notification", NULL);
}

/**
 * xdp_impl_notification_proxy_new_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_notification_proxy_new().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_impl_notification_proxy_new().
 *
 * Returns: (transfer full) (type XdpImplNotificationProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplNotification *
xdp_impl_notification_proxy_new_finish (
    GAsyncResult        *res,
    GError             **error)
{
  GObject *ret;
  GObject *source_object;
  source_object = g_async_result_get_source_object (res);
  ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
  g_object_unref (source_object);
  if (ret != NULL)
    return XDP_IMPL_NOTIFICATION (ret);
  else
    return NULL;
}

/**
 * xdp_impl_notification_proxy_new_sync:
 * @connection: A #GDBusConnection.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL
 *
 * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-Notification.top_of_page">org.freedesktop.impl.portal.Notification</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_notification_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpImplNotificationProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplNotification *
xdp_impl_notification_proxy_new_sync (
    GDBusConnection     *connection,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GError             **error)
{
  GInitable *ret;
  ret = g_initable_new (XDP_IMPL_TYPE_NOTIFICATION_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.Notification", NULL);
  if (ret != NULL)
    return XDP_IMPL_NOTIFICATION (ret);
  else
    return NULL;
}


/**
 * xdp_impl_notification_proxy_new_for_bus:
 * @bus_type: A #GBusType.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: A bus name (well-known or unique).
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
 * @user_data: User data to pass to @callback.
 *
 * Like xdp_impl_notification_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 xdp_impl_notification_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See xdp_impl_notification_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_impl_notification_proxy_new_for_bus (
    GBusType             bus_type,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GAsyncReadyCallback  callback,
    gpointer             user_data)
{
  g_async_initable_new_async (XDP_IMPL_TYPE_NOTIFICATION_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.Notification", NULL);
}

/**
 * xdp_impl_notification_proxy_new_for_bus_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_notification_proxy_new_for_bus().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_impl_notification_proxy_new_for_bus().
 *
 * Returns: (transfer full) (type XdpImplNotificationProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplNotification *
xdp_impl_notification_proxy_new_for_bus_finish (
    GAsyncResult        *res,
    GError             **error)
{
  GObject *ret;
  GObject *source_object;
  source_object = g_async_result_get_source_object (res);
  ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
  g_object_unref (source_object);
  if (ret != NULL)
    return XDP_IMPL_NOTIFICATION (ret);
  else
    return NULL;
}

/**
 * xdp_impl_notification_proxy_new_for_bus_sync:
 * @bus_type: A #GBusType.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: A bus name (well-known or unique).
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL
 *
 * Like xdp_impl_notification_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_notification_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpImplNotificationProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplNotification *
xdp_impl_notification_proxy_new_for_bus_sync (
    GBusType             bus_type,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GError             **error)
{
  GInitable *ret;
  ret = g_initable_new (XDP_IMPL_TYPE_NOTIFICATION_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.Notification", NULL);
  if (ret != NULL)
    return XDP_IMPL_NOTIFICATION (ret);
  else
    return NULL;
}


/* ------------------------------------------------------------------------ */

/**
 * XdpImplNotificationSkeleton:
 *
 * The #XdpImplNotificationSkeleton structure contains only private data and should only be accessed using the provided API.
 */

/**
 * XdpImplNotificationSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpImplNotificationSkeleton.
 */

struct _XdpImplNotificationSkeletonPrivate
{
  GValue *properties;
  GList *changed_properties;
  GSource *changed_properties_idle_source;
  GMainContext *context;
  GMutex lock;
};

static void
_xdp_impl_notification_skeleton_handle_method_call (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name,
  const gchar *method_name,
  GVariant *parameters,
  GDBusMethodInvocation *invocation,
  gpointer user_data)
{
  XdpImplNotificationSkeleton *skeleton = XDP_IMPL_NOTIFICATION_SKELETON (user_data);
  _ExtendedGDBusMethodInfo *info;
  GVariantIter iter;
  GVariant *child;
  GValue *paramv;
  gsize num_params;
  guint num_extra;
  gsize n;
  guint signal_id;
  GValue return_value = G_VALUE_INIT;
  info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
  g_assert (info != NULL);
  num_params = g_variant_n_children (parameters);
  num_extra = info->pass_fdlist ? 3 : 2;  paramv = g_new0 (GValue, num_params + num_extra);
  n = 0;
  g_value_init (&paramv[n], XDP_IMPL_TYPE_NOTIFICATION);
  g_value_set_object (&paramv[n++], skeleton);
  g_value_init (&paramv[n], G_TYPE_DBUS_METHOD_INVOCATION);
  g_value_set_object (&paramv[n++], invocation);
  if (info->pass_fdlist)
    {
#ifdef G_OS_UNIX
      g_value_init (&paramv[n], G_TYPE_UNIX_FD_LIST);
      g_value_set_object (&paramv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation)));
#else
      g_assert_not_reached ();
#endif
    }
  g_variant_iter_init (&iter, parameters);
  while ((child = g_variant_iter_next_value (&iter)) != NULL)
    {
      _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra];
      if (arg_info->use_gvariant)
        {
          g_value_init (&paramv[n], G_TYPE_VARIANT);
          g_value_set_variant (&paramv[n], child);
          n++;
        }
      else
        g_dbus_gvariant_to_gvalue (child, &paramv[n++]);
      g_variant_unref (child);
    }
  signal_id = g_signal_lookup (info->signal_name, XDP_IMPL_TYPE_NOTIFICATION);
  g_value_init (&return_value, G_TYPE_BOOLEAN);
  g_signal_emitv (paramv, signal_id, 0, &return_value);
  if (!g_value_get_boolean (&return_value))
    g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD, "Method %s is not implemented on interface %s", method_name, interface_name);
  g_value_unset (&return_value);
  for (n = 0; n < num_params + num_extra; n++)
    g_value_unset (&paramv[n]);
  g_free (paramv);
}

static GVariant *
_xdp_impl_notification_skeleton_handle_get_property (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name G_GNUC_UNUSED,
  const gchar *property_name,
  GError **error,
  gpointer user_data)
{
  XdpImplNotificationSkeleton *skeleton = XDP_IMPL_NOTIFICATION_SKELETON (user_data);
  GValue value = G_VALUE_INIT;
  GParamSpec *pspec;
  _ExtendedGDBusPropertyInfo *info;
  GVariant *ret;
  ret = NULL;
  info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_notification_interface_info.parent_struct, property_name);
  g_assert (info != NULL);
  pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
  if (pspec == NULL)
    {
      g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
    }
  else
    {
      g_value_init (&value, pspec->value_type);
      g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value);
      ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature));
      g_value_unset (&value);
    }
  return ret;
}

static gboolean
_xdp_impl_notification_skeleton_handle_set_property (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name G_GNUC_UNUSED,
  const gchar *property_name,
  GVariant *variant,
  GError **error,
  gpointer user_data)
{
  XdpImplNotificationSkeleton *skeleton = XDP_IMPL_NOTIFICATION_SKELETON (user_data);
  GValue value = G_VALUE_INIT;
  GParamSpec *pspec;
  _ExtendedGDBusPropertyInfo *info;
  gboolean ret;
  ret = FALSE;
  info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_notification_interface_info.parent_struct, property_name);
  g_assert (info != NULL);
  pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
  if (pspec == NULL)
    {
      g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
    }
  else
    {
      if (info->use_gvariant)
        g_value_set_variant (&value, variant);
      else
        g_dbus_gvariant_to_gvalue (variant, &value);
      g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value);
      g_value_unset (&value);
      ret = TRUE;
    }
  return ret;
}

static const GDBusInterfaceVTable _xdp_impl_notification_skeleton_vtable =
{
  _xdp_impl_notification_skeleton_handle_method_call,
  _xdp_impl_notification_skeleton_handle_get_property,
  _xdp_impl_notification_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
xdp_impl_notification_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return xdp_impl_notification_interface_info ();
}

static GDBusInterfaceVTable *
xdp_impl_notification_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_xdp_impl_notification_skeleton_vtable;
}

static GVariant *
xdp_impl_notification_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  XdpImplNotificationSkeleton *skeleton = XDP_IMPL_NOTIFICATION_SKELETON (_skeleton);

  GVariantBuilder builder;
  guint n;
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_84
  g_variant_builder_init_static (&builder, G_VARIANT_TYPE ("a{sv}"));
#else
  g_variant_builder_init(&builder, G_VARIANT_TYPE ("a{sv}"));
#endif
  if (_xdp_impl_notification_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _xdp_impl_notification_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _xdp_impl_notification_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _xdp_impl_notification_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.impl.portal.Notification", info->name, NULL, skeleton);
          if (value != NULL)
            {
              g_variant_take_ref (value);
              g_variant_builder_add (&builder, "{sv}", info->name, value);
              g_variant_unref (value);
            }
        }
    }
out:
  return g_variant_builder_end (&builder);
}

static gboolean _xdp_impl_notification_emit_changed (gpointer user_data);

static void
xdp_impl_notification_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
{
  XdpImplNotificationSkeleton *skeleton = XDP_IMPL_NOTIFICATION_SKELETON (_skeleton);
  gboolean emit_changed = FALSE;

  g_mutex_lock (&skeleton->priv->lock);
  if (skeleton->priv->changed_properties_idle_source != NULL)
    {
      g_source_destroy (skeleton->priv->changed_properties_idle_source);
      skeleton->priv->changed_properties_idle_source = NULL;
      emit_changed = TRUE;
    }
  g_mutex_unlock (&skeleton->priv->lock);

  if (emit_changed)
    _xdp_impl_notification_emit_changed (skeleton);
}

static void
_xdp_impl_notification_on_signal_action_invoked (
    XdpImplNotification *object,
    const gchar *arg_app_id,
    const gchar *arg_id,
    const gchar *arg_action,
    GVariant *arg_parameter)
{
  XdpImplNotificationSkeleton *skeleton = XDP_IMPL_NOTIFICATION_SKELETON (object);

  GList      *connections, *l;
  GVariant   *signal_variant;
  connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));

  signal_variant = g_variant_ref_sink (g_variant_new ("(sss@av)",
                   arg_app_id,
                   arg_id,
                   arg_action,
                   arg_parameter));
  for (l = connections; l != NULL; l = l->next)
    {
      GDBusConnection *connection = l->data;
      g_dbus_connection_emit_signal (connection,
        NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.impl.portal.Notification", "ActionInvoked",
        signal_variant, NULL);
    }
  g_variant_unref (signal_variant);
  g_list_free_full (connections, g_object_unref);
}

static void xdp_impl_notification_skeleton_iface_init (XdpImplNotificationIface *iface);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpImplNotificationSkeleton, xdp_impl_notification_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (XdpImplNotificationSkeleton)
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_NOTIFICATION, xdp_impl_notification_skeleton_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpImplNotificationSkeleton, xdp_impl_notification_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_NOTIFICATION, xdp_impl_notification_skeleton_iface_init))

#endif
static void
xdp_impl_notification_skeleton_finalize (GObject *object)
{
  XdpImplNotificationSkeleton *skeleton = XDP_IMPL_NOTIFICATION_SKELETON (object);
  guint n;
  for (n = 0; n < 2; n++)
    g_value_unset (&skeleton->priv->properties[n]);
  g_free (skeleton->priv->properties);
  g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  /* coverity[missing_lock : SUPPRESS] */
  g_clear_pointer (&skeleton->priv->changed_properties_idle_source, g_source_destroy);
#else
  if (skeleton->priv->changed_properties_idle_source != NULL)
    g_source_destroy (skeleton->priv->changed_properties_idle_source);
skeleton->priv->changed_properties_idle_source = NULL;
#endif
  g_main_context_unref (skeleton->priv->context);
  g_mutex_clear (&skeleton->priv->lock);
  G_OBJECT_CLASS (xdp_impl_notification_skeleton_parent_class)->finalize (object);
}

static void
xdp_impl_notification_skeleton_get_property (GObject      *object,
  guint         prop_id,
  GValue       *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  XdpImplNotificationSkeleton *skeleton = XDP_IMPL_NOTIFICATION_SKELETON (object);
  g_assert (prop_id != 0 && prop_id - 1 < 2);
  g_mutex_lock (&skeleton->priv->lock);
  g_value_copy (&skeleton->priv->properties[prop_id - 1], value);
  g_mutex_unlock (&skeleton->priv->lock);
}

static gboolean
_xdp_impl_notification_emit_changed (gpointer user_data)
{
  XdpImplNotificationSkeleton *skeleton = XDP_IMPL_NOTIFICATION_SKELETON (user_data);
  GList *l;
  GVariantBuilder builder;
  GVariantBuilder invalidated_builder;
  guint num_changes;

  g_mutex_lock (&skeleton->priv->lock);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_84
  g_variant_builder_init_static (&builder, G_VARIANT_TYPE ("a{sv}"));
  g_variant_builder_init_static (&invalidated_builder, G_VARIANT_TYPE ("as"));
#else
  g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
  g_variant_builder_init (&invalidated_builder, G_VARIANT_TYPE ("as"));
#endif
  for (l = skeleton->priv->changed_properties, num_changes = 0; l != NULL; l = l->next)
    {
      ChangedProperty *cp = l->data;
      GVariant *variant;
      const GValue *cur_value;

      cur_value = &skeleton->priv->properties[cp->prop_id - 1];
      if (!_g_value_equal (cur_value, &cp->orig_value))
        {
          variant = g_dbus_gvalue_to_gvariant (cur_value, G_VARIANT_TYPE (cp->info->parent_struct.signature));
          g_variant_builder_add (&builder, "{sv}", cp->info->parent_struct.name, variant);
          g_variant_unref (variant);
          num_changes++;
        }
    }
  if (num_changes > 0)
    {
      GList *connections, *ll;
      GVariant *signal_variant;
      signal_variant = g_variant_ref_sink (g_variant_new ("(sa{sv}as)", "org.freedesktop.impl.portal.Notification",
                                           &builder, &invalidated_builder));
      connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
      for (ll = connections; ll != NULL; ll = ll->next)
        {
          GDBusConnection *connection = ll->data;

          g_dbus_connection_emit_signal (connection,
                                         NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)),
                                         "org.freedesktop.DBus.Properties",
                                         "PropertiesChanged",
                                         signal_variant,
                                         NULL);
        }
      g_variant_unref (signal_variant);
      g_list_free_full (connections, g_object_unref);
    }
  else
    {
      g_variant_builder_clear (&builder);
      g_variant_builder_clear (&invalidated_builder);
    }
  g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
  skeleton->priv->changed_properties = NULL;
  skeleton->priv->changed_properties_idle_source = NULL;
  g_mutex_unlock (&skeleton->priv->lock);
  return FALSE;
}

static void
_xdp_impl_notification_schedule_emit_changed (XdpImplNotificationSkeleton *skeleton, const _ExtendedGDBusPropertyInfo *info, guint prop_id, const GValue *orig_value)
{
  ChangedProperty *cp;
  GList *l;
  cp = NULL;
  for (l = skeleton->priv->changed_properties; l != NULL; l = l->next)
    {
      ChangedProperty *i_cp = l->data;
      if (i_cp->info == info)
        {
          cp = i_cp;
          break;
        }
    }
  if (cp == NULL)
    {
      cp = g_new0 (ChangedProperty, 1);
      cp->prop_id = prop_id;
      cp->info = info;
      skeleton->priv->changed_properties = g_list_prepend (skeleton->priv->changed_properties, cp);
      g_value_init (&cp->orig_value, G_VALUE_TYPE (orig_value));
      g_value_copy (orig_value, &cp->orig_value);
    }
}

static void
xdp_impl_notification_skeleton_notify (GObject      *object,
  GParamSpec *pspec G_GNUC_UNUSED)
{
  XdpImplNotificationSkeleton *skeleton = XDP_IMPL_NOTIFICATION_SKELETON (object);
  g_mutex_lock (&skeleton->priv->lock);
  if (skeleton->priv->changed_properties != NULL &&
      skeleton->priv->changed_properties_idle_source == NULL)
    {
      skeleton->priv->changed_properties_idle_source = g_idle_source_new ();
      g_source_set_priority (skeleton->priv->changed_properties_idle_source, G_PRIORITY_DEFAULT);
      g_source_set_callback (skeleton->priv->changed_properties_idle_source, _xdp_impl_notification_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
      g_source_set_name (skeleton->priv->changed_properties_idle_source, "[generated] _xdp_impl_notification_emit_changed");
      g_source_attach (skeleton->priv->changed_properties_idle_source, skeleton->priv->context);
      g_source_unref (skeleton->priv->changed_properties_idle_source);
    }
  g_mutex_unlock (&skeleton->priv->lock);
}

static void
xdp_impl_notification_skeleton_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec)
{
  const _ExtendedGDBusPropertyInfo *info;
  XdpImplNotificationSkeleton *skeleton = XDP_IMPL_NOTIFICATION_SKELETON (object);
  g_assert (prop_id != 0 && prop_id - 1 < 2);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_impl_notification_property_info_pointers[prop_id - 1];
  g_mutex_lock (&skeleton->priv->lock);
  g_object_freeze_notify (object);
  if (!_g_value_equal (value, &skeleton->priv->properties[prop_id - 1]))
    {
      if (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)) != NULL &&
          info->emits_changed_signal)
        _xdp_impl_notification_schedule_emit_changed (skeleton, info, prop_id, &skeleton->priv->properties[prop_id - 1]);
      g_value_copy (value, &skeleton->priv->properties[prop_id - 1]);
      g_object_notify_by_pspec (object, pspec);
    }
  g_mutex_unlock (&skeleton->priv->lock);
  g_object_thaw_notify (object);
}

static void
xdp_impl_notification_skeleton_init (XdpImplNotificationSkeleton *skeleton)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  skeleton->priv = xdp_impl_notification_skeleton_get_instance_private (skeleton);
#else
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, XDP_IMPL_TYPE_NOTIFICATION_SKELETON, XdpImplNotificationSkeletonPrivate);
#endif

  g_mutex_init (&skeleton->priv->lock);
  skeleton->priv->context = g_main_context_ref_thread_default ();
  skeleton->priv->properties = g_new0 (GValue, 2);
  g_value_init (&skeleton->priv->properties[0], G_TYPE_VARIANT);
  g_value_init (&skeleton->priv->properties[1], G_TYPE_UINT);
}

static GVariant *
xdp_impl_notification_skeleton_get_supported_options (XdpImplNotification *object)
{
  XdpImplNotificationSkeleton *skeleton = XDP_IMPL_NOTIFICATION_SKELETON (object);
  GVariant *value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_marshal_value_peek_variant (&(skeleton->priv->properties[0]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static guint 
xdp_impl_notification_skeleton_get_version (XdpImplNotification *object)
{
  XdpImplNotificationSkeleton *skeleton = XDP_IMPL_NOTIFICATION_SKELETON (object);
  guint value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_marshal_value_peek_uint (&(skeleton->priv->properties[1]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static void
xdp_impl_notification_skeleton_class_init (XdpImplNotificationSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize = xdp_impl_notification_skeleton_finalize;
  gobject_class->get_property = xdp_impl_notification_skeleton_get_property;
  gobject_class->set_property = xdp_impl_notification_skeleton_set_property;
  gobject_class->notify       = xdp_impl_notification_skeleton_notify;


  xdp_impl_notification_override_properties (gobject_class, 1);

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = xdp_impl_notification_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = xdp_impl_notification_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = xdp_impl_notification_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = xdp_impl_notification_skeleton_dbus_interface_get_vtable;

#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
  g_type_class_add_private (klass, sizeof (XdpImplNotificationSkeletonPrivate));
#endif
}

static void
xdp_impl_notification_skeleton_iface_init (XdpImplNotificationIface *iface)
{
  iface->action_invoked = _xdp_impl_notification_on_signal_action_invoked;
  iface->get_supported_options = xdp_impl_notification_skeleton_get_supported_options;
  iface->get_version = xdp_impl_notification_skeleton_get_version;
}

/**
 * xdp_impl_notification_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-Notification.top_of_page">org.freedesktop.impl.portal.Notification</link>.
 *
 * Returns: (transfer full) (type XdpImplNotificationSkeleton): The skeleton object.
 */
XdpImplNotification *
xdp_impl_notification_skeleton_new (void)
{
  return XDP_IMPL_NOTIFICATION (g_object_new (XDP_IMPL_TYPE_NOTIFICATION_SKELETON, NULL));
}

/* ------------------------------------------------------------------------
 * Code for interface org.freedesktop.impl.portal.Print
 * ------------------------------------------------------------------------
 */

/**
 * SECTION:XdpImplPrint
 * @title: XdpImplPrint
 * @short_description: Generated C code for the org.freedesktop.impl.portal.Print D-Bus interface
 *
 * This section contains code for working with the <link linkend="gdbus-interface-org-freedesktop-impl-portal-Print.top_of_page">org.freedesktop.impl.portal.Print</link> D-Bus interface in C.
 */

/* ---- Introspection data for org.freedesktop.impl.portal.Print ---- */

static const _ExtendedGDBusArgInfo _xdp_impl_print_method_info_prepare_print_IN_ARG_handle =
{
  {
    -1,
    (gchar *) "handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_print_method_info_prepare_print_IN_ARG_app_id =
{
  {
    -1,
    (gchar *) "app_id",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_print_method_info_prepare_print_IN_ARG_parent_window =
{
  {
    -1,
    (gchar *) "parent_window",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_print_method_info_prepare_print_IN_ARG_title =
{
  {
    -1,
    (gchar *) "title",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_print_method_info_prepare_print_IN_ARG_settings =
{
  {
    -1,
    (gchar *) "settings",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_print_method_info_prepare_print_IN_ARG_page_setup =
{
  {
    -1,
    (gchar *) "page_setup",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_print_method_info_prepare_print_IN_ARG_options =
{
  {
    -1,
    (gchar *) "options",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_print_method_info_prepare_print_IN_ARG_pointers[] =
{
  &_xdp_impl_print_method_info_prepare_print_IN_ARG_handle.parent_struct,
  &_xdp_impl_print_method_info_prepare_print_IN_ARG_app_id.parent_struct,
  &_xdp_impl_print_method_info_prepare_print_IN_ARG_parent_window.parent_struct,
  &_xdp_impl_print_method_info_prepare_print_IN_ARG_title.parent_struct,
  &_xdp_impl_print_method_info_prepare_print_IN_ARG_settings.parent_struct,
  &_xdp_impl_print_method_info_prepare_print_IN_ARG_page_setup.parent_struct,
  &_xdp_impl_print_method_info_prepare_print_IN_ARG_options.parent_struct,
  NULL
};

static const _ExtendedGDBusArgInfo _xdp_impl_print_method_info_prepare_print_OUT_ARG_response =
{
  {
    -1,
    (gchar *) "response",
    (gchar *) "u",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_print_method_info_prepare_print_OUT_ARG_results =
{
  {
    -1,
    (gchar *) "results",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_print_method_info_prepare_print_OUT_ARG_pointers[] =
{
  &_xdp_impl_print_method_info_prepare_print_OUT_ARG_response.parent_struct,
  &_xdp_impl_print_method_info_prepare_print_OUT_ARG_results.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_print_method_prepare_print_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.In4",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_print_method_prepare_print_annotation_info_1 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.In5",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_print_method_prepare_print_annotation_info_2 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.In6",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_print_method_prepare_print_annotation_info_3 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.Out1",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo * const _xdp_impl_print_method_prepare_print_annotation_info_pointers[] =
{
  &_xdp_impl_print_method_prepare_print_annotation_info_0,
  &_xdp_impl_print_method_prepare_print_annotation_info_1,
  &_xdp_impl_print_method_prepare_print_annotation_info_2,
  &_xdp_impl_print_method_prepare_print_annotation_info_3,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_impl_print_method_info_prepare_print =
{
  {
    -1,
    (gchar *) "PreparePrint",
    (GDBusArgInfo **) &_xdp_impl_print_method_info_prepare_print_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_impl_print_method_info_prepare_print_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_impl_print_method_prepare_print_annotation_info_pointers
  },
  "handle-prepare-print",
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_print_method_info_print_IN_ARG_handle =
{
  {
    -1,
    (gchar *) "handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_print_method_info_print_IN_ARG_app_id =
{
  {
    -1,
    (gchar *) "app_id",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_print_method_info_print_IN_ARG_parent_window =
{
  {
    -1,
    (gchar *) "parent_window",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_print_method_info_print_IN_ARG_title =
{
  {
    -1,
    (gchar *) "title",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_print_method_info_print_IN_ARG_fd =
{
  {
    -1,
    (gchar *) "fd",
    (gchar *) "h",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_print_method_info_print_IN_ARG_options =
{
  {
    -1,
    (gchar *) "options",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_print_method_info_print_IN_ARG_pointers[] =
{
  &_xdp_impl_print_method_info_print_IN_ARG_handle.parent_struct,
  &_xdp_impl_print_method_info_print_IN_ARG_app_id.parent_struct,
  &_xdp_impl_print_method_info_print_IN_ARG_parent_window.parent_struct,
  &_xdp_impl_print_method_info_print_IN_ARG_title.parent_struct,
  &_xdp_impl_print_method_info_print_IN_ARG_fd.parent_struct,
  &_xdp_impl_print_method_info_print_IN_ARG_options.parent_struct,
  NULL
};

static const _ExtendedGDBusArgInfo _xdp_impl_print_method_info_print_OUT_ARG_response =
{
  {
    -1,
    (gchar *) "response",
    (gchar *) "u",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_print_method_info_print_OUT_ARG_results =
{
  {
    -1,
    (gchar *) "results",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_print_method_info_print_OUT_ARG_pointers[] =
{
  &_xdp_impl_print_method_info_print_OUT_ARG_response.parent_struct,
  &_xdp_impl_print_method_info_print_OUT_ARG_results.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_print_method_print_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.In5",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_print_method_print_annotation_info_1 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.Out1",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo * const _xdp_impl_print_method_print_annotation_info_pointers[] =
{
  &_xdp_impl_print_method_print_annotation_info_0,
  &_xdp_impl_print_method_print_annotation_info_1,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_impl_print_method_info_print =
{
  {
    -1,
    (gchar *) "Print",
    (GDBusArgInfo **) &_xdp_impl_print_method_info_print_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_impl_print_method_info_print_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_impl_print_method_print_annotation_info_pointers
  },
  "handle-print",
  TRUE
};

static const GDBusMethodInfo * const _xdp_impl_print_method_info_pointers[] =
{
  &_xdp_impl_print_method_info_prepare_print.parent_struct,
  &_xdp_impl_print_method_info_print.parent_struct,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _xdp_impl_print_interface_info =
{
  {
    -1,
    (gchar *) "org.freedesktop.impl.portal.Print",
    (GDBusMethodInfo **) &_xdp_impl_print_method_info_pointers,
    NULL,
    NULL,
    NULL
  },
  "print",
};


/**
 * xdp_impl_print_interface_info:
 *
 * Gets a machine-readable description of the <link linkend="gdbus-interface-org-freedesktop-impl-portal-Print.top_of_page">org.freedesktop.impl.portal.Print</link> D-Bus interface.
 *
 * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
 */
GDBusInterfaceInfo *
xdp_impl_print_interface_info (void)
{
  return (GDBusInterfaceInfo *) &_xdp_impl_print_interface_info.parent_struct;
}

/**
 * xdp_impl_print_override_properties:
 * @klass: The class structure for a #GObject derived class.
 * @property_id_begin: The property id to assign to the first overridden property.
 *
 * Overrides all #GObject properties in the #XdpImplPrint interface for a concrete class.
 * The properties are overridden in the order they are defined.
 *
 * Returns: The last property id.
 */
guint
xdp_impl_print_override_properties (GObjectClass *klass G_GNUC_UNUSED, guint property_id_begin)
{
  return property_id_begin - 1;
}


inline static void
xdp_impl_print_method_marshal_prepare_print (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  _g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_STRING_STRING_STRING_VARIANT_VARIANT_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_impl_print_method_marshal_print (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  _g_dbus_codegen_marshal_BOOLEAN__OBJECT_OBJECT_STRING_STRING_STRING_STRING_VARIANT_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}


/**
 * XdpImplPrint:
 *
 * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-Print.top_of_page">org.freedesktop.impl.portal.Print</link>.
 */

/**
 * XdpImplPrintIface:
 * @parent_iface: The parent interface.
 * @handle_prepare_print: Handler for the #XdpImplPrint::handle-prepare-print signal.
 * @handle_print: Handler for the #XdpImplPrint::handle-print signal.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-Print.top_of_page">org.freedesktop.impl.portal.Print</link>.
 */

typedef XdpImplPrintIface XdpImplPrintInterface;
G_DEFINE_INTERFACE (XdpImplPrint, xdp_impl_print, G_TYPE_OBJECT)

static void
xdp_impl_print_default_init (XdpImplPrintIface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * XdpImplPrint::handle-prepare-print:
   * @object: A #XdpImplPrint.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_handle: Argument passed by remote caller.
   * @arg_app_id: Argument passed by remote caller.
   * @arg_parent_window: Argument passed by remote caller.
   * @arg_title: Argument passed by remote caller.
   * @arg_settings: Argument passed by remote caller.
   * @arg_page_setup: Argument passed by remote caller.
   * @arg_options: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-impl-portal-Print.PreparePrint">PreparePrint()</link> 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 xdp_impl_print_complete_prepare_print() 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.
   *
   * 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.
   */
  g_signal_new ("handle-prepare-print",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpImplPrintIface, handle_prepare_print),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_impl_print_method_marshal_prepare_print,
    G_TYPE_BOOLEAN,
    8,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_VARIANT, G_TYPE_VARIANT, G_TYPE_VARIANT);

  /**
   * XdpImplPrint::handle-print:
   * @object: A #XdpImplPrint.
   * @invocation: A #GDBusMethodInvocation.
   * @fd_list: (nullable): A #GUnixFDList or %NULL.
   * @arg_handle: Argument passed by remote caller.
   * @arg_app_id: Argument passed by remote caller.
   * @arg_parent_window: Argument passed by remote caller.
   * @arg_title: Argument passed by remote caller.
   * @arg_fd: Argument passed by remote caller.
   * @arg_options: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-impl-portal-Print.Print">Print()</link> 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 xdp_impl_print_complete_print() 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.
   *
   * 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.
   */
  g_signal_new ("handle-print",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpImplPrintIface, handle_print),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_impl_print_method_marshal_print,
    G_TYPE_BOOLEAN,
    8,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UNIX_FD_LIST, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_VARIANT, G_TYPE_VARIANT);

}

/**
 * xdp_impl_print_call_prepare_print:
 * @proxy: A #XdpImplPrintProxy.
 * @arg_handle: Argument to pass with the method invocation.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_parent_window: Argument to pass with the method invocation.
 * @arg_title: Argument to pass with the method invocation.
 * @arg_settings: Argument to pass with the method invocation.
 * @arg_page_setup: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-Print.PreparePrint">PreparePrint()</link> 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 xdp_impl_print_call_prepare_print_finish() to get the result of the operation.
 *
 * See xdp_impl_print_call_prepare_print_sync() for the synchronous, blocking version of this method.
 */
void
xdp_impl_print_call_prepare_print (
    XdpImplPrint *proxy,
    const gchar *arg_handle,
    const gchar *arg_app_id,
    const gchar *arg_parent_window,
    const gchar *arg_title,
    GVariant *arg_settings,
    GVariant *arg_page_setup,
    GVariant *arg_options,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "PreparePrint",
    g_variant_new ("(osss@a{sv}@a{sv}@a{sv})",
                   arg_handle,
                   arg_app_id,
                   arg_parent_window,
                   arg_title,
                   arg_settings,
                   arg_page_setup,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_impl_print_call_prepare_print_finish:
 * @proxy: A #XdpImplPrintProxy.
 * @out_response: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_results: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_print_call_prepare_print().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_impl_print_call_prepare_print().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_print_call_prepare_print_finish (
    XdpImplPrint *proxy,
    guint* out_response,
    GVariant ** out_results,
    GAsyncResult *res,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(u@a{sv})",
                 out_response,
                 out_results);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_print_call_prepare_print_sync:
 * @proxy: A #XdpImplPrintProxy.
 * @arg_handle: Argument to pass with the method invocation.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_parent_window: Argument to pass with the method invocation.
 * @arg_title: Argument to pass with the method invocation.
 * @arg_settings: Argument to pass with the method invocation.
 * @arg_page_setup: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @out_response: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_results: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-Print.PreparePrint">PreparePrint()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_print_call_prepare_print() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_print_call_prepare_print_sync (
    XdpImplPrint *proxy,
    const gchar *arg_handle,
    const gchar *arg_app_id,
    const gchar *arg_parent_window,
    const gchar *arg_title,
    GVariant *arg_settings,
    GVariant *arg_page_setup,
    GVariant *arg_options,
    guint* out_response,
    GVariant ** out_results,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "PreparePrint",
    g_variant_new ("(osss@a{sv}@a{sv}@a{sv})",
                   arg_handle,
                   arg_app_id,
                   arg_parent_window,
                   arg_title,
                   arg_settings,
                   arg_page_setup,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(u@a{sv})",
                 out_response,
                 out_results);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_print_call_print:
 * @proxy: A #XdpImplPrintProxy.
 * @arg_handle: Argument to pass with the method invocation.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_parent_window: Argument to pass with the method invocation.
 * @arg_title: Argument to pass with the method invocation.
 * @arg_fd: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @fd_list: (nullable): A #GUnixFDList or %NULL.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-Print.Print">Print()</link> 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 xdp_impl_print_call_print_finish() to get the result of the operation.
 *
 * See xdp_impl_print_call_print_sync() for the synchronous, blocking version of this method.
 */
void
xdp_impl_print_call_print (
    XdpImplPrint *proxy,
    const gchar *arg_handle,
    const gchar *arg_app_id,
    const gchar *arg_parent_window,
    const gchar *arg_title,
    GVariant *arg_fd,
    GVariant *arg_options,
    GUnixFDList *fd_list,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call_with_unix_fd_list (G_DBUS_PROXY (proxy),
    "Print",
    g_variant_new ("(osss@h@a{sv})",
                   arg_handle,
                   arg_app_id,
                   arg_parent_window,
                   arg_title,
                   arg_fd,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    fd_list,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_impl_print_call_print_finish:
 * @proxy: A #XdpImplPrintProxy.
 * @out_response: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_results: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_fd_list: (out) (optional) (nullable): Return location for a #GUnixFDList or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_print_call_print().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_impl_print_call_print().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_print_call_print_finish (
    XdpImplPrint *proxy,
    guint* out_response,
    GVariant ** out_results,
    GUnixFDList **out_fd_list,
    GAsyncResult *res,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_with_unix_fd_list_finish (G_DBUS_PROXY (proxy), out_fd_list, res, error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(u@a{sv})",
                 out_response,
                 out_results);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_print_call_print_sync:
 * @proxy: A #XdpImplPrintProxy.
 * @arg_handle: Argument to pass with the method invocation.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_parent_window: Argument to pass with the method invocation.
 * @arg_title: Argument to pass with the method invocation.
 * @arg_fd: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @fd_list: (nullable): A #GUnixFDList or %NULL.
 * @out_response: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_results: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_fd_list: (out) (optional) (nullable): Return location for a #GUnixFDList or %NULL.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-Print.Print">Print()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_print_call_print() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_print_call_print_sync (
    XdpImplPrint *proxy,
    const gchar *arg_handle,
    const gchar *arg_app_id,
    const gchar *arg_parent_window,
    const gchar *arg_title,
    GVariant *arg_fd,
    GVariant *arg_options,
    GUnixFDList  *fd_list,
    guint* out_response,
    GVariant ** out_results,
    GUnixFDList **out_fd_list,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_with_unix_fd_list_sync (G_DBUS_PROXY (proxy),
    "Print",
    g_variant_new ("(osss@h@a{sv})",
                   arg_handle,
                   arg_app_id,
                   arg_parent_window,
                   arg_title,
                   arg_fd,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    fd_list,
    out_fd_list,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(u@a{sv})",
                 out_response,
                 out_results);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_print_complete_prepare_print:
 * @object: A #XdpImplPrint.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @response: Parameter to return.
 * @results: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-impl-portal-Print.PreparePrint">PreparePrint()</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
xdp_impl_print_complete_prepare_print (
    XdpImplPrint *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    guint response,
    GVariant *results)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(u@a{sv})",
                   response,
                   results));
}

/**
 * xdp_impl_print_complete_print:
 * @object: A #XdpImplPrint.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @fd_list: (nullable): A #GUnixFDList or %NULL.
 * @response: Parameter to return.
 * @results: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-impl-portal-Print.Print">Print()</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
xdp_impl_print_complete_print (
    XdpImplPrint *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    GUnixFDList *fd_list,
    guint response,
    GVariant *results)
{
  g_dbus_method_invocation_return_value_with_unix_fd_list (invocation,
    g_variant_new ("(u@a{sv})",
                   response,
                   results),
    fd_list);
}

/* ------------------------------------------------------------------------ */

/**
 * XdpImplPrintProxy:
 *
 * The #XdpImplPrintProxy structure contains only private data and should only be accessed using the provided API.
 */

/**
 * XdpImplPrintProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpImplPrintProxy.
 */

struct _XdpImplPrintProxyPrivate
{
  GData *qdata;
};

static void xdp_impl_print_proxy_iface_init (XdpImplPrintIface *iface);

#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpImplPrintProxy, xdp_impl_print_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (XdpImplPrintProxy)
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_PRINT, xdp_impl_print_proxy_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpImplPrintProxy, xdp_impl_print_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_PRINT, xdp_impl_print_proxy_iface_init))

#endif
static void
xdp_impl_print_proxy_finalize (GObject *object)
{
  XdpImplPrintProxy *proxy = XDP_IMPL_PRINT_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (xdp_impl_print_proxy_parent_class)->finalize (object);
}

static void
xdp_impl_print_proxy_get_property (GObject      *object G_GNUC_UNUSED,
  guint         prop_id G_GNUC_UNUSED,
  GValue       *value G_GNUC_UNUSED,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
}

static void
xdp_impl_print_proxy_set_property (GObject      *object G_GNUC_UNUSED,
  guint         prop_id G_GNUC_UNUSED,
  const GValue *value G_GNUC_UNUSED,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
}

static void
xdp_impl_print_proxy_g_signal (GDBusProxy *proxy,
  const gchar *sender_name G_GNUC_UNUSED,
  const gchar *signal_name,
  GVariant *parameters)
{
  _ExtendedGDBusSignalInfo *info;
  GVariantIter iter;
  GVariant *child;
  GValue *paramv;
  gsize num_params;
  gsize n;
  guint signal_id;
  info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_xdp_impl_print_interface_info.parent_struct, signal_name);
  if (info == NULL)
    return;
  num_params = g_variant_n_children (parameters);
  paramv = g_new0 (GValue, num_params + 1);
  g_value_init (&paramv[0], XDP_IMPL_TYPE_PRINT);
  g_value_set_object (&paramv[0], proxy);
  g_variant_iter_init (&iter, parameters);
  n = 1;
  while ((child = g_variant_iter_next_value (&iter)) != NULL)
    {
      _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1];
      if (arg_info->use_gvariant)
        {
          g_value_init (&paramv[n], G_TYPE_VARIANT);
          g_value_set_variant (&paramv[n], child);
          n++;
        }
      else
        g_dbus_gvariant_to_gvalue (child, &paramv[n++]);
      g_variant_unref (child);
    }
  signal_id = g_signal_lookup (info->signal_name, XDP_IMPL_TYPE_PRINT);
  g_signal_emitv (paramv, signal_id, 0, NULL);
  for (n = 0; n < num_params + 1; n++)
    g_value_unset (&paramv[n]);
  g_free (paramv);
}

static void
xdp_impl_print_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  XdpImplPrintProxy *proxy = XDP_IMPL_PRINT_PROXY (_proxy);
  guint n;
  const gchar *key;
  GVariantIter *iter;
  _ExtendedGDBusPropertyInfo *info;
  g_variant_get (changed_properties, "a{sv}", &iter);
  while (g_variant_iter_next (iter, "{&sv}", &key, NULL))
    {
      info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_print_interface_info.parent_struct, key);
      g_datalist_remove_data (&proxy->priv->qdata, key);
      if (info != NULL)
        g_object_notify (G_OBJECT (proxy), info->hyphen_name);
    }
  g_variant_iter_free (iter);
  for (n = 0; invalidated_properties[n] != NULL; n++)
    {
      info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_print_interface_info.parent_struct, invalidated_properties[n]);
      g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]);
      if (info != NULL)
        g_object_notify (G_OBJECT (proxy), info->hyphen_name);
    }
}

static void
xdp_impl_print_proxy_init (XdpImplPrintProxy *proxy)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  proxy->priv = xdp_impl_print_proxy_get_instance_private (proxy);
#else
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, XDP_IMPL_TYPE_PRINT_PROXY, XdpImplPrintProxyPrivate);
#endif

  g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), xdp_impl_print_interface_info ());
}

static void
xdp_impl_print_proxy_class_init (XdpImplPrintProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = xdp_impl_print_proxy_finalize;
  gobject_class->get_property = xdp_impl_print_proxy_get_property;
  gobject_class->set_property = xdp_impl_print_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = xdp_impl_print_proxy_g_signal;
  proxy_class->g_properties_changed = xdp_impl_print_proxy_g_properties_changed;

#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
  g_type_class_add_private (klass, sizeof (XdpImplPrintProxyPrivate));
#endif
}

static void
xdp_impl_print_proxy_iface_init (XdpImplPrintIface *iface G_GNUC_UNUSED)
{
}

/**
 * xdp_impl_print_proxy_new:
 * @connection: A #GDBusConnection.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-Print.top_of_page">org.freedesktop.impl.portal.Print</link>. 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 xdp_impl_print_proxy_new_finish() to get the result of the operation.
 *
 * See xdp_impl_print_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_impl_print_proxy_new (
    GDBusConnection     *connection,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GAsyncReadyCallback  callback,
    gpointer             user_data)
{
  g_async_initable_new_async (XDP_IMPL_TYPE_PRINT_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.Print", NULL);
}

/**
 * xdp_impl_print_proxy_new_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_print_proxy_new().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_impl_print_proxy_new().
 *
 * Returns: (transfer full) (type XdpImplPrintProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplPrint *
xdp_impl_print_proxy_new_finish (
    GAsyncResult        *res,
    GError             **error)
{
  GObject *ret;
  GObject *source_object;
  source_object = g_async_result_get_source_object (res);
  ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
  g_object_unref (source_object);
  if (ret != NULL)
    return XDP_IMPL_PRINT (ret);
  else
    return NULL;
}

/**
 * xdp_impl_print_proxy_new_sync:
 * @connection: A #GDBusConnection.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL
 *
 * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-Print.top_of_page">org.freedesktop.impl.portal.Print</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_print_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpImplPrintProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplPrint *
xdp_impl_print_proxy_new_sync (
    GDBusConnection     *connection,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GError             **error)
{
  GInitable *ret;
  ret = g_initable_new (XDP_IMPL_TYPE_PRINT_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.Print", NULL);
  if (ret != NULL)
    return XDP_IMPL_PRINT (ret);
  else
    return NULL;
}


/**
 * xdp_impl_print_proxy_new_for_bus:
 * @bus_type: A #GBusType.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: A bus name (well-known or unique).
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
 * @user_data: User data to pass to @callback.
 *
 * Like xdp_impl_print_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 xdp_impl_print_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See xdp_impl_print_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_impl_print_proxy_new_for_bus (
    GBusType             bus_type,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GAsyncReadyCallback  callback,
    gpointer             user_data)
{
  g_async_initable_new_async (XDP_IMPL_TYPE_PRINT_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.Print", NULL);
}

/**
 * xdp_impl_print_proxy_new_for_bus_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_print_proxy_new_for_bus().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_impl_print_proxy_new_for_bus().
 *
 * Returns: (transfer full) (type XdpImplPrintProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplPrint *
xdp_impl_print_proxy_new_for_bus_finish (
    GAsyncResult        *res,
    GError             **error)
{
  GObject *ret;
  GObject *source_object;
  source_object = g_async_result_get_source_object (res);
  ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
  g_object_unref (source_object);
  if (ret != NULL)
    return XDP_IMPL_PRINT (ret);
  else
    return NULL;
}

/**
 * xdp_impl_print_proxy_new_for_bus_sync:
 * @bus_type: A #GBusType.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: A bus name (well-known or unique).
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL
 *
 * Like xdp_impl_print_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_print_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpImplPrintProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplPrint *
xdp_impl_print_proxy_new_for_bus_sync (
    GBusType             bus_type,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GError             **error)
{
  GInitable *ret;
  ret = g_initable_new (XDP_IMPL_TYPE_PRINT_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.Print", NULL);
  if (ret != NULL)
    return XDP_IMPL_PRINT (ret);
  else
    return NULL;
}


/* ------------------------------------------------------------------------ */

/**
 * XdpImplPrintSkeleton:
 *
 * The #XdpImplPrintSkeleton structure contains only private data and should only be accessed using the provided API.
 */

/**
 * XdpImplPrintSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpImplPrintSkeleton.
 */

struct _XdpImplPrintSkeletonPrivate
{
  GValue *properties;
  GList *changed_properties;
  GSource *changed_properties_idle_source;
  GMainContext *context;
  GMutex lock;
};

static void
_xdp_impl_print_skeleton_handle_method_call (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name,
  const gchar *method_name,
  GVariant *parameters,
  GDBusMethodInvocation *invocation,
  gpointer user_data)
{
  XdpImplPrintSkeleton *skeleton = XDP_IMPL_PRINT_SKELETON (user_data);
  _ExtendedGDBusMethodInfo *info;
  GVariantIter iter;
  GVariant *child;
  GValue *paramv;
  gsize num_params;
  guint num_extra;
  gsize n;
  guint signal_id;
  GValue return_value = G_VALUE_INIT;
  info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
  g_assert (info != NULL);
  num_params = g_variant_n_children (parameters);
  num_extra = info->pass_fdlist ? 3 : 2;  paramv = g_new0 (GValue, num_params + num_extra);
  n = 0;
  g_value_init (&paramv[n], XDP_IMPL_TYPE_PRINT);
  g_value_set_object (&paramv[n++], skeleton);
  g_value_init (&paramv[n], G_TYPE_DBUS_METHOD_INVOCATION);
  g_value_set_object (&paramv[n++], invocation);
  if (info->pass_fdlist)
    {
#ifdef G_OS_UNIX
      g_value_init (&paramv[n], G_TYPE_UNIX_FD_LIST);
      g_value_set_object (&paramv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation)));
#else
      g_assert_not_reached ();
#endif
    }
  g_variant_iter_init (&iter, parameters);
  while ((child = g_variant_iter_next_value (&iter)) != NULL)
    {
      _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra];
      if (arg_info->use_gvariant)
        {
          g_value_init (&paramv[n], G_TYPE_VARIANT);
          g_value_set_variant (&paramv[n], child);
          n++;
        }
      else
        g_dbus_gvariant_to_gvalue (child, &paramv[n++]);
      g_variant_unref (child);
    }
  signal_id = g_signal_lookup (info->signal_name, XDP_IMPL_TYPE_PRINT);
  g_value_init (&return_value, G_TYPE_BOOLEAN);
  g_signal_emitv (paramv, signal_id, 0, &return_value);
  if (!g_value_get_boolean (&return_value))
    g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD, "Method %s is not implemented on interface %s", method_name, interface_name);
  g_value_unset (&return_value);
  for (n = 0; n < num_params + num_extra; n++)
    g_value_unset (&paramv[n]);
  g_free (paramv);
}

static GVariant *
_xdp_impl_print_skeleton_handle_get_property (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name G_GNUC_UNUSED,
  const gchar *property_name,
  GError **error,
  gpointer user_data)
{
  XdpImplPrintSkeleton *skeleton = XDP_IMPL_PRINT_SKELETON (user_data);
  GValue value = G_VALUE_INIT;
  GParamSpec *pspec;
  _ExtendedGDBusPropertyInfo *info;
  GVariant *ret;
  ret = NULL;
  info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_print_interface_info.parent_struct, property_name);
  g_assert (info != NULL);
  pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
  if (pspec == NULL)
    {
      g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
    }
  else
    {
      g_value_init (&value, pspec->value_type);
      g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value);
      ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature));
      g_value_unset (&value);
    }
  return ret;
}

static gboolean
_xdp_impl_print_skeleton_handle_set_property (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name G_GNUC_UNUSED,
  const gchar *property_name,
  GVariant *variant,
  GError **error,
  gpointer user_data)
{
  XdpImplPrintSkeleton *skeleton = XDP_IMPL_PRINT_SKELETON (user_data);
  GValue value = G_VALUE_INIT;
  GParamSpec *pspec;
  _ExtendedGDBusPropertyInfo *info;
  gboolean ret;
  ret = FALSE;
  info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_print_interface_info.parent_struct, property_name);
  g_assert (info != NULL);
  pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
  if (pspec == NULL)
    {
      g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
    }
  else
    {
      if (info->use_gvariant)
        g_value_set_variant (&value, variant);
      else
        g_dbus_gvariant_to_gvalue (variant, &value);
      g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value);
      g_value_unset (&value);
      ret = TRUE;
    }
  return ret;
}

static const GDBusInterfaceVTable _xdp_impl_print_skeleton_vtable =
{
  _xdp_impl_print_skeleton_handle_method_call,
  _xdp_impl_print_skeleton_handle_get_property,
  _xdp_impl_print_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
xdp_impl_print_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return xdp_impl_print_interface_info ();
}

static GDBusInterfaceVTable *
xdp_impl_print_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_xdp_impl_print_skeleton_vtable;
}

static GVariant *
xdp_impl_print_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  XdpImplPrintSkeleton *skeleton = XDP_IMPL_PRINT_SKELETON (_skeleton);

  GVariantBuilder builder;
  guint n;
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_84
  g_variant_builder_init_static (&builder, G_VARIANT_TYPE ("a{sv}"));
#else
  g_variant_builder_init(&builder, G_VARIANT_TYPE ("a{sv}"));
#endif
  if (_xdp_impl_print_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _xdp_impl_print_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _xdp_impl_print_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _xdp_impl_print_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.impl.portal.Print", info->name, NULL, skeleton);
          if (value != NULL)
            {
              g_variant_take_ref (value);
              g_variant_builder_add (&builder, "{sv}", info->name, value);
              g_variant_unref (value);
            }
        }
    }
out:
  return g_variant_builder_end (&builder);
}

static void
xdp_impl_print_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton G_GNUC_UNUSED)
{
}

static void xdp_impl_print_skeleton_iface_init (XdpImplPrintIface *iface);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpImplPrintSkeleton, xdp_impl_print_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (XdpImplPrintSkeleton)
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_PRINT, xdp_impl_print_skeleton_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpImplPrintSkeleton, xdp_impl_print_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_PRINT, xdp_impl_print_skeleton_iface_init))

#endif
static void
xdp_impl_print_skeleton_finalize (GObject *object)
{
  XdpImplPrintSkeleton *skeleton = XDP_IMPL_PRINT_SKELETON (object);
  g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  /* coverity[missing_lock : SUPPRESS] */
  g_clear_pointer (&skeleton->priv->changed_properties_idle_source, g_source_destroy);
#else
  if (skeleton->priv->changed_properties_idle_source != NULL)
    g_source_destroy (skeleton->priv->changed_properties_idle_source);
skeleton->priv->changed_properties_idle_source = NULL;
#endif
  g_main_context_unref (skeleton->priv->context);
  g_mutex_clear (&skeleton->priv->lock);
  G_OBJECT_CLASS (xdp_impl_print_skeleton_parent_class)->finalize (object);
}

static void
xdp_impl_print_skeleton_init (XdpImplPrintSkeleton *skeleton)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  skeleton->priv = xdp_impl_print_skeleton_get_instance_private (skeleton);
#else
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, XDP_IMPL_TYPE_PRINT_SKELETON, XdpImplPrintSkeletonPrivate);
#endif

  g_mutex_init (&skeleton->priv->lock);
  skeleton->priv->context = g_main_context_ref_thread_default ();
}

static void
xdp_impl_print_skeleton_class_init (XdpImplPrintSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize = xdp_impl_print_skeleton_finalize;

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = xdp_impl_print_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = xdp_impl_print_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = xdp_impl_print_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = xdp_impl_print_skeleton_dbus_interface_get_vtable;

#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
  g_type_class_add_private (klass, sizeof (XdpImplPrintSkeletonPrivate));
#endif
}

static void
xdp_impl_print_skeleton_iface_init (XdpImplPrintIface *iface G_GNUC_UNUSED)
{
}

/**
 * xdp_impl_print_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-Print.top_of_page">org.freedesktop.impl.portal.Print</link>.
 *
 * Returns: (transfer full) (type XdpImplPrintSkeleton): The skeleton object.
 */
XdpImplPrint *
xdp_impl_print_skeleton_new (void)
{
  return XDP_IMPL_PRINT (g_object_new (XDP_IMPL_TYPE_PRINT_SKELETON, NULL));
}

/* ------------------------------------------------------------------------
 * Code for interface org.freedesktop.impl.portal.RemoteDesktop
 * ------------------------------------------------------------------------
 */

/**
 * SECTION:XdpImplRemoteDesktop
 * @title: XdpImplRemoteDesktop
 * @short_description: Generated C code for the org.freedesktop.impl.portal.RemoteDesktop D-Bus interface
 *
 * This section contains code for working with the <link linkend="gdbus-interface-org-freedesktop-impl-portal-RemoteDesktop.top_of_page">org.freedesktop.impl.portal.RemoteDesktop</link> D-Bus interface in C.
 */

/* ---- Introspection data for org.freedesktop.impl.portal.RemoteDesktop ---- */

static const _ExtendedGDBusArgInfo _xdp_impl_remote_desktop_method_info_create_session_IN_ARG_handle =
{
  {
    -1,
    (gchar *) "handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_remote_desktop_method_info_create_session_IN_ARG_session_handle =
{
  {
    -1,
    (gchar *) "session_handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_remote_desktop_method_info_create_session_IN_ARG_app_id =
{
  {
    -1,
    (gchar *) "app_id",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_remote_desktop_method_info_create_session_IN_ARG_options =
{
  {
    -1,
    (gchar *) "options",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_remote_desktop_method_info_create_session_IN_ARG_pointers[] =
{
  &_xdp_impl_remote_desktop_method_info_create_session_IN_ARG_handle.parent_struct,
  &_xdp_impl_remote_desktop_method_info_create_session_IN_ARG_session_handle.parent_struct,
  &_xdp_impl_remote_desktop_method_info_create_session_IN_ARG_app_id.parent_struct,
  &_xdp_impl_remote_desktop_method_info_create_session_IN_ARG_options.parent_struct,
  NULL
};

static const _ExtendedGDBusArgInfo _xdp_impl_remote_desktop_method_info_create_session_OUT_ARG_response =
{
  {
    -1,
    (gchar *) "response",
    (gchar *) "u",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_remote_desktop_method_info_create_session_OUT_ARG_results =
{
  {
    -1,
    (gchar *) "results",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_remote_desktop_method_info_create_session_OUT_ARG_pointers[] =
{
  &_xdp_impl_remote_desktop_method_info_create_session_OUT_ARG_response.parent_struct,
  &_xdp_impl_remote_desktop_method_info_create_session_OUT_ARG_results.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_remote_desktop_method_create_session_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.In3",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_remote_desktop_method_create_session_annotation_info_1 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.Out1",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo * const _xdp_impl_remote_desktop_method_create_session_annotation_info_pointers[] =
{
  &_xdp_impl_remote_desktop_method_create_session_annotation_info_0,
  &_xdp_impl_remote_desktop_method_create_session_annotation_info_1,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_impl_remote_desktop_method_info_create_session =
{
  {
    -1,
    (gchar *) "CreateSession",
    (GDBusArgInfo **) &_xdp_impl_remote_desktop_method_info_create_session_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_impl_remote_desktop_method_info_create_session_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_impl_remote_desktop_method_create_session_annotation_info_pointers
  },
  "handle-create-session",
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_remote_desktop_method_info_select_devices_IN_ARG_handle =
{
  {
    -1,
    (gchar *) "handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_remote_desktop_method_info_select_devices_IN_ARG_session_handle =
{
  {
    -1,
    (gchar *) "session_handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_remote_desktop_method_info_select_devices_IN_ARG_app_id =
{
  {
    -1,
    (gchar *) "app_id",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_remote_desktop_method_info_select_devices_IN_ARG_options =
{
  {
    -1,
    (gchar *) "options",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_remote_desktop_method_info_select_devices_IN_ARG_pointers[] =
{
  &_xdp_impl_remote_desktop_method_info_select_devices_IN_ARG_handle.parent_struct,
  &_xdp_impl_remote_desktop_method_info_select_devices_IN_ARG_session_handle.parent_struct,
  &_xdp_impl_remote_desktop_method_info_select_devices_IN_ARG_app_id.parent_struct,
  &_xdp_impl_remote_desktop_method_info_select_devices_IN_ARG_options.parent_struct,
  NULL
};

static const _ExtendedGDBusArgInfo _xdp_impl_remote_desktop_method_info_select_devices_OUT_ARG_response =
{
  {
    -1,
    (gchar *) "response",
    (gchar *) "u",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_remote_desktop_method_info_select_devices_OUT_ARG_results =
{
  {
    -1,
    (gchar *) "results",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_remote_desktop_method_info_select_devices_OUT_ARG_pointers[] =
{
  &_xdp_impl_remote_desktop_method_info_select_devices_OUT_ARG_response.parent_struct,
  &_xdp_impl_remote_desktop_method_info_select_devices_OUT_ARG_results.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_remote_desktop_method_select_devices_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.In3",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_remote_desktop_method_select_devices_annotation_info_1 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.Out1",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo * const _xdp_impl_remote_desktop_method_select_devices_annotation_info_pointers[] =
{
  &_xdp_impl_remote_desktop_method_select_devices_annotation_info_0,
  &_xdp_impl_remote_desktop_method_select_devices_annotation_info_1,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_impl_remote_desktop_method_info_select_devices =
{
  {
    -1,
    (gchar *) "SelectDevices",
    (GDBusArgInfo **) &_xdp_impl_remote_desktop_method_info_select_devices_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_impl_remote_desktop_method_info_select_devices_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_impl_remote_desktop_method_select_devices_annotation_info_pointers
  },
  "handle-select-devices",
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_remote_desktop_method_info_start_IN_ARG_handle =
{
  {
    -1,
    (gchar *) "handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_remote_desktop_method_info_start_IN_ARG_session_handle =
{
  {
    -1,
    (gchar *) "session_handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_remote_desktop_method_info_start_IN_ARG_app_id =
{
  {
    -1,
    (gchar *) "app_id",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_remote_desktop_method_info_start_IN_ARG_parent_window =
{
  {
    -1,
    (gchar *) "parent_window",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_remote_desktop_method_info_start_IN_ARG_options =
{
  {
    -1,
    (gchar *) "options",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_remote_desktop_method_info_start_IN_ARG_pointers[] =
{
  &_xdp_impl_remote_desktop_method_info_start_IN_ARG_handle.parent_struct,
  &_xdp_impl_remote_desktop_method_info_start_IN_ARG_session_handle.parent_struct,
  &_xdp_impl_remote_desktop_method_info_start_IN_ARG_app_id.parent_struct,
  &_xdp_impl_remote_desktop_method_info_start_IN_ARG_parent_window.parent_struct,
  &_xdp_impl_remote_desktop_method_info_start_IN_ARG_options.parent_struct,
  NULL
};

static const _ExtendedGDBusArgInfo _xdp_impl_remote_desktop_method_info_start_OUT_ARG_response =
{
  {
    -1,
    (gchar *) "response",
    (gchar *) "u",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_remote_desktop_method_info_start_OUT_ARG_results =
{
  {
    -1,
    (gchar *) "results",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_remote_desktop_method_info_start_OUT_ARG_pointers[] =
{
  &_xdp_impl_remote_desktop_method_info_start_OUT_ARG_response.parent_struct,
  &_xdp_impl_remote_desktop_method_info_start_OUT_ARG_results.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_remote_desktop_method_start_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.In4",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_remote_desktop_method_start_annotation_info_1 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.Out1",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo * const _xdp_impl_remote_desktop_method_start_annotation_info_pointers[] =
{
  &_xdp_impl_remote_desktop_method_start_annotation_info_0,
  &_xdp_impl_remote_desktop_method_start_annotation_info_1,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_impl_remote_desktop_method_info_start =
{
  {
    -1,
    (gchar *) "Start",
    (GDBusArgInfo **) &_xdp_impl_remote_desktop_method_info_start_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_impl_remote_desktop_method_info_start_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_impl_remote_desktop_method_start_annotation_info_pointers
  },
  "handle-start",
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_remote_desktop_method_info_notify_pointer_motion_IN_ARG_session_handle =
{
  {
    -1,
    (gchar *) "session_handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_remote_desktop_method_info_notify_pointer_motion_IN_ARG_options =
{
  {
    -1,
    (gchar *) "options",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_remote_desktop_method_info_notify_pointer_motion_IN_ARG_dx =
{
  {
    -1,
    (gchar *) "dx",
    (gchar *) "d",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_remote_desktop_method_info_notify_pointer_motion_IN_ARG_dy =
{
  {
    -1,
    (gchar *) "dy",
    (gchar *) "d",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_remote_desktop_method_info_notify_pointer_motion_IN_ARG_pointers[] =
{
  &_xdp_impl_remote_desktop_method_info_notify_pointer_motion_IN_ARG_session_handle.parent_struct,
  &_xdp_impl_remote_desktop_method_info_notify_pointer_motion_IN_ARG_options.parent_struct,
  &_xdp_impl_remote_desktop_method_info_notify_pointer_motion_IN_ARG_dx.parent_struct,
  &_xdp_impl_remote_desktop_method_info_notify_pointer_motion_IN_ARG_dy.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_remote_desktop_method_notify_pointer_motion_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.In1",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo * const _xdp_impl_remote_desktop_method_notify_pointer_motion_annotation_info_pointers[] =
{
  &_xdp_impl_remote_desktop_method_notify_pointer_motion_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_impl_remote_desktop_method_info_notify_pointer_motion =
{
  {
    -1,
    (gchar *) "NotifyPointerMotion",
    (GDBusArgInfo **) &_xdp_impl_remote_desktop_method_info_notify_pointer_motion_IN_ARG_pointers,
    NULL,
    (GDBusAnnotationInfo **) &_xdp_impl_remote_desktop_method_notify_pointer_motion_annotation_info_pointers
  },
  "handle-notify-pointer-motion",
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_remote_desktop_method_info_notify_pointer_motion_absolute_IN_ARG_session_handle =
{
  {
    -1,
    (gchar *) "session_handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_remote_desktop_method_info_notify_pointer_motion_absolute_IN_ARG_options =
{
  {
    -1,
    (gchar *) "options",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_remote_desktop_method_info_notify_pointer_motion_absolute_IN_ARG_stream =
{
  {
    -1,
    (gchar *) "stream",
    (gchar *) "u",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_remote_desktop_method_info_notify_pointer_motion_absolute_IN_ARG_x =
{
  {
    -1,
    (gchar *) "x",
    (gchar *) "d",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_remote_desktop_method_info_notify_pointer_motion_absolute_IN_ARG_y =
{
  {
    -1,
    (gchar *) "y",
    (gchar *) "d",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_remote_desktop_method_info_notify_pointer_motion_absolute_IN_ARG_pointers[] =
{
  &_xdp_impl_remote_desktop_method_info_notify_pointer_motion_absolute_IN_ARG_session_handle.parent_struct,
  &_xdp_impl_remote_desktop_method_info_notify_pointer_motion_absolute_IN_ARG_options.parent_struct,
  &_xdp_impl_remote_desktop_method_info_notify_pointer_motion_absolute_IN_ARG_stream.parent_struct,
  &_xdp_impl_remote_desktop_method_info_notify_pointer_motion_absolute_IN_ARG_x.parent_struct,
  &_xdp_impl_remote_desktop_method_info_notify_pointer_motion_absolute_IN_ARG_y.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_remote_desktop_method_notify_pointer_motion_absolute_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.In1",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo * const _xdp_impl_remote_desktop_method_notify_pointer_motion_absolute_annotation_info_pointers[] =
{
  &_xdp_impl_remote_desktop_method_notify_pointer_motion_absolute_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_impl_remote_desktop_method_info_notify_pointer_motion_absolute =
{
  {
    -1,
    (gchar *) "NotifyPointerMotionAbsolute",
    (GDBusArgInfo **) &_xdp_impl_remote_desktop_method_info_notify_pointer_motion_absolute_IN_ARG_pointers,
    NULL,
    (GDBusAnnotationInfo **) &_xdp_impl_remote_desktop_method_notify_pointer_motion_absolute_annotation_info_pointers
  },
  "handle-notify-pointer-motion-absolute",
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_remote_desktop_method_info_notify_pointer_button_IN_ARG_session_handle =
{
  {
    -1,
    (gchar *) "session_handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_remote_desktop_method_info_notify_pointer_button_IN_ARG_options =
{
  {
    -1,
    (gchar *) "options",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_remote_desktop_method_info_notify_pointer_button_IN_ARG_button =
{
  {
    -1,
    (gchar *) "button",
    (gchar *) "i",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_remote_desktop_method_info_notify_pointer_button_IN_ARG_state =
{
  {
    -1,
    (gchar *) "state",
    (gchar *) "u",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_remote_desktop_method_info_notify_pointer_button_IN_ARG_pointers[] =
{
  &_xdp_impl_remote_desktop_method_info_notify_pointer_button_IN_ARG_session_handle.parent_struct,
  &_xdp_impl_remote_desktop_method_info_notify_pointer_button_IN_ARG_options.parent_struct,
  &_xdp_impl_remote_desktop_method_info_notify_pointer_button_IN_ARG_button.parent_struct,
  &_xdp_impl_remote_desktop_method_info_notify_pointer_button_IN_ARG_state.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_remote_desktop_method_notify_pointer_button_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.In1",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo * const _xdp_impl_remote_desktop_method_notify_pointer_button_annotation_info_pointers[] =
{
  &_xdp_impl_remote_desktop_method_notify_pointer_button_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_impl_remote_desktop_method_info_notify_pointer_button =
{
  {
    -1,
    (gchar *) "NotifyPointerButton",
    (GDBusArgInfo **) &_xdp_impl_remote_desktop_method_info_notify_pointer_button_IN_ARG_pointers,
    NULL,
    (GDBusAnnotationInfo **) &_xdp_impl_remote_desktop_method_notify_pointer_button_annotation_info_pointers
  },
  "handle-notify-pointer-button",
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_remote_desktop_method_info_notify_pointer_axis_IN_ARG_session_handle =
{
  {
    -1,
    (gchar *) "session_handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_remote_desktop_method_info_notify_pointer_axis_IN_ARG_options =
{
  {
    -1,
    (gchar *) "options",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_remote_desktop_method_info_notify_pointer_axis_IN_ARG_dx =
{
  {
    -1,
    (gchar *) "dx",
    (gchar *) "d",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_remote_desktop_method_info_notify_pointer_axis_IN_ARG_dy =
{
  {
    -1,
    (gchar *) "dy",
    (gchar *) "d",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_remote_desktop_method_info_notify_pointer_axis_IN_ARG_pointers[] =
{
  &_xdp_impl_remote_desktop_method_info_notify_pointer_axis_IN_ARG_session_handle.parent_struct,
  &_xdp_impl_remote_desktop_method_info_notify_pointer_axis_IN_ARG_options.parent_struct,
  &_xdp_impl_remote_desktop_method_info_notify_pointer_axis_IN_ARG_dx.parent_struct,
  &_xdp_impl_remote_desktop_method_info_notify_pointer_axis_IN_ARG_dy.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_remote_desktop_method_notify_pointer_axis_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.In1",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo * const _xdp_impl_remote_desktop_method_notify_pointer_axis_annotation_info_pointers[] =
{
  &_xdp_impl_remote_desktop_method_notify_pointer_axis_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_impl_remote_desktop_method_info_notify_pointer_axis =
{
  {
    -1,
    (gchar *) "NotifyPointerAxis",
    (GDBusArgInfo **) &_xdp_impl_remote_desktop_method_info_notify_pointer_axis_IN_ARG_pointers,
    NULL,
    (GDBusAnnotationInfo **) &_xdp_impl_remote_desktop_method_notify_pointer_axis_annotation_info_pointers
  },
  "handle-notify-pointer-axis",
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_remote_desktop_method_info_notify_pointer_axis_discrete_IN_ARG_session_handle =
{
  {
    -1,
    (gchar *) "session_handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_remote_desktop_method_info_notify_pointer_axis_discrete_IN_ARG_options =
{
  {
    -1,
    (gchar *) "options",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_remote_desktop_method_info_notify_pointer_axis_discrete_IN_ARG_axis =
{
  {
    -1,
    (gchar *) "axis",
    (gchar *) "u",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_remote_desktop_method_info_notify_pointer_axis_discrete_IN_ARG_steps =
{
  {
    -1,
    (gchar *) "steps",
    (gchar *) "i",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_remote_desktop_method_info_notify_pointer_axis_discrete_IN_ARG_pointers[] =
{
  &_xdp_impl_remote_desktop_method_info_notify_pointer_axis_discrete_IN_ARG_session_handle.parent_struct,
  &_xdp_impl_remote_desktop_method_info_notify_pointer_axis_discrete_IN_ARG_options.parent_struct,
  &_xdp_impl_remote_desktop_method_info_notify_pointer_axis_discrete_IN_ARG_axis.parent_struct,
  &_xdp_impl_remote_desktop_method_info_notify_pointer_axis_discrete_IN_ARG_steps.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_remote_desktop_method_notify_pointer_axis_discrete_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.In1",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo * const _xdp_impl_remote_desktop_method_notify_pointer_axis_discrete_annotation_info_pointers[] =
{
  &_xdp_impl_remote_desktop_method_notify_pointer_axis_discrete_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_impl_remote_desktop_method_info_notify_pointer_axis_discrete =
{
  {
    -1,
    (gchar *) "NotifyPointerAxisDiscrete",
    (GDBusArgInfo **) &_xdp_impl_remote_desktop_method_info_notify_pointer_axis_discrete_IN_ARG_pointers,
    NULL,
    (GDBusAnnotationInfo **) &_xdp_impl_remote_desktop_method_notify_pointer_axis_discrete_annotation_info_pointers
  },
  "handle-notify-pointer-axis-discrete",
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_remote_desktop_method_info_notify_keyboard_keycode_IN_ARG_session_handle =
{
  {
    -1,
    (gchar *) "session_handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_remote_desktop_method_info_notify_keyboard_keycode_IN_ARG_options =
{
  {
    -1,
    (gchar *) "options",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_remote_desktop_method_info_notify_keyboard_keycode_IN_ARG_keycode =
{
  {
    -1,
    (gchar *) "keycode",
    (gchar *) "i",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_remote_desktop_method_info_notify_keyboard_keycode_IN_ARG_state =
{
  {
    -1,
    (gchar *) "state",
    (gchar *) "u",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_remote_desktop_method_info_notify_keyboard_keycode_IN_ARG_pointers[] =
{
  &_xdp_impl_remote_desktop_method_info_notify_keyboard_keycode_IN_ARG_session_handle.parent_struct,
  &_xdp_impl_remote_desktop_method_info_notify_keyboard_keycode_IN_ARG_options.parent_struct,
  &_xdp_impl_remote_desktop_method_info_notify_keyboard_keycode_IN_ARG_keycode.parent_struct,
  &_xdp_impl_remote_desktop_method_info_notify_keyboard_keycode_IN_ARG_state.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_remote_desktop_method_notify_keyboard_keycode_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.In1",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo * const _xdp_impl_remote_desktop_method_notify_keyboard_keycode_annotation_info_pointers[] =
{
  &_xdp_impl_remote_desktop_method_notify_keyboard_keycode_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_impl_remote_desktop_method_info_notify_keyboard_keycode =
{
  {
    -1,
    (gchar *) "NotifyKeyboardKeycode",
    (GDBusArgInfo **) &_xdp_impl_remote_desktop_method_info_notify_keyboard_keycode_IN_ARG_pointers,
    NULL,
    (GDBusAnnotationInfo **) &_xdp_impl_remote_desktop_method_notify_keyboard_keycode_annotation_info_pointers
  },
  "handle-notify-keyboard-keycode",
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_remote_desktop_method_info_notify_keyboard_keysym_IN_ARG_session_handle =
{
  {
    -1,
    (gchar *) "session_handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_remote_desktop_method_info_notify_keyboard_keysym_IN_ARG_options =
{
  {
    -1,
    (gchar *) "options",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_remote_desktop_method_info_notify_keyboard_keysym_IN_ARG_keysym =
{
  {
    -1,
    (gchar *) "keysym",
    (gchar *) "i",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_remote_desktop_method_info_notify_keyboard_keysym_IN_ARG_state =
{
  {
    -1,
    (gchar *) "state",
    (gchar *) "u",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_remote_desktop_method_info_notify_keyboard_keysym_IN_ARG_pointers[] =
{
  &_xdp_impl_remote_desktop_method_info_notify_keyboard_keysym_IN_ARG_session_handle.parent_struct,
  &_xdp_impl_remote_desktop_method_info_notify_keyboard_keysym_IN_ARG_options.parent_struct,
  &_xdp_impl_remote_desktop_method_info_notify_keyboard_keysym_IN_ARG_keysym.parent_struct,
  &_xdp_impl_remote_desktop_method_info_notify_keyboard_keysym_IN_ARG_state.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_remote_desktop_method_notify_keyboard_keysym_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.In1",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo * const _xdp_impl_remote_desktop_method_notify_keyboard_keysym_annotation_info_pointers[] =
{
  &_xdp_impl_remote_desktop_method_notify_keyboard_keysym_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_impl_remote_desktop_method_info_notify_keyboard_keysym =
{
  {
    -1,
    (gchar *) "NotifyKeyboardKeysym",
    (GDBusArgInfo **) &_xdp_impl_remote_desktop_method_info_notify_keyboard_keysym_IN_ARG_pointers,
    NULL,
    (GDBusAnnotationInfo **) &_xdp_impl_remote_desktop_method_notify_keyboard_keysym_annotation_info_pointers
  },
  "handle-notify-keyboard-keysym",
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_remote_desktop_method_info_notify_touch_down_IN_ARG_session_handle =
{
  {
    -1,
    (gchar *) "session_handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_remote_desktop_method_info_notify_touch_down_IN_ARG_options =
{
  {
    -1,
    (gchar *) "options",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_remote_desktop_method_info_notify_touch_down_IN_ARG_stream =
{
  {
    -1,
    (gchar *) "stream",
    (gchar *) "u",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_remote_desktop_method_info_notify_touch_down_IN_ARG_slot =
{
  {
    -1,
    (gchar *) "slot",
    (gchar *) "u",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_remote_desktop_method_info_notify_touch_down_IN_ARG_x =
{
  {
    -1,
    (gchar *) "x",
    (gchar *) "d",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_remote_desktop_method_info_notify_touch_down_IN_ARG_y =
{
  {
    -1,
    (gchar *) "y",
    (gchar *) "d",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_remote_desktop_method_info_notify_touch_down_IN_ARG_pointers[] =
{
  &_xdp_impl_remote_desktop_method_info_notify_touch_down_IN_ARG_session_handle.parent_struct,
  &_xdp_impl_remote_desktop_method_info_notify_touch_down_IN_ARG_options.parent_struct,
  &_xdp_impl_remote_desktop_method_info_notify_touch_down_IN_ARG_stream.parent_struct,
  &_xdp_impl_remote_desktop_method_info_notify_touch_down_IN_ARG_slot.parent_struct,
  &_xdp_impl_remote_desktop_method_info_notify_touch_down_IN_ARG_x.parent_struct,
  &_xdp_impl_remote_desktop_method_info_notify_touch_down_IN_ARG_y.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_remote_desktop_method_notify_touch_down_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.In1",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo * const _xdp_impl_remote_desktop_method_notify_touch_down_annotation_info_pointers[] =
{
  &_xdp_impl_remote_desktop_method_notify_touch_down_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_impl_remote_desktop_method_info_notify_touch_down =
{
  {
    -1,
    (gchar *) "NotifyTouchDown",
    (GDBusArgInfo **) &_xdp_impl_remote_desktop_method_info_notify_touch_down_IN_ARG_pointers,
    NULL,
    (GDBusAnnotationInfo **) &_xdp_impl_remote_desktop_method_notify_touch_down_annotation_info_pointers
  },
  "handle-notify-touch-down",
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_remote_desktop_method_info_notify_touch_motion_IN_ARG_session_handle =
{
  {
    -1,
    (gchar *) "session_handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_remote_desktop_method_info_notify_touch_motion_IN_ARG_options =
{
  {
    -1,
    (gchar *) "options",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_remote_desktop_method_info_notify_touch_motion_IN_ARG_stream =
{
  {
    -1,
    (gchar *) "stream",
    (gchar *) "u",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_remote_desktop_method_info_notify_touch_motion_IN_ARG_slot =
{
  {
    -1,
    (gchar *) "slot",
    (gchar *) "u",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_remote_desktop_method_info_notify_touch_motion_IN_ARG_x =
{
  {
    -1,
    (gchar *) "x",
    (gchar *) "d",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_remote_desktop_method_info_notify_touch_motion_IN_ARG_y =
{
  {
    -1,
    (gchar *) "y",
    (gchar *) "d",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_remote_desktop_method_info_notify_touch_motion_IN_ARG_pointers[] =
{
  &_xdp_impl_remote_desktop_method_info_notify_touch_motion_IN_ARG_session_handle.parent_struct,
  &_xdp_impl_remote_desktop_method_info_notify_touch_motion_IN_ARG_options.parent_struct,
  &_xdp_impl_remote_desktop_method_info_notify_touch_motion_IN_ARG_stream.parent_struct,
  &_xdp_impl_remote_desktop_method_info_notify_touch_motion_IN_ARG_slot.parent_struct,
  &_xdp_impl_remote_desktop_method_info_notify_touch_motion_IN_ARG_x.parent_struct,
  &_xdp_impl_remote_desktop_method_info_notify_touch_motion_IN_ARG_y.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_remote_desktop_method_notify_touch_motion_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.In1",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo * const _xdp_impl_remote_desktop_method_notify_touch_motion_annotation_info_pointers[] =
{
  &_xdp_impl_remote_desktop_method_notify_touch_motion_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_impl_remote_desktop_method_info_notify_touch_motion =
{
  {
    -1,
    (gchar *) "NotifyTouchMotion",
    (GDBusArgInfo **) &_xdp_impl_remote_desktop_method_info_notify_touch_motion_IN_ARG_pointers,
    NULL,
    (GDBusAnnotationInfo **) &_xdp_impl_remote_desktop_method_notify_touch_motion_annotation_info_pointers
  },
  "handle-notify-touch-motion",
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_remote_desktop_method_info_notify_touch_up_IN_ARG_session_handle =
{
  {
    -1,
    (gchar *) "session_handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_remote_desktop_method_info_notify_touch_up_IN_ARG_options =
{
  {
    -1,
    (gchar *) "options",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_remote_desktop_method_info_notify_touch_up_IN_ARG_slot =
{
  {
    -1,
    (gchar *) "slot",
    (gchar *) "u",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_remote_desktop_method_info_notify_touch_up_IN_ARG_pointers[] =
{
  &_xdp_impl_remote_desktop_method_info_notify_touch_up_IN_ARG_session_handle.parent_struct,
  &_xdp_impl_remote_desktop_method_info_notify_touch_up_IN_ARG_options.parent_struct,
  &_xdp_impl_remote_desktop_method_info_notify_touch_up_IN_ARG_slot.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_remote_desktop_method_notify_touch_up_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.In1",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo * const _xdp_impl_remote_desktop_method_notify_touch_up_annotation_info_pointers[] =
{
  &_xdp_impl_remote_desktop_method_notify_touch_up_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_impl_remote_desktop_method_info_notify_touch_up =
{
  {
    -1,
    (gchar *) "NotifyTouchUp",
    (GDBusArgInfo **) &_xdp_impl_remote_desktop_method_info_notify_touch_up_IN_ARG_pointers,
    NULL,
    (GDBusAnnotationInfo **) &_xdp_impl_remote_desktop_method_notify_touch_up_annotation_info_pointers
  },
  "handle-notify-touch-up",
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_remote_desktop_method_info_connect_to_eis_IN_ARG_session_handle =
{
  {
    -1,
    (gchar *) "session_handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_remote_desktop_method_info_connect_to_eis_IN_ARG_app_id =
{
  {
    -1,
    (gchar *) "app_id",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_remote_desktop_method_info_connect_to_eis_IN_ARG_options =
{
  {
    -1,
    (gchar *) "options",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_remote_desktop_method_info_connect_to_eis_IN_ARG_pointers[] =
{
  &_xdp_impl_remote_desktop_method_info_connect_to_eis_IN_ARG_session_handle.parent_struct,
  &_xdp_impl_remote_desktop_method_info_connect_to_eis_IN_ARG_app_id.parent_struct,
  &_xdp_impl_remote_desktop_method_info_connect_to_eis_IN_ARG_options.parent_struct,
  NULL
};

static const _ExtendedGDBusArgInfo _xdp_impl_remote_desktop_method_info_connect_to_eis_OUT_ARG_fd =
{
  {
    -1,
    (gchar *) "fd",
    (gchar *) "h",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_remote_desktop_method_info_connect_to_eis_OUT_ARG_pointers[] =
{
  &_xdp_impl_remote_desktop_method_info_connect_to_eis_OUT_ARG_fd.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_remote_desktop_method_connect_to_eis_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.In2",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo * const _xdp_impl_remote_desktop_method_connect_to_eis_annotation_info_pointers[] =
{
  &_xdp_impl_remote_desktop_method_connect_to_eis_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_impl_remote_desktop_method_info_connect_to_eis =
{
  {
    -1,
    (gchar *) "ConnectToEIS",
    (GDBusArgInfo **) &_xdp_impl_remote_desktop_method_info_connect_to_eis_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_impl_remote_desktop_method_info_connect_to_eis_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_impl_remote_desktop_method_connect_to_eis_annotation_info_pointers
  },
  "handle-connect-to-eis",
  TRUE
};

static const GDBusMethodInfo * const _xdp_impl_remote_desktop_method_info_pointers[] =
{
  &_xdp_impl_remote_desktop_method_info_create_session.parent_struct,
  &_xdp_impl_remote_desktop_method_info_select_devices.parent_struct,
  &_xdp_impl_remote_desktop_method_info_start.parent_struct,
  &_xdp_impl_remote_desktop_method_info_notify_pointer_motion.parent_struct,
  &_xdp_impl_remote_desktop_method_info_notify_pointer_motion_absolute.parent_struct,
  &_xdp_impl_remote_desktop_method_info_notify_pointer_button.parent_struct,
  &_xdp_impl_remote_desktop_method_info_notify_pointer_axis.parent_struct,
  &_xdp_impl_remote_desktop_method_info_notify_pointer_axis_discrete.parent_struct,
  &_xdp_impl_remote_desktop_method_info_notify_keyboard_keycode.parent_struct,
  &_xdp_impl_remote_desktop_method_info_notify_keyboard_keysym.parent_struct,
  &_xdp_impl_remote_desktop_method_info_notify_touch_down.parent_struct,
  &_xdp_impl_remote_desktop_method_info_notify_touch_motion.parent_struct,
  &_xdp_impl_remote_desktop_method_info_notify_touch_up.parent_struct,
  &_xdp_impl_remote_desktop_method_info_connect_to_eis.parent_struct,
  NULL
};

static const _ExtendedGDBusPropertyInfo _xdp_impl_remote_desktop_property_info_available_device_types =
{
  {
    -1,
    (gchar *) "AvailableDeviceTypes",
    (gchar *) "u",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "available-device-types",
  FALSE,
  TRUE
};

static const _ExtendedGDBusPropertyInfo _xdp_impl_remote_desktop_property_info_version =
{
  {
    -1,
    (gchar *) "version",
    (gchar *) "u",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "version",
  FALSE,
  TRUE
};

static const GDBusPropertyInfo * const _xdp_impl_remote_desktop_property_info_pointers[] =
{
  &_xdp_impl_remote_desktop_property_info_available_device_types.parent_struct,
  &_xdp_impl_remote_desktop_property_info_version.parent_struct,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _xdp_impl_remote_desktop_interface_info =
{
  {
    -1,
    (gchar *) "org.freedesktop.impl.portal.RemoteDesktop",
    (GDBusMethodInfo **) &_xdp_impl_remote_desktop_method_info_pointers,
    NULL,
    (GDBusPropertyInfo **) &_xdp_impl_remote_desktop_property_info_pointers,
    NULL
  },
  "remote-desktop",
};


/**
 * xdp_impl_remote_desktop_interface_info:
 *
 * Gets a machine-readable description of the <link linkend="gdbus-interface-org-freedesktop-impl-portal-RemoteDesktop.top_of_page">org.freedesktop.impl.portal.RemoteDesktop</link> D-Bus interface.
 *
 * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
 */
GDBusInterfaceInfo *
xdp_impl_remote_desktop_interface_info (void)
{
  return (GDBusInterfaceInfo *) &_xdp_impl_remote_desktop_interface_info.parent_struct;
}

/**
 * xdp_impl_remote_desktop_override_properties:
 * @klass: The class structure for a #GObject derived class.
 * @property_id_begin: The property id to assign to the first overridden property.
 *
 * Overrides all #GObject properties in the #XdpImplRemoteDesktop interface for a concrete class.
 * The properties are overridden in the order they are defined.
 *
 * Returns: The last property id.
 */
guint
xdp_impl_remote_desktop_override_properties (GObjectClass *klass, guint property_id_begin)
{
  g_object_class_override_property (klass, property_id_begin++, "available-device-types");
  g_object_class_override_property (klass, property_id_begin++, "version");
  return property_id_begin - 1;
}


inline static void
xdp_impl_remote_desktop_method_marshal_create_session (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  _g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_STRING_STRING_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_impl_remote_desktop_method_marshal_select_devices (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  _g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_STRING_STRING_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_impl_remote_desktop_method_marshal_start (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  _g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_STRING_STRING_STRING_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_impl_remote_desktop_method_marshal_notify_pointer_motion (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  _g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_VARIANT_DOUBLE_DOUBLE (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_impl_remote_desktop_method_marshal_notify_pointer_motion_absolute (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  _g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_VARIANT_UINT_DOUBLE_DOUBLE (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_impl_remote_desktop_method_marshal_notify_pointer_button (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  _g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_VARIANT_INT_UINT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_impl_remote_desktop_method_marshal_notify_pointer_axis (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  _g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_VARIANT_DOUBLE_DOUBLE (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_impl_remote_desktop_method_marshal_notify_pointer_axis_discrete (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  _g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_VARIANT_UINT_INT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_impl_remote_desktop_method_marshal_notify_keyboard_keycode (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  _g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_VARIANT_INT_UINT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_impl_remote_desktop_method_marshal_notify_keyboard_keysym (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  _g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_VARIANT_INT_UINT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_impl_remote_desktop_method_marshal_notify_touch_down (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  _g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_VARIANT_UINT_UINT_DOUBLE_DOUBLE (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_impl_remote_desktop_method_marshal_notify_touch_motion (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  _g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_VARIANT_UINT_UINT_DOUBLE_DOUBLE (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_impl_remote_desktop_method_marshal_notify_touch_up (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  _g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_VARIANT_UINT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_impl_remote_desktop_method_marshal_connect_to_eis (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  _g_dbus_codegen_marshal_BOOLEAN__OBJECT_OBJECT_STRING_STRING_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}


/**
 * XdpImplRemoteDesktop:
 *
 * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-RemoteDesktop.top_of_page">org.freedesktop.impl.portal.RemoteDesktop</link>.
 */

/**
 * XdpImplRemoteDesktopIface:
 * @parent_iface: The parent interface.
 * @handle_connect_to_eis: Handler for the #XdpImplRemoteDesktop::handle-connect-to-eis signal.
 * @handle_create_session: Handler for the #XdpImplRemoteDesktop::handle-create-session signal.
 * @handle_notify_keyboard_keycode: Handler for the #XdpImplRemoteDesktop::handle-notify-keyboard-keycode signal.
 * @handle_notify_keyboard_keysym: Handler for the #XdpImplRemoteDesktop::handle-notify-keyboard-keysym signal.
 * @handle_notify_pointer_axis: Handler for the #XdpImplRemoteDesktop::handle-notify-pointer-axis signal.
 * @handle_notify_pointer_axis_discrete: Handler for the #XdpImplRemoteDesktop::handle-notify-pointer-axis-discrete signal.
 * @handle_notify_pointer_button: Handler for the #XdpImplRemoteDesktop::handle-notify-pointer-button signal.
 * @handle_notify_pointer_motion: Handler for the #XdpImplRemoteDesktop::handle-notify-pointer-motion signal.
 * @handle_notify_pointer_motion_absolute: Handler for the #XdpImplRemoteDesktop::handle-notify-pointer-motion-absolute signal.
 * @handle_notify_touch_down: Handler for the #XdpImplRemoteDesktop::handle-notify-touch-down signal.
 * @handle_notify_touch_motion: Handler for the #XdpImplRemoteDesktop::handle-notify-touch-motion signal.
 * @handle_notify_touch_up: Handler for the #XdpImplRemoteDesktop::handle-notify-touch-up signal.
 * @handle_select_devices: Handler for the #XdpImplRemoteDesktop::handle-select-devices signal.
 * @handle_start: Handler for the #XdpImplRemoteDesktop::handle-start signal.
 * @get_available_device_types: Getter for the #XdpImplRemoteDesktop:available-device-types property.
 * @get_version: Getter for the #XdpImplRemoteDesktop:version property.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-RemoteDesktop.top_of_page">org.freedesktop.impl.portal.RemoteDesktop</link>.
 */

typedef XdpImplRemoteDesktopIface XdpImplRemoteDesktopInterface;
G_DEFINE_INTERFACE (XdpImplRemoteDesktop, xdp_impl_remote_desktop, G_TYPE_OBJECT)

static void
xdp_impl_remote_desktop_default_init (XdpImplRemoteDesktopIface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * XdpImplRemoteDesktop::handle-create-session:
   * @object: A #XdpImplRemoteDesktop.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_handle: Argument passed by remote caller.
   * @arg_session_handle: Argument passed by remote caller.
   * @arg_app_id: Argument passed by remote caller.
   * @arg_options: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-impl-portal-RemoteDesktop.CreateSession">CreateSession()</link> 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 xdp_impl_remote_desktop_complete_create_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.
   *
   * 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.
   */
  g_signal_new ("handle-create-session",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpImplRemoteDesktopIface, handle_create_session),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_impl_remote_desktop_method_marshal_create_session,
    G_TYPE_BOOLEAN,
    5,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_VARIANT);

  /**
   * XdpImplRemoteDesktop::handle-select-devices:
   * @object: A #XdpImplRemoteDesktop.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_handle: Argument passed by remote caller.
   * @arg_session_handle: Argument passed by remote caller.
   * @arg_app_id: Argument passed by remote caller.
   * @arg_options: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-impl-portal-RemoteDesktop.SelectDevices">SelectDevices()</link> 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 xdp_impl_remote_desktop_complete_select_devices() 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.
   *
   * 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.
   */
  g_signal_new ("handle-select-devices",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpImplRemoteDesktopIface, handle_select_devices),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_impl_remote_desktop_method_marshal_select_devices,
    G_TYPE_BOOLEAN,
    5,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_VARIANT);

  /**
   * XdpImplRemoteDesktop::handle-start:
   * @object: A #XdpImplRemoteDesktop.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_handle: Argument passed by remote caller.
   * @arg_session_handle: Argument passed by remote caller.
   * @arg_app_id: Argument passed by remote caller.
   * @arg_parent_window: Argument passed by remote caller.
   * @arg_options: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-impl-portal-RemoteDesktop.Start">Start()</link> 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 xdp_impl_remote_desktop_complete_start() 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.
   *
   * 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.
   */
  g_signal_new ("handle-start",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpImplRemoteDesktopIface, handle_start),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_impl_remote_desktop_method_marshal_start,
    G_TYPE_BOOLEAN,
    6,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_VARIANT);

  /**
   * XdpImplRemoteDesktop::handle-notify-pointer-motion:
   * @object: A #XdpImplRemoteDesktop.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_session_handle: Argument passed by remote caller.
   * @arg_options: Argument passed by remote caller.
   * @arg_dx: Argument passed by remote caller.
   * @arg_dy: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-impl-portal-RemoteDesktop.NotifyPointerMotion">NotifyPointerMotion()</link> 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 xdp_impl_remote_desktop_complete_notify_pointer_motion() 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.
   *
   * 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.
   */
  g_signal_new ("handle-notify-pointer-motion",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpImplRemoteDesktopIface, handle_notify_pointer_motion),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_impl_remote_desktop_method_marshal_notify_pointer_motion,
    G_TYPE_BOOLEAN,
    5,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_VARIANT, G_TYPE_DOUBLE, G_TYPE_DOUBLE);

  /**
   * XdpImplRemoteDesktop::handle-notify-pointer-motion-absolute:
   * @object: A #XdpImplRemoteDesktop.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_session_handle: Argument passed by remote caller.
   * @arg_options: Argument passed by remote caller.
   * @arg_stream: Argument passed by remote caller.
   * @arg_x: Argument passed by remote caller.
   * @arg_y: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-impl-portal-RemoteDesktop.NotifyPointerMotionAbsolute">NotifyPointerMotionAbsolute()</link> 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 xdp_impl_remote_desktop_complete_notify_pointer_motion_absolute() 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.
   *
   * 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.
   */
  g_signal_new ("handle-notify-pointer-motion-absolute",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpImplRemoteDesktopIface, handle_notify_pointer_motion_absolute),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_impl_remote_desktop_method_marshal_notify_pointer_motion_absolute,
    G_TYPE_BOOLEAN,
    6,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_VARIANT, G_TYPE_UINT, G_TYPE_DOUBLE, G_TYPE_DOUBLE);

  /**
   * XdpImplRemoteDesktop::handle-notify-pointer-button:
   * @object: A #XdpImplRemoteDesktop.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_session_handle: Argument passed by remote caller.
   * @arg_options: Argument passed by remote caller.
   * @arg_button: Argument passed by remote caller.
   * @arg_state: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-impl-portal-RemoteDesktop.NotifyPointerButton">NotifyPointerButton()</link> 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 xdp_impl_remote_desktop_complete_notify_pointer_button() 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.
   *
   * 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.
   */
  g_signal_new ("handle-notify-pointer-button",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpImplRemoteDesktopIface, handle_notify_pointer_button),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_impl_remote_desktop_method_marshal_notify_pointer_button,
    G_TYPE_BOOLEAN,
    5,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_VARIANT, G_TYPE_INT, G_TYPE_UINT);

  /**
   * XdpImplRemoteDesktop::handle-notify-pointer-axis:
   * @object: A #XdpImplRemoteDesktop.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_session_handle: Argument passed by remote caller.
   * @arg_options: Argument passed by remote caller.
   * @arg_dx: Argument passed by remote caller.
   * @arg_dy: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-impl-portal-RemoteDesktop.NotifyPointerAxis">NotifyPointerAxis()</link> 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 xdp_impl_remote_desktop_complete_notify_pointer_axis() 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.
   *
   * 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.
   */
  g_signal_new ("handle-notify-pointer-axis",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpImplRemoteDesktopIface, handle_notify_pointer_axis),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_impl_remote_desktop_method_marshal_notify_pointer_axis,
    G_TYPE_BOOLEAN,
    5,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_VARIANT, G_TYPE_DOUBLE, G_TYPE_DOUBLE);

  /**
   * XdpImplRemoteDesktop::handle-notify-pointer-axis-discrete:
   * @object: A #XdpImplRemoteDesktop.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_session_handle: Argument passed by remote caller.
   * @arg_options: Argument passed by remote caller.
   * @arg_axis: Argument passed by remote caller.
   * @arg_steps: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-impl-portal-RemoteDesktop.NotifyPointerAxisDiscrete">NotifyPointerAxisDiscrete()</link> 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 xdp_impl_remote_desktop_complete_notify_pointer_axis_discrete() 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.
   *
   * 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.
   */
  g_signal_new ("handle-notify-pointer-axis-discrete",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpImplRemoteDesktopIface, handle_notify_pointer_axis_discrete),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_impl_remote_desktop_method_marshal_notify_pointer_axis_discrete,
    G_TYPE_BOOLEAN,
    5,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_VARIANT, G_TYPE_UINT, G_TYPE_INT);

  /**
   * XdpImplRemoteDesktop::handle-notify-keyboard-keycode:
   * @object: A #XdpImplRemoteDesktop.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_session_handle: Argument passed by remote caller.
   * @arg_options: Argument passed by remote caller.
   * @arg_keycode: Argument passed by remote caller.
   * @arg_state: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-impl-portal-RemoteDesktop.NotifyKeyboardKeycode">NotifyKeyboardKeycode()</link> 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 xdp_impl_remote_desktop_complete_notify_keyboard_keycode() 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.
   *
   * 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.
   */
  g_signal_new ("handle-notify-keyboard-keycode",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpImplRemoteDesktopIface, handle_notify_keyboard_keycode),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_impl_remote_desktop_method_marshal_notify_keyboard_keycode,
    G_TYPE_BOOLEAN,
    5,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_VARIANT, G_TYPE_INT, G_TYPE_UINT);

  /**
   * XdpImplRemoteDesktop::handle-notify-keyboard-keysym:
   * @object: A #XdpImplRemoteDesktop.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_session_handle: Argument passed by remote caller.
   * @arg_options: Argument passed by remote caller.
   * @arg_keysym: Argument passed by remote caller.
   * @arg_state: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-impl-portal-RemoteDesktop.NotifyKeyboardKeysym">NotifyKeyboardKeysym()</link> 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 xdp_impl_remote_desktop_complete_notify_keyboard_keysym() 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.
   *
   * 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.
   */
  g_signal_new ("handle-notify-keyboard-keysym",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpImplRemoteDesktopIface, handle_notify_keyboard_keysym),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_impl_remote_desktop_method_marshal_notify_keyboard_keysym,
    G_TYPE_BOOLEAN,
    5,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_VARIANT, G_TYPE_INT, G_TYPE_UINT);

  /**
   * XdpImplRemoteDesktop::handle-notify-touch-down:
   * @object: A #XdpImplRemoteDesktop.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_session_handle: Argument passed by remote caller.
   * @arg_options: Argument passed by remote caller.
   * @arg_stream: Argument passed by remote caller.
   * @arg_slot: Argument passed by remote caller.
   * @arg_x: Argument passed by remote caller.
   * @arg_y: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-impl-portal-RemoteDesktop.NotifyTouchDown">NotifyTouchDown()</link> 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 xdp_impl_remote_desktop_complete_notify_touch_down() 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.
   *
   * 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.
   */
  g_signal_new ("handle-notify-touch-down",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpImplRemoteDesktopIface, handle_notify_touch_down),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_impl_remote_desktop_method_marshal_notify_touch_down,
    G_TYPE_BOOLEAN,
    7,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_VARIANT, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_DOUBLE, G_TYPE_DOUBLE);

  /**
   * XdpImplRemoteDesktop::handle-notify-touch-motion:
   * @object: A #XdpImplRemoteDesktop.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_session_handle: Argument passed by remote caller.
   * @arg_options: Argument passed by remote caller.
   * @arg_stream: Argument passed by remote caller.
   * @arg_slot: Argument passed by remote caller.
   * @arg_x: Argument passed by remote caller.
   * @arg_y: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-impl-portal-RemoteDesktop.NotifyTouchMotion">NotifyTouchMotion()</link> 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 xdp_impl_remote_desktop_complete_notify_touch_motion() 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.
   *
   * 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.
   */
  g_signal_new ("handle-notify-touch-motion",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpImplRemoteDesktopIface, handle_notify_touch_motion),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_impl_remote_desktop_method_marshal_notify_touch_motion,
    G_TYPE_BOOLEAN,
    7,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_VARIANT, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_DOUBLE, G_TYPE_DOUBLE);

  /**
   * XdpImplRemoteDesktop::handle-notify-touch-up:
   * @object: A #XdpImplRemoteDesktop.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_session_handle: Argument passed by remote caller.
   * @arg_options: Argument passed by remote caller.
   * @arg_slot: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-impl-portal-RemoteDesktop.NotifyTouchUp">NotifyTouchUp()</link> 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 xdp_impl_remote_desktop_complete_notify_touch_up() 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.
   *
   * 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.
   */
  g_signal_new ("handle-notify-touch-up",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpImplRemoteDesktopIface, handle_notify_touch_up),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_impl_remote_desktop_method_marshal_notify_touch_up,
    G_TYPE_BOOLEAN,
    4,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_VARIANT, G_TYPE_UINT);

  /**
   * XdpImplRemoteDesktop::handle-connect-to-eis:
   * @object: A #XdpImplRemoteDesktop.
   * @invocation: A #GDBusMethodInvocation.
   * @fd_list: (nullable): A #GUnixFDList or %NULL.
   * @arg_session_handle: Argument passed by remote caller.
   * @arg_app_id: Argument passed by remote caller.
   * @arg_options: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-impl-portal-RemoteDesktop.ConnectToEIS">ConnectToEIS()</link> 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 xdp_impl_remote_desktop_complete_connect_to_eis() 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.
   *
   * 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.
   */
  g_signal_new ("handle-connect-to-eis",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpImplRemoteDesktopIface, handle_connect_to_eis),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_impl_remote_desktop_method_marshal_connect_to_eis,
    G_TYPE_BOOLEAN,
    5,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UNIX_FD_LIST, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_VARIANT);

  /* GObject properties for D-Bus properties: */
  /**
   * XdpImplRemoteDesktop:available-device-types:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-impl-portal-RemoteDesktop.AvailableDeviceTypes">"AvailableDeviceTypes"</link>.
   *
   * 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.
   */
  g_object_interface_install_property (iface,
    g_param_spec_uint ("available-device-types", "AvailableDeviceTypes", "AvailableDeviceTypes", 0, G_MAXUINT32, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * XdpImplRemoteDesktop:version:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-impl-portal-RemoteDesktop.version">"version"</link>.
   *
   * 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.
   */
  g_object_interface_install_property (iface,
    g_param_spec_uint ("version", "version", "version", 0, G_MAXUINT32, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
}

/**
 * xdp_impl_remote_desktop_get_available_device_types: (skip)
 * @object: A #XdpImplRemoteDesktop.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-impl-portal-RemoteDesktop.AvailableDeviceTypes">"AvailableDeviceTypes"</link> D-Bus property.
 *
 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
 *
 * Returns: The property value.
 */
guint 
xdp_impl_remote_desktop_get_available_device_types (XdpImplRemoteDesktop *object)
{
  g_return_val_if_fail (XDP_IMPL_IS_REMOTE_DESKTOP (object), 0);

  return XDP_IMPL_REMOTE_DESKTOP_GET_IFACE (object)->get_available_device_types (object);
}

/**
 * xdp_impl_remote_desktop_set_available_device_types: (skip)
 * @object: A #XdpImplRemoteDesktop.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-freedesktop-impl-portal-RemoteDesktop.AvailableDeviceTypes">"AvailableDeviceTypes"</link> 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.
 */
void
xdp_impl_remote_desktop_set_available_device_types (XdpImplRemoteDesktop *object, guint value)
{
  g_object_set (G_OBJECT (object), "available-device-types", value, NULL);
}

/**
 * xdp_impl_remote_desktop_get_version: (skip)
 * @object: A #XdpImplRemoteDesktop.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-impl-portal-RemoteDesktop.version">"version"</link> D-Bus property.
 *
 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
 *
 * Returns: The property value.
 */
guint 
xdp_impl_remote_desktop_get_version (XdpImplRemoteDesktop *object)
{
  g_return_val_if_fail (XDP_IMPL_IS_REMOTE_DESKTOP (object), 0);

  return XDP_IMPL_REMOTE_DESKTOP_GET_IFACE (object)->get_version (object);
}

/**
 * xdp_impl_remote_desktop_set_version: (skip)
 * @object: A #XdpImplRemoteDesktop.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-freedesktop-impl-portal-RemoteDesktop.version">"version"</link> 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.
 */
void
xdp_impl_remote_desktop_set_version (XdpImplRemoteDesktop *object, guint value)
{
  g_object_set (G_OBJECT (object), "version", value, NULL);
}

/**
 * xdp_impl_remote_desktop_call_create_session:
 * @proxy: A #XdpImplRemoteDesktopProxy.
 * @arg_handle: Argument to pass with the method invocation.
 * @arg_session_handle: Argument to pass with the method invocation.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-RemoteDesktop.CreateSession">CreateSession()</link> 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 xdp_impl_remote_desktop_call_create_session_finish() to get the result of the operation.
 *
 * See xdp_impl_remote_desktop_call_create_session_sync() for the synchronous, blocking version of this method.
 */
void
xdp_impl_remote_desktop_call_create_session (
    XdpImplRemoteDesktop *proxy,
    const gchar *arg_handle,
    const gchar *arg_session_handle,
    const gchar *arg_app_id,
    GVariant *arg_options,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "CreateSession",
    g_variant_new ("(oos@a{sv})",
                   arg_handle,
                   arg_session_handle,
                   arg_app_id,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_impl_remote_desktop_call_create_session_finish:
 * @proxy: A #XdpImplRemoteDesktopProxy.
 * @out_response: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_results: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_remote_desktop_call_create_session().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_impl_remote_desktop_call_create_session().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_remote_desktop_call_create_session_finish (
    XdpImplRemoteDesktop *proxy,
    guint* out_response,
    GVariant ** out_results,
    GAsyncResult *res,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(u@a{sv})",
                 out_response,
                 out_results);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_remote_desktop_call_create_session_sync:
 * @proxy: A #XdpImplRemoteDesktopProxy.
 * @arg_handle: Argument to pass with the method invocation.
 * @arg_session_handle: Argument to pass with the method invocation.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @out_response: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_results: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-RemoteDesktop.CreateSession">CreateSession()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_remote_desktop_call_create_session() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_remote_desktop_call_create_session_sync (
    XdpImplRemoteDesktop *proxy,
    const gchar *arg_handle,
    const gchar *arg_session_handle,
    const gchar *arg_app_id,
    GVariant *arg_options,
    guint* out_response,
    GVariant ** out_results,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "CreateSession",
    g_variant_new ("(oos@a{sv})",
                   arg_handle,
                   arg_session_handle,
                   arg_app_id,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(u@a{sv})",
                 out_response,
                 out_results);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_remote_desktop_call_select_devices:
 * @proxy: A #XdpImplRemoteDesktopProxy.
 * @arg_handle: Argument to pass with the method invocation.
 * @arg_session_handle: Argument to pass with the method invocation.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-RemoteDesktop.SelectDevices">SelectDevices()</link> 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 xdp_impl_remote_desktop_call_select_devices_finish() to get the result of the operation.
 *
 * See xdp_impl_remote_desktop_call_select_devices_sync() for the synchronous, blocking version of this method.
 */
void
xdp_impl_remote_desktop_call_select_devices (
    XdpImplRemoteDesktop *proxy,
    const gchar *arg_handle,
    const gchar *arg_session_handle,
    const gchar *arg_app_id,
    GVariant *arg_options,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "SelectDevices",
    g_variant_new ("(oos@a{sv})",
                   arg_handle,
                   arg_session_handle,
                   arg_app_id,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_impl_remote_desktop_call_select_devices_finish:
 * @proxy: A #XdpImplRemoteDesktopProxy.
 * @out_response: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_results: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_remote_desktop_call_select_devices().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_impl_remote_desktop_call_select_devices().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_remote_desktop_call_select_devices_finish (
    XdpImplRemoteDesktop *proxy,
    guint* out_response,
    GVariant ** out_results,
    GAsyncResult *res,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(u@a{sv})",
                 out_response,
                 out_results);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_remote_desktop_call_select_devices_sync:
 * @proxy: A #XdpImplRemoteDesktopProxy.
 * @arg_handle: Argument to pass with the method invocation.
 * @arg_session_handle: Argument to pass with the method invocation.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @out_response: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_results: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-RemoteDesktop.SelectDevices">SelectDevices()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_remote_desktop_call_select_devices() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_remote_desktop_call_select_devices_sync (
    XdpImplRemoteDesktop *proxy,
    const gchar *arg_handle,
    const gchar *arg_session_handle,
    const gchar *arg_app_id,
    GVariant *arg_options,
    guint* out_response,
    GVariant ** out_results,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "SelectDevices",
    g_variant_new ("(oos@a{sv})",
                   arg_handle,
                   arg_session_handle,
                   arg_app_id,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(u@a{sv})",
                 out_response,
                 out_results);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_remote_desktop_call_start:
 * @proxy: A #XdpImplRemoteDesktopProxy.
 * @arg_handle: Argument to pass with the method invocation.
 * @arg_session_handle: Argument to pass with the method invocation.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_parent_window: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-RemoteDesktop.Start">Start()</link> 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 xdp_impl_remote_desktop_call_start_finish() to get the result of the operation.
 *
 * See xdp_impl_remote_desktop_call_start_sync() for the synchronous, blocking version of this method.
 */
void
xdp_impl_remote_desktop_call_start (
    XdpImplRemoteDesktop *proxy,
    const gchar *arg_handle,
    const gchar *arg_session_handle,
    const gchar *arg_app_id,
    const gchar *arg_parent_window,
    GVariant *arg_options,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "Start",
    g_variant_new ("(ooss@a{sv})",
                   arg_handle,
                   arg_session_handle,
                   arg_app_id,
                   arg_parent_window,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_impl_remote_desktop_call_start_finish:
 * @proxy: A #XdpImplRemoteDesktopProxy.
 * @out_response: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_results: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_remote_desktop_call_start().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_impl_remote_desktop_call_start().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_remote_desktop_call_start_finish (
    XdpImplRemoteDesktop *proxy,
    guint* out_response,
    GVariant ** out_results,
    GAsyncResult *res,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(u@a{sv})",
                 out_response,
                 out_results);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_remote_desktop_call_start_sync:
 * @proxy: A #XdpImplRemoteDesktopProxy.
 * @arg_handle: Argument to pass with the method invocation.
 * @arg_session_handle: Argument to pass with the method invocation.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_parent_window: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @out_response: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_results: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-RemoteDesktop.Start">Start()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_remote_desktop_call_start() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_remote_desktop_call_start_sync (
    XdpImplRemoteDesktop *proxy,
    const gchar *arg_handle,
    const gchar *arg_session_handle,
    const gchar *arg_app_id,
    const gchar *arg_parent_window,
    GVariant *arg_options,
    guint* out_response,
    GVariant ** out_results,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "Start",
    g_variant_new ("(ooss@a{sv})",
                   arg_handle,
                   arg_session_handle,
                   arg_app_id,
                   arg_parent_window,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(u@a{sv})",
                 out_response,
                 out_results);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_remote_desktop_call_notify_pointer_motion:
 * @proxy: A #XdpImplRemoteDesktopProxy.
 * @arg_session_handle: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @arg_dx: Argument to pass with the method invocation.
 * @arg_dy: Argument to pass with the method invocation.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-RemoteDesktop.NotifyPointerMotion">NotifyPointerMotion()</link> 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 xdp_impl_remote_desktop_call_notify_pointer_motion_finish() to get the result of the operation.
 *
 * See xdp_impl_remote_desktop_call_notify_pointer_motion_sync() for the synchronous, blocking version of this method.
 */
void
xdp_impl_remote_desktop_call_notify_pointer_motion (
    XdpImplRemoteDesktop *proxy,
    const gchar *arg_session_handle,
    GVariant *arg_options,
    gdouble arg_dx,
    gdouble arg_dy,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "NotifyPointerMotion",
    g_variant_new ("(o@a{sv}dd)",
                   arg_session_handle,
                   arg_options,
                   arg_dx,
                   arg_dy),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_impl_remote_desktop_call_notify_pointer_motion_finish:
 * @proxy: A #XdpImplRemoteDesktopProxy.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_remote_desktop_call_notify_pointer_motion().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_impl_remote_desktop_call_notify_pointer_motion().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_remote_desktop_call_notify_pointer_motion_finish (
    XdpImplRemoteDesktop *proxy,
    GAsyncResult *res,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "()");
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_remote_desktop_call_notify_pointer_motion_sync:
 * @proxy: A #XdpImplRemoteDesktopProxy.
 * @arg_session_handle: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @arg_dx: Argument to pass with the method invocation.
 * @arg_dy: Argument to pass with the method invocation.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-RemoteDesktop.NotifyPointerMotion">NotifyPointerMotion()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_remote_desktop_call_notify_pointer_motion() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_remote_desktop_call_notify_pointer_motion_sync (
    XdpImplRemoteDesktop *proxy,
    const gchar *arg_session_handle,
    GVariant *arg_options,
    gdouble arg_dx,
    gdouble arg_dy,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "NotifyPointerMotion",
    g_variant_new ("(o@a{sv}dd)",
                   arg_session_handle,
                   arg_options,
                   arg_dx,
                   arg_dy),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "()");
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_remote_desktop_call_notify_pointer_motion_absolute:
 * @proxy: A #XdpImplRemoteDesktopProxy.
 * @arg_session_handle: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @arg_stream: Argument to pass with the method invocation.
 * @arg_x: Argument to pass with the method invocation.
 * @arg_y: Argument to pass with the method invocation.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-RemoteDesktop.NotifyPointerMotionAbsolute">NotifyPointerMotionAbsolute()</link> 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 xdp_impl_remote_desktop_call_notify_pointer_motion_absolute_finish() to get the result of the operation.
 *
 * See xdp_impl_remote_desktop_call_notify_pointer_motion_absolute_sync() for the synchronous, blocking version of this method.
 */
void
xdp_impl_remote_desktop_call_notify_pointer_motion_absolute (
    XdpImplRemoteDesktop *proxy,
    const gchar *arg_session_handle,
    GVariant *arg_options,
    guint arg_stream,
    gdouble arg_x,
    gdouble arg_y,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "NotifyPointerMotionAbsolute",
    g_variant_new ("(o@a{sv}udd)",
                   arg_session_handle,
                   arg_options,
                   arg_stream,
                   arg_x,
                   arg_y),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_impl_remote_desktop_call_notify_pointer_motion_absolute_finish:
 * @proxy: A #XdpImplRemoteDesktopProxy.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_remote_desktop_call_notify_pointer_motion_absolute().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_impl_remote_desktop_call_notify_pointer_motion_absolute().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_remote_desktop_call_notify_pointer_motion_absolute_finish (
    XdpImplRemoteDesktop *proxy,
    GAsyncResult *res,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "()");
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_remote_desktop_call_notify_pointer_motion_absolute_sync:
 * @proxy: A #XdpImplRemoteDesktopProxy.
 * @arg_session_handle: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @arg_stream: Argument to pass with the method invocation.
 * @arg_x: Argument to pass with the method invocation.
 * @arg_y: Argument to pass with the method invocation.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-RemoteDesktop.NotifyPointerMotionAbsolute">NotifyPointerMotionAbsolute()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_remote_desktop_call_notify_pointer_motion_absolute() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_remote_desktop_call_notify_pointer_motion_absolute_sync (
    XdpImplRemoteDesktop *proxy,
    const gchar *arg_session_handle,
    GVariant *arg_options,
    guint arg_stream,
    gdouble arg_x,
    gdouble arg_y,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "NotifyPointerMotionAbsolute",
    g_variant_new ("(o@a{sv}udd)",
                   arg_session_handle,
                   arg_options,
                   arg_stream,
                   arg_x,
                   arg_y),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "()");
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_remote_desktop_call_notify_pointer_button:
 * @proxy: A #XdpImplRemoteDesktopProxy.
 * @arg_session_handle: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @arg_button: Argument to pass with the method invocation.
 * @arg_state: Argument to pass with the method invocation.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-RemoteDesktop.NotifyPointerButton">NotifyPointerButton()</link> 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 xdp_impl_remote_desktop_call_notify_pointer_button_finish() to get the result of the operation.
 *
 * See xdp_impl_remote_desktop_call_notify_pointer_button_sync() for the synchronous, blocking version of this method.
 */
void
xdp_impl_remote_desktop_call_notify_pointer_button (
    XdpImplRemoteDesktop *proxy,
    const gchar *arg_session_handle,
    GVariant *arg_options,
    gint arg_button,
    guint arg_state,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "NotifyPointerButton",
    g_variant_new ("(o@a{sv}iu)",
                   arg_session_handle,
                   arg_options,
                   arg_button,
                   arg_state),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_impl_remote_desktop_call_notify_pointer_button_finish:
 * @proxy: A #XdpImplRemoteDesktopProxy.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_remote_desktop_call_notify_pointer_button().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_impl_remote_desktop_call_notify_pointer_button().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_remote_desktop_call_notify_pointer_button_finish (
    XdpImplRemoteDesktop *proxy,
    GAsyncResult *res,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "()");
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_remote_desktop_call_notify_pointer_button_sync:
 * @proxy: A #XdpImplRemoteDesktopProxy.
 * @arg_session_handle: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @arg_button: Argument to pass with the method invocation.
 * @arg_state: Argument to pass with the method invocation.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-RemoteDesktop.NotifyPointerButton">NotifyPointerButton()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_remote_desktop_call_notify_pointer_button() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_remote_desktop_call_notify_pointer_button_sync (
    XdpImplRemoteDesktop *proxy,
    const gchar *arg_session_handle,
    GVariant *arg_options,
    gint arg_button,
    guint arg_state,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "NotifyPointerButton",
    g_variant_new ("(o@a{sv}iu)",
                   arg_session_handle,
                   arg_options,
                   arg_button,
                   arg_state),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "()");
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_remote_desktop_call_notify_pointer_axis:
 * @proxy: A #XdpImplRemoteDesktopProxy.
 * @arg_session_handle: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @arg_dx: Argument to pass with the method invocation.
 * @arg_dy: Argument to pass with the method invocation.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-RemoteDesktop.NotifyPointerAxis">NotifyPointerAxis()</link> 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 xdp_impl_remote_desktop_call_notify_pointer_axis_finish() to get the result of the operation.
 *
 * See xdp_impl_remote_desktop_call_notify_pointer_axis_sync() for the synchronous, blocking version of this method.
 */
void
xdp_impl_remote_desktop_call_notify_pointer_axis (
    XdpImplRemoteDesktop *proxy,
    const gchar *arg_session_handle,
    GVariant *arg_options,
    gdouble arg_dx,
    gdouble arg_dy,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "NotifyPointerAxis",
    g_variant_new ("(o@a{sv}dd)",
                   arg_session_handle,
                   arg_options,
                   arg_dx,
                   arg_dy),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_impl_remote_desktop_call_notify_pointer_axis_finish:
 * @proxy: A #XdpImplRemoteDesktopProxy.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_remote_desktop_call_notify_pointer_axis().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_impl_remote_desktop_call_notify_pointer_axis().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_remote_desktop_call_notify_pointer_axis_finish (
    XdpImplRemoteDesktop *proxy,
    GAsyncResult *res,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "()");
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_remote_desktop_call_notify_pointer_axis_sync:
 * @proxy: A #XdpImplRemoteDesktopProxy.
 * @arg_session_handle: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @arg_dx: Argument to pass with the method invocation.
 * @arg_dy: Argument to pass with the method invocation.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-RemoteDesktop.NotifyPointerAxis">NotifyPointerAxis()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_remote_desktop_call_notify_pointer_axis() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_remote_desktop_call_notify_pointer_axis_sync (
    XdpImplRemoteDesktop *proxy,
    const gchar *arg_session_handle,
    GVariant *arg_options,
    gdouble arg_dx,
    gdouble arg_dy,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "NotifyPointerAxis",
    g_variant_new ("(o@a{sv}dd)",
                   arg_session_handle,
                   arg_options,
                   arg_dx,
                   arg_dy),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "()");
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_remote_desktop_call_notify_pointer_axis_discrete:
 * @proxy: A #XdpImplRemoteDesktopProxy.
 * @arg_session_handle: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @arg_axis: Argument to pass with the method invocation.
 * @arg_steps: Argument to pass with the method invocation.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-RemoteDesktop.NotifyPointerAxisDiscrete">NotifyPointerAxisDiscrete()</link> 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 xdp_impl_remote_desktop_call_notify_pointer_axis_discrete_finish() to get the result of the operation.
 *
 * See xdp_impl_remote_desktop_call_notify_pointer_axis_discrete_sync() for the synchronous, blocking version of this method.
 */
void
xdp_impl_remote_desktop_call_notify_pointer_axis_discrete (
    XdpImplRemoteDesktop *proxy,
    const gchar *arg_session_handle,
    GVariant *arg_options,
    guint arg_axis,
    gint arg_steps,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "NotifyPointerAxisDiscrete",
    g_variant_new ("(o@a{sv}ui)",
                   arg_session_handle,
                   arg_options,
                   arg_axis,
                   arg_steps),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_impl_remote_desktop_call_notify_pointer_axis_discrete_finish:
 * @proxy: A #XdpImplRemoteDesktopProxy.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_remote_desktop_call_notify_pointer_axis_discrete().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_impl_remote_desktop_call_notify_pointer_axis_discrete().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_remote_desktop_call_notify_pointer_axis_discrete_finish (
    XdpImplRemoteDesktop *proxy,
    GAsyncResult *res,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "()");
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_remote_desktop_call_notify_pointer_axis_discrete_sync:
 * @proxy: A #XdpImplRemoteDesktopProxy.
 * @arg_session_handle: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @arg_axis: Argument to pass with the method invocation.
 * @arg_steps: Argument to pass with the method invocation.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-RemoteDesktop.NotifyPointerAxisDiscrete">NotifyPointerAxisDiscrete()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_remote_desktop_call_notify_pointer_axis_discrete() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_remote_desktop_call_notify_pointer_axis_discrete_sync (
    XdpImplRemoteDesktop *proxy,
    const gchar *arg_session_handle,
    GVariant *arg_options,
    guint arg_axis,
    gint arg_steps,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "NotifyPointerAxisDiscrete",
    g_variant_new ("(o@a{sv}ui)",
                   arg_session_handle,
                   arg_options,
                   arg_axis,
                   arg_steps),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "()");
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_remote_desktop_call_notify_keyboard_keycode:
 * @proxy: A #XdpImplRemoteDesktopProxy.
 * @arg_session_handle: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @arg_keycode: Argument to pass with the method invocation.
 * @arg_state: Argument to pass with the method invocation.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-RemoteDesktop.NotifyKeyboardKeycode">NotifyKeyboardKeycode()</link> 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 xdp_impl_remote_desktop_call_notify_keyboard_keycode_finish() to get the result of the operation.
 *
 * See xdp_impl_remote_desktop_call_notify_keyboard_keycode_sync() for the synchronous, blocking version of this method.
 */
void
xdp_impl_remote_desktop_call_notify_keyboard_keycode (
    XdpImplRemoteDesktop *proxy,
    const gchar *arg_session_handle,
    GVariant *arg_options,
    gint arg_keycode,
    guint arg_state,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "NotifyKeyboardKeycode",
    g_variant_new ("(o@a{sv}iu)",
                   arg_session_handle,
                   arg_options,
                   arg_keycode,
                   arg_state),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_impl_remote_desktop_call_notify_keyboard_keycode_finish:
 * @proxy: A #XdpImplRemoteDesktopProxy.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_remote_desktop_call_notify_keyboard_keycode().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_impl_remote_desktop_call_notify_keyboard_keycode().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_remote_desktop_call_notify_keyboard_keycode_finish (
    XdpImplRemoteDesktop *proxy,
    GAsyncResult *res,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "()");
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_remote_desktop_call_notify_keyboard_keycode_sync:
 * @proxy: A #XdpImplRemoteDesktopProxy.
 * @arg_session_handle: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @arg_keycode: Argument to pass with the method invocation.
 * @arg_state: Argument to pass with the method invocation.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-RemoteDesktop.NotifyKeyboardKeycode">NotifyKeyboardKeycode()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_remote_desktop_call_notify_keyboard_keycode() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_remote_desktop_call_notify_keyboard_keycode_sync (
    XdpImplRemoteDesktop *proxy,
    const gchar *arg_session_handle,
    GVariant *arg_options,
    gint arg_keycode,
    guint arg_state,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "NotifyKeyboardKeycode",
    g_variant_new ("(o@a{sv}iu)",
                   arg_session_handle,
                   arg_options,
                   arg_keycode,
                   arg_state),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "()");
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_remote_desktop_call_notify_keyboard_keysym:
 * @proxy: A #XdpImplRemoteDesktopProxy.
 * @arg_session_handle: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @arg_keysym: Argument to pass with the method invocation.
 * @arg_state: Argument to pass with the method invocation.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-RemoteDesktop.NotifyKeyboardKeysym">NotifyKeyboardKeysym()</link> 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 xdp_impl_remote_desktop_call_notify_keyboard_keysym_finish() to get the result of the operation.
 *
 * See xdp_impl_remote_desktop_call_notify_keyboard_keysym_sync() for the synchronous, blocking version of this method.
 */
void
xdp_impl_remote_desktop_call_notify_keyboard_keysym (
    XdpImplRemoteDesktop *proxy,
    const gchar *arg_session_handle,
    GVariant *arg_options,
    gint arg_keysym,
    guint arg_state,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "NotifyKeyboardKeysym",
    g_variant_new ("(o@a{sv}iu)",
                   arg_session_handle,
                   arg_options,
                   arg_keysym,
                   arg_state),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_impl_remote_desktop_call_notify_keyboard_keysym_finish:
 * @proxy: A #XdpImplRemoteDesktopProxy.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_remote_desktop_call_notify_keyboard_keysym().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_impl_remote_desktop_call_notify_keyboard_keysym().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_remote_desktop_call_notify_keyboard_keysym_finish (
    XdpImplRemoteDesktop *proxy,
    GAsyncResult *res,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "()");
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_remote_desktop_call_notify_keyboard_keysym_sync:
 * @proxy: A #XdpImplRemoteDesktopProxy.
 * @arg_session_handle: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @arg_keysym: Argument to pass with the method invocation.
 * @arg_state: Argument to pass with the method invocation.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-RemoteDesktop.NotifyKeyboardKeysym">NotifyKeyboardKeysym()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_remote_desktop_call_notify_keyboard_keysym() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_remote_desktop_call_notify_keyboard_keysym_sync (
    XdpImplRemoteDesktop *proxy,
    const gchar *arg_session_handle,
    GVariant *arg_options,
    gint arg_keysym,
    guint arg_state,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "NotifyKeyboardKeysym",
    g_variant_new ("(o@a{sv}iu)",
                   arg_session_handle,
                   arg_options,
                   arg_keysym,
                   arg_state),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "()");
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_remote_desktop_call_notify_touch_down:
 * @proxy: A #XdpImplRemoteDesktopProxy.
 * @arg_session_handle: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @arg_stream: Argument to pass with the method invocation.
 * @arg_slot: Argument to pass with the method invocation.
 * @arg_x: Argument to pass with the method invocation.
 * @arg_y: Argument to pass with the method invocation.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-RemoteDesktop.NotifyTouchDown">NotifyTouchDown()</link> 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 xdp_impl_remote_desktop_call_notify_touch_down_finish() to get the result of the operation.
 *
 * See xdp_impl_remote_desktop_call_notify_touch_down_sync() for the synchronous, blocking version of this method.
 */
void
xdp_impl_remote_desktop_call_notify_touch_down (
    XdpImplRemoteDesktop *proxy,
    const gchar *arg_session_handle,
    GVariant *arg_options,
    guint arg_stream,
    guint arg_slot,
    gdouble arg_x,
    gdouble arg_y,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "NotifyTouchDown",
    g_variant_new ("(o@a{sv}uudd)",
                   arg_session_handle,
                   arg_options,
                   arg_stream,
                   arg_slot,
                   arg_x,
                   arg_y),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_impl_remote_desktop_call_notify_touch_down_finish:
 * @proxy: A #XdpImplRemoteDesktopProxy.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_remote_desktop_call_notify_touch_down().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_impl_remote_desktop_call_notify_touch_down().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_remote_desktop_call_notify_touch_down_finish (
    XdpImplRemoteDesktop *proxy,
    GAsyncResult *res,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "()");
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_remote_desktop_call_notify_touch_down_sync:
 * @proxy: A #XdpImplRemoteDesktopProxy.
 * @arg_session_handle: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @arg_stream: Argument to pass with the method invocation.
 * @arg_slot: Argument to pass with the method invocation.
 * @arg_x: Argument to pass with the method invocation.
 * @arg_y: Argument to pass with the method invocation.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-RemoteDesktop.NotifyTouchDown">NotifyTouchDown()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_remote_desktop_call_notify_touch_down() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_remote_desktop_call_notify_touch_down_sync (
    XdpImplRemoteDesktop *proxy,
    const gchar *arg_session_handle,
    GVariant *arg_options,
    guint arg_stream,
    guint arg_slot,
    gdouble arg_x,
    gdouble arg_y,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "NotifyTouchDown",
    g_variant_new ("(o@a{sv}uudd)",
                   arg_session_handle,
                   arg_options,
                   arg_stream,
                   arg_slot,
                   arg_x,
                   arg_y),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "()");
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_remote_desktop_call_notify_touch_motion:
 * @proxy: A #XdpImplRemoteDesktopProxy.
 * @arg_session_handle: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @arg_stream: Argument to pass with the method invocation.
 * @arg_slot: Argument to pass with the method invocation.
 * @arg_x: Argument to pass with the method invocation.
 * @arg_y: Argument to pass with the method invocation.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-RemoteDesktop.NotifyTouchMotion">NotifyTouchMotion()</link> 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 xdp_impl_remote_desktop_call_notify_touch_motion_finish() to get the result of the operation.
 *
 * See xdp_impl_remote_desktop_call_notify_touch_motion_sync() for the synchronous, blocking version of this method.
 */
void
xdp_impl_remote_desktop_call_notify_touch_motion (
    XdpImplRemoteDesktop *proxy,
    const gchar *arg_session_handle,
    GVariant *arg_options,
    guint arg_stream,
    guint arg_slot,
    gdouble arg_x,
    gdouble arg_y,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "NotifyTouchMotion",
    g_variant_new ("(o@a{sv}uudd)",
                   arg_session_handle,
                   arg_options,
                   arg_stream,
                   arg_slot,
                   arg_x,
                   arg_y),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_impl_remote_desktop_call_notify_touch_motion_finish:
 * @proxy: A #XdpImplRemoteDesktopProxy.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_remote_desktop_call_notify_touch_motion().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_impl_remote_desktop_call_notify_touch_motion().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_remote_desktop_call_notify_touch_motion_finish (
    XdpImplRemoteDesktop *proxy,
    GAsyncResult *res,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "()");
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_remote_desktop_call_notify_touch_motion_sync:
 * @proxy: A #XdpImplRemoteDesktopProxy.
 * @arg_session_handle: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @arg_stream: Argument to pass with the method invocation.
 * @arg_slot: Argument to pass with the method invocation.
 * @arg_x: Argument to pass with the method invocation.
 * @arg_y: Argument to pass with the method invocation.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-RemoteDesktop.NotifyTouchMotion">NotifyTouchMotion()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_remote_desktop_call_notify_touch_motion() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_remote_desktop_call_notify_touch_motion_sync (
    XdpImplRemoteDesktop *proxy,
    const gchar *arg_session_handle,
    GVariant *arg_options,
    guint arg_stream,
    guint arg_slot,
    gdouble arg_x,
    gdouble arg_y,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "NotifyTouchMotion",
    g_variant_new ("(o@a{sv}uudd)",
                   arg_session_handle,
                   arg_options,
                   arg_stream,
                   arg_slot,
                   arg_x,
                   arg_y),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "()");
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_remote_desktop_call_notify_touch_up:
 * @proxy: A #XdpImplRemoteDesktopProxy.
 * @arg_session_handle: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @arg_slot: Argument to pass with the method invocation.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-RemoteDesktop.NotifyTouchUp">NotifyTouchUp()</link> 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 xdp_impl_remote_desktop_call_notify_touch_up_finish() to get the result of the operation.
 *
 * See xdp_impl_remote_desktop_call_notify_touch_up_sync() for the synchronous, blocking version of this method.
 */
void
xdp_impl_remote_desktop_call_notify_touch_up (
    XdpImplRemoteDesktop *proxy,
    const gchar *arg_session_handle,
    GVariant *arg_options,
    guint arg_slot,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "NotifyTouchUp",
    g_variant_new ("(o@a{sv}u)",
                   arg_session_handle,
                   arg_options,
                   arg_slot),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_impl_remote_desktop_call_notify_touch_up_finish:
 * @proxy: A #XdpImplRemoteDesktopProxy.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_remote_desktop_call_notify_touch_up().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_impl_remote_desktop_call_notify_touch_up().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_remote_desktop_call_notify_touch_up_finish (
    XdpImplRemoteDesktop *proxy,
    GAsyncResult *res,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "()");
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_remote_desktop_call_notify_touch_up_sync:
 * @proxy: A #XdpImplRemoteDesktopProxy.
 * @arg_session_handle: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @arg_slot: Argument to pass with the method invocation.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-RemoteDesktop.NotifyTouchUp">NotifyTouchUp()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_remote_desktop_call_notify_touch_up() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_remote_desktop_call_notify_touch_up_sync (
    XdpImplRemoteDesktop *proxy,
    const gchar *arg_session_handle,
    GVariant *arg_options,
    guint arg_slot,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "NotifyTouchUp",
    g_variant_new ("(o@a{sv}u)",
                   arg_session_handle,
                   arg_options,
                   arg_slot),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "()");
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_remote_desktop_call_connect_to_eis:
 * @proxy: A #XdpImplRemoteDesktopProxy.
 * @arg_session_handle: Argument to pass with the method invocation.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @fd_list: (nullable): A #GUnixFDList or %NULL.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-RemoteDesktop.ConnectToEIS">ConnectToEIS()</link> 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 xdp_impl_remote_desktop_call_connect_to_eis_finish() to get the result of the operation.
 *
 * See xdp_impl_remote_desktop_call_connect_to_eis_sync() for the synchronous, blocking version of this method.
 */
void
xdp_impl_remote_desktop_call_connect_to_eis (
    XdpImplRemoteDesktop *proxy,
    const gchar *arg_session_handle,
    const gchar *arg_app_id,
    GVariant *arg_options,
    GUnixFDList *fd_list,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call_with_unix_fd_list (G_DBUS_PROXY (proxy),
    "ConnectToEIS",
    g_variant_new ("(os@a{sv})",
                   arg_session_handle,
                   arg_app_id,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    fd_list,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_impl_remote_desktop_call_connect_to_eis_finish:
 * @proxy: A #XdpImplRemoteDesktopProxy.
 * @out_fd: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_fd_list: (out) (optional) (nullable): Return location for a #GUnixFDList or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_remote_desktop_call_connect_to_eis().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_impl_remote_desktop_call_connect_to_eis().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_remote_desktop_call_connect_to_eis_finish (
    XdpImplRemoteDesktop *proxy,
    GVariant ** out_fd,
    GUnixFDList **out_fd_list,
    GAsyncResult *res,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_with_unix_fd_list_finish (G_DBUS_PROXY (proxy), out_fd_list, res, error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(@h)",
                 out_fd);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_remote_desktop_call_connect_to_eis_sync:
 * @proxy: A #XdpImplRemoteDesktopProxy.
 * @arg_session_handle: Argument to pass with the method invocation.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @fd_list: (nullable): A #GUnixFDList or %NULL.
 * @out_fd: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_fd_list: (out) (optional) (nullable): Return location for a #GUnixFDList or %NULL.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-RemoteDesktop.ConnectToEIS">ConnectToEIS()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_remote_desktop_call_connect_to_eis() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_remote_desktop_call_connect_to_eis_sync (
    XdpImplRemoteDesktop *proxy,
    const gchar *arg_session_handle,
    const gchar *arg_app_id,
    GVariant *arg_options,
    GUnixFDList  *fd_list,
    GVariant ** out_fd,
    GUnixFDList **out_fd_list,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_with_unix_fd_list_sync (G_DBUS_PROXY (proxy),
    "ConnectToEIS",
    g_variant_new ("(os@a{sv})",
                   arg_session_handle,
                   arg_app_id,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    fd_list,
    out_fd_list,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(@h)",
                 out_fd);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_remote_desktop_complete_create_session:
 * @object: A #XdpImplRemoteDesktop.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @response: Parameter to return.
 * @results: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-impl-portal-RemoteDesktop.CreateSession">CreateSession()</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
xdp_impl_remote_desktop_complete_create_session (
    XdpImplRemoteDesktop *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    guint response,
    GVariant *results)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(u@a{sv})",
                   response,
                   results));
}

/**
 * xdp_impl_remote_desktop_complete_select_devices:
 * @object: A #XdpImplRemoteDesktop.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @response: Parameter to return.
 * @results: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-impl-portal-RemoteDesktop.SelectDevices">SelectDevices()</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
xdp_impl_remote_desktop_complete_select_devices (
    XdpImplRemoteDesktop *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    guint response,
    GVariant *results)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(u@a{sv})",
                   response,
                   results));
}

/**
 * xdp_impl_remote_desktop_complete_start:
 * @object: A #XdpImplRemoteDesktop.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @response: Parameter to return.
 * @results: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-impl-portal-RemoteDesktop.Start">Start()</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
xdp_impl_remote_desktop_complete_start (
    XdpImplRemoteDesktop *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    guint response,
    GVariant *results)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(u@a{sv})",
                   response,
                   results));
}

/**
 * xdp_impl_remote_desktop_complete_notify_pointer_motion:
 * @object: A #XdpImplRemoteDesktop.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-impl-portal-RemoteDesktop.NotifyPointerMotion">NotifyPointerMotion()</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
xdp_impl_remote_desktop_complete_notify_pointer_motion (
    XdpImplRemoteDesktop *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("()"));
}

/**
 * xdp_impl_remote_desktop_complete_notify_pointer_motion_absolute:
 * @object: A #XdpImplRemoteDesktop.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-impl-portal-RemoteDesktop.NotifyPointerMotionAbsolute">NotifyPointerMotionAbsolute()</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
xdp_impl_remote_desktop_complete_notify_pointer_motion_absolute (
    XdpImplRemoteDesktop *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("()"));
}

/**
 * xdp_impl_remote_desktop_complete_notify_pointer_button:
 * @object: A #XdpImplRemoteDesktop.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-impl-portal-RemoteDesktop.NotifyPointerButton">NotifyPointerButton()</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
xdp_impl_remote_desktop_complete_notify_pointer_button (
    XdpImplRemoteDesktop *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("()"));
}

/**
 * xdp_impl_remote_desktop_complete_notify_pointer_axis:
 * @object: A #XdpImplRemoteDesktop.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-impl-portal-RemoteDesktop.NotifyPointerAxis">NotifyPointerAxis()</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
xdp_impl_remote_desktop_complete_notify_pointer_axis (
    XdpImplRemoteDesktop *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("()"));
}

/**
 * xdp_impl_remote_desktop_complete_notify_pointer_axis_discrete:
 * @object: A #XdpImplRemoteDesktop.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-impl-portal-RemoteDesktop.NotifyPointerAxisDiscrete">NotifyPointerAxisDiscrete()</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
xdp_impl_remote_desktop_complete_notify_pointer_axis_discrete (
    XdpImplRemoteDesktop *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("()"));
}

/**
 * xdp_impl_remote_desktop_complete_notify_keyboard_keycode:
 * @object: A #XdpImplRemoteDesktop.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-impl-portal-RemoteDesktop.NotifyKeyboardKeycode">NotifyKeyboardKeycode()</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
xdp_impl_remote_desktop_complete_notify_keyboard_keycode (
    XdpImplRemoteDesktop *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("()"));
}

/**
 * xdp_impl_remote_desktop_complete_notify_keyboard_keysym:
 * @object: A #XdpImplRemoteDesktop.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-impl-portal-RemoteDesktop.NotifyKeyboardKeysym">NotifyKeyboardKeysym()</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
xdp_impl_remote_desktop_complete_notify_keyboard_keysym (
    XdpImplRemoteDesktop *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("()"));
}

/**
 * xdp_impl_remote_desktop_complete_notify_touch_down:
 * @object: A #XdpImplRemoteDesktop.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-impl-portal-RemoteDesktop.NotifyTouchDown">NotifyTouchDown()</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
xdp_impl_remote_desktop_complete_notify_touch_down (
    XdpImplRemoteDesktop *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("()"));
}

/**
 * xdp_impl_remote_desktop_complete_notify_touch_motion:
 * @object: A #XdpImplRemoteDesktop.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-impl-portal-RemoteDesktop.NotifyTouchMotion">NotifyTouchMotion()</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
xdp_impl_remote_desktop_complete_notify_touch_motion (
    XdpImplRemoteDesktop *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("()"));
}

/**
 * xdp_impl_remote_desktop_complete_notify_touch_up:
 * @object: A #XdpImplRemoteDesktop.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-impl-portal-RemoteDesktop.NotifyTouchUp">NotifyTouchUp()</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
xdp_impl_remote_desktop_complete_notify_touch_up (
    XdpImplRemoteDesktop *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("()"));
}

/**
 * xdp_impl_remote_desktop_complete_connect_to_eis:
 * @object: A #XdpImplRemoteDesktop.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @fd_list: (nullable): A #GUnixFDList or %NULL.
 * @fd: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-impl-portal-RemoteDesktop.ConnectToEIS">ConnectToEIS()</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
xdp_impl_remote_desktop_complete_connect_to_eis (
    XdpImplRemoteDesktop *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    GUnixFDList *fd_list,
    GVariant *fd)
{
  g_dbus_method_invocation_return_value_with_unix_fd_list (invocation,
    g_variant_new ("(@h)",
                   fd),
    fd_list);
}

/* ------------------------------------------------------------------------ */

/**
 * XdpImplRemoteDesktopProxy:
 *
 * The #XdpImplRemoteDesktopProxy structure contains only private data and should only be accessed using the provided API.
 */

/**
 * XdpImplRemoteDesktopProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpImplRemoteDesktopProxy.
 */

struct _XdpImplRemoteDesktopProxyPrivate
{
  GData *qdata;
};

static void xdp_impl_remote_desktop_proxy_iface_init (XdpImplRemoteDesktopIface *iface);

#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpImplRemoteDesktopProxy, xdp_impl_remote_desktop_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (XdpImplRemoteDesktopProxy)
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_REMOTE_DESKTOP, xdp_impl_remote_desktop_proxy_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpImplRemoteDesktopProxy, xdp_impl_remote_desktop_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_REMOTE_DESKTOP, xdp_impl_remote_desktop_proxy_iface_init))

#endif
static void
xdp_impl_remote_desktop_proxy_finalize (GObject *object)
{
  XdpImplRemoteDesktopProxy *proxy = XDP_IMPL_REMOTE_DESKTOP_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (xdp_impl_remote_desktop_proxy_parent_class)->finalize (object);
}

static void
xdp_impl_remote_desktop_proxy_get_property (GObject      *object,
  guint         prop_id,
  GValue       *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  const _ExtendedGDBusPropertyInfo *info;
  GVariant *variant;
  g_assert (prop_id != 0 && prop_id - 1 < 2);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_impl_remote_desktop_property_info_pointers[prop_id - 1];
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), info->parent_struct.name);
  if (info->use_gvariant)
    {
      g_value_set_variant (value, variant);
    }
  else
    {
      if (variant != NULL)
        g_dbus_gvariant_to_gvalue (variant, value);
    }
  if (variant != NULL)
    g_variant_unref (variant);
}

static void
xdp_impl_remote_desktop_proxy_set_property_cb (GDBusProxy *proxy,
  GAsyncResult *res,
  gpointer      user_data)
{
  const _ExtendedGDBusPropertyInfo *info = user_data;
  GError *error;
  GVariant *_ret;
  error = NULL;
  _ret = g_dbus_proxy_call_finish (proxy, res, &error);
  if (!_ret)
    {
      g_warning ("Error setting property '%s' on interface org.freedesktop.impl.portal.RemoteDesktop: %s (%s, %d)",
                 info->parent_struct.name, 
                 error->message, g_quark_to_string (error->domain), error->code);
      g_error_free (error);
    }
  else
    {
      g_variant_unref (_ret);
    }
}

static void
xdp_impl_remote_desktop_proxy_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  const _ExtendedGDBusPropertyInfo *info;
  GVariant *variant;
  g_assert (prop_id != 0 && prop_id - 1 < 2);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_impl_remote_desktop_property_info_pointers[prop_id - 1];
  variant = g_dbus_gvalue_to_gvariant (value, G_VARIANT_TYPE (info->parent_struct.signature));
  g_dbus_proxy_call (G_DBUS_PROXY (object),
    "org.freedesktop.DBus.Properties.Set",
    g_variant_new ("(ssv)", "org.freedesktop.impl.portal.RemoteDesktop", info->parent_struct.name, variant),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    NULL, (GAsyncReadyCallback) xdp_impl_remote_desktop_proxy_set_property_cb, (GDBusPropertyInfo *) &info->parent_struct);
  g_variant_unref (variant);
}

static void
xdp_impl_remote_desktop_proxy_g_signal (GDBusProxy *proxy,
  const gchar *sender_name G_GNUC_UNUSED,
  const gchar *signal_name,
  GVariant *parameters)
{
  _ExtendedGDBusSignalInfo *info;
  GVariantIter iter;
  GVariant *child;
  GValue *paramv;
  gsize num_params;
  gsize n;
  guint signal_id;
  info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_xdp_impl_remote_desktop_interface_info.parent_struct, signal_name);
  if (info == NULL)
    return;
  num_params = g_variant_n_children (parameters);
  paramv = g_new0 (GValue, num_params + 1);
  g_value_init (&paramv[0], XDP_IMPL_TYPE_REMOTE_DESKTOP);
  g_value_set_object (&paramv[0], proxy);
  g_variant_iter_init (&iter, parameters);
  n = 1;
  while ((child = g_variant_iter_next_value (&iter)) != NULL)
    {
      _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1];
      if (arg_info->use_gvariant)
        {
          g_value_init (&paramv[n], G_TYPE_VARIANT);
          g_value_set_variant (&paramv[n], child);
          n++;
        }
      else
        g_dbus_gvariant_to_gvalue (child, &paramv[n++]);
      g_variant_unref (child);
    }
  signal_id = g_signal_lookup (info->signal_name, XDP_IMPL_TYPE_REMOTE_DESKTOP);
  g_signal_emitv (paramv, signal_id, 0, NULL);
  for (n = 0; n < num_params + 1; n++)
    g_value_unset (&paramv[n]);
  g_free (paramv);
}

static void
xdp_impl_remote_desktop_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  XdpImplRemoteDesktopProxy *proxy = XDP_IMPL_REMOTE_DESKTOP_PROXY (_proxy);
  guint n;
  const gchar *key;
  GVariantIter *iter;
  _ExtendedGDBusPropertyInfo *info;
  g_variant_get (changed_properties, "a{sv}", &iter);
  while (g_variant_iter_next (iter, "{&sv}", &key, NULL))
    {
      info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_remote_desktop_interface_info.parent_struct, key);
      g_datalist_remove_data (&proxy->priv->qdata, key);
      if (info != NULL)
        g_object_notify (G_OBJECT (proxy), info->hyphen_name);
    }
  g_variant_iter_free (iter);
  for (n = 0; invalidated_properties[n] != NULL; n++)
    {
      info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_remote_desktop_interface_info.parent_struct, invalidated_properties[n]);
      g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]);
      if (info != NULL)
        g_object_notify (G_OBJECT (proxy), info->hyphen_name);
    }
}

static guint 
xdp_impl_remote_desktop_proxy_get_available_device_types (XdpImplRemoteDesktop *object)
{
  XdpImplRemoteDesktopProxy *proxy = XDP_IMPL_REMOTE_DESKTOP_PROXY (object);
  GVariant *variant;
  guint value = 0;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "AvailableDeviceTypes");
  if (variant != NULL)
    {
      value = g_variant_get_uint32 (variant);
      g_variant_unref (variant);
    }
  return value;
}

static guint 
xdp_impl_remote_desktop_proxy_get_version (XdpImplRemoteDesktop *object)
{
  XdpImplRemoteDesktopProxy *proxy = XDP_IMPL_REMOTE_DESKTOP_PROXY (object);
  GVariant *variant;
  guint value = 0;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "version");
  if (variant != NULL)
    {
      value = g_variant_get_uint32 (variant);
      g_variant_unref (variant);
    }
  return value;
}

static void
xdp_impl_remote_desktop_proxy_init (XdpImplRemoteDesktopProxy *proxy)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  proxy->priv = xdp_impl_remote_desktop_proxy_get_instance_private (proxy);
#else
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, XDP_IMPL_TYPE_REMOTE_DESKTOP_PROXY, XdpImplRemoteDesktopProxyPrivate);
#endif

  g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), xdp_impl_remote_desktop_interface_info ());
}

static void
xdp_impl_remote_desktop_proxy_class_init (XdpImplRemoteDesktopProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = xdp_impl_remote_desktop_proxy_finalize;
  gobject_class->get_property = xdp_impl_remote_desktop_proxy_get_property;
  gobject_class->set_property = xdp_impl_remote_desktop_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = xdp_impl_remote_desktop_proxy_g_signal;
  proxy_class->g_properties_changed = xdp_impl_remote_desktop_proxy_g_properties_changed;

  xdp_impl_remote_desktop_override_properties (gobject_class, 1);

#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
  g_type_class_add_private (klass, sizeof (XdpImplRemoteDesktopProxyPrivate));
#endif
}

static void
xdp_impl_remote_desktop_proxy_iface_init (XdpImplRemoteDesktopIface *iface)
{
  iface->get_available_device_types = xdp_impl_remote_desktop_proxy_get_available_device_types;
  iface->get_version = xdp_impl_remote_desktop_proxy_get_version;
}

/**
 * xdp_impl_remote_desktop_proxy_new:
 * @connection: A #GDBusConnection.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-RemoteDesktop.top_of_page">org.freedesktop.impl.portal.RemoteDesktop</link>. 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 xdp_impl_remote_desktop_proxy_new_finish() to get the result of the operation.
 *
 * See xdp_impl_remote_desktop_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_impl_remote_desktop_proxy_new (
    GDBusConnection     *connection,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GAsyncReadyCallback  callback,
    gpointer             user_data)
{
  g_async_initable_new_async (XDP_IMPL_TYPE_REMOTE_DESKTOP_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.RemoteDesktop", NULL);
}

/**
 * xdp_impl_remote_desktop_proxy_new_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_remote_desktop_proxy_new().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_impl_remote_desktop_proxy_new().
 *
 * Returns: (transfer full) (type XdpImplRemoteDesktopProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplRemoteDesktop *
xdp_impl_remote_desktop_proxy_new_finish (
    GAsyncResult        *res,
    GError             **error)
{
  GObject *ret;
  GObject *source_object;
  source_object = g_async_result_get_source_object (res);
  ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
  g_object_unref (source_object);
  if (ret != NULL)
    return XDP_IMPL_REMOTE_DESKTOP (ret);
  else
    return NULL;
}

/**
 * xdp_impl_remote_desktop_proxy_new_sync:
 * @connection: A #GDBusConnection.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL
 *
 * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-RemoteDesktop.top_of_page">org.freedesktop.impl.portal.RemoteDesktop</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_remote_desktop_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpImplRemoteDesktopProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplRemoteDesktop *
xdp_impl_remote_desktop_proxy_new_sync (
    GDBusConnection     *connection,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GError             **error)
{
  GInitable *ret;
  ret = g_initable_new (XDP_IMPL_TYPE_REMOTE_DESKTOP_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.RemoteDesktop", NULL);
  if (ret != NULL)
    return XDP_IMPL_REMOTE_DESKTOP (ret);
  else
    return NULL;
}


/**
 * xdp_impl_remote_desktop_proxy_new_for_bus:
 * @bus_type: A #GBusType.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: A bus name (well-known or unique).
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
 * @user_data: User data to pass to @callback.
 *
 * Like xdp_impl_remote_desktop_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 xdp_impl_remote_desktop_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See xdp_impl_remote_desktop_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_impl_remote_desktop_proxy_new_for_bus (
    GBusType             bus_type,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GAsyncReadyCallback  callback,
    gpointer             user_data)
{
  g_async_initable_new_async (XDP_IMPL_TYPE_REMOTE_DESKTOP_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.RemoteDesktop", NULL);
}

/**
 * xdp_impl_remote_desktop_proxy_new_for_bus_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_remote_desktop_proxy_new_for_bus().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_impl_remote_desktop_proxy_new_for_bus().
 *
 * Returns: (transfer full) (type XdpImplRemoteDesktopProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplRemoteDesktop *
xdp_impl_remote_desktop_proxy_new_for_bus_finish (
    GAsyncResult        *res,
    GError             **error)
{
  GObject *ret;
  GObject *source_object;
  source_object = g_async_result_get_source_object (res);
  ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
  g_object_unref (source_object);
  if (ret != NULL)
    return XDP_IMPL_REMOTE_DESKTOP (ret);
  else
    return NULL;
}

/**
 * xdp_impl_remote_desktop_proxy_new_for_bus_sync:
 * @bus_type: A #GBusType.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: A bus name (well-known or unique).
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL
 *
 * Like xdp_impl_remote_desktop_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_remote_desktop_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpImplRemoteDesktopProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplRemoteDesktop *
xdp_impl_remote_desktop_proxy_new_for_bus_sync (
    GBusType             bus_type,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GError             **error)
{
  GInitable *ret;
  ret = g_initable_new (XDP_IMPL_TYPE_REMOTE_DESKTOP_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.RemoteDesktop", NULL);
  if (ret != NULL)
    return XDP_IMPL_REMOTE_DESKTOP (ret);
  else
    return NULL;
}


/* ------------------------------------------------------------------------ */

/**
 * XdpImplRemoteDesktopSkeleton:
 *
 * The #XdpImplRemoteDesktopSkeleton structure contains only private data and should only be accessed using the provided API.
 */

/**
 * XdpImplRemoteDesktopSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpImplRemoteDesktopSkeleton.
 */

struct _XdpImplRemoteDesktopSkeletonPrivate
{
  GValue *properties;
  GList *changed_properties;
  GSource *changed_properties_idle_source;
  GMainContext *context;
  GMutex lock;
};

static void
_xdp_impl_remote_desktop_skeleton_handle_method_call (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name,
  const gchar *method_name,
  GVariant *parameters,
  GDBusMethodInvocation *invocation,
  gpointer user_data)
{
  XdpImplRemoteDesktopSkeleton *skeleton = XDP_IMPL_REMOTE_DESKTOP_SKELETON (user_data);
  _ExtendedGDBusMethodInfo *info;
  GVariantIter iter;
  GVariant *child;
  GValue *paramv;
  gsize num_params;
  guint num_extra;
  gsize n;
  guint signal_id;
  GValue return_value = G_VALUE_INIT;
  info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
  g_assert (info != NULL);
  num_params = g_variant_n_children (parameters);
  num_extra = info->pass_fdlist ? 3 : 2;  paramv = g_new0 (GValue, num_params + num_extra);
  n = 0;
  g_value_init (&paramv[n], XDP_IMPL_TYPE_REMOTE_DESKTOP);
  g_value_set_object (&paramv[n++], skeleton);
  g_value_init (&paramv[n], G_TYPE_DBUS_METHOD_INVOCATION);
  g_value_set_object (&paramv[n++], invocation);
  if (info->pass_fdlist)
    {
#ifdef G_OS_UNIX
      g_value_init (&paramv[n], G_TYPE_UNIX_FD_LIST);
      g_value_set_object (&paramv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation)));
#else
      g_assert_not_reached ();
#endif
    }
  g_variant_iter_init (&iter, parameters);
  while ((child = g_variant_iter_next_value (&iter)) != NULL)
    {
      _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra];
      if (arg_info->use_gvariant)
        {
          g_value_init (&paramv[n], G_TYPE_VARIANT);
          g_value_set_variant (&paramv[n], child);
          n++;
        }
      else
        g_dbus_gvariant_to_gvalue (child, &paramv[n++]);
      g_variant_unref (child);
    }
  signal_id = g_signal_lookup (info->signal_name, XDP_IMPL_TYPE_REMOTE_DESKTOP);
  g_value_init (&return_value, G_TYPE_BOOLEAN);
  g_signal_emitv (paramv, signal_id, 0, &return_value);
  if (!g_value_get_boolean (&return_value))
    g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD, "Method %s is not implemented on interface %s", method_name, interface_name);
  g_value_unset (&return_value);
  for (n = 0; n < num_params + num_extra; n++)
    g_value_unset (&paramv[n]);
  g_free (paramv);
}

static GVariant *
_xdp_impl_remote_desktop_skeleton_handle_get_property (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name G_GNUC_UNUSED,
  const gchar *property_name,
  GError **error,
  gpointer user_data)
{
  XdpImplRemoteDesktopSkeleton *skeleton = XDP_IMPL_REMOTE_DESKTOP_SKELETON (user_data);
  GValue value = G_VALUE_INIT;
  GParamSpec *pspec;
  _ExtendedGDBusPropertyInfo *info;
  GVariant *ret;
  ret = NULL;
  info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_remote_desktop_interface_info.parent_struct, property_name);
  g_assert (info != NULL);
  pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
  if (pspec == NULL)
    {
      g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
    }
  else
    {
      g_value_init (&value, pspec->value_type);
      g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value);
      ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature));
      g_value_unset (&value);
    }
  return ret;
}

static gboolean
_xdp_impl_remote_desktop_skeleton_handle_set_property (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name G_GNUC_UNUSED,
  const gchar *property_name,
  GVariant *variant,
  GError **error,
  gpointer user_data)
{
  XdpImplRemoteDesktopSkeleton *skeleton = XDP_IMPL_REMOTE_DESKTOP_SKELETON (user_data);
  GValue value = G_VALUE_INIT;
  GParamSpec *pspec;
  _ExtendedGDBusPropertyInfo *info;
  gboolean ret;
  ret = FALSE;
  info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_remote_desktop_interface_info.parent_struct, property_name);
  g_assert (info != NULL);
  pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
  if (pspec == NULL)
    {
      g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
    }
  else
    {
      if (info->use_gvariant)
        g_value_set_variant (&value, variant);
      else
        g_dbus_gvariant_to_gvalue (variant, &value);
      g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value);
      g_value_unset (&value);
      ret = TRUE;
    }
  return ret;
}

static const GDBusInterfaceVTable _xdp_impl_remote_desktop_skeleton_vtable =
{
  _xdp_impl_remote_desktop_skeleton_handle_method_call,
  _xdp_impl_remote_desktop_skeleton_handle_get_property,
  _xdp_impl_remote_desktop_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
xdp_impl_remote_desktop_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return xdp_impl_remote_desktop_interface_info ();
}

static GDBusInterfaceVTable *
xdp_impl_remote_desktop_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_xdp_impl_remote_desktop_skeleton_vtable;
}

static GVariant *
xdp_impl_remote_desktop_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  XdpImplRemoteDesktopSkeleton *skeleton = XDP_IMPL_REMOTE_DESKTOP_SKELETON (_skeleton);

  GVariantBuilder builder;
  guint n;
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_84
  g_variant_builder_init_static (&builder, G_VARIANT_TYPE ("a{sv}"));
#else
  g_variant_builder_init(&builder, G_VARIANT_TYPE ("a{sv}"));
#endif
  if (_xdp_impl_remote_desktop_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _xdp_impl_remote_desktop_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _xdp_impl_remote_desktop_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _xdp_impl_remote_desktop_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.impl.portal.RemoteDesktop", info->name, NULL, skeleton);
          if (value != NULL)
            {
              g_variant_take_ref (value);
              g_variant_builder_add (&builder, "{sv}", info->name, value);
              g_variant_unref (value);
            }
        }
    }
out:
  return g_variant_builder_end (&builder);
}

static gboolean _xdp_impl_remote_desktop_emit_changed (gpointer user_data);

static void
xdp_impl_remote_desktop_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
{
  XdpImplRemoteDesktopSkeleton *skeleton = XDP_IMPL_REMOTE_DESKTOP_SKELETON (_skeleton);
  gboolean emit_changed = FALSE;

  g_mutex_lock (&skeleton->priv->lock);
  if (skeleton->priv->changed_properties_idle_source != NULL)
    {
      g_source_destroy (skeleton->priv->changed_properties_idle_source);
      skeleton->priv->changed_properties_idle_source = NULL;
      emit_changed = TRUE;
    }
  g_mutex_unlock (&skeleton->priv->lock);

  if (emit_changed)
    _xdp_impl_remote_desktop_emit_changed (skeleton);
}

static void xdp_impl_remote_desktop_skeleton_iface_init (XdpImplRemoteDesktopIface *iface);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpImplRemoteDesktopSkeleton, xdp_impl_remote_desktop_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (XdpImplRemoteDesktopSkeleton)
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_REMOTE_DESKTOP, xdp_impl_remote_desktop_skeleton_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpImplRemoteDesktopSkeleton, xdp_impl_remote_desktop_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_REMOTE_DESKTOP, xdp_impl_remote_desktop_skeleton_iface_init))

#endif
static void
xdp_impl_remote_desktop_skeleton_finalize (GObject *object)
{
  XdpImplRemoteDesktopSkeleton *skeleton = XDP_IMPL_REMOTE_DESKTOP_SKELETON (object);
  guint n;
  for (n = 0; n < 2; n++)
    g_value_unset (&skeleton->priv->properties[n]);
  g_free (skeleton->priv->properties);
  g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  /* coverity[missing_lock : SUPPRESS] */
  g_clear_pointer (&skeleton->priv->changed_properties_idle_source, g_source_destroy);
#else
  if (skeleton->priv->changed_properties_idle_source != NULL)
    g_source_destroy (skeleton->priv->changed_properties_idle_source);
skeleton->priv->changed_properties_idle_source = NULL;
#endif
  g_main_context_unref (skeleton->priv->context);
  g_mutex_clear (&skeleton->priv->lock);
  G_OBJECT_CLASS (xdp_impl_remote_desktop_skeleton_parent_class)->finalize (object);
}

static void
xdp_impl_remote_desktop_skeleton_get_property (GObject      *object,
  guint         prop_id,
  GValue       *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  XdpImplRemoteDesktopSkeleton *skeleton = XDP_IMPL_REMOTE_DESKTOP_SKELETON (object);
  g_assert (prop_id != 0 && prop_id - 1 < 2);
  g_mutex_lock (&skeleton->priv->lock);
  g_value_copy (&skeleton->priv->properties[prop_id - 1], value);
  g_mutex_unlock (&skeleton->priv->lock);
}

static gboolean
_xdp_impl_remote_desktop_emit_changed (gpointer user_data)
{
  XdpImplRemoteDesktopSkeleton *skeleton = XDP_IMPL_REMOTE_DESKTOP_SKELETON (user_data);
  GList *l;
  GVariantBuilder builder;
  GVariantBuilder invalidated_builder;
  guint num_changes;

  g_mutex_lock (&skeleton->priv->lock);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_84
  g_variant_builder_init_static (&builder, G_VARIANT_TYPE ("a{sv}"));
  g_variant_builder_init_static (&invalidated_builder, G_VARIANT_TYPE ("as"));
#else
  g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
  g_variant_builder_init (&invalidated_builder, G_VARIANT_TYPE ("as"));
#endif
  for (l = skeleton->priv->changed_properties, num_changes = 0; l != NULL; l = l->next)
    {
      ChangedProperty *cp = l->data;
      GVariant *variant;
      const GValue *cur_value;

      cur_value = &skeleton->priv->properties[cp->prop_id - 1];
      if (!_g_value_equal (cur_value, &cp->orig_value))
        {
          variant = g_dbus_gvalue_to_gvariant (cur_value, G_VARIANT_TYPE (cp->info->parent_struct.signature));
          g_variant_builder_add (&builder, "{sv}", cp->info->parent_struct.name, variant);
          g_variant_unref (variant);
          num_changes++;
        }
    }
  if (num_changes > 0)
    {
      GList *connections, *ll;
      GVariant *signal_variant;
      signal_variant = g_variant_ref_sink (g_variant_new ("(sa{sv}as)", "org.freedesktop.impl.portal.RemoteDesktop",
                                           &builder, &invalidated_builder));
      connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
      for (ll = connections; ll != NULL; ll = ll->next)
        {
          GDBusConnection *connection = ll->data;

          g_dbus_connection_emit_signal (connection,
                                         NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)),
                                         "org.freedesktop.DBus.Properties",
                                         "PropertiesChanged",
                                         signal_variant,
                                         NULL);
        }
      g_variant_unref (signal_variant);
      g_list_free_full (connections, g_object_unref);
    }
  else
    {
      g_variant_builder_clear (&builder);
      g_variant_builder_clear (&invalidated_builder);
    }
  g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
  skeleton->priv->changed_properties = NULL;
  skeleton->priv->changed_properties_idle_source = NULL;
  g_mutex_unlock (&skeleton->priv->lock);
  return FALSE;
}

static void
_xdp_impl_remote_desktop_schedule_emit_changed (XdpImplRemoteDesktopSkeleton *skeleton, const _ExtendedGDBusPropertyInfo *info, guint prop_id, const GValue *orig_value)
{
  ChangedProperty *cp;
  GList *l;
  cp = NULL;
  for (l = skeleton->priv->changed_properties; l != NULL; l = l->next)
    {
      ChangedProperty *i_cp = l->data;
      if (i_cp->info == info)
        {
          cp = i_cp;
          break;
        }
    }
  if (cp == NULL)
    {
      cp = g_new0 (ChangedProperty, 1);
      cp->prop_id = prop_id;
      cp->info = info;
      skeleton->priv->changed_properties = g_list_prepend (skeleton->priv->changed_properties, cp);
      g_value_init (&cp->orig_value, G_VALUE_TYPE (orig_value));
      g_value_copy (orig_value, &cp->orig_value);
    }
}

static void
xdp_impl_remote_desktop_skeleton_notify (GObject      *object,
  GParamSpec *pspec G_GNUC_UNUSED)
{
  XdpImplRemoteDesktopSkeleton *skeleton = XDP_IMPL_REMOTE_DESKTOP_SKELETON (object);
  g_mutex_lock (&skeleton->priv->lock);
  if (skeleton->priv->changed_properties != NULL &&
      skeleton->priv->changed_properties_idle_source == NULL)
    {
      skeleton->priv->changed_properties_idle_source = g_idle_source_new ();
      g_source_set_priority (skeleton->priv->changed_properties_idle_source, G_PRIORITY_DEFAULT);
      g_source_set_callback (skeleton->priv->changed_properties_idle_source, _xdp_impl_remote_desktop_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
      g_source_set_name (skeleton->priv->changed_properties_idle_source, "[generated] _xdp_impl_remote_desktop_emit_changed");
      g_source_attach (skeleton->priv->changed_properties_idle_source, skeleton->priv->context);
      g_source_unref (skeleton->priv->changed_properties_idle_source);
    }
  g_mutex_unlock (&skeleton->priv->lock);
}

static void
xdp_impl_remote_desktop_skeleton_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec)
{
  const _ExtendedGDBusPropertyInfo *info;
  XdpImplRemoteDesktopSkeleton *skeleton = XDP_IMPL_REMOTE_DESKTOP_SKELETON (object);
  g_assert (prop_id != 0 && prop_id - 1 < 2);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_impl_remote_desktop_property_info_pointers[prop_id - 1];
  g_mutex_lock (&skeleton->priv->lock);
  g_object_freeze_notify (object);
  if (!_g_value_equal (value, &skeleton->priv->properties[prop_id - 1]))
    {
      if (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)) != NULL &&
          info->emits_changed_signal)
        _xdp_impl_remote_desktop_schedule_emit_changed (skeleton, info, prop_id, &skeleton->priv->properties[prop_id - 1]);
      g_value_copy (value, &skeleton->priv->properties[prop_id - 1]);
      g_object_notify_by_pspec (object, pspec);
    }
  g_mutex_unlock (&skeleton->priv->lock);
  g_object_thaw_notify (object);
}

static void
xdp_impl_remote_desktop_skeleton_init (XdpImplRemoteDesktopSkeleton *skeleton)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  skeleton->priv = xdp_impl_remote_desktop_skeleton_get_instance_private (skeleton);
#else
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, XDP_IMPL_TYPE_REMOTE_DESKTOP_SKELETON, XdpImplRemoteDesktopSkeletonPrivate);
#endif

  g_mutex_init (&skeleton->priv->lock);
  skeleton->priv->context = g_main_context_ref_thread_default ();
  skeleton->priv->properties = g_new0 (GValue, 2);
  g_value_init (&skeleton->priv->properties[0], G_TYPE_UINT);
  g_value_init (&skeleton->priv->properties[1], G_TYPE_UINT);
}

static guint 
xdp_impl_remote_desktop_skeleton_get_available_device_types (XdpImplRemoteDesktop *object)
{
  XdpImplRemoteDesktopSkeleton *skeleton = XDP_IMPL_REMOTE_DESKTOP_SKELETON (object);
  guint value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_marshal_value_peek_uint (&(skeleton->priv->properties[0]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static guint 
xdp_impl_remote_desktop_skeleton_get_version (XdpImplRemoteDesktop *object)
{
  XdpImplRemoteDesktopSkeleton *skeleton = XDP_IMPL_REMOTE_DESKTOP_SKELETON (object);
  guint value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_marshal_value_peek_uint (&(skeleton->priv->properties[1]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static void
xdp_impl_remote_desktop_skeleton_class_init (XdpImplRemoteDesktopSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize = xdp_impl_remote_desktop_skeleton_finalize;
  gobject_class->get_property = xdp_impl_remote_desktop_skeleton_get_property;
  gobject_class->set_property = xdp_impl_remote_desktop_skeleton_set_property;
  gobject_class->notify       = xdp_impl_remote_desktop_skeleton_notify;


  xdp_impl_remote_desktop_override_properties (gobject_class, 1);

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = xdp_impl_remote_desktop_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = xdp_impl_remote_desktop_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = xdp_impl_remote_desktop_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = xdp_impl_remote_desktop_skeleton_dbus_interface_get_vtable;

#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
  g_type_class_add_private (klass, sizeof (XdpImplRemoteDesktopSkeletonPrivate));
#endif
}

static void
xdp_impl_remote_desktop_skeleton_iface_init (XdpImplRemoteDesktopIface *iface)
{
  iface->get_available_device_types = xdp_impl_remote_desktop_skeleton_get_available_device_types;
  iface->get_version = xdp_impl_remote_desktop_skeleton_get_version;
}

/**
 * xdp_impl_remote_desktop_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-RemoteDesktop.top_of_page">org.freedesktop.impl.portal.RemoteDesktop</link>.
 *
 * Returns: (transfer full) (type XdpImplRemoteDesktopSkeleton): The skeleton object.
 */
XdpImplRemoteDesktop *
xdp_impl_remote_desktop_skeleton_new (void)
{
  return XDP_IMPL_REMOTE_DESKTOP (g_object_new (XDP_IMPL_TYPE_REMOTE_DESKTOP_SKELETON, NULL));
}

/* ------------------------------------------------------------------------
 * Code for interface org.freedesktop.impl.portal.Request
 * ------------------------------------------------------------------------
 */

/**
 * SECTION:XdpImplRequest
 * @title: XdpImplRequest
 * @short_description: Generated C code for the org.freedesktop.impl.portal.Request D-Bus interface
 *
 * This section contains code for working with the <link linkend="gdbus-interface-org-freedesktop-impl-portal-Request.top_of_page">org.freedesktop.impl.portal.Request</link> D-Bus interface in C.
 */

/* ---- Introspection data for org.freedesktop.impl.portal.Request ---- */

static const _ExtendedGDBusMethodInfo _xdp_impl_request_method_info_close =
{
  {
    -1,
    (gchar *) "Close",
    NULL,
    NULL,
    NULL
  },
  "handle-close",
  FALSE
};

static const GDBusMethodInfo * const _xdp_impl_request_method_info_pointers[] =
{
  &_xdp_impl_request_method_info_close.parent_struct,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _xdp_impl_request_interface_info =
{
  {
    -1,
    (gchar *) "org.freedesktop.impl.portal.Request",
    (GDBusMethodInfo **) &_xdp_impl_request_method_info_pointers,
    NULL,
    NULL,
    NULL
  },
  "request",
};


/**
 * xdp_impl_request_interface_info:
 *
 * Gets a machine-readable description of the <link linkend="gdbus-interface-org-freedesktop-impl-portal-Request.top_of_page">org.freedesktop.impl.portal.Request</link> D-Bus interface.
 *
 * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
 */
GDBusInterfaceInfo *
xdp_impl_request_interface_info (void)
{
  return (GDBusInterfaceInfo *) &_xdp_impl_request_interface_info.parent_struct;
}

/**
 * xdp_impl_request_override_properties:
 * @klass: The class structure for a #GObject derived class.
 * @property_id_begin: The property id to assign to the first overridden property.
 *
 * Overrides all #GObject properties in the #XdpImplRequest interface for a concrete class.
 * The properties are overridden in the order they are defined.
 *
 * Returns: The last property id.
 */
guint
xdp_impl_request_override_properties (GObjectClass *klass G_GNUC_UNUSED, guint property_id_begin)
{
  return property_id_begin - 1;
}


inline static void
xdp_impl_request_method_marshal_close (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  _g_dbus_codegen_marshal_BOOLEAN__OBJECT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}


/**
 * XdpImplRequest:
 *
 * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-Request.top_of_page">org.freedesktop.impl.portal.Request</link>.
 */

/**
 * XdpImplRequestIface:
 * @parent_iface: The parent interface.
 * @handle_close: Handler for the #XdpImplRequest::handle-close signal.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-Request.top_of_page">org.freedesktop.impl.portal.Request</link>.
 */

typedef XdpImplRequestIface XdpImplRequestInterface;
G_DEFINE_INTERFACE (XdpImplRequest, xdp_impl_request, G_TYPE_OBJECT)

static void
xdp_impl_request_default_init (XdpImplRequestIface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * XdpImplRequest::handle-close:
   * @object: A #XdpImplRequest.
   * @invocation: A #GDBusMethodInvocation.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-impl-portal-Request.Close">Close()</link> 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 xdp_impl_request_complete_close() 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.
   *
   * 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.
   */
  g_signal_new ("handle-close",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpImplRequestIface, handle_close),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_impl_request_method_marshal_close,
    G_TYPE_BOOLEAN,
    1,
    G_TYPE_DBUS_METHOD_INVOCATION);

}

/**
 * xdp_impl_request_call_close:
 * @proxy: A #XdpImplRequestProxy.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-Request.Close">Close()</link> 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 xdp_impl_request_call_close_finish() to get the result of the operation.
 *
 * See xdp_impl_request_call_close_sync() for the synchronous, blocking version of this method.
 */
void
xdp_impl_request_call_close (
    XdpImplRequest *proxy,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "Close",
    g_variant_new ("()"),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_impl_request_call_close_finish:
 * @proxy: A #XdpImplRequestProxy.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_request_call_close().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_impl_request_call_close().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_request_call_close_finish (
    XdpImplRequest *proxy,
    GAsyncResult *res,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "()");
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_request_call_close_sync:
 * @proxy: A #XdpImplRequestProxy.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-Request.Close">Close()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_request_call_close() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_request_call_close_sync (
    XdpImplRequest *proxy,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "Close",
    g_variant_new ("()"),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "()");
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_request_complete_close:
 * @object: A #XdpImplRequest.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-impl-portal-Request.Close">Close()</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
xdp_impl_request_complete_close (
    XdpImplRequest *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("()"));
}

/* ------------------------------------------------------------------------ */

/**
 * XdpImplRequestProxy:
 *
 * The #XdpImplRequestProxy structure contains only private data and should only be accessed using the provided API.
 */

/**
 * XdpImplRequestProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpImplRequestProxy.
 */

struct _XdpImplRequestProxyPrivate
{
  GData *qdata;
};

static void xdp_impl_request_proxy_iface_init (XdpImplRequestIface *iface);

#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpImplRequestProxy, xdp_impl_request_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (XdpImplRequestProxy)
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_REQUEST, xdp_impl_request_proxy_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpImplRequestProxy, xdp_impl_request_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_REQUEST, xdp_impl_request_proxy_iface_init))

#endif
static void
xdp_impl_request_proxy_finalize (GObject *object)
{
  XdpImplRequestProxy *proxy = XDP_IMPL_REQUEST_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (xdp_impl_request_proxy_parent_class)->finalize (object);
}

static void
xdp_impl_request_proxy_get_property (GObject      *object G_GNUC_UNUSED,
  guint         prop_id G_GNUC_UNUSED,
  GValue       *value G_GNUC_UNUSED,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
}

static void
xdp_impl_request_proxy_set_property (GObject      *object G_GNUC_UNUSED,
  guint         prop_id G_GNUC_UNUSED,
  const GValue *value G_GNUC_UNUSED,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
}

static void
xdp_impl_request_proxy_g_signal (GDBusProxy *proxy,
  const gchar *sender_name G_GNUC_UNUSED,
  const gchar *signal_name,
  GVariant *parameters)
{
  _ExtendedGDBusSignalInfo *info;
  GVariantIter iter;
  GVariant *child;
  GValue *paramv;
  gsize num_params;
  gsize n;
  guint signal_id;
  info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_xdp_impl_request_interface_info.parent_struct, signal_name);
  if (info == NULL)
    return;
  num_params = g_variant_n_children (parameters);
  paramv = g_new0 (GValue, num_params + 1);
  g_value_init (&paramv[0], XDP_IMPL_TYPE_REQUEST);
  g_value_set_object (&paramv[0], proxy);
  g_variant_iter_init (&iter, parameters);
  n = 1;
  while ((child = g_variant_iter_next_value (&iter)) != NULL)
    {
      _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1];
      if (arg_info->use_gvariant)
        {
          g_value_init (&paramv[n], G_TYPE_VARIANT);
          g_value_set_variant (&paramv[n], child);
          n++;
        }
      else
        g_dbus_gvariant_to_gvalue (child, &paramv[n++]);
      g_variant_unref (child);
    }
  signal_id = g_signal_lookup (info->signal_name, XDP_IMPL_TYPE_REQUEST);
  g_signal_emitv (paramv, signal_id, 0, NULL);
  for (n = 0; n < num_params + 1; n++)
    g_value_unset (&paramv[n]);
  g_free (paramv);
}

static void
xdp_impl_request_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  XdpImplRequestProxy *proxy = XDP_IMPL_REQUEST_PROXY (_proxy);
  guint n;
  const gchar *key;
  GVariantIter *iter;
  _ExtendedGDBusPropertyInfo *info;
  g_variant_get (changed_properties, "a{sv}", &iter);
  while (g_variant_iter_next (iter, "{&sv}", &key, NULL))
    {
      info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_request_interface_info.parent_struct, key);
      g_datalist_remove_data (&proxy->priv->qdata, key);
      if (info != NULL)
        g_object_notify (G_OBJECT (proxy), info->hyphen_name);
    }
  g_variant_iter_free (iter);
  for (n = 0; invalidated_properties[n] != NULL; n++)
    {
      info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_request_interface_info.parent_struct, invalidated_properties[n]);
      g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]);
      if (info != NULL)
        g_object_notify (G_OBJECT (proxy), info->hyphen_name);
    }
}

static void
xdp_impl_request_proxy_init (XdpImplRequestProxy *proxy)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  proxy->priv = xdp_impl_request_proxy_get_instance_private (proxy);
#else
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, XDP_IMPL_TYPE_REQUEST_PROXY, XdpImplRequestProxyPrivate);
#endif

  g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), xdp_impl_request_interface_info ());
}

static void
xdp_impl_request_proxy_class_init (XdpImplRequestProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = xdp_impl_request_proxy_finalize;
  gobject_class->get_property = xdp_impl_request_proxy_get_property;
  gobject_class->set_property = xdp_impl_request_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = xdp_impl_request_proxy_g_signal;
  proxy_class->g_properties_changed = xdp_impl_request_proxy_g_properties_changed;

#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
  g_type_class_add_private (klass, sizeof (XdpImplRequestProxyPrivate));
#endif
}

static void
xdp_impl_request_proxy_iface_init (XdpImplRequestIface *iface G_GNUC_UNUSED)
{
}

/**
 * xdp_impl_request_proxy_new:
 * @connection: A #GDBusConnection.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-Request.top_of_page">org.freedesktop.impl.portal.Request</link>. 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 xdp_impl_request_proxy_new_finish() to get the result of the operation.
 *
 * See xdp_impl_request_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_impl_request_proxy_new (
    GDBusConnection     *connection,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GAsyncReadyCallback  callback,
    gpointer             user_data)
{
  g_async_initable_new_async (XDP_IMPL_TYPE_REQUEST_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.Request", NULL);
}

/**
 * xdp_impl_request_proxy_new_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_request_proxy_new().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_impl_request_proxy_new().
 *
 * Returns: (transfer full) (type XdpImplRequestProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplRequest *
xdp_impl_request_proxy_new_finish (
    GAsyncResult        *res,
    GError             **error)
{
  GObject *ret;
  GObject *source_object;
  source_object = g_async_result_get_source_object (res);
  ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
  g_object_unref (source_object);
  if (ret != NULL)
    return XDP_IMPL_REQUEST (ret);
  else
    return NULL;
}

/**
 * xdp_impl_request_proxy_new_sync:
 * @connection: A #GDBusConnection.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL
 *
 * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-Request.top_of_page">org.freedesktop.impl.portal.Request</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_request_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpImplRequestProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplRequest *
xdp_impl_request_proxy_new_sync (
    GDBusConnection     *connection,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GError             **error)
{
  GInitable *ret;
  ret = g_initable_new (XDP_IMPL_TYPE_REQUEST_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.Request", NULL);
  if (ret != NULL)
    return XDP_IMPL_REQUEST (ret);
  else
    return NULL;
}


/**
 * xdp_impl_request_proxy_new_for_bus:
 * @bus_type: A #GBusType.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: A bus name (well-known or unique).
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
 * @user_data: User data to pass to @callback.
 *
 * Like xdp_impl_request_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 xdp_impl_request_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See xdp_impl_request_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_impl_request_proxy_new_for_bus (
    GBusType             bus_type,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GAsyncReadyCallback  callback,
    gpointer             user_data)
{
  g_async_initable_new_async (XDP_IMPL_TYPE_REQUEST_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.Request", NULL);
}

/**
 * xdp_impl_request_proxy_new_for_bus_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_request_proxy_new_for_bus().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_impl_request_proxy_new_for_bus().
 *
 * Returns: (transfer full) (type XdpImplRequestProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplRequest *
xdp_impl_request_proxy_new_for_bus_finish (
    GAsyncResult        *res,
    GError             **error)
{
  GObject *ret;
  GObject *source_object;
  source_object = g_async_result_get_source_object (res);
  ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
  g_object_unref (source_object);
  if (ret != NULL)
    return XDP_IMPL_REQUEST (ret);
  else
    return NULL;
}

/**
 * xdp_impl_request_proxy_new_for_bus_sync:
 * @bus_type: A #GBusType.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: A bus name (well-known or unique).
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL
 *
 * Like xdp_impl_request_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_request_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpImplRequestProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplRequest *
xdp_impl_request_proxy_new_for_bus_sync (
    GBusType             bus_type,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GError             **error)
{
  GInitable *ret;
  ret = g_initable_new (XDP_IMPL_TYPE_REQUEST_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.Request", NULL);
  if (ret != NULL)
    return XDP_IMPL_REQUEST (ret);
  else
    return NULL;
}


/* ------------------------------------------------------------------------ */

/**
 * XdpImplRequestSkeleton:
 *
 * The #XdpImplRequestSkeleton structure contains only private data and should only be accessed using the provided API.
 */

/**
 * XdpImplRequestSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpImplRequestSkeleton.
 */

struct _XdpImplRequestSkeletonPrivate
{
  GValue *properties;
  GList *changed_properties;
  GSource *changed_properties_idle_source;
  GMainContext *context;
  GMutex lock;
};

static void
_xdp_impl_request_skeleton_handle_method_call (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name,
  const gchar *method_name,
  GVariant *parameters,
  GDBusMethodInvocation *invocation,
  gpointer user_data)
{
  XdpImplRequestSkeleton *skeleton = XDP_IMPL_REQUEST_SKELETON (user_data);
  _ExtendedGDBusMethodInfo *info;
  GVariantIter iter;
  GVariant *child;
  GValue *paramv;
  gsize num_params;
  guint num_extra;
  gsize n;
  guint signal_id;
  GValue return_value = G_VALUE_INIT;
  info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
  g_assert (info != NULL);
  num_params = g_variant_n_children (parameters);
  num_extra = info->pass_fdlist ? 3 : 2;  paramv = g_new0 (GValue, num_params + num_extra);
  n = 0;
  g_value_init (&paramv[n], XDP_IMPL_TYPE_REQUEST);
  g_value_set_object (&paramv[n++], skeleton);
  g_value_init (&paramv[n], G_TYPE_DBUS_METHOD_INVOCATION);
  g_value_set_object (&paramv[n++], invocation);
  if (info->pass_fdlist)
    {
#ifdef G_OS_UNIX
      g_value_init (&paramv[n], G_TYPE_UNIX_FD_LIST);
      g_value_set_object (&paramv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation)));
#else
      g_assert_not_reached ();
#endif
    }
  g_variant_iter_init (&iter, parameters);
  while ((child = g_variant_iter_next_value (&iter)) != NULL)
    {
      _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra];
      if (arg_info->use_gvariant)
        {
          g_value_init (&paramv[n], G_TYPE_VARIANT);
          g_value_set_variant (&paramv[n], child);
          n++;
        }
      else
        g_dbus_gvariant_to_gvalue (child, &paramv[n++]);
      g_variant_unref (child);
    }
  signal_id = g_signal_lookup (info->signal_name, XDP_IMPL_TYPE_REQUEST);
  g_value_init (&return_value, G_TYPE_BOOLEAN);
  g_signal_emitv (paramv, signal_id, 0, &return_value);
  if (!g_value_get_boolean (&return_value))
    g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD, "Method %s is not implemented on interface %s", method_name, interface_name);
  g_value_unset (&return_value);
  for (n = 0; n < num_params + num_extra; n++)
    g_value_unset (&paramv[n]);
  g_free (paramv);
}

static GVariant *
_xdp_impl_request_skeleton_handle_get_property (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name G_GNUC_UNUSED,
  const gchar *property_name,
  GError **error,
  gpointer user_data)
{
  XdpImplRequestSkeleton *skeleton = XDP_IMPL_REQUEST_SKELETON (user_data);
  GValue value = G_VALUE_INIT;
  GParamSpec *pspec;
  _ExtendedGDBusPropertyInfo *info;
  GVariant *ret;
  ret = NULL;
  info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_request_interface_info.parent_struct, property_name);
  g_assert (info != NULL);
  pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
  if (pspec == NULL)
    {
      g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
    }
  else
    {
      g_value_init (&value, pspec->value_type);
      g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value);
      ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature));
      g_value_unset (&value);
    }
  return ret;
}

static gboolean
_xdp_impl_request_skeleton_handle_set_property (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name G_GNUC_UNUSED,
  const gchar *property_name,
  GVariant *variant,
  GError **error,
  gpointer user_data)
{
  XdpImplRequestSkeleton *skeleton = XDP_IMPL_REQUEST_SKELETON (user_data);
  GValue value = G_VALUE_INIT;
  GParamSpec *pspec;
  _ExtendedGDBusPropertyInfo *info;
  gboolean ret;
  ret = FALSE;
  info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_request_interface_info.parent_struct, property_name);
  g_assert (info != NULL);
  pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
  if (pspec == NULL)
    {
      g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
    }
  else
    {
      if (info->use_gvariant)
        g_value_set_variant (&value, variant);
      else
        g_dbus_gvariant_to_gvalue (variant, &value);
      g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value);
      g_value_unset (&value);
      ret = TRUE;
    }
  return ret;
}

static const GDBusInterfaceVTable _xdp_impl_request_skeleton_vtable =
{
  _xdp_impl_request_skeleton_handle_method_call,
  _xdp_impl_request_skeleton_handle_get_property,
  _xdp_impl_request_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
xdp_impl_request_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return xdp_impl_request_interface_info ();
}

static GDBusInterfaceVTable *
xdp_impl_request_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_xdp_impl_request_skeleton_vtable;
}

static GVariant *
xdp_impl_request_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  XdpImplRequestSkeleton *skeleton = XDP_IMPL_REQUEST_SKELETON (_skeleton);

  GVariantBuilder builder;
  guint n;
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_84
  g_variant_builder_init_static (&builder, G_VARIANT_TYPE ("a{sv}"));
#else
  g_variant_builder_init(&builder, G_VARIANT_TYPE ("a{sv}"));
#endif
  if (_xdp_impl_request_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _xdp_impl_request_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _xdp_impl_request_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _xdp_impl_request_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.impl.portal.Request", info->name, NULL, skeleton);
          if (value != NULL)
            {
              g_variant_take_ref (value);
              g_variant_builder_add (&builder, "{sv}", info->name, value);
              g_variant_unref (value);
            }
        }
    }
out:
  return g_variant_builder_end (&builder);
}

static void
xdp_impl_request_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton G_GNUC_UNUSED)
{
}

static void xdp_impl_request_skeleton_iface_init (XdpImplRequestIface *iface);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpImplRequestSkeleton, xdp_impl_request_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (XdpImplRequestSkeleton)
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_REQUEST, xdp_impl_request_skeleton_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpImplRequestSkeleton, xdp_impl_request_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_REQUEST, xdp_impl_request_skeleton_iface_init))

#endif
static void
xdp_impl_request_skeleton_finalize (GObject *object)
{
  XdpImplRequestSkeleton *skeleton = XDP_IMPL_REQUEST_SKELETON (object);
  g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  /* coverity[missing_lock : SUPPRESS] */
  g_clear_pointer (&skeleton->priv->changed_properties_idle_source, g_source_destroy);
#else
  if (skeleton->priv->changed_properties_idle_source != NULL)
    g_source_destroy (skeleton->priv->changed_properties_idle_source);
skeleton->priv->changed_properties_idle_source = NULL;
#endif
  g_main_context_unref (skeleton->priv->context);
  g_mutex_clear (&skeleton->priv->lock);
  G_OBJECT_CLASS (xdp_impl_request_skeleton_parent_class)->finalize (object);
}

static void
xdp_impl_request_skeleton_init (XdpImplRequestSkeleton *skeleton)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  skeleton->priv = xdp_impl_request_skeleton_get_instance_private (skeleton);
#else
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, XDP_IMPL_TYPE_REQUEST_SKELETON, XdpImplRequestSkeletonPrivate);
#endif

  g_mutex_init (&skeleton->priv->lock);
  skeleton->priv->context = g_main_context_ref_thread_default ();
}

static void
xdp_impl_request_skeleton_class_init (XdpImplRequestSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize = xdp_impl_request_skeleton_finalize;

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = xdp_impl_request_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = xdp_impl_request_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = xdp_impl_request_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = xdp_impl_request_skeleton_dbus_interface_get_vtable;

#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
  g_type_class_add_private (klass, sizeof (XdpImplRequestSkeletonPrivate));
#endif
}

static void
xdp_impl_request_skeleton_iface_init (XdpImplRequestIface *iface G_GNUC_UNUSED)
{
}

/**
 * xdp_impl_request_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-Request.top_of_page">org.freedesktop.impl.portal.Request</link>.
 *
 * Returns: (transfer full) (type XdpImplRequestSkeleton): The skeleton object.
 */
XdpImplRequest *
xdp_impl_request_skeleton_new (void)
{
  return XDP_IMPL_REQUEST (g_object_new (XDP_IMPL_TYPE_REQUEST_SKELETON, NULL));
}

/* ------------------------------------------------------------------------
 * Code for interface org.freedesktop.impl.portal.ScreenCast
 * ------------------------------------------------------------------------
 */

/**
 * SECTION:XdpImplScreenCast
 * @title: XdpImplScreenCast
 * @short_description: Generated C code for the org.freedesktop.impl.portal.ScreenCast D-Bus interface
 *
 * This section contains code for working with the <link linkend="gdbus-interface-org-freedesktop-impl-portal-ScreenCast.top_of_page">org.freedesktop.impl.portal.ScreenCast</link> D-Bus interface in C.
 */

/* ---- Introspection data for org.freedesktop.impl.portal.ScreenCast ---- */

static const _ExtendedGDBusArgInfo _xdp_impl_screen_cast_method_info_create_session_IN_ARG_handle =
{
  {
    -1,
    (gchar *) "handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_screen_cast_method_info_create_session_IN_ARG_session_handle =
{
  {
    -1,
    (gchar *) "session_handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_screen_cast_method_info_create_session_IN_ARG_app_id =
{
  {
    -1,
    (gchar *) "app_id",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_screen_cast_method_info_create_session_IN_ARG_options =
{
  {
    -1,
    (gchar *) "options",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_screen_cast_method_info_create_session_IN_ARG_pointers[] =
{
  &_xdp_impl_screen_cast_method_info_create_session_IN_ARG_handle.parent_struct,
  &_xdp_impl_screen_cast_method_info_create_session_IN_ARG_session_handle.parent_struct,
  &_xdp_impl_screen_cast_method_info_create_session_IN_ARG_app_id.parent_struct,
  &_xdp_impl_screen_cast_method_info_create_session_IN_ARG_options.parent_struct,
  NULL
};

static const _ExtendedGDBusArgInfo _xdp_impl_screen_cast_method_info_create_session_OUT_ARG_response =
{
  {
    -1,
    (gchar *) "response",
    (gchar *) "u",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_screen_cast_method_info_create_session_OUT_ARG_results =
{
  {
    -1,
    (gchar *) "results",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_screen_cast_method_info_create_session_OUT_ARG_pointers[] =
{
  &_xdp_impl_screen_cast_method_info_create_session_OUT_ARG_response.parent_struct,
  &_xdp_impl_screen_cast_method_info_create_session_OUT_ARG_results.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_screen_cast_method_create_session_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.In3",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_screen_cast_method_create_session_annotation_info_1 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.Out1",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo * const _xdp_impl_screen_cast_method_create_session_annotation_info_pointers[] =
{
  &_xdp_impl_screen_cast_method_create_session_annotation_info_0,
  &_xdp_impl_screen_cast_method_create_session_annotation_info_1,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_impl_screen_cast_method_info_create_session =
{
  {
    -1,
    (gchar *) "CreateSession",
    (GDBusArgInfo **) &_xdp_impl_screen_cast_method_info_create_session_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_impl_screen_cast_method_info_create_session_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_impl_screen_cast_method_create_session_annotation_info_pointers
  },
  "handle-create-session",
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_screen_cast_method_info_select_sources_IN_ARG_handle =
{
  {
    -1,
    (gchar *) "handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_screen_cast_method_info_select_sources_IN_ARG_session_handle =
{
  {
    -1,
    (gchar *) "session_handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_screen_cast_method_info_select_sources_IN_ARG_app_id =
{
  {
    -1,
    (gchar *) "app_id",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_screen_cast_method_info_select_sources_IN_ARG_options =
{
  {
    -1,
    (gchar *) "options",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_screen_cast_method_info_select_sources_IN_ARG_pointers[] =
{
  &_xdp_impl_screen_cast_method_info_select_sources_IN_ARG_handle.parent_struct,
  &_xdp_impl_screen_cast_method_info_select_sources_IN_ARG_session_handle.parent_struct,
  &_xdp_impl_screen_cast_method_info_select_sources_IN_ARG_app_id.parent_struct,
  &_xdp_impl_screen_cast_method_info_select_sources_IN_ARG_options.parent_struct,
  NULL
};

static const _ExtendedGDBusArgInfo _xdp_impl_screen_cast_method_info_select_sources_OUT_ARG_response =
{
  {
    -1,
    (gchar *) "response",
    (gchar *) "u",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_screen_cast_method_info_select_sources_OUT_ARG_results =
{
  {
    -1,
    (gchar *) "results",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_screen_cast_method_info_select_sources_OUT_ARG_pointers[] =
{
  &_xdp_impl_screen_cast_method_info_select_sources_OUT_ARG_response.parent_struct,
  &_xdp_impl_screen_cast_method_info_select_sources_OUT_ARG_results.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_screen_cast_method_select_sources_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.In3",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_screen_cast_method_select_sources_annotation_info_1 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.Out1",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo * const _xdp_impl_screen_cast_method_select_sources_annotation_info_pointers[] =
{
  &_xdp_impl_screen_cast_method_select_sources_annotation_info_0,
  &_xdp_impl_screen_cast_method_select_sources_annotation_info_1,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_impl_screen_cast_method_info_select_sources =
{
  {
    -1,
    (gchar *) "SelectSources",
    (GDBusArgInfo **) &_xdp_impl_screen_cast_method_info_select_sources_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_impl_screen_cast_method_info_select_sources_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_impl_screen_cast_method_select_sources_annotation_info_pointers
  },
  "handle-select-sources",
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_screen_cast_method_info_start_IN_ARG_handle =
{
  {
    -1,
    (gchar *) "handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_screen_cast_method_info_start_IN_ARG_session_handle =
{
  {
    -1,
    (gchar *) "session_handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_screen_cast_method_info_start_IN_ARG_app_id =
{
  {
    -1,
    (gchar *) "app_id",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_screen_cast_method_info_start_IN_ARG_parent_window =
{
  {
    -1,
    (gchar *) "parent_window",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_screen_cast_method_info_start_IN_ARG_options =
{
  {
    -1,
    (gchar *) "options",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_screen_cast_method_info_start_IN_ARG_pointers[] =
{
  &_xdp_impl_screen_cast_method_info_start_IN_ARG_handle.parent_struct,
  &_xdp_impl_screen_cast_method_info_start_IN_ARG_session_handle.parent_struct,
  &_xdp_impl_screen_cast_method_info_start_IN_ARG_app_id.parent_struct,
  &_xdp_impl_screen_cast_method_info_start_IN_ARG_parent_window.parent_struct,
  &_xdp_impl_screen_cast_method_info_start_IN_ARG_options.parent_struct,
  NULL
};

static const _ExtendedGDBusArgInfo _xdp_impl_screen_cast_method_info_start_OUT_ARG_response =
{
  {
    -1,
    (gchar *) "response",
    (gchar *) "u",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_screen_cast_method_info_start_OUT_ARG_results =
{
  {
    -1,
    (gchar *) "results",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_screen_cast_method_info_start_OUT_ARG_pointers[] =
{
  &_xdp_impl_screen_cast_method_info_start_OUT_ARG_response.parent_struct,
  &_xdp_impl_screen_cast_method_info_start_OUT_ARG_results.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_screen_cast_method_start_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.In4",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_screen_cast_method_start_annotation_info_1 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.Out1",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo * const _xdp_impl_screen_cast_method_start_annotation_info_pointers[] =
{
  &_xdp_impl_screen_cast_method_start_annotation_info_0,
  &_xdp_impl_screen_cast_method_start_annotation_info_1,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_impl_screen_cast_method_info_start =
{
  {
    -1,
    (gchar *) "Start",
    (GDBusArgInfo **) &_xdp_impl_screen_cast_method_info_start_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_impl_screen_cast_method_info_start_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_impl_screen_cast_method_start_annotation_info_pointers
  },
  "handle-start",
  FALSE
};

static const GDBusMethodInfo * const _xdp_impl_screen_cast_method_info_pointers[] =
{
  &_xdp_impl_screen_cast_method_info_create_session.parent_struct,
  &_xdp_impl_screen_cast_method_info_select_sources.parent_struct,
  &_xdp_impl_screen_cast_method_info_start.parent_struct,
  NULL
};

static const _ExtendedGDBusPropertyInfo _xdp_impl_screen_cast_property_info_available_source_types =
{
  {
    -1,
    (gchar *) "AvailableSourceTypes",
    (gchar *) "u",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "available-source-types",
  FALSE,
  TRUE
};

static const _ExtendedGDBusPropertyInfo _xdp_impl_screen_cast_property_info_available_cursor_modes =
{
  {
    -1,
    (gchar *) "AvailableCursorModes",
    (gchar *) "u",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "available-cursor-modes",
  FALSE,
  TRUE
};

static const _ExtendedGDBusPropertyInfo _xdp_impl_screen_cast_property_info_version =
{
  {
    -1,
    (gchar *) "version",
    (gchar *) "u",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "version",
  FALSE,
  TRUE
};

static const GDBusPropertyInfo * const _xdp_impl_screen_cast_property_info_pointers[] =
{
  &_xdp_impl_screen_cast_property_info_available_source_types.parent_struct,
  &_xdp_impl_screen_cast_property_info_available_cursor_modes.parent_struct,
  &_xdp_impl_screen_cast_property_info_version.parent_struct,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _xdp_impl_screen_cast_interface_info =
{
  {
    -1,
    (gchar *) "org.freedesktop.impl.portal.ScreenCast",
    (GDBusMethodInfo **) &_xdp_impl_screen_cast_method_info_pointers,
    NULL,
    (GDBusPropertyInfo **) &_xdp_impl_screen_cast_property_info_pointers,
    NULL
  },
  "screen-cast",
};


/**
 * xdp_impl_screen_cast_interface_info:
 *
 * Gets a machine-readable description of the <link linkend="gdbus-interface-org-freedesktop-impl-portal-ScreenCast.top_of_page">org.freedesktop.impl.portal.ScreenCast</link> D-Bus interface.
 *
 * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
 */
GDBusInterfaceInfo *
xdp_impl_screen_cast_interface_info (void)
{
  return (GDBusInterfaceInfo *) &_xdp_impl_screen_cast_interface_info.parent_struct;
}

/**
 * xdp_impl_screen_cast_override_properties:
 * @klass: The class structure for a #GObject derived class.
 * @property_id_begin: The property id to assign to the first overridden property.
 *
 * Overrides all #GObject properties in the #XdpImplScreenCast interface for a concrete class.
 * The properties are overridden in the order they are defined.
 *
 * Returns: The last property id.
 */
guint
xdp_impl_screen_cast_override_properties (GObjectClass *klass, guint property_id_begin)
{
  g_object_class_override_property (klass, property_id_begin++, "available-source-types");
  g_object_class_override_property (klass, property_id_begin++, "available-cursor-modes");
  g_object_class_override_property (klass, property_id_begin++, "version");
  return property_id_begin - 1;
}


inline static void
xdp_impl_screen_cast_method_marshal_create_session (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  _g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_STRING_STRING_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_impl_screen_cast_method_marshal_select_sources (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  _g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_STRING_STRING_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_impl_screen_cast_method_marshal_start (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  _g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_STRING_STRING_STRING_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}


/**
 * XdpImplScreenCast:
 *
 * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-ScreenCast.top_of_page">org.freedesktop.impl.portal.ScreenCast</link>.
 */

/**
 * XdpImplScreenCastIface:
 * @parent_iface: The parent interface.
 * @handle_create_session: Handler for the #XdpImplScreenCast::handle-create-session signal.
 * @handle_select_sources: Handler for the #XdpImplScreenCast::handle-select-sources signal.
 * @handle_start: Handler for the #XdpImplScreenCast::handle-start signal.
 * @get_available_cursor_modes: Getter for the #XdpImplScreenCast:available-cursor-modes property.
 * @get_available_source_types: Getter for the #XdpImplScreenCast:available-source-types property.
 * @get_version: Getter for the #XdpImplScreenCast:version property.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-ScreenCast.top_of_page">org.freedesktop.impl.portal.ScreenCast</link>.
 */

typedef XdpImplScreenCastIface XdpImplScreenCastInterface;
G_DEFINE_INTERFACE (XdpImplScreenCast, xdp_impl_screen_cast, G_TYPE_OBJECT)

static void
xdp_impl_screen_cast_default_init (XdpImplScreenCastIface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * XdpImplScreenCast::handle-create-session:
   * @object: A #XdpImplScreenCast.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_handle: Argument passed by remote caller.
   * @arg_session_handle: Argument passed by remote caller.
   * @arg_app_id: Argument passed by remote caller.
   * @arg_options: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-impl-portal-ScreenCast.CreateSession">CreateSession()</link> 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 xdp_impl_screen_cast_complete_create_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.
   *
   * 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.
   */
  g_signal_new ("handle-create-session",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpImplScreenCastIface, handle_create_session),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_impl_screen_cast_method_marshal_create_session,
    G_TYPE_BOOLEAN,
    5,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_VARIANT);

  /**
   * XdpImplScreenCast::handle-select-sources:
   * @object: A #XdpImplScreenCast.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_handle: Argument passed by remote caller.
   * @arg_session_handle: Argument passed by remote caller.
   * @arg_app_id: Argument passed by remote caller.
   * @arg_options: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-impl-portal-ScreenCast.SelectSources">SelectSources()</link> 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 xdp_impl_screen_cast_complete_select_sources() 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.
   *
   * 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.
   */
  g_signal_new ("handle-select-sources",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpImplScreenCastIface, handle_select_sources),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_impl_screen_cast_method_marshal_select_sources,
    G_TYPE_BOOLEAN,
    5,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_VARIANT);

  /**
   * XdpImplScreenCast::handle-start:
   * @object: A #XdpImplScreenCast.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_handle: Argument passed by remote caller.
   * @arg_session_handle: Argument passed by remote caller.
   * @arg_app_id: Argument passed by remote caller.
   * @arg_parent_window: Argument passed by remote caller.
   * @arg_options: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-impl-portal-ScreenCast.Start">Start()</link> 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 xdp_impl_screen_cast_complete_start() 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.
   *
   * 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.
   */
  g_signal_new ("handle-start",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpImplScreenCastIface, handle_start),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_impl_screen_cast_method_marshal_start,
    G_TYPE_BOOLEAN,
    6,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_VARIANT);

  /* GObject properties for D-Bus properties: */
  /**
   * XdpImplScreenCast:available-source-types:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-impl-portal-ScreenCast.AvailableSourceTypes">"AvailableSourceTypes"</link>.
   *
   * 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.
   */
  g_object_interface_install_property (iface,
    g_param_spec_uint ("available-source-types", "AvailableSourceTypes", "AvailableSourceTypes", 0, G_MAXUINT32, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * XdpImplScreenCast:available-cursor-modes:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-impl-portal-ScreenCast.AvailableCursorModes">"AvailableCursorModes"</link>.
   *
   * 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.
   */
  g_object_interface_install_property (iface,
    g_param_spec_uint ("available-cursor-modes", "AvailableCursorModes", "AvailableCursorModes", 0, G_MAXUINT32, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * XdpImplScreenCast:version:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-impl-portal-ScreenCast.version">"version"</link>.
   *
   * 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.
   */
  g_object_interface_install_property (iface,
    g_param_spec_uint ("version", "version", "version", 0, G_MAXUINT32, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
}

/**
 * xdp_impl_screen_cast_get_available_source_types: (skip)
 * @object: A #XdpImplScreenCast.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-impl-portal-ScreenCast.AvailableSourceTypes">"AvailableSourceTypes"</link> D-Bus property.
 *
 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
 *
 * Returns: The property value.
 */
guint 
xdp_impl_screen_cast_get_available_source_types (XdpImplScreenCast *object)
{
  g_return_val_if_fail (XDP_IMPL_IS_SCREEN_CAST (object), 0);

  return XDP_IMPL_SCREEN_CAST_GET_IFACE (object)->get_available_source_types (object);
}

/**
 * xdp_impl_screen_cast_set_available_source_types: (skip)
 * @object: A #XdpImplScreenCast.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-freedesktop-impl-portal-ScreenCast.AvailableSourceTypes">"AvailableSourceTypes"</link> 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.
 */
void
xdp_impl_screen_cast_set_available_source_types (XdpImplScreenCast *object, guint value)
{
  g_object_set (G_OBJECT (object), "available-source-types", value, NULL);
}

/**
 * xdp_impl_screen_cast_get_available_cursor_modes: (skip)
 * @object: A #XdpImplScreenCast.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-impl-portal-ScreenCast.AvailableCursorModes">"AvailableCursorModes"</link> D-Bus property.
 *
 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
 *
 * Returns: The property value.
 */
guint 
xdp_impl_screen_cast_get_available_cursor_modes (XdpImplScreenCast *object)
{
  g_return_val_if_fail (XDP_IMPL_IS_SCREEN_CAST (object), 0);

  return XDP_IMPL_SCREEN_CAST_GET_IFACE (object)->get_available_cursor_modes (object);
}

/**
 * xdp_impl_screen_cast_set_available_cursor_modes: (skip)
 * @object: A #XdpImplScreenCast.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-freedesktop-impl-portal-ScreenCast.AvailableCursorModes">"AvailableCursorModes"</link> 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.
 */
void
xdp_impl_screen_cast_set_available_cursor_modes (XdpImplScreenCast *object, guint value)
{
  g_object_set (G_OBJECT (object), "available-cursor-modes", value, NULL);
}

/**
 * xdp_impl_screen_cast_get_version: (skip)
 * @object: A #XdpImplScreenCast.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-impl-portal-ScreenCast.version">"version"</link> D-Bus property.
 *
 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
 *
 * Returns: The property value.
 */
guint 
xdp_impl_screen_cast_get_version (XdpImplScreenCast *object)
{
  g_return_val_if_fail (XDP_IMPL_IS_SCREEN_CAST (object), 0);

  return XDP_IMPL_SCREEN_CAST_GET_IFACE (object)->get_version (object);
}

/**
 * xdp_impl_screen_cast_set_version: (skip)
 * @object: A #XdpImplScreenCast.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-freedesktop-impl-portal-ScreenCast.version">"version"</link> 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.
 */
void
xdp_impl_screen_cast_set_version (XdpImplScreenCast *object, guint value)
{
  g_object_set (G_OBJECT (object), "version", value, NULL);
}

/**
 * xdp_impl_screen_cast_call_create_session:
 * @proxy: A #XdpImplScreenCastProxy.
 * @arg_handle: Argument to pass with the method invocation.
 * @arg_session_handle: Argument to pass with the method invocation.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-ScreenCast.CreateSession">CreateSession()</link> 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 xdp_impl_screen_cast_call_create_session_finish() to get the result of the operation.
 *
 * See xdp_impl_screen_cast_call_create_session_sync() for the synchronous, blocking version of this method.
 */
void
xdp_impl_screen_cast_call_create_session (
    XdpImplScreenCast *proxy,
    const gchar *arg_handle,
    const gchar *arg_session_handle,
    const gchar *arg_app_id,
    GVariant *arg_options,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "CreateSession",
    g_variant_new ("(oos@a{sv})",
                   arg_handle,
                   arg_session_handle,
                   arg_app_id,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_impl_screen_cast_call_create_session_finish:
 * @proxy: A #XdpImplScreenCastProxy.
 * @out_response: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_results: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_screen_cast_call_create_session().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_impl_screen_cast_call_create_session().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_screen_cast_call_create_session_finish (
    XdpImplScreenCast *proxy,
    guint* out_response,
    GVariant ** out_results,
    GAsyncResult *res,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(u@a{sv})",
                 out_response,
                 out_results);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_screen_cast_call_create_session_sync:
 * @proxy: A #XdpImplScreenCastProxy.
 * @arg_handle: Argument to pass with the method invocation.
 * @arg_session_handle: Argument to pass with the method invocation.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @out_response: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_results: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-ScreenCast.CreateSession">CreateSession()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_screen_cast_call_create_session() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_screen_cast_call_create_session_sync (
    XdpImplScreenCast *proxy,
    const gchar *arg_handle,
    const gchar *arg_session_handle,
    const gchar *arg_app_id,
    GVariant *arg_options,
    guint* out_response,
    GVariant ** out_results,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "CreateSession",
    g_variant_new ("(oos@a{sv})",
                   arg_handle,
                   arg_session_handle,
                   arg_app_id,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(u@a{sv})",
                 out_response,
                 out_results);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_screen_cast_call_select_sources:
 * @proxy: A #XdpImplScreenCastProxy.
 * @arg_handle: Argument to pass with the method invocation.
 * @arg_session_handle: Argument to pass with the method invocation.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-ScreenCast.SelectSources">SelectSources()</link> 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 xdp_impl_screen_cast_call_select_sources_finish() to get the result of the operation.
 *
 * See xdp_impl_screen_cast_call_select_sources_sync() for the synchronous, blocking version of this method.
 */
void
xdp_impl_screen_cast_call_select_sources (
    XdpImplScreenCast *proxy,
    const gchar *arg_handle,
    const gchar *arg_session_handle,
    const gchar *arg_app_id,
    GVariant *arg_options,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "SelectSources",
    g_variant_new ("(oos@a{sv})",
                   arg_handle,
                   arg_session_handle,
                   arg_app_id,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_impl_screen_cast_call_select_sources_finish:
 * @proxy: A #XdpImplScreenCastProxy.
 * @out_response: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_results: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_screen_cast_call_select_sources().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_impl_screen_cast_call_select_sources().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_screen_cast_call_select_sources_finish (
    XdpImplScreenCast *proxy,
    guint* out_response,
    GVariant ** out_results,
    GAsyncResult *res,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(u@a{sv})",
                 out_response,
                 out_results);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_screen_cast_call_select_sources_sync:
 * @proxy: A #XdpImplScreenCastProxy.
 * @arg_handle: Argument to pass with the method invocation.
 * @arg_session_handle: Argument to pass with the method invocation.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @out_response: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_results: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-ScreenCast.SelectSources">SelectSources()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_screen_cast_call_select_sources() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_screen_cast_call_select_sources_sync (
    XdpImplScreenCast *proxy,
    const gchar *arg_handle,
    const gchar *arg_session_handle,
    const gchar *arg_app_id,
    GVariant *arg_options,
    guint* out_response,
    GVariant ** out_results,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "SelectSources",
    g_variant_new ("(oos@a{sv})",
                   arg_handle,
                   arg_session_handle,
                   arg_app_id,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(u@a{sv})",
                 out_response,
                 out_results);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_screen_cast_call_start:
 * @proxy: A #XdpImplScreenCastProxy.
 * @arg_handle: Argument to pass with the method invocation.
 * @arg_session_handle: Argument to pass with the method invocation.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_parent_window: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-ScreenCast.Start">Start()</link> 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 xdp_impl_screen_cast_call_start_finish() to get the result of the operation.
 *
 * See xdp_impl_screen_cast_call_start_sync() for the synchronous, blocking version of this method.
 */
void
xdp_impl_screen_cast_call_start (
    XdpImplScreenCast *proxy,
    const gchar *arg_handle,
    const gchar *arg_session_handle,
    const gchar *arg_app_id,
    const gchar *arg_parent_window,
    GVariant *arg_options,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "Start",
    g_variant_new ("(ooss@a{sv})",
                   arg_handle,
                   arg_session_handle,
                   arg_app_id,
                   arg_parent_window,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_impl_screen_cast_call_start_finish:
 * @proxy: A #XdpImplScreenCastProxy.
 * @out_response: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_results: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_screen_cast_call_start().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_impl_screen_cast_call_start().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_screen_cast_call_start_finish (
    XdpImplScreenCast *proxy,
    guint* out_response,
    GVariant ** out_results,
    GAsyncResult *res,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(u@a{sv})",
                 out_response,
                 out_results);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_screen_cast_call_start_sync:
 * @proxy: A #XdpImplScreenCastProxy.
 * @arg_handle: Argument to pass with the method invocation.
 * @arg_session_handle: Argument to pass with the method invocation.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_parent_window: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @out_response: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_results: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-ScreenCast.Start">Start()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_screen_cast_call_start() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_screen_cast_call_start_sync (
    XdpImplScreenCast *proxy,
    const gchar *arg_handle,
    const gchar *arg_session_handle,
    const gchar *arg_app_id,
    const gchar *arg_parent_window,
    GVariant *arg_options,
    guint* out_response,
    GVariant ** out_results,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "Start",
    g_variant_new ("(ooss@a{sv})",
                   arg_handle,
                   arg_session_handle,
                   arg_app_id,
                   arg_parent_window,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(u@a{sv})",
                 out_response,
                 out_results);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_screen_cast_complete_create_session:
 * @object: A #XdpImplScreenCast.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @response: Parameter to return.
 * @results: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-impl-portal-ScreenCast.CreateSession">CreateSession()</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
xdp_impl_screen_cast_complete_create_session (
    XdpImplScreenCast *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    guint response,
    GVariant *results)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(u@a{sv})",
                   response,
                   results));
}

/**
 * xdp_impl_screen_cast_complete_select_sources:
 * @object: A #XdpImplScreenCast.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @response: Parameter to return.
 * @results: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-impl-portal-ScreenCast.SelectSources">SelectSources()</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
xdp_impl_screen_cast_complete_select_sources (
    XdpImplScreenCast *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    guint response,
    GVariant *results)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(u@a{sv})",
                   response,
                   results));
}

/**
 * xdp_impl_screen_cast_complete_start:
 * @object: A #XdpImplScreenCast.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @response: Parameter to return.
 * @results: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-impl-portal-ScreenCast.Start">Start()</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
xdp_impl_screen_cast_complete_start (
    XdpImplScreenCast *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    guint response,
    GVariant *results)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(u@a{sv})",
                   response,
                   results));
}

/* ------------------------------------------------------------------------ */

/**
 * XdpImplScreenCastProxy:
 *
 * The #XdpImplScreenCastProxy structure contains only private data and should only be accessed using the provided API.
 */

/**
 * XdpImplScreenCastProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpImplScreenCastProxy.
 */

struct _XdpImplScreenCastProxyPrivate
{
  GData *qdata;
};

static void xdp_impl_screen_cast_proxy_iface_init (XdpImplScreenCastIface *iface);

#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpImplScreenCastProxy, xdp_impl_screen_cast_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (XdpImplScreenCastProxy)
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_SCREEN_CAST, xdp_impl_screen_cast_proxy_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpImplScreenCastProxy, xdp_impl_screen_cast_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_SCREEN_CAST, xdp_impl_screen_cast_proxy_iface_init))

#endif
static void
xdp_impl_screen_cast_proxy_finalize (GObject *object)
{
  XdpImplScreenCastProxy *proxy = XDP_IMPL_SCREEN_CAST_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (xdp_impl_screen_cast_proxy_parent_class)->finalize (object);
}

static void
xdp_impl_screen_cast_proxy_get_property (GObject      *object,
  guint         prop_id,
  GValue       *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  const _ExtendedGDBusPropertyInfo *info;
  GVariant *variant;
  g_assert (prop_id != 0 && prop_id - 1 < 3);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_impl_screen_cast_property_info_pointers[prop_id - 1];
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), info->parent_struct.name);
  if (info->use_gvariant)
    {
      g_value_set_variant (value, variant);
    }
  else
    {
      if (variant != NULL)
        g_dbus_gvariant_to_gvalue (variant, value);
    }
  if (variant != NULL)
    g_variant_unref (variant);
}

static void
xdp_impl_screen_cast_proxy_set_property_cb (GDBusProxy *proxy,
  GAsyncResult *res,
  gpointer      user_data)
{
  const _ExtendedGDBusPropertyInfo *info = user_data;
  GError *error;
  GVariant *_ret;
  error = NULL;
  _ret = g_dbus_proxy_call_finish (proxy, res, &error);
  if (!_ret)
    {
      g_warning ("Error setting property '%s' on interface org.freedesktop.impl.portal.ScreenCast: %s (%s, %d)",
                 info->parent_struct.name, 
                 error->message, g_quark_to_string (error->domain), error->code);
      g_error_free (error);
    }
  else
    {
      g_variant_unref (_ret);
    }
}

static void
xdp_impl_screen_cast_proxy_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  const _ExtendedGDBusPropertyInfo *info;
  GVariant *variant;
  g_assert (prop_id != 0 && prop_id - 1 < 3);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_impl_screen_cast_property_info_pointers[prop_id - 1];
  variant = g_dbus_gvalue_to_gvariant (value, G_VARIANT_TYPE (info->parent_struct.signature));
  g_dbus_proxy_call (G_DBUS_PROXY (object),
    "org.freedesktop.DBus.Properties.Set",
    g_variant_new ("(ssv)", "org.freedesktop.impl.portal.ScreenCast", info->parent_struct.name, variant),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    NULL, (GAsyncReadyCallback) xdp_impl_screen_cast_proxy_set_property_cb, (GDBusPropertyInfo *) &info->parent_struct);
  g_variant_unref (variant);
}

static void
xdp_impl_screen_cast_proxy_g_signal (GDBusProxy *proxy,
  const gchar *sender_name G_GNUC_UNUSED,
  const gchar *signal_name,
  GVariant *parameters)
{
  _ExtendedGDBusSignalInfo *info;
  GVariantIter iter;
  GVariant *child;
  GValue *paramv;
  gsize num_params;
  gsize n;
  guint signal_id;
  info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_xdp_impl_screen_cast_interface_info.parent_struct, signal_name);
  if (info == NULL)
    return;
  num_params = g_variant_n_children (parameters);
  paramv = g_new0 (GValue, num_params + 1);
  g_value_init (&paramv[0], XDP_IMPL_TYPE_SCREEN_CAST);
  g_value_set_object (&paramv[0], proxy);
  g_variant_iter_init (&iter, parameters);
  n = 1;
  while ((child = g_variant_iter_next_value (&iter)) != NULL)
    {
      _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1];
      if (arg_info->use_gvariant)
        {
          g_value_init (&paramv[n], G_TYPE_VARIANT);
          g_value_set_variant (&paramv[n], child);
          n++;
        }
      else
        g_dbus_gvariant_to_gvalue (child, &paramv[n++]);
      g_variant_unref (child);
    }
  signal_id = g_signal_lookup (info->signal_name, XDP_IMPL_TYPE_SCREEN_CAST);
  g_signal_emitv (paramv, signal_id, 0, NULL);
  for (n = 0; n < num_params + 1; n++)
    g_value_unset (&paramv[n]);
  g_free (paramv);
}

static void
xdp_impl_screen_cast_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  XdpImplScreenCastProxy *proxy = XDP_IMPL_SCREEN_CAST_PROXY (_proxy);
  guint n;
  const gchar *key;
  GVariantIter *iter;
  _ExtendedGDBusPropertyInfo *info;
  g_variant_get (changed_properties, "a{sv}", &iter);
  while (g_variant_iter_next (iter, "{&sv}", &key, NULL))
    {
      info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_screen_cast_interface_info.parent_struct, key);
      g_datalist_remove_data (&proxy->priv->qdata, key);
      if (info != NULL)
        g_object_notify (G_OBJECT (proxy), info->hyphen_name);
    }
  g_variant_iter_free (iter);
  for (n = 0; invalidated_properties[n] != NULL; n++)
    {
      info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_screen_cast_interface_info.parent_struct, invalidated_properties[n]);
      g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]);
      if (info != NULL)
        g_object_notify (G_OBJECT (proxy), info->hyphen_name);
    }
}

static guint 
xdp_impl_screen_cast_proxy_get_available_source_types (XdpImplScreenCast *object)
{
  XdpImplScreenCastProxy *proxy = XDP_IMPL_SCREEN_CAST_PROXY (object);
  GVariant *variant;
  guint value = 0;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "AvailableSourceTypes");
  if (variant != NULL)
    {
      value = g_variant_get_uint32 (variant);
      g_variant_unref (variant);
    }
  return value;
}

static guint 
xdp_impl_screen_cast_proxy_get_available_cursor_modes (XdpImplScreenCast *object)
{
  XdpImplScreenCastProxy *proxy = XDP_IMPL_SCREEN_CAST_PROXY (object);
  GVariant *variant;
  guint value = 0;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "AvailableCursorModes");
  if (variant != NULL)
    {
      value = g_variant_get_uint32 (variant);
      g_variant_unref (variant);
    }
  return value;
}

static guint 
xdp_impl_screen_cast_proxy_get_version (XdpImplScreenCast *object)
{
  XdpImplScreenCastProxy *proxy = XDP_IMPL_SCREEN_CAST_PROXY (object);
  GVariant *variant;
  guint value = 0;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "version");
  if (variant != NULL)
    {
      value = g_variant_get_uint32 (variant);
      g_variant_unref (variant);
    }
  return value;
}

static void
xdp_impl_screen_cast_proxy_init (XdpImplScreenCastProxy *proxy)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  proxy->priv = xdp_impl_screen_cast_proxy_get_instance_private (proxy);
#else
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, XDP_IMPL_TYPE_SCREEN_CAST_PROXY, XdpImplScreenCastProxyPrivate);
#endif

  g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), xdp_impl_screen_cast_interface_info ());
}

static void
xdp_impl_screen_cast_proxy_class_init (XdpImplScreenCastProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = xdp_impl_screen_cast_proxy_finalize;
  gobject_class->get_property = xdp_impl_screen_cast_proxy_get_property;
  gobject_class->set_property = xdp_impl_screen_cast_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = xdp_impl_screen_cast_proxy_g_signal;
  proxy_class->g_properties_changed = xdp_impl_screen_cast_proxy_g_properties_changed;

  xdp_impl_screen_cast_override_properties (gobject_class, 1);

#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
  g_type_class_add_private (klass, sizeof (XdpImplScreenCastProxyPrivate));
#endif
}

static void
xdp_impl_screen_cast_proxy_iface_init (XdpImplScreenCastIface *iface)
{
  iface->get_available_source_types = xdp_impl_screen_cast_proxy_get_available_source_types;
  iface->get_available_cursor_modes = xdp_impl_screen_cast_proxy_get_available_cursor_modes;
  iface->get_version = xdp_impl_screen_cast_proxy_get_version;
}

/**
 * xdp_impl_screen_cast_proxy_new:
 * @connection: A #GDBusConnection.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-ScreenCast.top_of_page">org.freedesktop.impl.portal.ScreenCast</link>. 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 xdp_impl_screen_cast_proxy_new_finish() to get the result of the operation.
 *
 * See xdp_impl_screen_cast_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_impl_screen_cast_proxy_new (
    GDBusConnection     *connection,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GAsyncReadyCallback  callback,
    gpointer             user_data)
{
  g_async_initable_new_async (XDP_IMPL_TYPE_SCREEN_CAST_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.ScreenCast", NULL);
}

/**
 * xdp_impl_screen_cast_proxy_new_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_screen_cast_proxy_new().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_impl_screen_cast_proxy_new().
 *
 * Returns: (transfer full) (type XdpImplScreenCastProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplScreenCast *
xdp_impl_screen_cast_proxy_new_finish (
    GAsyncResult        *res,
    GError             **error)
{
  GObject *ret;
  GObject *source_object;
  source_object = g_async_result_get_source_object (res);
  ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
  g_object_unref (source_object);
  if (ret != NULL)
    return XDP_IMPL_SCREEN_CAST (ret);
  else
    return NULL;
}

/**
 * xdp_impl_screen_cast_proxy_new_sync:
 * @connection: A #GDBusConnection.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL
 *
 * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-ScreenCast.top_of_page">org.freedesktop.impl.portal.ScreenCast</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_screen_cast_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpImplScreenCastProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplScreenCast *
xdp_impl_screen_cast_proxy_new_sync (
    GDBusConnection     *connection,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GError             **error)
{
  GInitable *ret;
  ret = g_initable_new (XDP_IMPL_TYPE_SCREEN_CAST_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.ScreenCast", NULL);
  if (ret != NULL)
    return XDP_IMPL_SCREEN_CAST (ret);
  else
    return NULL;
}


/**
 * xdp_impl_screen_cast_proxy_new_for_bus:
 * @bus_type: A #GBusType.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: A bus name (well-known or unique).
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
 * @user_data: User data to pass to @callback.
 *
 * Like xdp_impl_screen_cast_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 xdp_impl_screen_cast_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See xdp_impl_screen_cast_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_impl_screen_cast_proxy_new_for_bus (
    GBusType             bus_type,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GAsyncReadyCallback  callback,
    gpointer             user_data)
{
  g_async_initable_new_async (XDP_IMPL_TYPE_SCREEN_CAST_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.ScreenCast", NULL);
}

/**
 * xdp_impl_screen_cast_proxy_new_for_bus_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_screen_cast_proxy_new_for_bus().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_impl_screen_cast_proxy_new_for_bus().
 *
 * Returns: (transfer full) (type XdpImplScreenCastProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplScreenCast *
xdp_impl_screen_cast_proxy_new_for_bus_finish (
    GAsyncResult        *res,
    GError             **error)
{
  GObject *ret;
  GObject *source_object;
  source_object = g_async_result_get_source_object (res);
  ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
  g_object_unref (source_object);
  if (ret != NULL)
    return XDP_IMPL_SCREEN_CAST (ret);
  else
    return NULL;
}

/**
 * xdp_impl_screen_cast_proxy_new_for_bus_sync:
 * @bus_type: A #GBusType.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: A bus name (well-known or unique).
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL
 *
 * Like xdp_impl_screen_cast_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_screen_cast_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpImplScreenCastProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplScreenCast *
xdp_impl_screen_cast_proxy_new_for_bus_sync (
    GBusType             bus_type,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GError             **error)
{
  GInitable *ret;
  ret = g_initable_new (XDP_IMPL_TYPE_SCREEN_CAST_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.ScreenCast", NULL);
  if (ret != NULL)
    return XDP_IMPL_SCREEN_CAST (ret);
  else
    return NULL;
}


/* ------------------------------------------------------------------------ */

/**
 * XdpImplScreenCastSkeleton:
 *
 * The #XdpImplScreenCastSkeleton structure contains only private data and should only be accessed using the provided API.
 */

/**
 * XdpImplScreenCastSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpImplScreenCastSkeleton.
 */

struct _XdpImplScreenCastSkeletonPrivate
{
  GValue *properties;
  GList *changed_properties;
  GSource *changed_properties_idle_source;
  GMainContext *context;
  GMutex lock;
};

static void
_xdp_impl_screen_cast_skeleton_handle_method_call (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name,
  const gchar *method_name,
  GVariant *parameters,
  GDBusMethodInvocation *invocation,
  gpointer user_data)
{
  XdpImplScreenCastSkeleton *skeleton = XDP_IMPL_SCREEN_CAST_SKELETON (user_data);
  _ExtendedGDBusMethodInfo *info;
  GVariantIter iter;
  GVariant *child;
  GValue *paramv;
  gsize num_params;
  guint num_extra;
  gsize n;
  guint signal_id;
  GValue return_value = G_VALUE_INIT;
  info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
  g_assert (info != NULL);
  num_params = g_variant_n_children (parameters);
  num_extra = info->pass_fdlist ? 3 : 2;  paramv = g_new0 (GValue, num_params + num_extra);
  n = 0;
  g_value_init (&paramv[n], XDP_IMPL_TYPE_SCREEN_CAST);
  g_value_set_object (&paramv[n++], skeleton);
  g_value_init (&paramv[n], G_TYPE_DBUS_METHOD_INVOCATION);
  g_value_set_object (&paramv[n++], invocation);
  if (info->pass_fdlist)
    {
#ifdef G_OS_UNIX
      g_value_init (&paramv[n], G_TYPE_UNIX_FD_LIST);
      g_value_set_object (&paramv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation)));
#else
      g_assert_not_reached ();
#endif
    }
  g_variant_iter_init (&iter, parameters);
  while ((child = g_variant_iter_next_value (&iter)) != NULL)
    {
      _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra];
      if (arg_info->use_gvariant)
        {
          g_value_init (&paramv[n], G_TYPE_VARIANT);
          g_value_set_variant (&paramv[n], child);
          n++;
        }
      else
        g_dbus_gvariant_to_gvalue (child, &paramv[n++]);
      g_variant_unref (child);
    }
  signal_id = g_signal_lookup (info->signal_name, XDP_IMPL_TYPE_SCREEN_CAST);
  g_value_init (&return_value, G_TYPE_BOOLEAN);
  g_signal_emitv (paramv, signal_id, 0, &return_value);
  if (!g_value_get_boolean (&return_value))
    g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD, "Method %s is not implemented on interface %s", method_name, interface_name);
  g_value_unset (&return_value);
  for (n = 0; n < num_params + num_extra; n++)
    g_value_unset (&paramv[n]);
  g_free (paramv);
}

static GVariant *
_xdp_impl_screen_cast_skeleton_handle_get_property (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name G_GNUC_UNUSED,
  const gchar *property_name,
  GError **error,
  gpointer user_data)
{
  XdpImplScreenCastSkeleton *skeleton = XDP_IMPL_SCREEN_CAST_SKELETON (user_data);
  GValue value = G_VALUE_INIT;
  GParamSpec *pspec;
  _ExtendedGDBusPropertyInfo *info;
  GVariant *ret;
  ret = NULL;
  info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_screen_cast_interface_info.parent_struct, property_name);
  g_assert (info != NULL);
  pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
  if (pspec == NULL)
    {
      g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
    }
  else
    {
      g_value_init (&value, pspec->value_type);
      g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value);
      ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature));
      g_value_unset (&value);
    }
  return ret;
}

static gboolean
_xdp_impl_screen_cast_skeleton_handle_set_property (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name G_GNUC_UNUSED,
  const gchar *property_name,
  GVariant *variant,
  GError **error,
  gpointer user_data)
{
  XdpImplScreenCastSkeleton *skeleton = XDP_IMPL_SCREEN_CAST_SKELETON (user_data);
  GValue value = G_VALUE_INIT;
  GParamSpec *pspec;
  _ExtendedGDBusPropertyInfo *info;
  gboolean ret;
  ret = FALSE;
  info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_screen_cast_interface_info.parent_struct, property_name);
  g_assert (info != NULL);
  pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
  if (pspec == NULL)
    {
      g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
    }
  else
    {
      if (info->use_gvariant)
        g_value_set_variant (&value, variant);
      else
        g_dbus_gvariant_to_gvalue (variant, &value);
      g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value);
      g_value_unset (&value);
      ret = TRUE;
    }
  return ret;
}

static const GDBusInterfaceVTable _xdp_impl_screen_cast_skeleton_vtable =
{
  _xdp_impl_screen_cast_skeleton_handle_method_call,
  _xdp_impl_screen_cast_skeleton_handle_get_property,
  _xdp_impl_screen_cast_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
xdp_impl_screen_cast_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return xdp_impl_screen_cast_interface_info ();
}

static GDBusInterfaceVTable *
xdp_impl_screen_cast_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_xdp_impl_screen_cast_skeleton_vtable;
}

static GVariant *
xdp_impl_screen_cast_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  XdpImplScreenCastSkeleton *skeleton = XDP_IMPL_SCREEN_CAST_SKELETON (_skeleton);

  GVariantBuilder builder;
  guint n;
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_84
  g_variant_builder_init_static (&builder, G_VARIANT_TYPE ("a{sv}"));
#else
  g_variant_builder_init(&builder, G_VARIANT_TYPE ("a{sv}"));
#endif
  if (_xdp_impl_screen_cast_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _xdp_impl_screen_cast_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _xdp_impl_screen_cast_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _xdp_impl_screen_cast_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.impl.portal.ScreenCast", info->name, NULL, skeleton);
          if (value != NULL)
            {
              g_variant_take_ref (value);
              g_variant_builder_add (&builder, "{sv}", info->name, value);
              g_variant_unref (value);
            }
        }
    }
out:
  return g_variant_builder_end (&builder);
}

static gboolean _xdp_impl_screen_cast_emit_changed (gpointer user_data);

static void
xdp_impl_screen_cast_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
{
  XdpImplScreenCastSkeleton *skeleton = XDP_IMPL_SCREEN_CAST_SKELETON (_skeleton);
  gboolean emit_changed = FALSE;

  g_mutex_lock (&skeleton->priv->lock);
  if (skeleton->priv->changed_properties_idle_source != NULL)
    {
      g_source_destroy (skeleton->priv->changed_properties_idle_source);
      skeleton->priv->changed_properties_idle_source = NULL;
      emit_changed = TRUE;
    }
  g_mutex_unlock (&skeleton->priv->lock);

  if (emit_changed)
    _xdp_impl_screen_cast_emit_changed (skeleton);
}

static void xdp_impl_screen_cast_skeleton_iface_init (XdpImplScreenCastIface *iface);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpImplScreenCastSkeleton, xdp_impl_screen_cast_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (XdpImplScreenCastSkeleton)
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_SCREEN_CAST, xdp_impl_screen_cast_skeleton_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpImplScreenCastSkeleton, xdp_impl_screen_cast_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_SCREEN_CAST, xdp_impl_screen_cast_skeleton_iface_init))

#endif
static void
xdp_impl_screen_cast_skeleton_finalize (GObject *object)
{
  XdpImplScreenCastSkeleton *skeleton = XDP_IMPL_SCREEN_CAST_SKELETON (object);
  guint n;
  for (n = 0; n < 3; n++)
    g_value_unset (&skeleton->priv->properties[n]);
  g_free (skeleton->priv->properties);
  g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  /* coverity[missing_lock : SUPPRESS] */
  g_clear_pointer (&skeleton->priv->changed_properties_idle_source, g_source_destroy);
#else
  if (skeleton->priv->changed_properties_idle_source != NULL)
    g_source_destroy (skeleton->priv->changed_properties_idle_source);
skeleton->priv->changed_properties_idle_source = NULL;
#endif
  g_main_context_unref (skeleton->priv->context);
  g_mutex_clear (&skeleton->priv->lock);
  G_OBJECT_CLASS (xdp_impl_screen_cast_skeleton_parent_class)->finalize (object);
}

static void
xdp_impl_screen_cast_skeleton_get_property (GObject      *object,
  guint         prop_id,
  GValue       *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  XdpImplScreenCastSkeleton *skeleton = XDP_IMPL_SCREEN_CAST_SKELETON (object);
  g_assert (prop_id != 0 && prop_id - 1 < 3);
  g_mutex_lock (&skeleton->priv->lock);
  g_value_copy (&skeleton->priv->properties[prop_id - 1], value);
  g_mutex_unlock (&skeleton->priv->lock);
}

static gboolean
_xdp_impl_screen_cast_emit_changed (gpointer user_data)
{
  XdpImplScreenCastSkeleton *skeleton = XDP_IMPL_SCREEN_CAST_SKELETON (user_data);
  GList *l;
  GVariantBuilder builder;
  GVariantBuilder invalidated_builder;
  guint num_changes;

  g_mutex_lock (&skeleton->priv->lock);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_84
  g_variant_builder_init_static (&builder, G_VARIANT_TYPE ("a{sv}"));
  g_variant_builder_init_static (&invalidated_builder, G_VARIANT_TYPE ("as"));
#else
  g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
  g_variant_builder_init (&invalidated_builder, G_VARIANT_TYPE ("as"));
#endif
  for (l = skeleton->priv->changed_properties, num_changes = 0; l != NULL; l = l->next)
    {
      ChangedProperty *cp = l->data;
      GVariant *variant;
      const GValue *cur_value;

      cur_value = &skeleton->priv->properties[cp->prop_id - 1];
      if (!_g_value_equal (cur_value, &cp->orig_value))
        {
          variant = g_dbus_gvalue_to_gvariant (cur_value, G_VARIANT_TYPE (cp->info->parent_struct.signature));
          g_variant_builder_add (&builder, "{sv}", cp->info->parent_struct.name, variant);
          g_variant_unref (variant);
          num_changes++;
        }
    }
  if (num_changes > 0)
    {
      GList *connections, *ll;
      GVariant *signal_variant;
      signal_variant = g_variant_ref_sink (g_variant_new ("(sa{sv}as)", "org.freedesktop.impl.portal.ScreenCast",
                                           &builder, &invalidated_builder));
      connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
      for (ll = connections; ll != NULL; ll = ll->next)
        {
          GDBusConnection *connection = ll->data;

          g_dbus_connection_emit_signal (connection,
                                         NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)),
                                         "org.freedesktop.DBus.Properties",
                                         "PropertiesChanged",
                                         signal_variant,
                                         NULL);
        }
      g_variant_unref (signal_variant);
      g_list_free_full (connections, g_object_unref);
    }
  else
    {
      g_variant_builder_clear (&builder);
      g_variant_builder_clear (&invalidated_builder);
    }
  g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
  skeleton->priv->changed_properties = NULL;
  skeleton->priv->changed_properties_idle_source = NULL;
  g_mutex_unlock (&skeleton->priv->lock);
  return FALSE;
}

static void
_xdp_impl_screen_cast_schedule_emit_changed (XdpImplScreenCastSkeleton *skeleton, const _ExtendedGDBusPropertyInfo *info, guint prop_id, const GValue *orig_value)
{
  ChangedProperty *cp;
  GList *l;
  cp = NULL;
  for (l = skeleton->priv->changed_properties; l != NULL; l = l->next)
    {
      ChangedProperty *i_cp = l->data;
      if (i_cp->info == info)
        {
          cp = i_cp;
          break;
        }
    }
  if (cp == NULL)
    {
      cp = g_new0 (ChangedProperty, 1);
      cp->prop_id = prop_id;
      cp->info = info;
      skeleton->priv->changed_properties = g_list_prepend (skeleton->priv->changed_properties, cp);
      g_value_init (&cp->orig_value, G_VALUE_TYPE (orig_value));
      g_value_copy (orig_value, &cp->orig_value);
    }
}

static void
xdp_impl_screen_cast_skeleton_notify (GObject      *object,
  GParamSpec *pspec G_GNUC_UNUSED)
{
  XdpImplScreenCastSkeleton *skeleton = XDP_IMPL_SCREEN_CAST_SKELETON (object);
  g_mutex_lock (&skeleton->priv->lock);
  if (skeleton->priv->changed_properties != NULL &&
      skeleton->priv->changed_properties_idle_source == NULL)
    {
      skeleton->priv->changed_properties_idle_source = g_idle_source_new ();
      g_source_set_priority (skeleton->priv->changed_properties_idle_source, G_PRIORITY_DEFAULT);
      g_source_set_callback (skeleton->priv->changed_properties_idle_source, _xdp_impl_screen_cast_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
      g_source_set_name (skeleton->priv->changed_properties_idle_source, "[generated] _xdp_impl_screen_cast_emit_changed");
      g_source_attach (skeleton->priv->changed_properties_idle_source, skeleton->priv->context);
      g_source_unref (skeleton->priv->changed_properties_idle_source);
    }
  g_mutex_unlock (&skeleton->priv->lock);
}

static void
xdp_impl_screen_cast_skeleton_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec)
{
  const _ExtendedGDBusPropertyInfo *info;
  XdpImplScreenCastSkeleton *skeleton = XDP_IMPL_SCREEN_CAST_SKELETON (object);
  g_assert (prop_id != 0 && prop_id - 1 < 3);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_impl_screen_cast_property_info_pointers[prop_id - 1];
  g_mutex_lock (&skeleton->priv->lock);
  g_object_freeze_notify (object);
  if (!_g_value_equal (value, &skeleton->priv->properties[prop_id - 1]))
    {
      if (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)) != NULL &&
          info->emits_changed_signal)
        _xdp_impl_screen_cast_schedule_emit_changed (skeleton, info, prop_id, &skeleton->priv->properties[prop_id - 1]);
      g_value_copy (value, &skeleton->priv->properties[prop_id - 1]);
      g_object_notify_by_pspec (object, pspec);
    }
  g_mutex_unlock (&skeleton->priv->lock);
  g_object_thaw_notify (object);
}

static void
xdp_impl_screen_cast_skeleton_init (XdpImplScreenCastSkeleton *skeleton)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  skeleton->priv = xdp_impl_screen_cast_skeleton_get_instance_private (skeleton);
#else
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, XDP_IMPL_TYPE_SCREEN_CAST_SKELETON, XdpImplScreenCastSkeletonPrivate);
#endif

  g_mutex_init (&skeleton->priv->lock);
  skeleton->priv->context = g_main_context_ref_thread_default ();
  skeleton->priv->properties = g_new0 (GValue, 3);
  g_value_init (&skeleton->priv->properties[0], G_TYPE_UINT);
  g_value_init (&skeleton->priv->properties[1], G_TYPE_UINT);
  g_value_init (&skeleton->priv->properties[2], G_TYPE_UINT);
}

static guint 
xdp_impl_screen_cast_skeleton_get_available_source_types (XdpImplScreenCast *object)
{
  XdpImplScreenCastSkeleton *skeleton = XDP_IMPL_SCREEN_CAST_SKELETON (object);
  guint value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_marshal_value_peek_uint (&(skeleton->priv->properties[0]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static guint 
xdp_impl_screen_cast_skeleton_get_available_cursor_modes (XdpImplScreenCast *object)
{
  XdpImplScreenCastSkeleton *skeleton = XDP_IMPL_SCREEN_CAST_SKELETON (object);
  guint value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_marshal_value_peek_uint (&(skeleton->priv->properties[1]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static guint 
xdp_impl_screen_cast_skeleton_get_version (XdpImplScreenCast *object)
{
  XdpImplScreenCastSkeleton *skeleton = XDP_IMPL_SCREEN_CAST_SKELETON (object);
  guint value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_marshal_value_peek_uint (&(skeleton->priv->properties[2]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static void
xdp_impl_screen_cast_skeleton_class_init (XdpImplScreenCastSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize = xdp_impl_screen_cast_skeleton_finalize;
  gobject_class->get_property = xdp_impl_screen_cast_skeleton_get_property;
  gobject_class->set_property = xdp_impl_screen_cast_skeleton_set_property;
  gobject_class->notify       = xdp_impl_screen_cast_skeleton_notify;


  xdp_impl_screen_cast_override_properties (gobject_class, 1);

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = xdp_impl_screen_cast_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = xdp_impl_screen_cast_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = xdp_impl_screen_cast_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = xdp_impl_screen_cast_skeleton_dbus_interface_get_vtable;

#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
  g_type_class_add_private (klass, sizeof (XdpImplScreenCastSkeletonPrivate));
#endif
}

static void
xdp_impl_screen_cast_skeleton_iface_init (XdpImplScreenCastIface *iface)
{
  iface->get_available_source_types = xdp_impl_screen_cast_skeleton_get_available_source_types;
  iface->get_available_cursor_modes = xdp_impl_screen_cast_skeleton_get_available_cursor_modes;
  iface->get_version = xdp_impl_screen_cast_skeleton_get_version;
}

/**
 * xdp_impl_screen_cast_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-ScreenCast.top_of_page">org.freedesktop.impl.portal.ScreenCast</link>.
 *
 * Returns: (transfer full) (type XdpImplScreenCastSkeleton): The skeleton object.
 */
XdpImplScreenCast *
xdp_impl_screen_cast_skeleton_new (void)
{
  return XDP_IMPL_SCREEN_CAST (g_object_new (XDP_IMPL_TYPE_SCREEN_CAST_SKELETON, NULL));
}

/* ------------------------------------------------------------------------
 * Code for interface org.freedesktop.impl.portal.Screenshot
 * ------------------------------------------------------------------------
 */

/**
 * SECTION:XdpImplScreenshot
 * @title: XdpImplScreenshot
 * @short_description: Generated C code for the org.freedesktop.impl.portal.Screenshot D-Bus interface
 *
 * This section contains code for working with the <link linkend="gdbus-interface-org-freedesktop-impl-portal-Screenshot.top_of_page">org.freedesktop.impl.portal.Screenshot</link> D-Bus interface in C.
 */

/* ---- Introspection data for org.freedesktop.impl.portal.Screenshot ---- */

static const _ExtendedGDBusArgInfo _xdp_impl_screenshot_method_info_screenshot_IN_ARG_handle =
{
  {
    -1,
    (gchar *) "handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_screenshot_method_info_screenshot_IN_ARG_app_id =
{
  {
    -1,
    (gchar *) "app_id",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_screenshot_method_info_screenshot_IN_ARG_parent_window =
{
  {
    -1,
    (gchar *) "parent_window",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_screenshot_method_info_screenshot_IN_ARG_options =
{
  {
    -1,
    (gchar *) "options",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_screenshot_method_info_screenshot_IN_ARG_pointers[] =
{
  &_xdp_impl_screenshot_method_info_screenshot_IN_ARG_handle.parent_struct,
  &_xdp_impl_screenshot_method_info_screenshot_IN_ARG_app_id.parent_struct,
  &_xdp_impl_screenshot_method_info_screenshot_IN_ARG_parent_window.parent_struct,
  &_xdp_impl_screenshot_method_info_screenshot_IN_ARG_options.parent_struct,
  NULL
};

static const _ExtendedGDBusArgInfo _xdp_impl_screenshot_method_info_screenshot_OUT_ARG_response =
{
  {
    -1,
    (gchar *) "response",
    (gchar *) "u",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_screenshot_method_info_screenshot_OUT_ARG_results =
{
  {
    -1,
    (gchar *) "results",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_screenshot_method_info_screenshot_OUT_ARG_pointers[] =
{
  &_xdp_impl_screenshot_method_info_screenshot_OUT_ARG_response.parent_struct,
  &_xdp_impl_screenshot_method_info_screenshot_OUT_ARG_results.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_screenshot_method_screenshot_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.In3",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_screenshot_method_screenshot_annotation_info_1 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.Out1",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo * const _xdp_impl_screenshot_method_screenshot_annotation_info_pointers[] =
{
  &_xdp_impl_screenshot_method_screenshot_annotation_info_0,
  &_xdp_impl_screenshot_method_screenshot_annotation_info_1,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_impl_screenshot_method_info_screenshot =
{
  {
    -1,
    (gchar *) "Screenshot",
    (GDBusArgInfo **) &_xdp_impl_screenshot_method_info_screenshot_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_impl_screenshot_method_info_screenshot_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_impl_screenshot_method_screenshot_annotation_info_pointers
  },
  "handle-screenshot",
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_screenshot_method_info_pick_color_IN_ARG_handle =
{
  {
    -1,
    (gchar *) "handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_screenshot_method_info_pick_color_IN_ARG_app_id =
{
  {
    -1,
    (gchar *) "app_id",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_screenshot_method_info_pick_color_IN_ARG_parent_window =
{
  {
    -1,
    (gchar *) "parent_window",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_screenshot_method_info_pick_color_IN_ARG_options =
{
  {
    -1,
    (gchar *) "options",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_screenshot_method_info_pick_color_IN_ARG_pointers[] =
{
  &_xdp_impl_screenshot_method_info_pick_color_IN_ARG_handle.parent_struct,
  &_xdp_impl_screenshot_method_info_pick_color_IN_ARG_app_id.parent_struct,
  &_xdp_impl_screenshot_method_info_pick_color_IN_ARG_parent_window.parent_struct,
  &_xdp_impl_screenshot_method_info_pick_color_IN_ARG_options.parent_struct,
  NULL
};

static const _ExtendedGDBusArgInfo _xdp_impl_screenshot_method_info_pick_color_OUT_ARG_response =
{
  {
    -1,
    (gchar *) "response",
    (gchar *) "u",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_screenshot_method_info_pick_color_OUT_ARG_results =
{
  {
    -1,
    (gchar *) "results",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_screenshot_method_info_pick_color_OUT_ARG_pointers[] =
{
  &_xdp_impl_screenshot_method_info_pick_color_OUT_ARG_response.parent_struct,
  &_xdp_impl_screenshot_method_info_pick_color_OUT_ARG_results.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_screenshot_method_pick_color_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.In3",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_screenshot_method_pick_color_annotation_info_1 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.Out1",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo * const _xdp_impl_screenshot_method_pick_color_annotation_info_pointers[] =
{
  &_xdp_impl_screenshot_method_pick_color_annotation_info_0,
  &_xdp_impl_screenshot_method_pick_color_annotation_info_1,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_impl_screenshot_method_info_pick_color =
{
  {
    -1,
    (gchar *) "PickColor",
    (GDBusArgInfo **) &_xdp_impl_screenshot_method_info_pick_color_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_impl_screenshot_method_info_pick_color_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_impl_screenshot_method_pick_color_annotation_info_pointers
  },
  "handle-pick-color",
  FALSE
};

static const GDBusMethodInfo * const _xdp_impl_screenshot_method_info_pointers[] =
{
  &_xdp_impl_screenshot_method_info_screenshot.parent_struct,
  &_xdp_impl_screenshot_method_info_pick_color.parent_struct,
  NULL
};

static const _ExtendedGDBusPropertyInfo _xdp_impl_screenshot_property_info_version =
{
  {
    -1,
    (gchar *) "version",
    (gchar *) "u",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "version",
  FALSE,
  TRUE
};

static const GDBusPropertyInfo * const _xdp_impl_screenshot_property_info_pointers[] =
{
  &_xdp_impl_screenshot_property_info_version.parent_struct,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _xdp_impl_screenshot_interface_info =
{
  {
    -1,
    (gchar *) "org.freedesktop.impl.portal.Screenshot",
    (GDBusMethodInfo **) &_xdp_impl_screenshot_method_info_pointers,
    NULL,
    (GDBusPropertyInfo **) &_xdp_impl_screenshot_property_info_pointers,
    NULL
  },
  "screenshot",
};


/**
 * xdp_impl_screenshot_interface_info:
 *
 * Gets a machine-readable description of the <link linkend="gdbus-interface-org-freedesktop-impl-portal-Screenshot.top_of_page">org.freedesktop.impl.portal.Screenshot</link> D-Bus interface.
 *
 * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
 */
GDBusInterfaceInfo *
xdp_impl_screenshot_interface_info (void)
{
  return (GDBusInterfaceInfo *) &_xdp_impl_screenshot_interface_info.parent_struct;
}

/**
 * xdp_impl_screenshot_override_properties:
 * @klass: The class structure for a #GObject derived class.
 * @property_id_begin: The property id to assign to the first overridden property.
 *
 * Overrides all #GObject properties in the #XdpImplScreenshot interface for a concrete class.
 * The properties are overridden in the order they are defined.
 *
 * Returns: The last property id.
 */
guint
xdp_impl_screenshot_override_properties (GObjectClass *klass, guint property_id_begin)
{
  g_object_class_override_property (klass, property_id_begin++, "version");
  return property_id_begin - 1;
}


inline static void
xdp_impl_screenshot_method_marshal_screenshot (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  _g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_STRING_STRING_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_impl_screenshot_method_marshal_pick_color (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  _g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_STRING_STRING_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}


/**
 * XdpImplScreenshot:
 *
 * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-Screenshot.top_of_page">org.freedesktop.impl.portal.Screenshot</link>.
 */

/**
 * XdpImplScreenshotIface:
 * @parent_iface: The parent interface.
 * @handle_pick_color: Handler for the #XdpImplScreenshot::handle-pick-color signal.
 * @handle_screenshot: Handler for the #XdpImplScreenshot::handle-screenshot signal.
 * @get_version: Getter for the #XdpImplScreenshot:version property.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-Screenshot.top_of_page">org.freedesktop.impl.portal.Screenshot</link>.
 */

typedef XdpImplScreenshotIface XdpImplScreenshotInterface;
G_DEFINE_INTERFACE (XdpImplScreenshot, xdp_impl_screenshot, G_TYPE_OBJECT)

static void
xdp_impl_screenshot_default_init (XdpImplScreenshotIface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * XdpImplScreenshot::handle-screenshot:
   * @object: A #XdpImplScreenshot.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_handle: Argument passed by remote caller.
   * @arg_app_id: Argument passed by remote caller.
   * @arg_parent_window: Argument passed by remote caller.
   * @arg_options: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-impl-portal-Screenshot.Screenshot">Screenshot()</link> 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 xdp_impl_screenshot_complete_screenshot() 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.
   *
   * 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.
   */
  g_signal_new ("handle-screenshot",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpImplScreenshotIface, handle_screenshot),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_impl_screenshot_method_marshal_screenshot,
    G_TYPE_BOOLEAN,
    5,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_VARIANT);

  /**
   * XdpImplScreenshot::handle-pick-color:
   * @object: A #XdpImplScreenshot.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_handle: Argument passed by remote caller.
   * @arg_app_id: Argument passed by remote caller.
   * @arg_parent_window: Argument passed by remote caller.
   * @arg_options: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-impl-portal-Screenshot.PickColor">PickColor()</link> 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 xdp_impl_screenshot_complete_pick_color() 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.
   *
   * 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.
   */
  g_signal_new ("handle-pick-color",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpImplScreenshotIface, handle_pick_color),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_impl_screenshot_method_marshal_pick_color,
    G_TYPE_BOOLEAN,
    5,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_VARIANT);

  /* GObject properties for D-Bus properties: */
  /**
   * XdpImplScreenshot:version:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-impl-portal-Screenshot.version">"version"</link>.
   *
   * 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.
   */
  g_object_interface_install_property (iface,
    g_param_spec_uint ("version", "version", "version", 0, G_MAXUINT32, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
}

/**
 * xdp_impl_screenshot_get_version: (skip)
 * @object: A #XdpImplScreenshot.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-impl-portal-Screenshot.version">"version"</link> D-Bus property.
 *
 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
 *
 * Returns: The property value.
 */
guint 
xdp_impl_screenshot_get_version (XdpImplScreenshot *object)
{
  g_return_val_if_fail (XDP_IMPL_IS_SCREENSHOT (object), 0);

  return XDP_IMPL_SCREENSHOT_GET_IFACE (object)->get_version (object);
}

/**
 * xdp_impl_screenshot_set_version: (skip)
 * @object: A #XdpImplScreenshot.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-freedesktop-impl-portal-Screenshot.version">"version"</link> 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.
 */
void
xdp_impl_screenshot_set_version (XdpImplScreenshot *object, guint value)
{
  g_object_set (G_OBJECT (object), "version", value, NULL);
}

/**
 * xdp_impl_screenshot_call_screenshot:
 * @proxy: A #XdpImplScreenshotProxy.
 * @arg_handle: Argument to pass with the method invocation.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_parent_window: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-Screenshot.Screenshot">Screenshot()</link> 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 xdp_impl_screenshot_call_screenshot_finish() to get the result of the operation.
 *
 * See xdp_impl_screenshot_call_screenshot_sync() for the synchronous, blocking version of this method.
 */
void
xdp_impl_screenshot_call_screenshot (
    XdpImplScreenshot *proxy,
    const gchar *arg_handle,
    const gchar *arg_app_id,
    const gchar *arg_parent_window,
    GVariant *arg_options,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "Screenshot",
    g_variant_new ("(oss@a{sv})",
                   arg_handle,
                   arg_app_id,
                   arg_parent_window,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_impl_screenshot_call_screenshot_finish:
 * @proxy: A #XdpImplScreenshotProxy.
 * @out_response: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_results: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_screenshot_call_screenshot().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_impl_screenshot_call_screenshot().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_screenshot_call_screenshot_finish (
    XdpImplScreenshot *proxy,
    guint* out_response,
    GVariant ** out_results,
    GAsyncResult *res,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(u@a{sv})",
                 out_response,
                 out_results);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_screenshot_call_screenshot_sync:
 * @proxy: A #XdpImplScreenshotProxy.
 * @arg_handle: Argument to pass with the method invocation.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_parent_window: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @out_response: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_results: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-Screenshot.Screenshot">Screenshot()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_screenshot_call_screenshot() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_screenshot_call_screenshot_sync (
    XdpImplScreenshot *proxy,
    const gchar *arg_handle,
    const gchar *arg_app_id,
    const gchar *arg_parent_window,
    GVariant *arg_options,
    guint* out_response,
    GVariant ** out_results,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "Screenshot",
    g_variant_new ("(oss@a{sv})",
                   arg_handle,
                   arg_app_id,
                   arg_parent_window,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(u@a{sv})",
                 out_response,
                 out_results);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_screenshot_call_pick_color:
 * @proxy: A #XdpImplScreenshotProxy.
 * @arg_handle: Argument to pass with the method invocation.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_parent_window: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-Screenshot.PickColor">PickColor()</link> 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 xdp_impl_screenshot_call_pick_color_finish() to get the result of the operation.
 *
 * See xdp_impl_screenshot_call_pick_color_sync() for the synchronous, blocking version of this method.
 */
void
xdp_impl_screenshot_call_pick_color (
    XdpImplScreenshot *proxy,
    const gchar *arg_handle,
    const gchar *arg_app_id,
    const gchar *arg_parent_window,
    GVariant *arg_options,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "PickColor",
    g_variant_new ("(oss@a{sv})",
                   arg_handle,
                   arg_app_id,
                   arg_parent_window,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_impl_screenshot_call_pick_color_finish:
 * @proxy: A #XdpImplScreenshotProxy.
 * @out_response: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_results: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_screenshot_call_pick_color().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_impl_screenshot_call_pick_color().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_screenshot_call_pick_color_finish (
    XdpImplScreenshot *proxy,
    guint* out_response,
    GVariant ** out_results,
    GAsyncResult *res,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(u@a{sv})",
                 out_response,
                 out_results);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_screenshot_call_pick_color_sync:
 * @proxy: A #XdpImplScreenshotProxy.
 * @arg_handle: Argument to pass with the method invocation.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_parent_window: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @out_response: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_results: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-Screenshot.PickColor">PickColor()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_screenshot_call_pick_color() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_screenshot_call_pick_color_sync (
    XdpImplScreenshot *proxy,
    const gchar *arg_handle,
    const gchar *arg_app_id,
    const gchar *arg_parent_window,
    GVariant *arg_options,
    guint* out_response,
    GVariant ** out_results,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "PickColor",
    g_variant_new ("(oss@a{sv})",
                   arg_handle,
                   arg_app_id,
                   arg_parent_window,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(u@a{sv})",
                 out_response,
                 out_results);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_screenshot_complete_screenshot:
 * @object: A #XdpImplScreenshot.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @response: Parameter to return.
 * @results: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-impl-portal-Screenshot.Screenshot">Screenshot()</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
xdp_impl_screenshot_complete_screenshot (
    XdpImplScreenshot *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    guint response,
    GVariant *results)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(u@a{sv})",
                   response,
                   results));
}

/**
 * xdp_impl_screenshot_complete_pick_color:
 * @object: A #XdpImplScreenshot.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @response: Parameter to return.
 * @results: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-impl-portal-Screenshot.PickColor">PickColor()</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
xdp_impl_screenshot_complete_pick_color (
    XdpImplScreenshot *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    guint response,
    GVariant *results)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(u@a{sv})",
                   response,
                   results));
}

/* ------------------------------------------------------------------------ */

/**
 * XdpImplScreenshotProxy:
 *
 * The #XdpImplScreenshotProxy structure contains only private data and should only be accessed using the provided API.
 */

/**
 * XdpImplScreenshotProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpImplScreenshotProxy.
 */

struct _XdpImplScreenshotProxyPrivate
{
  GData *qdata;
};

static void xdp_impl_screenshot_proxy_iface_init (XdpImplScreenshotIface *iface);

#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpImplScreenshotProxy, xdp_impl_screenshot_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (XdpImplScreenshotProxy)
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_SCREENSHOT, xdp_impl_screenshot_proxy_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpImplScreenshotProxy, xdp_impl_screenshot_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_SCREENSHOT, xdp_impl_screenshot_proxy_iface_init))

#endif
static void
xdp_impl_screenshot_proxy_finalize (GObject *object)
{
  XdpImplScreenshotProxy *proxy = XDP_IMPL_SCREENSHOT_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (xdp_impl_screenshot_proxy_parent_class)->finalize (object);
}

static void
xdp_impl_screenshot_proxy_get_property (GObject      *object,
  guint         prop_id,
  GValue       *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  const _ExtendedGDBusPropertyInfo *info;
  GVariant *variant;
  g_assert (prop_id != 0 && prop_id - 1 < 1);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_impl_screenshot_property_info_pointers[prop_id - 1];
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), info->parent_struct.name);
  if (info->use_gvariant)
    {
      g_value_set_variant (value, variant);
    }
  else
    {
      if (variant != NULL)
        g_dbus_gvariant_to_gvalue (variant, value);
    }
  if (variant != NULL)
    g_variant_unref (variant);
}

static void
xdp_impl_screenshot_proxy_set_property_cb (GDBusProxy *proxy,
  GAsyncResult *res,
  gpointer      user_data)
{
  const _ExtendedGDBusPropertyInfo *info = user_data;
  GError *error;
  GVariant *_ret;
  error = NULL;
  _ret = g_dbus_proxy_call_finish (proxy, res, &error);
  if (!_ret)
    {
      g_warning ("Error setting property '%s' on interface org.freedesktop.impl.portal.Screenshot: %s (%s, %d)",
                 info->parent_struct.name, 
                 error->message, g_quark_to_string (error->domain), error->code);
      g_error_free (error);
    }
  else
    {
      g_variant_unref (_ret);
    }
}

static void
xdp_impl_screenshot_proxy_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  const _ExtendedGDBusPropertyInfo *info;
  GVariant *variant;
  g_assert (prop_id != 0 && prop_id - 1 < 1);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_impl_screenshot_property_info_pointers[prop_id - 1];
  variant = g_dbus_gvalue_to_gvariant (value, G_VARIANT_TYPE (info->parent_struct.signature));
  g_dbus_proxy_call (G_DBUS_PROXY (object),
    "org.freedesktop.DBus.Properties.Set",
    g_variant_new ("(ssv)", "org.freedesktop.impl.portal.Screenshot", info->parent_struct.name, variant),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    NULL, (GAsyncReadyCallback) xdp_impl_screenshot_proxy_set_property_cb, (GDBusPropertyInfo *) &info->parent_struct);
  g_variant_unref (variant);
}

static void
xdp_impl_screenshot_proxy_g_signal (GDBusProxy *proxy,
  const gchar *sender_name G_GNUC_UNUSED,
  const gchar *signal_name,
  GVariant *parameters)
{
  _ExtendedGDBusSignalInfo *info;
  GVariantIter iter;
  GVariant *child;
  GValue *paramv;
  gsize num_params;
  gsize n;
  guint signal_id;
  info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_xdp_impl_screenshot_interface_info.parent_struct, signal_name);
  if (info == NULL)
    return;
  num_params = g_variant_n_children (parameters);
  paramv = g_new0 (GValue, num_params + 1);
  g_value_init (&paramv[0], XDP_IMPL_TYPE_SCREENSHOT);
  g_value_set_object (&paramv[0], proxy);
  g_variant_iter_init (&iter, parameters);
  n = 1;
  while ((child = g_variant_iter_next_value (&iter)) != NULL)
    {
      _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1];
      if (arg_info->use_gvariant)
        {
          g_value_init (&paramv[n], G_TYPE_VARIANT);
          g_value_set_variant (&paramv[n], child);
          n++;
        }
      else
        g_dbus_gvariant_to_gvalue (child, &paramv[n++]);
      g_variant_unref (child);
    }
  signal_id = g_signal_lookup (info->signal_name, XDP_IMPL_TYPE_SCREENSHOT);
  g_signal_emitv (paramv, signal_id, 0, NULL);
  for (n = 0; n < num_params + 1; n++)
    g_value_unset (&paramv[n]);
  g_free (paramv);
}

static void
xdp_impl_screenshot_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  XdpImplScreenshotProxy *proxy = XDP_IMPL_SCREENSHOT_PROXY (_proxy);
  guint n;
  const gchar *key;
  GVariantIter *iter;
  _ExtendedGDBusPropertyInfo *info;
  g_variant_get (changed_properties, "a{sv}", &iter);
  while (g_variant_iter_next (iter, "{&sv}", &key, NULL))
    {
      info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_screenshot_interface_info.parent_struct, key);
      g_datalist_remove_data (&proxy->priv->qdata, key);
      if (info != NULL)
        g_object_notify (G_OBJECT (proxy), info->hyphen_name);
    }
  g_variant_iter_free (iter);
  for (n = 0; invalidated_properties[n] != NULL; n++)
    {
      info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_screenshot_interface_info.parent_struct, invalidated_properties[n]);
      g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]);
      if (info != NULL)
        g_object_notify (G_OBJECT (proxy), info->hyphen_name);
    }
}

static guint 
xdp_impl_screenshot_proxy_get_version (XdpImplScreenshot *object)
{
  XdpImplScreenshotProxy *proxy = XDP_IMPL_SCREENSHOT_PROXY (object);
  GVariant *variant;
  guint value = 0;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "version");
  if (variant != NULL)
    {
      value = g_variant_get_uint32 (variant);
      g_variant_unref (variant);
    }
  return value;
}

static void
xdp_impl_screenshot_proxy_init (XdpImplScreenshotProxy *proxy)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  proxy->priv = xdp_impl_screenshot_proxy_get_instance_private (proxy);
#else
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, XDP_IMPL_TYPE_SCREENSHOT_PROXY, XdpImplScreenshotProxyPrivate);
#endif

  g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), xdp_impl_screenshot_interface_info ());
}

static void
xdp_impl_screenshot_proxy_class_init (XdpImplScreenshotProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = xdp_impl_screenshot_proxy_finalize;
  gobject_class->get_property = xdp_impl_screenshot_proxy_get_property;
  gobject_class->set_property = xdp_impl_screenshot_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = xdp_impl_screenshot_proxy_g_signal;
  proxy_class->g_properties_changed = xdp_impl_screenshot_proxy_g_properties_changed;

  xdp_impl_screenshot_override_properties (gobject_class, 1);

#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
  g_type_class_add_private (klass, sizeof (XdpImplScreenshotProxyPrivate));
#endif
}

static void
xdp_impl_screenshot_proxy_iface_init (XdpImplScreenshotIface *iface)
{
  iface->get_version = xdp_impl_screenshot_proxy_get_version;
}

/**
 * xdp_impl_screenshot_proxy_new:
 * @connection: A #GDBusConnection.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-Screenshot.top_of_page">org.freedesktop.impl.portal.Screenshot</link>. 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 xdp_impl_screenshot_proxy_new_finish() to get the result of the operation.
 *
 * See xdp_impl_screenshot_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_impl_screenshot_proxy_new (
    GDBusConnection     *connection,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GAsyncReadyCallback  callback,
    gpointer             user_data)
{
  g_async_initable_new_async (XDP_IMPL_TYPE_SCREENSHOT_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.Screenshot", NULL);
}

/**
 * xdp_impl_screenshot_proxy_new_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_screenshot_proxy_new().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_impl_screenshot_proxy_new().
 *
 * Returns: (transfer full) (type XdpImplScreenshotProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplScreenshot *
xdp_impl_screenshot_proxy_new_finish (
    GAsyncResult        *res,
    GError             **error)
{
  GObject *ret;
  GObject *source_object;
  source_object = g_async_result_get_source_object (res);
  ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
  g_object_unref (source_object);
  if (ret != NULL)
    return XDP_IMPL_SCREENSHOT (ret);
  else
    return NULL;
}

/**
 * xdp_impl_screenshot_proxy_new_sync:
 * @connection: A #GDBusConnection.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL
 *
 * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-Screenshot.top_of_page">org.freedesktop.impl.portal.Screenshot</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_screenshot_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpImplScreenshotProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplScreenshot *
xdp_impl_screenshot_proxy_new_sync (
    GDBusConnection     *connection,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GError             **error)
{
  GInitable *ret;
  ret = g_initable_new (XDP_IMPL_TYPE_SCREENSHOT_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.Screenshot", NULL);
  if (ret != NULL)
    return XDP_IMPL_SCREENSHOT (ret);
  else
    return NULL;
}


/**
 * xdp_impl_screenshot_proxy_new_for_bus:
 * @bus_type: A #GBusType.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: A bus name (well-known or unique).
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
 * @user_data: User data to pass to @callback.
 *
 * Like xdp_impl_screenshot_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 xdp_impl_screenshot_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See xdp_impl_screenshot_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_impl_screenshot_proxy_new_for_bus (
    GBusType             bus_type,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GAsyncReadyCallback  callback,
    gpointer             user_data)
{
  g_async_initable_new_async (XDP_IMPL_TYPE_SCREENSHOT_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.Screenshot", NULL);
}

/**
 * xdp_impl_screenshot_proxy_new_for_bus_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_screenshot_proxy_new_for_bus().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_impl_screenshot_proxy_new_for_bus().
 *
 * Returns: (transfer full) (type XdpImplScreenshotProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplScreenshot *
xdp_impl_screenshot_proxy_new_for_bus_finish (
    GAsyncResult        *res,
    GError             **error)
{
  GObject *ret;
  GObject *source_object;
  source_object = g_async_result_get_source_object (res);
  ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
  g_object_unref (source_object);
  if (ret != NULL)
    return XDP_IMPL_SCREENSHOT (ret);
  else
    return NULL;
}

/**
 * xdp_impl_screenshot_proxy_new_for_bus_sync:
 * @bus_type: A #GBusType.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: A bus name (well-known or unique).
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL
 *
 * Like xdp_impl_screenshot_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_screenshot_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpImplScreenshotProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplScreenshot *
xdp_impl_screenshot_proxy_new_for_bus_sync (
    GBusType             bus_type,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GError             **error)
{
  GInitable *ret;
  ret = g_initable_new (XDP_IMPL_TYPE_SCREENSHOT_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.Screenshot", NULL);
  if (ret != NULL)
    return XDP_IMPL_SCREENSHOT (ret);
  else
    return NULL;
}


/* ------------------------------------------------------------------------ */

/**
 * XdpImplScreenshotSkeleton:
 *
 * The #XdpImplScreenshotSkeleton structure contains only private data and should only be accessed using the provided API.
 */

/**
 * XdpImplScreenshotSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpImplScreenshotSkeleton.
 */

struct _XdpImplScreenshotSkeletonPrivate
{
  GValue *properties;
  GList *changed_properties;
  GSource *changed_properties_idle_source;
  GMainContext *context;
  GMutex lock;
};

static void
_xdp_impl_screenshot_skeleton_handle_method_call (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name,
  const gchar *method_name,
  GVariant *parameters,
  GDBusMethodInvocation *invocation,
  gpointer user_data)
{
  XdpImplScreenshotSkeleton *skeleton = XDP_IMPL_SCREENSHOT_SKELETON (user_data);
  _ExtendedGDBusMethodInfo *info;
  GVariantIter iter;
  GVariant *child;
  GValue *paramv;
  gsize num_params;
  guint num_extra;
  gsize n;
  guint signal_id;
  GValue return_value = G_VALUE_INIT;
  info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
  g_assert (info != NULL);
  num_params = g_variant_n_children (parameters);
  num_extra = info->pass_fdlist ? 3 : 2;  paramv = g_new0 (GValue, num_params + num_extra);
  n = 0;
  g_value_init (&paramv[n], XDP_IMPL_TYPE_SCREENSHOT);
  g_value_set_object (&paramv[n++], skeleton);
  g_value_init (&paramv[n], G_TYPE_DBUS_METHOD_INVOCATION);
  g_value_set_object (&paramv[n++], invocation);
  if (info->pass_fdlist)
    {
#ifdef G_OS_UNIX
      g_value_init (&paramv[n], G_TYPE_UNIX_FD_LIST);
      g_value_set_object (&paramv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation)));
#else
      g_assert_not_reached ();
#endif
    }
  g_variant_iter_init (&iter, parameters);
  while ((child = g_variant_iter_next_value (&iter)) != NULL)
    {
      _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra];
      if (arg_info->use_gvariant)
        {
          g_value_init (&paramv[n], G_TYPE_VARIANT);
          g_value_set_variant (&paramv[n], child);
          n++;
        }
      else
        g_dbus_gvariant_to_gvalue (child, &paramv[n++]);
      g_variant_unref (child);
    }
  signal_id = g_signal_lookup (info->signal_name, XDP_IMPL_TYPE_SCREENSHOT);
  g_value_init (&return_value, G_TYPE_BOOLEAN);
  g_signal_emitv (paramv, signal_id, 0, &return_value);
  if (!g_value_get_boolean (&return_value))
    g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD, "Method %s is not implemented on interface %s", method_name, interface_name);
  g_value_unset (&return_value);
  for (n = 0; n < num_params + num_extra; n++)
    g_value_unset (&paramv[n]);
  g_free (paramv);
}

static GVariant *
_xdp_impl_screenshot_skeleton_handle_get_property (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name G_GNUC_UNUSED,
  const gchar *property_name,
  GError **error,
  gpointer user_data)
{
  XdpImplScreenshotSkeleton *skeleton = XDP_IMPL_SCREENSHOT_SKELETON (user_data);
  GValue value = G_VALUE_INIT;
  GParamSpec *pspec;
  _ExtendedGDBusPropertyInfo *info;
  GVariant *ret;
  ret = NULL;
  info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_screenshot_interface_info.parent_struct, property_name);
  g_assert (info != NULL);
  pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
  if (pspec == NULL)
    {
      g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
    }
  else
    {
      g_value_init (&value, pspec->value_type);
      g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value);
      ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature));
      g_value_unset (&value);
    }
  return ret;
}

static gboolean
_xdp_impl_screenshot_skeleton_handle_set_property (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name G_GNUC_UNUSED,
  const gchar *property_name,
  GVariant *variant,
  GError **error,
  gpointer user_data)
{
  XdpImplScreenshotSkeleton *skeleton = XDP_IMPL_SCREENSHOT_SKELETON (user_data);
  GValue value = G_VALUE_INIT;
  GParamSpec *pspec;
  _ExtendedGDBusPropertyInfo *info;
  gboolean ret;
  ret = FALSE;
  info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_screenshot_interface_info.parent_struct, property_name);
  g_assert (info != NULL);
  pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
  if (pspec == NULL)
    {
      g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
    }
  else
    {
      if (info->use_gvariant)
        g_value_set_variant (&value, variant);
      else
        g_dbus_gvariant_to_gvalue (variant, &value);
      g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value);
      g_value_unset (&value);
      ret = TRUE;
    }
  return ret;
}

static const GDBusInterfaceVTable _xdp_impl_screenshot_skeleton_vtable =
{
  _xdp_impl_screenshot_skeleton_handle_method_call,
  _xdp_impl_screenshot_skeleton_handle_get_property,
  _xdp_impl_screenshot_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
xdp_impl_screenshot_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return xdp_impl_screenshot_interface_info ();
}

static GDBusInterfaceVTable *
xdp_impl_screenshot_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_xdp_impl_screenshot_skeleton_vtable;
}

static GVariant *
xdp_impl_screenshot_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  XdpImplScreenshotSkeleton *skeleton = XDP_IMPL_SCREENSHOT_SKELETON (_skeleton);

  GVariantBuilder builder;
  guint n;
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_84
  g_variant_builder_init_static (&builder, G_VARIANT_TYPE ("a{sv}"));
#else
  g_variant_builder_init(&builder, G_VARIANT_TYPE ("a{sv}"));
#endif
  if (_xdp_impl_screenshot_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _xdp_impl_screenshot_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _xdp_impl_screenshot_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _xdp_impl_screenshot_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.impl.portal.Screenshot", info->name, NULL, skeleton);
          if (value != NULL)
            {
              g_variant_take_ref (value);
              g_variant_builder_add (&builder, "{sv}", info->name, value);
              g_variant_unref (value);
            }
        }
    }
out:
  return g_variant_builder_end (&builder);
}

static gboolean _xdp_impl_screenshot_emit_changed (gpointer user_data);

static void
xdp_impl_screenshot_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
{
  XdpImplScreenshotSkeleton *skeleton = XDP_IMPL_SCREENSHOT_SKELETON (_skeleton);
  gboolean emit_changed = FALSE;

  g_mutex_lock (&skeleton->priv->lock);
  if (skeleton->priv->changed_properties_idle_source != NULL)
    {
      g_source_destroy (skeleton->priv->changed_properties_idle_source);
      skeleton->priv->changed_properties_idle_source = NULL;
      emit_changed = TRUE;
    }
  g_mutex_unlock (&skeleton->priv->lock);

  if (emit_changed)
    _xdp_impl_screenshot_emit_changed (skeleton);
}

static void xdp_impl_screenshot_skeleton_iface_init (XdpImplScreenshotIface *iface);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpImplScreenshotSkeleton, xdp_impl_screenshot_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (XdpImplScreenshotSkeleton)
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_SCREENSHOT, xdp_impl_screenshot_skeleton_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpImplScreenshotSkeleton, xdp_impl_screenshot_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_SCREENSHOT, xdp_impl_screenshot_skeleton_iface_init))

#endif
static void
xdp_impl_screenshot_skeleton_finalize (GObject *object)
{
  XdpImplScreenshotSkeleton *skeleton = XDP_IMPL_SCREENSHOT_SKELETON (object);
  guint n;
  for (n = 0; n < 1; n++)
    g_value_unset (&skeleton->priv->properties[n]);
  g_free (skeleton->priv->properties);
  g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  /* coverity[missing_lock : SUPPRESS] */
  g_clear_pointer (&skeleton->priv->changed_properties_idle_source, g_source_destroy);
#else
  if (skeleton->priv->changed_properties_idle_source != NULL)
    g_source_destroy (skeleton->priv->changed_properties_idle_source);
skeleton->priv->changed_properties_idle_source = NULL;
#endif
  g_main_context_unref (skeleton->priv->context);
  g_mutex_clear (&skeleton->priv->lock);
  G_OBJECT_CLASS (xdp_impl_screenshot_skeleton_parent_class)->finalize (object);
}

static void
xdp_impl_screenshot_skeleton_get_property (GObject      *object,
  guint         prop_id,
  GValue       *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  XdpImplScreenshotSkeleton *skeleton = XDP_IMPL_SCREENSHOT_SKELETON (object);
  g_assert (prop_id != 0 && prop_id - 1 < 1);
  g_mutex_lock (&skeleton->priv->lock);
  g_value_copy (&skeleton->priv->properties[prop_id - 1], value);
  g_mutex_unlock (&skeleton->priv->lock);
}

static gboolean
_xdp_impl_screenshot_emit_changed (gpointer user_data)
{
  XdpImplScreenshotSkeleton *skeleton = XDP_IMPL_SCREENSHOT_SKELETON (user_data);
  GList *l;
  GVariantBuilder builder;
  GVariantBuilder invalidated_builder;
  guint num_changes;

  g_mutex_lock (&skeleton->priv->lock);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_84
  g_variant_builder_init_static (&builder, G_VARIANT_TYPE ("a{sv}"));
  g_variant_builder_init_static (&invalidated_builder, G_VARIANT_TYPE ("as"));
#else
  g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
  g_variant_builder_init (&invalidated_builder, G_VARIANT_TYPE ("as"));
#endif
  for (l = skeleton->priv->changed_properties, num_changes = 0; l != NULL; l = l->next)
    {
      ChangedProperty *cp = l->data;
      GVariant *variant;
      const GValue *cur_value;

      cur_value = &skeleton->priv->properties[cp->prop_id - 1];
      if (!_g_value_equal (cur_value, &cp->orig_value))
        {
          variant = g_dbus_gvalue_to_gvariant (cur_value, G_VARIANT_TYPE (cp->info->parent_struct.signature));
          g_variant_builder_add (&builder, "{sv}", cp->info->parent_struct.name, variant);
          g_variant_unref (variant);
          num_changes++;
        }
    }
  if (num_changes > 0)
    {
      GList *connections, *ll;
      GVariant *signal_variant;
      signal_variant = g_variant_ref_sink (g_variant_new ("(sa{sv}as)", "org.freedesktop.impl.portal.Screenshot",
                                           &builder, &invalidated_builder));
      connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
      for (ll = connections; ll != NULL; ll = ll->next)
        {
          GDBusConnection *connection = ll->data;

          g_dbus_connection_emit_signal (connection,
                                         NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)),
                                         "org.freedesktop.DBus.Properties",
                                         "PropertiesChanged",
                                         signal_variant,
                                         NULL);
        }
      g_variant_unref (signal_variant);
      g_list_free_full (connections, g_object_unref);
    }
  else
    {
      g_variant_builder_clear (&builder);
      g_variant_builder_clear (&invalidated_builder);
    }
  g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
  skeleton->priv->changed_properties = NULL;
  skeleton->priv->changed_properties_idle_source = NULL;
  g_mutex_unlock (&skeleton->priv->lock);
  return FALSE;
}

static void
_xdp_impl_screenshot_schedule_emit_changed (XdpImplScreenshotSkeleton *skeleton, const _ExtendedGDBusPropertyInfo *info, guint prop_id, const GValue *orig_value)
{
  ChangedProperty *cp;
  GList *l;
  cp = NULL;
  for (l = skeleton->priv->changed_properties; l != NULL; l = l->next)
    {
      ChangedProperty *i_cp = l->data;
      if (i_cp->info == info)
        {
          cp = i_cp;
          break;
        }
    }
  if (cp == NULL)
    {
      cp = g_new0 (ChangedProperty, 1);
      cp->prop_id = prop_id;
      cp->info = info;
      skeleton->priv->changed_properties = g_list_prepend (skeleton->priv->changed_properties, cp);
      g_value_init (&cp->orig_value, G_VALUE_TYPE (orig_value));
      g_value_copy (orig_value, &cp->orig_value);
    }
}

static void
xdp_impl_screenshot_skeleton_notify (GObject      *object,
  GParamSpec *pspec G_GNUC_UNUSED)
{
  XdpImplScreenshotSkeleton *skeleton = XDP_IMPL_SCREENSHOT_SKELETON (object);
  g_mutex_lock (&skeleton->priv->lock);
  if (skeleton->priv->changed_properties != NULL &&
      skeleton->priv->changed_properties_idle_source == NULL)
    {
      skeleton->priv->changed_properties_idle_source = g_idle_source_new ();
      g_source_set_priority (skeleton->priv->changed_properties_idle_source, G_PRIORITY_DEFAULT);
      g_source_set_callback (skeleton->priv->changed_properties_idle_source, _xdp_impl_screenshot_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
      g_source_set_name (skeleton->priv->changed_properties_idle_source, "[generated] _xdp_impl_screenshot_emit_changed");
      g_source_attach (skeleton->priv->changed_properties_idle_source, skeleton->priv->context);
      g_source_unref (skeleton->priv->changed_properties_idle_source);
    }
  g_mutex_unlock (&skeleton->priv->lock);
}

static void
xdp_impl_screenshot_skeleton_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec)
{
  const _ExtendedGDBusPropertyInfo *info;
  XdpImplScreenshotSkeleton *skeleton = XDP_IMPL_SCREENSHOT_SKELETON (object);
  g_assert (prop_id != 0 && prop_id - 1 < 1);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_impl_screenshot_property_info_pointers[prop_id - 1];
  g_mutex_lock (&skeleton->priv->lock);
  g_object_freeze_notify (object);
  if (!_g_value_equal (value, &skeleton->priv->properties[prop_id - 1]))
    {
      if (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)) != NULL &&
          info->emits_changed_signal)
        _xdp_impl_screenshot_schedule_emit_changed (skeleton, info, prop_id, &skeleton->priv->properties[prop_id - 1]);
      g_value_copy (value, &skeleton->priv->properties[prop_id - 1]);
      g_object_notify_by_pspec (object, pspec);
    }
  g_mutex_unlock (&skeleton->priv->lock);
  g_object_thaw_notify (object);
}

static void
xdp_impl_screenshot_skeleton_init (XdpImplScreenshotSkeleton *skeleton)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  skeleton->priv = xdp_impl_screenshot_skeleton_get_instance_private (skeleton);
#else
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, XDP_IMPL_TYPE_SCREENSHOT_SKELETON, XdpImplScreenshotSkeletonPrivate);
#endif

  g_mutex_init (&skeleton->priv->lock);
  skeleton->priv->context = g_main_context_ref_thread_default ();
  skeleton->priv->properties = g_new0 (GValue, 1);
  g_value_init (&skeleton->priv->properties[0], G_TYPE_UINT);
}

static guint 
xdp_impl_screenshot_skeleton_get_version (XdpImplScreenshot *object)
{
  XdpImplScreenshotSkeleton *skeleton = XDP_IMPL_SCREENSHOT_SKELETON (object);
  guint value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_marshal_value_peek_uint (&(skeleton->priv->properties[0]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static void
xdp_impl_screenshot_skeleton_class_init (XdpImplScreenshotSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize = xdp_impl_screenshot_skeleton_finalize;
  gobject_class->get_property = xdp_impl_screenshot_skeleton_get_property;
  gobject_class->set_property = xdp_impl_screenshot_skeleton_set_property;
  gobject_class->notify       = xdp_impl_screenshot_skeleton_notify;


  xdp_impl_screenshot_override_properties (gobject_class, 1);

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = xdp_impl_screenshot_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = xdp_impl_screenshot_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = xdp_impl_screenshot_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = xdp_impl_screenshot_skeleton_dbus_interface_get_vtable;

#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
  g_type_class_add_private (klass, sizeof (XdpImplScreenshotSkeletonPrivate));
#endif
}

static void
xdp_impl_screenshot_skeleton_iface_init (XdpImplScreenshotIface *iface)
{
  iface->get_version = xdp_impl_screenshot_skeleton_get_version;
}

/**
 * xdp_impl_screenshot_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-Screenshot.top_of_page">org.freedesktop.impl.portal.Screenshot</link>.
 *
 * Returns: (transfer full) (type XdpImplScreenshotSkeleton): The skeleton object.
 */
XdpImplScreenshot *
xdp_impl_screenshot_skeleton_new (void)
{
  return XDP_IMPL_SCREENSHOT (g_object_new (XDP_IMPL_TYPE_SCREENSHOT_SKELETON, NULL));
}

/* ------------------------------------------------------------------------
 * Code for interface org.freedesktop.impl.portal.Session
 * ------------------------------------------------------------------------
 */

/**
 * SECTION:XdpImplSession
 * @title: XdpImplSession
 * @short_description: Generated C code for the org.freedesktop.impl.portal.Session D-Bus interface
 *
 * This section contains code for working with the <link linkend="gdbus-interface-org-freedesktop-impl-portal-Session.top_of_page">org.freedesktop.impl.portal.Session</link> D-Bus interface in C.
 */

enum
{
  XDP_IMPL__SESSION_CLOSED,
};

static unsigned XDP_IMPL__SESSION_SIGNALS[1] = { 0 };

/* ---- Introspection data for org.freedesktop.impl.portal.Session ---- */

static const _ExtendedGDBusMethodInfo _xdp_impl_session_method_info_close =
{
  {
    -1,
    (gchar *) "Close",
    NULL,
    NULL,
    NULL
  },
  "handle-close",
  FALSE
};

static const GDBusMethodInfo * const _xdp_impl_session_method_info_pointers[] =
{
  &_xdp_impl_session_method_info_close.parent_struct,
  NULL
};

static const _ExtendedGDBusSignalInfo _xdp_impl_session_signal_info_closed =
{
  {
    -1,
    (gchar *) "Closed",
    NULL,
    NULL
  },
  "closed"
};

static const GDBusSignalInfo * const _xdp_impl_session_signal_info_pointers[] =
{
  &_xdp_impl_session_signal_info_closed.parent_struct,
  NULL
};

static const _ExtendedGDBusPropertyInfo _xdp_impl_session_property_info_version =
{
  {
    -1,
    (gchar *) "version",
    (gchar *) "u",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "version",
  FALSE,
  TRUE
};

static const GDBusPropertyInfo * const _xdp_impl_session_property_info_pointers[] =
{
  &_xdp_impl_session_property_info_version.parent_struct,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _xdp_impl_session_interface_info =
{
  {
    -1,
    (gchar *) "org.freedesktop.impl.portal.Session",
    (GDBusMethodInfo **) &_xdp_impl_session_method_info_pointers,
    (GDBusSignalInfo **) &_xdp_impl_session_signal_info_pointers,
    (GDBusPropertyInfo **) &_xdp_impl_session_property_info_pointers,
    NULL
  },
  "session",
};


/**
 * xdp_impl_session_interface_info:
 *
 * Gets a machine-readable description of the <link linkend="gdbus-interface-org-freedesktop-impl-portal-Session.top_of_page">org.freedesktop.impl.portal.Session</link> D-Bus interface.
 *
 * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
 */
GDBusInterfaceInfo *
xdp_impl_session_interface_info (void)
{
  return (GDBusInterfaceInfo *) &_xdp_impl_session_interface_info.parent_struct;
}

/**
 * xdp_impl_session_override_properties:
 * @klass: The class structure for a #GObject derived class.
 * @property_id_begin: The property id to assign to the first overridden property.
 *
 * Overrides all #GObject properties in the #XdpImplSession interface for a concrete class.
 * The properties are overridden in the order they are defined.
 *
 * Returns: The last property id.
 */
guint
xdp_impl_session_override_properties (GObjectClass *klass, guint property_id_begin)
{
  g_object_class_override_property (klass, property_id_begin++, "version");
  return property_id_begin - 1;
}


inline static void
xdp_impl_session_signal_marshal_closed (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  g_cclosure_marshal_VOID__VOID (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_impl_session_method_marshal_close (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  _g_dbus_codegen_marshal_BOOLEAN__OBJECT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}


/**
 * XdpImplSession:
 *
 * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-Session.top_of_page">org.freedesktop.impl.portal.Session</link>.
 */

/**
 * XdpImplSessionIface:
 * @parent_iface: The parent interface.
 * @handle_close: Handler for the #XdpImplSession::handle-close signal.
 * @get_version: Getter for the #XdpImplSession:version property.
 * @closed: Handler for the #XdpImplSession::closed signal.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-Session.top_of_page">org.freedesktop.impl.portal.Session</link>.
 */

typedef XdpImplSessionIface XdpImplSessionInterface;
G_DEFINE_INTERFACE (XdpImplSession, xdp_impl_session, G_TYPE_OBJECT)

static void
xdp_impl_session_default_init (XdpImplSessionIface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * XdpImplSession::handle-close:
   * @object: A #XdpImplSession.
   * @invocation: A #GDBusMethodInvocation.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-impl-portal-Session.Close">Close()</link> 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 xdp_impl_session_complete_close() 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.
   *
   * 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.
   */
  g_signal_new ("handle-close",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpImplSessionIface, handle_close),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_impl_session_method_marshal_close,
    G_TYPE_BOOLEAN,
    1,
    G_TYPE_DBUS_METHOD_INVOCATION);

  /* GObject signals for received D-Bus signals: */
  /**
   * XdpImplSession::closed:
   * @object: A #XdpImplSession.
   *
   * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-freedesktop-impl-portal-Session.Closed">"Closed"</link> 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.
   */
  XDP_IMPL__SESSION_SIGNALS[XDP_IMPL__SESSION_CLOSED] =
    g_signal_new ("closed",
      G_TYPE_FROM_INTERFACE (iface),
      G_SIGNAL_RUN_LAST,
      G_STRUCT_OFFSET (XdpImplSessionIface, closed),
      NULL,
      NULL,
      xdp_impl_session_signal_marshal_closed,
      G_TYPE_NONE,
      0);

  /* GObject properties for D-Bus properties: */
  /**
   * XdpImplSession:version:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-impl-portal-Session.version">"version"</link>.
   *
   * 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.
   */
  g_object_interface_install_property (iface,
    g_param_spec_uint ("version", "version", "version", 0, G_MAXUINT32, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
}

/**
 * xdp_impl_session_get_version: (skip)
 * @object: A #XdpImplSession.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-impl-portal-Session.version">"version"</link> D-Bus property.
 *
 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
 *
 * Returns: The property value.
 */
guint 
xdp_impl_session_get_version (XdpImplSession *object)
{
  g_return_val_if_fail (XDP_IMPL_IS_SESSION (object), 0);

  return XDP_IMPL_SESSION_GET_IFACE (object)->get_version (object);
}

/**
 * xdp_impl_session_set_version: (skip)
 * @object: A #XdpImplSession.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-freedesktop-impl-portal-Session.version">"version"</link> 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.
 */
void
xdp_impl_session_set_version (XdpImplSession *object, guint value)
{
  g_object_set (G_OBJECT (object), "version", value, NULL);
}

/**
 * xdp_impl_session_emit_closed:
 * @object: A #XdpImplSession.
 *
 * Emits the <link linkend="gdbus-signal-org-freedesktop-impl-portal-Session.Closed">"Closed"</link> D-Bus signal.
 */
void
xdp_impl_session_emit_closed (
    XdpImplSession *object)
{
  g_signal_emit (object, XDP_IMPL__SESSION_SIGNALS[XDP_IMPL__SESSION_CLOSED], 0);
}

/**
 * xdp_impl_session_call_close:
 * @proxy: A #XdpImplSessionProxy.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-Session.Close">Close()</link> 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 xdp_impl_session_call_close_finish() to get the result of the operation.
 *
 * See xdp_impl_session_call_close_sync() for the synchronous, blocking version of this method.
 */
void
xdp_impl_session_call_close (
    XdpImplSession *proxy,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "Close",
    g_variant_new ("()"),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_impl_session_call_close_finish:
 * @proxy: A #XdpImplSessionProxy.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_session_call_close().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_impl_session_call_close().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_session_call_close_finish (
    XdpImplSession *proxy,
    GAsyncResult *res,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "()");
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_session_call_close_sync:
 * @proxy: A #XdpImplSessionProxy.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-Session.Close">Close()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_session_call_close() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_session_call_close_sync (
    XdpImplSession *proxy,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "Close",
    g_variant_new ("()"),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "()");
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_session_complete_close:
 * @object: A #XdpImplSession.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-impl-portal-Session.Close">Close()</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
xdp_impl_session_complete_close (
    XdpImplSession *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("()"));
}

/* ------------------------------------------------------------------------ */

/**
 * XdpImplSessionProxy:
 *
 * The #XdpImplSessionProxy structure contains only private data and should only be accessed using the provided API.
 */

/**
 * XdpImplSessionProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpImplSessionProxy.
 */

struct _XdpImplSessionProxyPrivate
{
  GData *qdata;
};

static void xdp_impl_session_proxy_iface_init (XdpImplSessionIface *iface);

#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpImplSessionProxy, xdp_impl_session_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (XdpImplSessionProxy)
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_SESSION, xdp_impl_session_proxy_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpImplSessionProxy, xdp_impl_session_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_SESSION, xdp_impl_session_proxy_iface_init))

#endif
static void
xdp_impl_session_proxy_finalize (GObject *object)
{
  XdpImplSessionProxy *proxy = XDP_IMPL_SESSION_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (xdp_impl_session_proxy_parent_class)->finalize (object);
}

static void
xdp_impl_session_proxy_get_property (GObject      *object,
  guint         prop_id,
  GValue       *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  const _ExtendedGDBusPropertyInfo *info;
  GVariant *variant;
  g_assert (prop_id != 0 && prop_id - 1 < 1);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_impl_session_property_info_pointers[prop_id - 1];
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), info->parent_struct.name);
  if (info->use_gvariant)
    {
      g_value_set_variant (value, variant);
    }
  else
    {
      if (variant != NULL)
        g_dbus_gvariant_to_gvalue (variant, value);
    }
  if (variant != NULL)
    g_variant_unref (variant);
}

static void
xdp_impl_session_proxy_set_property_cb (GDBusProxy *proxy,
  GAsyncResult *res,
  gpointer      user_data)
{
  const _ExtendedGDBusPropertyInfo *info = user_data;
  GError *error;
  GVariant *_ret;
  error = NULL;
  _ret = g_dbus_proxy_call_finish (proxy, res, &error);
  if (!_ret)
    {
      g_warning ("Error setting property '%s' on interface org.freedesktop.impl.portal.Session: %s (%s, %d)",
                 info->parent_struct.name, 
                 error->message, g_quark_to_string (error->domain), error->code);
      g_error_free (error);
    }
  else
    {
      g_variant_unref (_ret);
    }
}

static void
xdp_impl_session_proxy_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  const _ExtendedGDBusPropertyInfo *info;
  GVariant *variant;
  g_assert (prop_id != 0 && prop_id - 1 < 1);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_impl_session_property_info_pointers[prop_id - 1];
  variant = g_dbus_gvalue_to_gvariant (value, G_VARIANT_TYPE (info->parent_struct.signature));
  g_dbus_proxy_call (G_DBUS_PROXY (object),
    "org.freedesktop.DBus.Properties.Set",
    g_variant_new ("(ssv)", "org.freedesktop.impl.portal.Session", info->parent_struct.name, variant),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    NULL, (GAsyncReadyCallback) xdp_impl_session_proxy_set_property_cb, (GDBusPropertyInfo *) &info->parent_struct);
  g_variant_unref (variant);
}

static void
xdp_impl_session_proxy_g_signal (GDBusProxy *proxy,
  const gchar *sender_name G_GNUC_UNUSED,
  const gchar *signal_name,
  GVariant *parameters)
{
  _ExtendedGDBusSignalInfo *info;
  GVariantIter iter;
  GVariant *child;
  GValue *paramv;
  gsize num_params;
  gsize n;
  guint signal_id;
  info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_xdp_impl_session_interface_info.parent_struct, signal_name);
  if (info == NULL)
    return;
  num_params = g_variant_n_children (parameters);
  paramv = g_new0 (GValue, num_params + 1);
  g_value_init (&paramv[0], XDP_IMPL_TYPE_SESSION);
  g_value_set_object (&paramv[0], proxy);
  g_variant_iter_init (&iter, parameters);
  n = 1;
  while ((child = g_variant_iter_next_value (&iter)) != NULL)
    {
      _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1];
      if (arg_info->use_gvariant)
        {
          g_value_init (&paramv[n], G_TYPE_VARIANT);
          g_value_set_variant (&paramv[n], child);
          n++;
        }
      else
        g_dbus_gvariant_to_gvalue (child, &paramv[n++]);
      g_variant_unref (child);
    }
  signal_id = g_signal_lookup (info->signal_name, XDP_IMPL_TYPE_SESSION);
  g_signal_emitv (paramv, signal_id, 0, NULL);
  for (n = 0; n < num_params + 1; n++)
    g_value_unset (&paramv[n]);
  g_free (paramv);
}

static void
xdp_impl_session_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  XdpImplSessionProxy *proxy = XDP_IMPL_SESSION_PROXY (_proxy);
  guint n;
  const gchar *key;
  GVariantIter *iter;
  _ExtendedGDBusPropertyInfo *info;
  g_variant_get (changed_properties, "a{sv}", &iter);
  while (g_variant_iter_next (iter, "{&sv}", &key, NULL))
    {
      info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_session_interface_info.parent_struct, key);
      g_datalist_remove_data (&proxy->priv->qdata, key);
      if (info != NULL)
        g_object_notify (G_OBJECT (proxy), info->hyphen_name);
    }
  g_variant_iter_free (iter);
  for (n = 0; invalidated_properties[n] != NULL; n++)
    {
      info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_session_interface_info.parent_struct, invalidated_properties[n]);
      g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]);
      if (info != NULL)
        g_object_notify (G_OBJECT (proxy), info->hyphen_name);
    }
}

static guint 
xdp_impl_session_proxy_get_version (XdpImplSession *object)
{
  XdpImplSessionProxy *proxy = XDP_IMPL_SESSION_PROXY (object);
  GVariant *variant;
  guint value = 0;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "version");
  if (variant != NULL)
    {
      value = g_variant_get_uint32 (variant);
      g_variant_unref (variant);
    }
  return value;
}

static void
xdp_impl_session_proxy_init (XdpImplSessionProxy *proxy)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  proxy->priv = xdp_impl_session_proxy_get_instance_private (proxy);
#else
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, XDP_IMPL_TYPE_SESSION_PROXY, XdpImplSessionProxyPrivate);
#endif

  g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), xdp_impl_session_interface_info ());
}

static void
xdp_impl_session_proxy_class_init (XdpImplSessionProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = xdp_impl_session_proxy_finalize;
  gobject_class->get_property = xdp_impl_session_proxy_get_property;
  gobject_class->set_property = xdp_impl_session_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = xdp_impl_session_proxy_g_signal;
  proxy_class->g_properties_changed = xdp_impl_session_proxy_g_properties_changed;

  xdp_impl_session_override_properties (gobject_class, 1);

#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
  g_type_class_add_private (klass, sizeof (XdpImplSessionProxyPrivate));
#endif
}

static void
xdp_impl_session_proxy_iface_init (XdpImplSessionIface *iface)
{
  iface->get_version = xdp_impl_session_proxy_get_version;
}

/**
 * xdp_impl_session_proxy_new:
 * @connection: A #GDBusConnection.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-Session.top_of_page">org.freedesktop.impl.portal.Session</link>. 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 xdp_impl_session_proxy_new_finish() to get the result of the operation.
 *
 * See xdp_impl_session_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_impl_session_proxy_new (
    GDBusConnection     *connection,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GAsyncReadyCallback  callback,
    gpointer             user_data)
{
  g_async_initable_new_async (XDP_IMPL_TYPE_SESSION_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.Session", NULL);
}

/**
 * xdp_impl_session_proxy_new_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_session_proxy_new().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_impl_session_proxy_new().
 *
 * Returns: (transfer full) (type XdpImplSessionProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplSession *
xdp_impl_session_proxy_new_finish (
    GAsyncResult        *res,
    GError             **error)
{
  GObject *ret;
  GObject *source_object;
  source_object = g_async_result_get_source_object (res);
  ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
  g_object_unref (source_object);
  if (ret != NULL)
    return XDP_IMPL_SESSION (ret);
  else
    return NULL;
}

/**
 * xdp_impl_session_proxy_new_sync:
 * @connection: A #GDBusConnection.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL
 *
 * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-Session.top_of_page">org.freedesktop.impl.portal.Session</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_session_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpImplSessionProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplSession *
xdp_impl_session_proxy_new_sync (
    GDBusConnection     *connection,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GError             **error)
{
  GInitable *ret;
  ret = g_initable_new (XDP_IMPL_TYPE_SESSION_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.Session", NULL);
  if (ret != NULL)
    return XDP_IMPL_SESSION (ret);
  else
    return NULL;
}


/**
 * xdp_impl_session_proxy_new_for_bus:
 * @bus_type: A #GBusType.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: A bus name (well-known or unique).
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
 * @user_data: User data to pass to @callback.
 *
 * Like xdp_impl_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 xdp_impl_session_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See xdp_impl_session_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_impl_session_proxy_new_for_bus (
    GBusType             bus_type,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GAsyncReadyCallback  callback,
    gpointer             user_data)
{
  g_async_initable_new_async (XDP_IMPL_TYPE_SESSION_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.Session", NULL);
}

/**
 * xdp_impl_session_proxy_new_for_bus_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_session_proxy_new_for_bus().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_impl_session_proxy_new_for_bus().
 *
 * Returns: (transfer full) (type XdpImplSessionProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplSession *
xdp_impl_session_proxy_new_for_bus_finish (
    GAsyncResult        *res,
    GError             **error)
{
  GObject *ret;
  GObject *source_object;
  source_object = g_async_result_get_source_object (res);
  ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
  g_object_unref (source_object);
  if (ret != NULL)
    return XDP_IMPL_SESSION (ret);
  else
    return NULL;
}

/**
 * xdp_impl_session_proxy_new_for_bus_sync:
 * @bus_type: A #GBusType.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: A bus name (well-known or unique).
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL
 *
 * Like xdp_impl_session_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_session_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpImplSessionProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplSession *
xdp_impl_session_proxy_new_for_bus_sync (
    GBusType             bus_type,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GError             **error)
{
  GInitable *ret;
  ret = g_initable_new (XDP_IMPL_TYPE_SESSION_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.Session", NULL);
  if (ret != NULL)
    return XDP_IMPL_SESSION (ret);
  else
    return NULL;
}


/* ------------------------------------------------------------------------ */

/**
 * XdpImplSessionSkeleton:
 *
 * The #XdpImplSessionSkeleton structure contains only private data and should only be accessed using the provided API.
 */

/**
 * XdpImplSessionSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpImplSessionSkeleton.
 */

struct _XdpImplSessionSkeletonPrivate
{
  GValue *properties;
  GList *changed_properties;
  GSource *changed_properties_idle_source;
  GMainContext *context;
  GMutex lock;
};

static void
_xdp_impl_session_skeleton_handle_method_call (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name,
  const gchar *method_name,
  GVariant *parameters,
  GDBusMethodInvocation *invocation,
  gpointer user_data)
{
  XdpImplSessionSkeleton *skeleton = XDP_IMPL_SESSION_SKELETON (user_data);
  _ExtendedGDBusMethodInfo *info;
  GVariantIter iter;
  GVariant *child;
  GValue *paramv;
  gsize num_params;
  guint num_extra;
  gsize n;
  guint signal_id;
  GValue return_value = G_VALUE_INIT;
  info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
  g_assert (info != NULL);
  num_params = g_variant_n_children (parameters);
  num_extra = info->pass_fdlist ? 3 : 2;  paramv = g_new0 (GValue, num_params + num_extra);
  n = 0;
  g_value_init (&paramv[n], XDP_IMPL_TYPE_SESSION);
  g_value_set_object (&paramv[n++], skeleton);
  g_value_init (&paramv[n], G_TYPE_DBUS_METHOD_INVOCATION);
  g_value_set_object (&paramv[n++], invocation);
  if (info->pass_fdlist)
    {
#ifdef G_OS_UNIX
      g_value_init (&paramv[n], G_TYPE_UNIX_FD_LIST);
      g_value_set_object (&paramv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation)));
#else
      g_assert_not_reached ();
#endif
    }
  g_variant_iter_init (&iter, parameters);
  while ((child = g_variant_iter_next_value (&iter)) != NULL)
    {
      _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra];
      if (arg_info->use_gvariant)
        {
          g_value_init (&paramv[n], G_TYPE_VARIANT);
          g_value_set_variant (&paramv[n], child);
          n++;
        }
      else
        g_dbus_gvariant_to_gvalue (child, &paramv[n++]);
      g_variant_unref (child);
    }
  signal_id = g_signal_lookup (info->signal_name, XDP_IMPL_TYPE_SESSION);
  g_value_init (&return_value, G_TYPE_BOOLEAN);
  g_signal_emitv (paramv, signal_id, 0, &return_value);
  if (!g_value_get_boolean (&return_value))
    g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD, "Method %s is not implemented on interface %s", method_name, interface_name);
  g_value_unset (&return_value);
  for (n = 0; n < num_params + num_extra; n++)
    g_value_unset (&paramv[n]);
  g_free (paramv);
}

static GVariant *
_xdp_impl_session_skeleton_handle_get_property (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name G_GNUC_UNUSED,
  const gchar *property_name,
  GError **error,
  gpointer user_data)
{
  XdpImplSessionSkeleton *skeleton = XDP_IMPL_SESSION_SKELETON (user_data);
  GValue value = G_VALUE_INIT;
  GParamSpec *pspec;
  _ExtendedGDBusPropertyInfo *info;
  GVariant *ret;
  ret = NULL;
  info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_session_interface_info.parent_struct, property_name);
  g_assert (info != NULL);
  pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
  if (pspec == NULL)
    {
      g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
    }
  else
    {
      g_value_init (&value, pspec->value_type);
      g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value);
      ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature));
      g_value_unset (&value);
    }
  return ret;
}

static gboolean
_xdp_impl_session_skeleton_handle_set_property (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name G_GNUC_UNUSED,
  const gchar *property_name,
  GVariant *variant,
  GError **error,
  gpointer user_data)
{
  XdpImplSessionSkeleton *skeleton = XDP_IMPL_SESSION_SKELETON (user_data);
  GValue value = G_VALUE_INIT;
  GParamSpec *pspec;
  _ExtendedGDBusPropertyInfo *info;
  gboolean ret;
  ret = FALSE;
  info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_session_interface_info.parent_struct, property_name);
  g_assert (info != NULL);
  pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
  if (pspec == NULL)
    {
      g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
    }
  else
    {
      if (info->use_gvariant)
        g_value_set_variant (&value, variant);
      else
        g_dbus_gvariant_to_gvalue (variant, &value);
      g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value);
      g_value_unset (&value);
      ret = TRUE;
    }
  return ret;
}

static const GDBusInterfaceVTable _xdp_impl_session_skeleton_vtable =
{
  _xdp_impl_session_skeleton_handle_method_call,
  _xdp_impl_session_skeleton_handle_get_property,
  _xdp_impl_session_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
xdp_impl_session_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return xdp_impl_session_interface_info ();
}

static GDBusInterfaceVTable *
xdp_impl_session_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_xdp_impl_session_skeleton_vtable;
}

static GVariant *
xdp_impl_session_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  XdpImplSessionSkeleton *skeleton = XDP_IMPL_SESSION_SKELETON (_skeleton);

  GVariantBuilder builder;
  guint n;
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_84
  g_variant_builder_init_static (&builder, G_VARIANT_TYPE ("a{sv}"));
#else
  g_variant_builder_init(&builder, G_VARIANT_TYPE ("a{sv}"));
#endif
  if (_xdp_impl_session_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _xdp_impl_session_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _xdp_impl_session_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _xdp_impl_session_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.impl.portal.Session", info->name, NULL, skeleton);
          if (value != NULL)
            {
              g_variant_take_ref (value);
              g_variant_builder_add (&builder, "{sv}", info->name, value);
              g_variant_unref (value);
            }
        }
    }
out:
  return g_variant_builder_end (&builder);
}

static gboolean _xdp_impl_session_emit_changed (gpointer user_data);

static void
xdp_impl_session_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
{
  XdpImplSessionSkeleton *skeleton = XDP_IMPL_SESSION_SKELETON (_skeleton);
  gboolean emit_changed = FALSE;

  g_mutex_lock (&skeleton->priv->lock);
  if (skeleton->priv->changed_properties_idle_source != NULL)
    {
      g_source_destroy (skeleton->priv->changed_properties_idle_source);
      skeleton->priv->changed_properties_idle_source = NULL;
      emit_changed = TRUE;
    }
  g_mutex_unlock (&skeleton->priv->lock);

  if (emit_changed)
    _xdp_impl_session_emit_changed (skeleton);
}

static void
_xdp_impl_session_on_signal_closed (
    XdpImplSession *object)
{
  XdpImplSessionSkeleton *skeleton = XDP_IMPL_SESSION_SKELETON (object);

  GList      *connections, *l;
  GVariant   *signal_variant;
  connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));

  signal_variant = g_variant_ref_sink (g_variant_new ("()"));
  for (l = connections; l != NULL; l = l->next)
    {
      GDBusConnection *connection = l->data;
      g_dbus_connection_emit_signal (connection,
        NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.impl.portal.Session", "Closed",
        signal_variant, NULL);
    }
  g_variant_unref (signal_variant);
  g_list_free_full (connections, g_object_unref);
}

static void xdp_impl_session_skeleton_iface_init (XdpImplSessionIface *iface);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpImplSessionSkeleton, xdp_impl_session_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (XdpImplSessionSkeleton)
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_SESSION, xdp_impl_session_skeleton_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpImplSessionSkeleton, xdp_impl_session_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_SESSION, xdp_impl_session_skeleton_iface_init))

#endif
static void
xdp_impl_session_skeleton_finalize (GObject *object)
{
  XdpImplSessionSkeleton *skeleton = XDP_IMPL_SESSION_SKELETON (object);
  guint n;
  for (n = 0; n < 1; n++)
    g_value_unset (&skeleton->priv->properties[n]);
  g_free (skeleton->priv->properties);
  g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  /* coverity[missing_lock : SUPPRESS] */
  g_clear_pointer (&skeleton->priv->changed_properties_idle_source, g_source_destroy);
#else
  if (skeleton->priv->changed_properties_idle_source != NULL)
    g_source_destroy (skeleton->priv->changed_properties_idle_source);
skeleton->priv->changed_properties_idle_source = NULL;
#endif
  g_main_context_unref (skeleton->priv->context);
  g_mutex_clear (&skeleton->priv->lock);
  G_OBJECT_CLASS (xdp_impl_session_skeleton_parent_class)->finalize (object);
}

static void
xdp_impl_session_skeleton_get_property (GObject      *object,
  guint         prop_id,
  GValue       *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  XdpImplSessionSkeleton *skeleton = XDP_IMPL_SESSION_SKELETON (object);
  g_assert (prop_id != 0 && prop_id - 1 < 1);
  g_mutex_lock (&skeleton->priv->lock);
  g_value_copy (&skeleton->priv->properties[prop_id - 1], value);
  g_mutex_unlock (&skeleton->priv->lock);
}

static gboolean
_xdp_impl_session_emit_changed (gpointer user_data)
{
  XdpImplSessionSkeleton *skeleton = XDP_IMPL_SESSION_SKELETON (user_data);
  GList *l;
  GVariantBuilder builder;
  GVariantBuilder invalidated_builder;
  guint num_changes;

  g_mutex_lock (&skeleton->priv->lock);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_84
  g_variant_builder_init_static (&builder, G_VARIANT_TYPE ("a{sv}"));
  g_variant_builder_init_static (&invalidated_builder, G_VARIANT_TYPE ("as"));
#else
  g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
  g_variant_builder_init (&invalidated_builder, G_VARIANT_TYPE ("as"));
#endif
  for (l = skeleton->priv->changed_properties, num_changes = 0; l != NULL; l = l->next)
    {
      ChangedProperty *cp = l->data;
      GVariant *variant;
      const GValue *cur_value;

      cur_value = &skeleton->priv->properties[cp->prop_id - 1];
      if (!_g_value_equal (cur_value, &cp->orig_value))
        {
          variant = g_dbus_gvalue_to_gvariant (cur_value, G_VARIANT_TYPE (cp->info->parent_struct.signature));
          g_variant_builder_add (&builder, "{sv}", cp->info->parent_struct.name, variant);
          g_variant_unref (variant);
          num_changes++;
        }
    }
  if (num_changes > 0)
    {
      GList *connections, *ll;
      GVariant *signal_variant;
      signal_variant = g_variant_ref_sink (g_variant_new ("(sa{sv}as)", "org.freedesktop.impl.portal.Session",
                                           &builder, &invalidated_builder));
      connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
      for (ll = connections; ll != NULL; ll = ll->next)
        {
          GDBusConnection *connection = ll->data;

          g_dbus_connection_emit_signal (connection,
                                         NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)),
                                         "org.freedesktop.DBus.Properties",
                                         "PropertiesChanged",
                                         signal_variant,
                                         NULL);
        }
      g_variant_unref (signal_variant);
      g_list_free_full (connections, g_object_unref);
    }
  else
    {
      g_variant_builder_clear (&builder);
      g_variant_builder_clear (&invalidated_builder);
    }
  g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
  skeleton->priv->changed_properties = NULL;
  skeleton->priv->changed_properties_idle_source = NULL;
  g_mutex_unlock (&skeleton->priv->lock);
  return FALSE;
}

static void
_xdp_impl_session_schedule_emit_changed (XdpImplSessionSkeleton *skeleton, const _ExtendedGDBusPropertyInfo *info, guint prop_id, const GValue *orig_value)
{
  ChangedProperty *cp;
  GList *l;
  cp = NULL;
  for (l = skeleton->priv->changed_properties; l != NULL; l = l->next)
    {
      ChangedProperty *i_cp = l->data;
      if (i_cp->info == info)
        {
          cp = i_cp;
          break;
        }
    }
  if (cp == NULL)
    {
      cp = g_new0 (ChangedProperty, 1);
      cp->prop_id = prop_id;
      cp->info = info;
      skeleton->priv->changed_properties = g_list_prepend (skeleton->priv->changed_properties, cp);
      g_value_init (&cp->orig_value, G_VALUE_TYPE (orig_value));
      g_value_copy (orig_value, &cp->orig_value);
    }
}

static void
xdp_impl_session_skeleton_notify (GObject      *object,
  GParamSpec *pspec G_GNUC_UNUSED)
{
  XdpImplSessionSkeleton *skeleton = XDP_IMPL_SESSION_SKELETON (object);
  g_mutex_lock (&skeleton->priv->lock);
  if (skeleton->priv->changed_properties != NULL &&
      skeleton->priv->changed_properties_idle_source == NULL)
    {
      skeleton->priv->changed_properties_idle_source = g_idle_source_new ();
      g_source_set_priority (skeleton->priv->changed_properties_idle_source, G_PRIORITY_DEFAULT);
      g_source_set_callback (skeleton->priv->changed_properties_idle_source, _xdp_impl_session_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
      g_source_set_name (skeleton->priv->changed_properties_idle_source, "[generated] _xdp_impl_session_emit_changed");
      g_source_attach (skeleton->priv->changed_properties_idle_source, skeleton->priv->context);
      g_source_unref (skeleton->priv->changed_properties_idle_source);
    }
  g_mutex_unlock (&skeleton->priv->lock);
}

static void
xdp_impl_session_skeleton_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec)
{
  const _ExtendedGDBusPropertyInfo *info;
  XdpImplSessionSkeleton *skeleton = XDP_IMPL_SESSION_SKELETON (object);
  g_assert (prop_id != 0 && prop_id - 1 < 1);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_impl_session_property_info_pointers[prop_id - 1];
  g_mutex_lock (&skeleton->priv->lock);
  g_object_freeze_notify (object);
  if (!_g_value_equal (value, &skeleton->priv->properties[prop_id - 1]))
    {
      if (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)) != NULL &&
          info->emits_changed_signal)
        _xdp_impl_session_schedule_emit_changed (skeleton, info, prop_id, &skeleton->priv->properties[prop_id - 1]);
      g_value_copy (value, &skeleton->priv->properties[prop_id - 1]);
      g_object_notify_by_pspec (object, pspec);
    }
  g_mutex_unlock (&skeleton->priv->lock);
  g_object_thaw_notify (object);
}

static void
xdp_impl_session_skeleton_init (XdpImplSessionSkeleton *skeleton)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  skeleton->priv = xdp_impl_session_skeleton_get_instance_private (skeleton);
#else
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, XDP_IMPL_TYPE_SESSION_SKELETON, XdpImplSessionSkeletonPrivate);
#endif

  g_mutex_init (&skeleton->priv->lock);
  skeleton->priv->context = g_main_context_ref_thread_default ();
  skeleton->priv->properties = g_new0 (GValue, 1);
  g_value_init (&skeleton->priv->properties[0], G_TYPE_UINT);
}

static guint 
xdp_impl_session_skeleton_get_version (XdpImplSession *object)
{
  XdpImplSessionSkeleton *skeleton = XDP_IMPL_SESSION_SKELETON (object);
  guint value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_marshal_value_peek_uint (&(skeleton->priv->properties[0]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static void
xdp_impl_session_skeleton_class_init (XdpImplSessionSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize = xdp_impl_session_skeleton_finalize;
  gobject_class->get_property = xdp_impl_session_skeleton_get_property;
  gobject_class->set_property = xdp_impl_session_skeleton_set_property;
  gobject_class->notify       = xdp_impl_session_skeleton_notify;


  xdp_impl_session_override_properties (gobject_class, 1);

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = xdp_impl_session_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = xdp_impl_session_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = xdp_impl_session_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = xdp_impl_session_skeleton_dbus_interface_get_vtable;

#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
  g_type_class_add_private (klass, sizeof (XdpImplSessionSkeletonPrivate));
#endif
}

static void
xdp_impl_session_skeleton_iface_init (XdpImplSessionIface *iface)
{
  iface->closed = _xdp_impl_session_on_signal_closed;
  iface->get_version = xdp_impl_session_skeleton_get_version;
}

/**
 * xdp_impl_session_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-Session.top_of_page">org.freedesktop.impl.portal.Session</link>.
 *
 * Returns: (transfer full) (type XdpImplSessionSkeleton): The skeleton object.
 */
XdpImplSession *
xdp_impl_session_skeleton_new (void)
{
  return XDP_IMPL_SESSION (g_object_new (XDP_IMPL_TYPE_SESSION_SKELETON, NULL));
}

/* ------------------------------------------------------------------------
 * Code for interface org.freedesktop.impl.portal.Settings
 * ------------------------------------------------------------------------
 */

/**
 * SECTION:XdpImplSettings
 * @title: XdpImplSettings
 * @short_description: Generated C code for the org.freedesktop.impl.portal.Settings D-Bus interface
 *
 * This section contains code for working with the <link linkend="gdbus-interface-org-freedesktop-impl-portal-Settings.top_of_page">org.freedesktop.impl.portal.Settings</link> D-Bus interface in C.
 */

enum
{
  XDP_IMPL__SETTINGS_SETTING_CHANGED,
};

static unsigned XDP_IMPL__SETTINGS_SIGNALS[1] = { 0 };

/* ---- Introspection data for org.freedesktop.impl.portal.Settings ---- */

static const _ExtendedGDBusArgInfo _xdp_impl_settings_method_info_read_all_IN_ARG_namespaces =
{
  {
    -1,
    (gchar *) "namespaces",
    (gchar *) "as",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_settings_method_info_read_all_IN_ARG_pointers[] =
{
  &_xdp_impl_settings_method_info_read_all_IN_ARG_namespaces.parent_struct,
  NULL
};

static const _ExtendedGDBusArgInfo _xdp_impl_settings_method_info_read_all_OUT_ARG_value =
{
  {
    -1,
    (gchar *) "value",
    (gchar *) "a{sa{sv}}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_settings_method_info_read_all_OUT_ARG_pointers[] =
{
  &_xdp_impl_settings_method_info_read_all_OUT_ARG_value.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_settings_method_read_all_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.Out0",
  (gchar *) "QMap<QString,QVariantMap>",
  NULL
};

static const GDBusAnnotationInfo * const _xdp_impl_settings_method_read_all_annotation_info_pointers[] =
{
  &_xdp_impl_settings_method_read_all_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_impl_settings_method_info_read_all =
{
  {
    -1,
    (gchar *) "ReadAll",
    (GDBusArgInfo **) &_xdp_impl_settings_method_info_read_all_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_impl_settings_method_info_read_all_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_impl_settings_method_read_all_annotation_info_pointers
  },
  "handle-read-all",
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_settings_method_info_read_IN_ARG_namespace =
{
  {
    -1,
    (gchar *) "namespace",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_settings_method_info_read_IN_ARG_key =
{
  {
    -1,
    (gchar *) "key",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_settings_method_info_read_IN_ARG_pointers[] =
{
  &_xdp_impl_settings_method_info_read_IN_ARG_namespace.parent_struct,
  &_xdp_impl_settings_method_info_read_IN_ARG_key.parent_struct,
  NULL
};

static const _ExtendedGDBusArgInfo _xdp_impl_settings_method_info_read_OUT_ARG_value =
{
  {
    -1,
    (gchar *) "value",
    (gchar *) "v",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_settings_method_info_read_OUT_ARG_pointers[] =
{
  &_xdp_impl_settings_method_info_read_OUT_ARG_value.parent_struct,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_impl_settings_method_info_read =
{
  {
    -1,
    (gchar *) "Read",
    (GDBusArgInfo **) &_xdp_impl_settings_method_info_read_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_impl_settings_method_info_read_OUT_ARG_pointers,
    NULL
  },
  "handle-read",
  FALSE
};

static const GDBusMethodInfo * const _xdp_impl_settings_method_info_pointers[] =
{
  &_xdp_impl_settings_method_info_read_all.parent_struct,
  &_xdp_impl_settings_method_info_read.parent_struct,
  NULL
};

static const _ExtendedGDBusArgInfo _xdp_impl_settings_signal_info_setting_changed_ARG_namespace =
{
  {
    -1,
    (gchar *) "namespace",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_settings_signal_info_setting_changed_ARG_key =
{
  {
    -1,
    (gchar *) "key",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_settings_signal_info_setting_changed_ARG_value =
{
  {
    -1,
    (gchar *) "value",
    (gchar *) "v",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_settings_signal_info_setting_changed_ARG_pointers[] =
{
  &_xdp_impl_settings_signal_info_setting_changed_ARG_namespace.parent_struct,
  &_xdp_impl_settings_signal_info_setting_changed_ARG_key.parent_struct,
  &_xdp_impl_settings_signal_info_setting_changed_ARG_value.parent_struct,
  NULL
};

static const _ExtendedGDBusSignalInfo _xdp_impl_settings_signal_info_setting_changed =
{
  {
    -1,
    (gchar *) "SettingChanged",
    (GDBusArgInfo **) &_xdp_impl_settings_signal_info_setting_changed_ARG_pointers,
    NULL
  },
  "setting-changed"
};

static const GDBusSignalInfo * const _xdp_impl_settings_signal_info_pointers[] =
{
  &_xdp_impl_settings_signal_info_setting_changed.parent_struct,
  NULL
};

static const _ExtendedGDBusPropertyInfo _xdp_impl_settings_property_info_version =
{
  {
    -1,
    (gchar *) "version",
    (gchar *) "u",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "version",
  FALSE,
  TRUE
};

static const GDBusPropertyInfo * const _xdp_impl_settings_property_info_pointers[] =
{
  &_xdp_impl_settings_property_info_version.parent_struct,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _xdp_impl_settings_interface_info =
{
  {
    -1,
    (gchar *) "org.freedesktop.impl.portal.Settings",
    (GDBusMethodInfo **) &_xdp_impl_settings_method_info_pointers,
    (GDBusSignalInfo **) &_xdp_impl_settings_signal_info_pointers,
    (GDBusPropertyInfo **) &_xdp_impl_settings_property_info_pointers,
    NULL
  },
  "settings",
};


/**
 * xdp_impl_settings_interface_info:
 *
 * Gets a machine-readable description of the <link linkend="gdbus-interface-org-freedesktop-impl-portal-Settings.top_of_page">org.freedesktop.impl.portal.Settings</link> D-Bus interface.
 *
 * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
 */
GDBusInterfaceInfo *
xdp_impl_settings_interface_info (void)
{
  return (GDBusInterfaceInfo *) &_xdp_impl_settings_interface_info.parent_struct;
}

/**
 * xdp_impl_settings_override_properties:
 * @klass: The class structure for a #GObject derived class.
 * @property_id_begin: The property id to assign to the first overridden property.
 *
 * Overrides all #GObject properties in the #XdpImplSettings interface for a concrete class.
 * The properties are overridden in the order they are defined.
 *
 * Returns: The last property id.
 */
guint
xdp_impl_settings_override_properties (GObjectClass *klass, guint property_id_begin)
{
  g_object_class_override_property (klass, property_id_begin++, "version");
  return property_id_begin - 1;
}


inline static void
xdp_impl_settings_signal_marshal_setting_changed (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  _g_dbus_codegen_marshal_VOID__STRING_STRING_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_impl_settings_method_marshal_read_all (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  _g_dbus_codegen_marshal_BOOLEAN__OBJECT_BOXED (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_impl_settings_method_marshal_read (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  _g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_STRING (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}


/**
 * XdpImplSettings:
 *
 * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-Settings.top_of_page">org.freedesktop.impl.portal.Settings</link>.
 */

/**
 * XdpImplSettingsIface:
 * @parent_iface: The parent interface.
 * @handle_read: Handler for the #XdpImplSettings::handle-read signal.
 * @handle_read_all: Handler for the #XdpImplSettings::handle-read-all signal.
 * @get_version: Getter for the #XdpImplSettings:version property.
 * @setting_changed: Handler for the #XdpImplSettings::setting-changed signal.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-Settings.top_of_page">org.freedesktop.impl.portal.Settings</link>.
 */

typedef XdpImplSettingsIface XdpImplSettingsInterface;
G_DEFINE_INTERFACE (XdpImplSettings, xdp_impl_settings, G_TYPE_OBJECT)

static void
xdp_impl_settings_default_init (XdpImplSettingsIface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * XdpImplSettings::handle-read-all:
   * @object: A #XdpImplSettings.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_namespaces: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-impl-portal-Settings.ReadAll">ReadAll()</link> 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 xdp_impl_settings_complete_read_all() 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.
   *
   * 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.
   */
  g_signal_new ("handle-read-all",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpImplSettingsIface, handle_read_all),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_impl_settings_method_marshal_read_all,
    G_TYPE_BOOLEAN,
    2,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRV);

  /**
   * XdpImplSettings::handle-read:
   * @object: A #XdpImplSettings.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_namespace: Argument passed by remote caller.
   * @arg_key: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-impl-portal-Settings.Read">Read()</link> 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 xdp_impl_settings_complete_read() 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.
   *
   * 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.
   */
  g_signal_new ("handle-read",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpImplSettingsIface, handle_read),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_impl_settings_method_marshal_read,
    G_TYPE_BOOLEAN,
    3,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_STRING);

  /* GObject signals for received D-Bus signals: */
  /**
   * XdpImplSettings::setting-changed:
   * @object: A #XdpImplSettings.
   * @arg_namespace: Argument.
   * @arg_key: Argument.
   * @arg_value: Argument.
   *
   * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-freedesktop-impl-portal-Settings.SettingChanged">"SettingChanged"</link> 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.
   */
  XDP_IMPL__SETTINGS_SIGNALS[XDP_IMPL__SETTINGS_SETTING_CHANGED] =
    g_signal_new ("setting-changed",
      G_TYPE_FROM_INTERFACE (iface),
      G_SIGNAL_RUN_LAST,
      G_STRUCT_OFFSET (XdpImplSettingsIface, setting_changed),
      NULL,
      NULL,
      xdp_impl_settings_signal_marshal_setting_changed,
      G_TYPE_NONE,
      3, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_VARIANT);

  /* GObject properties for D-Bus properties: */
  /**
   * XdpImplSettings:version:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-impl-portal-Settings.version">"version"</link>.
   *
   * 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.
   */
  g_object_interface_install_property (iface,
    g_param_spec_uint ("version", "version", "version", 0, G_MAXUINT32, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
}

/**
 * xdp_impl_settings_get_version: (skip)
 * @object: A #XdpImplSettings.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-impl-portal-Settings.version">"version"</link> D-Bus property.
 *
 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
 *
 * Returns: The property value.
 */
guint 
xdp_impl_settings_get_version (XdpImplSettings *object)
{
  g_return_val_if_fail (XDP_IMPL_IS_SETTINGS (object), 0);

  return XDP_IMPL_SETTINGS_GET_IFACE (object)->get_version (object);
}

/**
 * xdp_impl_settings_set_version: (skip)
 * @object: A #XdpImplSettings.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-freedesktop-impl-portal-Settings.version">"version"</link> 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.
 */
void
xdp_impl_settings_set_version (XdpImplSettings *object, guint value)
{
  g_object_set (G_OBJECT (object), "version", value, NULL);
}

/**
 * xdp_impl_settings_emit_setting_changed:
 * @object: A #XdpImplSettings.
 * @arg_namespace: Argument to pass with the signal.
 * @arg_key: Argument to pass with the signal.
 * @arg_value: Argument to pass with the signal.
 *
 * Emits the <link linkend="gdbus-signal-org-freedesktop-impl-portal-Settings.SettingChanged">"SettingChanged"</link> D-Bus signal.
 */
void
xdp_impl_settings_emit_setting_changed (
    XdpImplSettings *object,
    const gchar *arg_namespace,
    const gchar *arg_key,
    GVariant *arg_value)
{
  g_signal_emit (object, XDP_IMPL__SETTINGS_SIGNALS[XDP_IMPL__SETTINGS_SETTING_CHANGED], 0, arg_namespace, arg_key, arg_value);
}

/**
 * xdp_impl_settings_call_read_all:
 * @proxy: A #XdpImplSettingsProxy.
 * @arg_namespaces: Argument to pass with the method invocation.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-Settings.ReadAll">ReadAll()</link> 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 xdp_impl_settings_call_read_all_finish() to get the result of the operation.
 *
 * See xdp_impl_settings_call_read_all_sync() for the synchronous, blocking version of this method.
 */
void
xdp_impl_settings_call_read_all (
    XdpImplSettings *proxy,
    const gchar *const *arg_namespaces,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "ReadAll",
    g_variant_new ("(^as)",
                   arg_namespaces),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_impl_settings_call_read_all_finish:
 * @proxy: A #XdpImplSettingsProxy.
 * @out_value: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_settings_call_read_all().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_impl_settings_call_read_all().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_settings_call_read_all_finish (
    XdpImplSettings *proxy,
    GVariant ** out_value,
    GAsyncResult *res,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(@a{sa{sv}})",
                 out_value);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_settings_call_read_all_sync:
 * @proxy: A #XdpImplSettingsProxy.
 * @arg_namespaces: Argument to pass with the method invocation.
 * @out_value: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-Settings.ReadAll">ReadAll()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_settings_call_read_all() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_settings_call_read_all_sync (
    XdpImplSettings *proxy,
    const gchar *const *arg_namespaces,
    GVariant ** out_value,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "ReadAll",
    g_variant_new ("(^as)",
                   arg_namespaces),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(@a{sa{sv}})",
                 out_value);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_settings_call_read:
 * @proxy: A #XdpImplSettingsProxy.
 * @arg_namespace: Argument to pass with the method invocation.
 * @arg_key: Argument to pass with the method invocation.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-Settings.Read">Read()</link> 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 xdp_impl_settings_call_read_finish() to get the result of the operation.
 *
 * See xdp_impl_settings_call_read_sync() for the synchronous, blocking version of this method.
 */
void
xdp_impl_settings_call_read (
    XdpImplSettings *proxy,
    const gchar *arg_namespace,
    const gchar *arg_key,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "Read",
    g_variant_new ("(ss)",
                   arg_namespace,
                   arg_key),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_impl_settings_call_read_finish:
 * @proxy: A #XdpImplSettingsProxy.
 * @out_value: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_settings_call_read().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_impl_settings_call_read().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_settings_call_read_finish (
    XdpImplSettings *proxy,
    GVariant ** out_value,
    GAsyncResult *res,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(@v)",
                 out_value);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_settings_call_read_sync:
 * @proxy: A #XdpImplSettingsProxy.
 * @arg_namespace: Argument to pass with the method invocation.
 * @arg_key: Argument to pass with the method invocation.
 * @out_value: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-Settings.Read">Read()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_settings_call_read() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_settings_call_read_sync (
    XdpImplSettings *proxy,
    const gchar *arg_namespace,
    const gchar *arg_key,
    GVariant ** out_value,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "Read",
    g_variant_new ("(ss)",
                   arg_namespace,
                   arg_key),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(@v)",
                 out_value);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_settings_complete_read_all:
 * @object: A #XdpImplSettings.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @value: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-impl-portal-Settings.ReadAll">ReadAll()</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
xdp_impl_settings_complete_read_all (
    XdpImplSettings *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    GVariant *value)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(@a{sa{sv}})",
                   value));
}

/**
 * xdp_impl_settings_complete_read:
 * @object: A #XdpImplSettings.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @value: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-impl-portal-Settings.Read">Read()</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
xdp_impl_settings_complete_read (
    XdpImplSettings *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    GVariant *value)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(@v)",
                   value));
}

/* ------------------------------------------------------------------------ */

/**
 * XdpImplSettingsProxy:
 *
 * The #XdpImplSettingsProxy structure contains only private data and should only be accessed using the provided API.
 */

/**
 * XdpImplSettingsProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpImplSettingsProxy.
 */

struct _XdpImplSettingsProxyPrivate
{
  GData *qdata;
};

static void xdp_impl_settings_proxy_iface_init (XdpImplSettingsIface *iface);

#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpImplSettingsProxy, xdp_impl_settings_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (XdpImplSettingsProxy)
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_SETTINGS, xdp_impl_settings_proxy_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpImplSettingsProxy, xdp_impl_settings_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_SETTINGS, xdp_impl_settings_proxy_iface_init))

#endif
static void
xdp_impl_settings_proxy_finalize (GObject *object)
{
  XdpImplSettingsProxy *proxy = XDP_IMPL_SETTINGS_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (xdp_impl_settings_proxy_parent_class)->finalize (object);
}

static void
xdp_impl_settings_proxy_get_property (GObject      *object,
  guint         prop_id,
  GValue       *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  const _ExtendedGDBusPropertyInfo *info;
  GVariant *variant;
  g_assert (prop_id != 0 && prop_id - 1 < 1);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_impl_settings_property_info_pointers[prop_id - 1];
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), info->parent_struct.name);
  if (info->use_gvariant)
    {
      g_value_set_variant (value, variant);
    }
  else
    {
      if (variant != NULL)
        g_dbus_gvariant_to_gvalue (variant, value);
    }
  if (variant != NULL)
    g_variant_unref (variant);
}

static void
xdp_impl_settings_proxy_set_property_cb (GDBusProxy *proxy,
  GAsyncResult *res,
  gpointer      user_data)
{
  const _ExtendedGDBusPropertyInfo *info = user_data;
  GError *error;
  GVariant *_ret;
  error = NULL;
  _ret = g_dbus_proxy_call_finish (proxy, res, &error);
  if (!_ret)
    {
      g_warning ("Error setting property '%s' on interface org.freedesktop.impl.portal.Settings: %s (%s, %d)",
                 info->parent_struct.name, 
                 error->message, g_quark_to_string (error->domain), error->code);
      g_error_free (error);
    }
  else
    {
      g_variant_unref (_ret);
    }
}

static void
xdp_impl_settings_proxy_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  const _ExtendedGDBusPropertyInfo *info;
  GVariant *variant;
  g_assert (prop_id != 0 && prop_id - 1 < 1);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_impl_settings_property_info_pointers[prop_id - 1];
  variant = g_dbus_gvalue_to_gvariant (value, G_VARIANT_TYPE (info->parent_struct.signature));
  g_dbus_proxy_call (G_DBUS_PROXY (object),
    "org.freedesktop.DBus.Properties.Set",
    g_variant_new ("(ssv)", "org.freedesktop.impl.portal.Settings", info->parent_struct.name, variant),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    NULL, (GAsyncReadyCallback) xdp_impl_settings_proxy_set_property_cb, (GDBusPropertyInfo *) &info->parent_struct);
  g_variant_unref (variant);
}

static void
xdp_impl_settings_proxy_g_signal (GDBusProxy *proxy,
  const gchar *sender_name G_GNUC_UNUSED,
  const gchar *signal_name,
  GVariant *parameters)
{
  _ExtendedGDBusSignalInfo *info;
  GVariantIter iter;
  GVariant *child;
  GValue *paramv;
  gsize num_params;
  gsize n;
  guint signal_id;
  info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_xdp_impl_settings_interface_info.parent_struct, signal_name);
  if (info == NULL)
    return;
  num_params = g_variant_n_children (parameters);
  paramv = g_new0 (GValue, num_params + 1);
  g_value_init (&paramv[0], XDP_IMPL_TYPE_SETTINGS);
  g_value_set_object (&paramv[0], proxy);
  g_variant_iter_init (&iter, parameters);
  n = 1;
  while ((child = g_variant_iter_next_value (&iter)) != NULL)
    {
      _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1];
      if (arg_info->use_gvariant)
        {
          g_value_init (&paramv[n], G_TYPE_VARIANT);
          g_value_set_variant (&paramv[n], child);
          n++;
        }
      else
        g_dbus_gvariant_to_gvalue (child, &paramv[n++]);
      g_variant_unref (child);
    }
  signal_id = g_signal_lookup (info->signal_name, XDP_IMPL_TYPE_SETTINGS);
  g_signal_emitv (paramv, signal_id, 0, NULL);
  for (n = 0; n < num_params + 1; n++)
    g_value_unset (&paramv[n]);
  g_free (paramv);
}

static void
xdp_impl_settings_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  XdpImplSettingsProxy *proxy = XDP_IMPL_SETTINGS_PROXY (_proxy);
  guint n;
  const gchar *key;
  GVariantIter *iter;
  _ExtendedGDBusPropertyInfo *info;
  g_variant_get (changed_properties, "a{sv}", &iter);
  while (g_variant_iter_next (iter, "{&sv}", &key, NULL))
    {
      info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_settings_interface_info.parent_struct, key);
      g_datalist_remove_data (&proxy->priv->qdata, key);
      if (info != NULL)
        g_object_notify (G_OBJECT (proxy), info->hyphen_name);
    }
  g_variant_iter_free (iter);
  for (n = 0; invalidated_properties[n] != NULL; n++)
    {
      info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_settings_interface_info.parent_struct, invalidated_properties[n]);
      g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]);
      if (info != NULL)
        g_object_notify (G_OBJECT (proxy), info->hyphen_name);
    }
}

static guint 
xdp_impl_settings_proxy_get_version (XdpImplSettings *object)
{
  XdpImplSettingsProxy *proxy = XDP_IMPL_SETTINGS_PROXY (object);
  GVariant *variant;
  guint value = 0;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "version");
  if (variant != NULL)
    {
      value = g_variant_get_uint32 (variant);
      g_variant_unref (variant);
    }
  return value;
}

static void
xdp_impl_settings_proxy_init (XdpImplSettingsProxy *proxy)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  proxy->priv = xdp_impl_settings_proxy_get_instance_private (proxy);
#else
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, XDP_IMPL_TYPE_SETTINGS_PROXY, XdpImplSettingsProxyPrivate);
#endif

  g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), xdp_impl_settings_interface_info ());
}

static void
xdp_impl_settings_proxy_class_init (XdpImplSettingsProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = xdp_impl_settings_proxy_finalize;
  gobject_class->get_property = xdp_impl_settings_proxy_get_property;
  gobject_class->set_property = xdp_impl_settings_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = xdp_impl_settings_proxy_g_signal;
  proxy_class->g_properties_changed = xdp_impl_settings_proxy_g_properties_changed;

  xdp_impl_settings_override_properties (gobject_class, 1);

#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
  g_type_class_add_private (klass, sizeof (XdpImplSettingsProxyPrivate));
#endif
}

static void
xdp_impl_settings_proxy_iface_init (XdpImplSettingsIface *iface)
{
  iface->get_version = xdp_impl_settings_proxy_get_version;
}

/**
 * xdp_impl_settings_proxy_new:
 * @connection: A #GDBusConnection.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-Settings.top_of_page">org.freedesktop.impl.portal.Settings</link>. 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 xdp_impl_settings_proxy_new_finish() to get the result of the operation.
 *
 * See xdp_impl_settings_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_impl_settings_proxy_new (
    GDBusConnection     *connection,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GAsyncReadyCallback  callback,
    gpointer             user_data)
{
  g_async_initable_new_async (XDP_IMPL_TYPE_SETTINGS_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.Settings", NULL);
}

/**
 * xdp_impl_settings_proxy_new_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_settings_proxy_new().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_impl_settings_proxy_new().
 *
 * Returns: (transfer full) (type XdpImplSettingsProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplSettings *
xdp_impl_settings_proxy_new_finish (
    GAsyncResult        *res,
    GError             **error)
{
  GObject *ret;
  GObject *source_object;
  source_object = g_async_result_get_source_object (res);
  ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
  g_object_unref (source_object);
  if (ret != NULL)
    return XDP_IMPL_SETTINGS (ret);
  else
    return NULL;
}

/**
 * xdp_impl_settings_proxy_new_sync:
 * @connection: A #GDBusConnection.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL
 *
 * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-Settings.top_of_page">org.freedesktop.impl.portal.Settings</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_settings_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpImplSettingsProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplSettings *
xdp_impl_settings_proxy_new_sync (
    GDBusConnection     *connection,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GError             **error)
{
  GInitable *ret;
  ret = g_initable_new (XDP_IMPL_TYPE_SETTINGS_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.Settings", NULL);
  if (ret != NULL)
    return XDP_IMPL_SETTINGS (ret);
  else
    return NULL;
}


/**
 * xdp_impl_settings_proxy_new_for_bus:
 * @bus_type: A #GBusType.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: A bus name (well-known or unique).
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
 * @user_data: User data to pass to @callback.
 *
 * Like xdp_impl_settings_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 xdp_impl_settings_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See xdp_impl_settings_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_impl_settings_proxy_new_for_bus (
    GBusType             bus_type,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GAsyncReadyCallback  callback,
    gpointer             user_data)
{
  g_async_initable_new_async (XDP_IMPL_TYPE_SETTINGS_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.Settings", NULL);
}

/**
 * xdp_impl_settings_proxy_new_for_bus_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_settings_proxy_new_for_bus().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_impl_settings_proxy_new_for_bus().
 *
 * Returns: (transfer full) (type XdpImplSettingsProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplSettings *
xdp_impl_settings_proxy_new_for_bus_finish (
    GAsyncResult        *res,
    GError             **error)
{
  GObject *ret;
  GObject *source_object;
  source_object = g_async_result_get_source_object (res);
  ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
  g_object_unref (source_object);
  if (ret != NULL)
    return XDP_IMPL_SETTINGS (ret);
  else
    return NULL;
}

/**
 * xdp_impl_settings_proxy_new_for_bus_sync:
 * @bus_type: A #GBusType.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: A bus name (well-known or unique).
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL
 *
 * Like xdp_impl_settings_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_settings_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpImplSettingsProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplSettings *
xdp_impl_settings_proxy_new_for_bus_sync (
    GBusType             bus_type,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GError             **error)
{
  GInitable *ret;
  ret = g_initable_new (XDP_IMPL_TYPE_SETTINGS_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.Settings", NULL);
  if (ret != NULL)
    return XDP_IMPL_SETTINGS (ret);
  else
    return NULL;
}


/* ------------------------------------------------------------------------ */

/**
 * XdpImplSettingsSkeleton:
 *
 * The #XdpImplSettingsSkeleton structure contains only private data and should only be accessed using the provided API.
 */

/**
 * XdpImplSettingsSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpImplSettingsSkeleton.
 */

struct _XdpImplSettingsSkeletonPrivate
{
  GValue *properties;
  GList *changed_properties;
  GSource *changed_properties_idle_source;
  GMainContext *context;
  GMutex lock;
};

static void
_xdp_impl_settings_skeleton_handle_method_call (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name,
  const gchar *method_name,
  GVariant *parameters,
  GDBusMethodInvocation *invocation,
  gpointer user_data)
{
  XdpImplSettingsSkeleton *skeleton = XDP_IMPL_SETTINGS_SKELETON (user_data);
  _ExtendedGDBusMethodInfo *info;
  GVariantIter iter;
  GVariant *child;
  GValue *paramv;
  gsize num_params;
  guint num_extra;
  gsize n;
  guint signal_id;
  GValue return_value = G_VALUE_INIT;
  info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
  g_assert (info != NULL);
  num_params = g_variant_n_children (parameters);
  num_extra = info->pass_fdlist ? 3 : 2;  paramv = g_new0 (GValue, num_params + num_extra);
  n = 0;
  g_value_init (&paramv[n], XDP_IMPL_TYPE_SETTINGS);
  g_value_set_object (&paramv[n++], skeleton);
  g_value_init (&paramv[n], G_TYPE_DBUS_METHOD_INVOCATION);
  g_value_set_object (&paramv[n++], invocation);
  if (info->pass_fdlist)
    {
#ifdef G_OS_UNIX
      g_value_init (&paramv[n], G_TYPE_UNIX_FD_LIST);
      g_value_set_object (&paramv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation)));
#else
      g_assert_not_reached ();
#endif
    }
  g_variant_iter_init (&iter, parameters);
  while ((child = g_variant_iter_next_value (&iter)) != NULL)
    {
      _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra];
      if (arg_info->use_gvariant)
        {
          g_value_init (&paramv[n], G_TYPE_VARIANT);
          g_value_set_variant (&paramv[n], child);
          n++;
        }
      else
        g_dbus_gvariant_to_gvalue (child, &paramv[n++]);
      g_variant_unref (child);
    }
  signal_id = g_signal_lookup (info->signal_name, XDP_IMPL_TYPE_SETTINGS);
  g_value_init (&return_value, G_TYPE_BOOLEAN);
  g_signal_emitv (paramv, signal_id, 0, &return_value);
  if (!g_value_get_boolean (&return_value))
    g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD, "Method %s is not implemented on interface %s", method_name, interface_name);
  g_value_unset (&return_value);
  for (n = 0; n < num_params + num_extra; n++)
    g_value_unset (&paramv[n]);
  g_free (paramv);
}

static GVariant *
_xdp_impl_settings_skeleton_handle_get_property (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name G_GNUC_UNUSED,
  const gchar *property_name,
  GError **error,
  gpointer user_data)
{
  XdpImplSettingsSkeleton *skeleton = XDP_IMPL_SETTINGS_SKELETON (user_data);
  GValue value = G_VALUE_INIT;
  GParamSpec *pspec;
  _ExtendedGDBusPropertyInfo *info;
  GVariant *ret;
  ret = NULL;
  info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_settings_interface_info.parent_struct, property_name);
  g_assert (info != NULL);
  pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
  if (pspec == NULL)
    {
      g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
    }
  else
    {
      g_value_init (&value, pspec->value_type);
      g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value);
      ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature));
      g_value_unset (&value);
    }
  return ret;
}

static gboolean
_xdp_impl_settings_skeleton_handle_set_property (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name G_GNUC_UNUSED,
  const gchar *property_name,
  GVariant *variant,
  GError **error,
  gpointer user_data)
{
  XdpImplSettingsSkeleton *skeleton = XDP_IMPL_SETTINGS_SKELETON (user_data);
  GValue value = G_VALUE_INIT;
  GParamSpec *pspec;
  _ExtendedGDBusPropertyInfo *info;
  gboolean ret;
  ret = FALSE;
  info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_settings_interface_info.parent_struct, property_name);
  g_assert (info != NULL);
  pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
  if (pspec == NULL)
    {
      g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
    }
  else
    {
      if (info->use_gvariant)
        g_value_set_variant (&value, variant);
      else
        g_dbus_gvariant_to_gvalue (variant, &value);
      g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value);
      g_value_unset (&value);
      ret = TRUE;
    }
  return ret;
}

static const GDBusInterfaceVTable _xdp_impl_settings_skeleton_vtable =
{
  _xdp_impl_settings_skeleton_handle_method_call,
  _xdp_impl_settings_skeleton_handle_get_property,
  _xdp_impl_settings_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
xdp_impl_settings_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return xdp_impl_settings_interface_info ();
}

static GDBusInterfaceVTable *
xdp_impl_settings_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_xdp_impl_settings_skeleton_vtable;
}

static GVariant *
xdp_impl_settings_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  XdpImplSettingsSkeleton *skeleton = XDP_IMPL_SETTINGS_SKELETON (_skeleton);

  GVariantBuilder builder;
  guint n;
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_84
  g_variant_builder_init_static (&builder, G_VARIANT_TYPE ("a{sv}"));
#else
  g_variant_builder_init(&builder, G_VARIANT_TYPE ("a{sv}"));
#endif
  if (_xdp_impl_settings_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _xdp_impl_settings_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _xdp_impl_settings_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _xdp_impl_settings_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.impl.portal.Settings", info->name, NULL, skeleton);
          if (value != NULL)
            {
              g_variant_take_ref (value);
              g_variant_builder_add (&builder, "{sv}", info->name, value);
              g_variant_unref (value);
            }
        }
    }
out:
  return g_variant_builder_end (&builder);
}

static gboolean _xdp_impl_settings_emit_changed (gpointer user_data);

static void
xdp_impl_settings_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
{
  XdpImplSettingsSkeleton *skeleton = XDP_IMPL_SETTINGS_SKELETON (_skeleton);
  gboolean emit_changed = FALSE;

  g_mutex_lock (&skeleton->priv->lock);
  if (skeleton->priv->changed_properties_idle_source != NULL)
    {
      g_source_destroy (skeleton->priv->changed_properties_idle_source);
      skeleton->priv->changed_properties_idle_source = NULL;
      emit_changed = TRUE;
    }
  g_mutex_unlock (&skeleton->priv->lock);

  if (emit_changed)
    _xdp_impl_settings_emit_changed (skeleton);
}

static void
_xdp_impl_settings_on_signal_setting_changed (
    XdpImplSettings *object,
    const gchar *arg_namespace,
    const gchar *arg_key,
    GVariant *arg_value)
{
  XdpImplSettingsSkeleton *skeleton = XDP_IMPL_SETTINGS_SKELETON (object);

  GList      *connections, *l;
  GVariant   *signal_variant;
  connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));

  signal_variant = g_variant_ref_sink (g_variant_new ("(ss@v)",
                   arg_namespace,
                   arg_key,
                   arg_value));
  for (l = connections; l != NULL; l = l->next)
    {
      GDBusConnection *connection = l->data;
      g_dbus_connection_emit_signal (connection,
        NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.impl.portal.Settings", "SettingChanged",
        signal_variant, NULL);
    }
  g_variant_unref (signal_variant);
  g_list_free_full (connections, g_object_unref);
}

static void xdp_impl_settings_skeleton_iface_init (XdpImplSettingsIface *iface);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpImplSettingsSkeleton, xdp_impl_settings_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (XdpImplSettingsSkeleton)
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_SETTINGS, xdp_impl_settings_skeleton_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpImplSettingsSkeleton, xdp_impl_settings_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_SETTINGS, xdp_impl_settings_skeleton_iface_init))

#endif
static void
xdp_impl_settings_skeleton_finalize (GObject *object)
{
  XdpImplSettingsSkeleton *skeleton = XDP_IMPL_SETTINGS_SKELETON (object);
  guint n;
  for (n = 0; n < 1; n++)
    g_value_unset (&skeleton->priv->properties[n]);
  g_free (skeleton->priv->properties);
  g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  /* coverity[missing_lock : SUPPRESS] */
  g_clear_pointer (&skeleton->priv->changed_properties_idle_source, g_source_destroy);
#else
  if (skeleton->priv->changed_properties_idle_source != NULL)
    g_source_destroy (skeleton->priv->changed_properties_idle_source);
skeleton->priv->changed_properties_idle_source = NULL;
#endif
  g_main_context_unref (skeleton->priv->context);
  g_mutex_clear (&skeleton->priv->lock);
  G_OBJECT_CLASS (xdp_impl_settings_skeleton_parent_class)->finalize (object);
}

static void
xdp_impl_settings_skeleton_get_property (GObject      *object,
  guint         prop_id,
  GValue       *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  XdpImplSettingsSkeleton *skeleton = XDP_IMPL_SETTINGS_SKELETON (object);
  g_assert (prop_id != 0 && prop_id - 1 < 1);
  g_mutex_lock (&skeleton->priv->lock);
  g_value_copy (&skeleton->priv->properties[prop_id - 1], value);
  g_mutex_unlock (&skeleton->priv->lock);
}

static gboolean
_xdp_impl_settings_emit_changed (gpointer user_data)
{
  XdpImplSettingsSkeleton *skeleton = XDP_IMPL_SETTINGS_SKELETON (user_data);
  GList *l;
  GVariantBuilder builder;
  GVariantBuilder invalidated_builder;
  guint num_changes;

  g_mutex_lock (&skeleton->priv->lock);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_84
  g_variant_builder_init_static (&builder, G_VARIANT_TYPE ("a{sv}"));
  g_variant_builder_init_static (&invalidated_builder, G_VARIANT_TYPE ("as"));
#else
  g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
  g_variant_builder_init (&invalidated_builder, G_VARIANT_TYPE ("as"));
#endif
  for (l = skeleton->priv->changed_properties, num_changes = 0; l != NULL; l = l->next)
    {
      ChangedProperty *cp = l->data;
      GVariant *variant;
      const GValue *cur_value;

      cur_value = &skeleton->priv->properties[cp->prop_id - 1];
      if (!_g_value_equal (cur_value, &cp->orig_value))
        {
          variant = g_dbus_gvalue_to_gvariant (cur_value, G_VARIANT_TYPE (cp->info->parent_struct.signature));
          g_variant_builder_add (&builder, "{sv}", cp->info->parent_struct.name, variant);
          g_variant_unref (variant);
          num_changes++;
        }
    }
  if (num_changes > 0)
    {
      GList *connections, *ll;
      GVariant *signal_variant;
      signal_variant = g_variant_ref_sink (g_variant_new ("(sa{sv}as)", "org.freedesktop.impl.portal.Settings",
                                           &builder, &invalidated_builder));
      connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
      for (ll = connections; ll != NULL; ll = ll->next)
        {
          GDBusConnection *connection = ll->data;

          g_dbus_connection_emit_signal (connection,
                                         NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)),
                                         "org.freedesktop.DBus.Properties",
                                         "PropertiesChanged",
                                         signal_variant,
                                         NULL);
        }
      g_variant_unref (signal_variant);
      g_list_free_full (connections, g_object_unref);
    }
  else
    {
      g_variant_builder_clear (&builder);
      g_variant_builder_clear (&invalidated_builder);
    }
  g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
  skeleton->priv->changed_properties = NULL;
  skeleton->priv->changed_properties_idle_source = NULL;
  g_mutex_unlock (&skeleton->priv->lock);
  return FALSE;
}

static void
_xdp_impl_settings_schedule_emit_changed (XdpImplSettingsSkeleton *skeleton, const _ExtendedGDBusPropertyInfo *info, guint prop_id, const GValue *orig_value)
{
  ChangedProperty *cp;
  GList *l;
  cp = NULL;
  for (l = skeleton->priv->changed_properties; l != NULL; l = l->next)
    {
      ChangedProperty *i_cp = l->data;
      if (i_cp->info == info)
        {
          cp = i_cp;
          break;
        }
    }
  if (cp == NULL)
    {
      cp = g_new0 (ChangedProperty, 1);
      cp->prop_id = prop_id;
      cp->info = info;
      skeleton->priv->changed_properties = g_list_prepend (skeleton->priv->changed_properties, cp);
      g_value_init (&cp->orig_value, G_VALUE_TYPE (orig_value));
      g_value_copy (orig_value, &cp->orig_value);
    }
}

static void
xdp_impl_settings_skeleton_notify (GObject      *object,
  GParamSpec *pspec G_GNUC_UNUSED)
{
  XdpImplSettingsSkeleton *skeleton = XDP_IMPL_SETTINGS_SKELETON (object);
  g_mutex_lock (&skeleton->priv->lock);
  if (skeleton->priv->changed_properties != NULL &&
      skeleton->priv->changed_properties_idle_source == NULL)
    {
      skeleton->priv->changed_properties_idle_source = g_idle_source_new ();
      g_source_set_priority (skeleton->priv->changed_properties_idle_source, G_PRIORITY_DEFAULT);
      g_source_set_callback (skeleton->priv->changed_properties_idle_source, _xdp_impl_settings_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
      g_source_set_name (skeleton->priv->changed_properties_idle_source, "[generated] _xdp_impl_settings_emit_changed");
      g_source_attach (skeleton->priv->changed_properties_idle_source, skeleton->priv->context);
      g_source_unref (skeleton->priv->changed_properties_idle_source);
    }
  g_mutex_unlock (&skeleton->priv->lock);
}

static void
xdp_impl_settings_skeleton_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec)
{
  const _ExtendedGDBusPropertyInfo *info;
  XdpImplSettingsSkeleton *skeleton = XDP_IMPL_SETTINGS_SKELETON (object);
  g_assert (prop_id != 0 && prop_id - 1 < 1);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_impl_settings_property_info_pointers[prop_id - 1];
  g_mutex_lock (&skeleton->priv->lock);
  g_object_freeze_notify (object);
  if (!_g_value_equal (value, &skeleton->priv->properties[prop_id - 1]))
    {
      if (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)) != NULL &&
          info->emits_changed_signal)
        _xdp_impl_settings_schedule_emit_changed (skeleton, info, prop_id, &skeleton->priv->properties[prop_id - 1]);
      g_value_copy (value, &skeleton->priv->properties[prop_id - 1]);
      g_object_notify_by_pspec (object, pspec);
    }
  g_mutex_unlock (&skeleton->priv->lock);
  g_object_thaw_notify (object);
}

static void
xdp_impl_settings_skeleton_init (XdpImplSettingsSkeleton *skeleton)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  skeleton->priv = xdp_impl_settings_skeleton_get_instance_private (skeleton);
#else
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, XDP_IMPL_TYPE_SETTINGS_SKELETON, XdpImplSettingsSkeletonPrivate);
#endif

  g_mutex_init (&skeleton->priv->lock);
  skeleton->priv->context = g_main_context_ref_thread_default ();
  skeleton->priv->properties = g_new0 (GValue, 1);
  g_value_init (&skeleton->priv->properties[0], G_TYPE_UINT);
}

static guint 
xdp_impl_settings_skeleton_get_version (XdpImplSettings *object)
{
  XdpImplSettingsSkeleton *skeleton = XDP_IMPL_SETTINGS_SKELETON (object);
  guint value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_marshal_value_peek_uint (&(skeleton->priv->properties[0]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static void
xdp_impl_settings_skeleton_class_init (XdpImplSettingsSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize = xdp_impl_settings_skeleton_finalize;
  gobject_class->get_property = xdp_impl_settings_skeleton_get_property;
  gobject_class->set_property = xdp_impl_settings_skeleton_set_property;
  gobject_class->notify       = xdp_impl_settings_skeleton_notify;


  xdp_impl_settings_override_properties (gobject_class, 1);

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = xdp_impl_settings_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = xdp_impl_settings_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = xdp_impl_settings_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = xdp_impl_settings_skeleton_dbus_interface_get_vtable;

#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
  g_type_class_add_private (klass, sizeof (XdpImplSettingsSkeletonPrivate));
#endif
}

static void
xdp_impl_settings_skeleton_iface_init (XdpImplSettingsIface *iface)
{
  iface->setting_changed = _xdp_impl_settings_on_signal_setting_changed;
  iface->get_version = xdp_impl_settings_skeleton_get_version;
}

/**
 * xdp_impl_settings_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-Settings.top_of_page">org.freedesktop.impl.portal.Settings</link>.
 *
 * Returns: (transfer full) (type XdpImplSettingsSkeleton): The skeleton object.
 */
XdpImplSettings *
xdp_impl_settings_skeleton_new (void)
{
  return XDP_IMPL_SETTINGS (g_object_new (XDP_IMPL_TYPE_SETTINGS_SKELETON, NULL));
}

/* ------------------------------------------------------------------------
 * Code for interface org.freedesktop.impl.portal.Usb
 * ------------------------------------------------------------------------
 */

/**
 * SECTION:XdpImplUsb
 * @title: XdpImplUsb
 * @short_description: Generated C code for the org.freedesktop.impl.portal.Usb D-Bus interface
 *
 * This section contains code for working with the <link linkend="gdbus-interface-org-freedesktop-impl-portal-Usb.top_of_page">org.freedesktop.impl.portal.Usb</link> D-Bus interface in C.
 */

/* ---- Introspection data for org.freedesktop.impl.portal.Usb ---- */

static const _ExtendedGDBusArgInfo _xdp_impl_usb_method_info_acquire_devices_IN_ARG_handle =
{
  {
    -1,
    (gchar *) "handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_usb_method_info_acquire_devices_IN_ARG_parent_window =
{
  {
    -1,
    (gchar *) "parent_window",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_usb_method_info_acquire_devices_IN_ARG_app_id =
{
  {
    -1,
    (gchar *) "app_id",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_usb_method_info_acquire_devices_IN_ARG_devices =
{
  {
    -1,
    (gchar *) "devices",
    (gchar *) "a(sa{sv}a{sv})",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_usb_method_info_acquire_devices_IN_ARG_options =
{
  {
    -1,
    (gchar *) "options",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_usb_method_info_acquire_devices_IN_ARG_pointers[] =
{
  &_xdp_impl_usb_method_info_acquire_devices_IN_ARG_handle.parent_struct,
  &_xdp_impl_usb_method_info_acquire_devices_IN_ARG_parent_window.parent_struct,
  &_xdp_impl_usb_method_info_acquire_devices_IN_ARG_app_id.parent_struct,
  &_xdp_impl_usb_method_info_acquire_devices_IN_ARG_devices.parent_struct,
  &_xdp_impl_usb_method_info_acquire_devices_IN_ARG_options.parent_struct,
  NULL
};

static const _ExtendedGDBusArgInfo _xdp_impl_usb_method_info_acquire_devices_OUT_ARG_response =
{
  {
    -1,
    (gchar *) "response",
    (gchar *) "u",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_usb_method_info_acquire_devices_OUT_ARG_results =
{
  {
    -1,
    (gchar *) "results",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_usb_method_info_acquire_devices_OUT_ARG_pointers[] =
{
  &_xdp_impl_usb_method_info_acquire_devices_OUT_ARG_response.parent_struct,
  &_xdp_impl_usb_method_info_acquire_devices_OUT_ARG_results.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_usb_method_acquire_devices_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.In3",
  (gchar *) "QList<std::tuple<QString,QVariantMap,QVariantMap>>",
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_usb_method_acquire_devices_annotation_info_1 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.In4",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_usb_method_acquire_devices_annotation_info_2 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.Out1",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo * const _xdp_impl_usb_method_acquire_devices_annotation_info_pointers[] =
{
  &_xdp_impl_usb_method_acquire_devices_annotation_info_0,
  &_xdp_impl_usb_method_acquire_devices_annotation_info_1,
  &_xdp_impl_usb_method_acquire_devices_annotation_info_2,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_impl_usb_method_info_acquire_devices =
{
  {
    -1,
    (gchar *) "AcquireDevices",
    (GDBusArgInfo **) &_xdp_impl_usb_method_info_acquire_devices_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_impl_usb_method_info_acquire_devices_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_impl_usb_method_acquire_devices_annotation_info_pointers
  },
  "handle-acquire-devices",
  FALSE
};

static const GDBusMethodInfo * const _xdp_impl_usb_method_info_pointers[] =
{
  &_xdp_impl_usb_method_info_acquire_devices.parent_struct,
  NULL
};

static const _ExtendedGDBusPropertyInfo _xdp_impl_usb_property_info_version =
{
  {
    -1,
    (gchar *) "version",
    (gchar *) "u",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "version",
  FALSE,
  TRUE
};

static const GDBusPropertyInfo * const _xdp_impl_usb_property_info_pointers[] =
{
  &_xdp_impl_usb_property_info_version.parent_struct,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _xdp_impl_usb_interface_info =
{
  {
    -1,
    (gchar *) "org.freedesktop.impl.portal.Usb",
    (GDBusMethodInfo **) &_xdp_impl_usb_method_info_pointers,
    NULL,
    (GDBusPropertyInfo **) &_xdp_impl_usb_property_info_pointers,
    NULL
  },
  "usb",
};


/**
 * xdp_impl_usb_interface_info:
 *
 * Gets a machine-readable description of the <link linkend="gdbus-interface-org-freedesktop-impl-portal-Usb.top_of_page">org.freedesktop.impl.portal.Usb</link> D-Bus interface.
 *
 * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
 */
GDBusInterfaceInfo *
xdp_impl_usb_interface_info (void)
{
  return (GDBusInterfaceInfo *) &_xdp_impl_usb_interface_info.parent_struct;
}

/**
 * xdp_impl_usb_override_properties:
 * @klass: The class structure for a #GObject derived class.
 * @property_id_begin: The property id to assign to the first overridden property.
 *
 * Overrides all #GObject properties in the #XdpImplUsb interface for a concrete class.
 * The properties are overridden in the order they are defined.
 *
 * Returns: The last property id.
 */
guint
xdp_impl_usb_override_properties (GObjectClass *klass, guint property_id_begin)
{
  g_object_class_override_property (klass, property_id_begin++, "version");
  return property_id_begin - 1;
}


inline static void
xdp_impl_usb_method_marshal_acquire_devices (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  _g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_STRING_STRING_VARIANT_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}


/**
 * XdpImplUsb:
 *
 * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-Usb.top_of_page">org.freedesktop.impl.portal.Usb</link>.
 */

/**
 * XdpImplUsbIface:
 * @parent_iface: The parent interface.
 * @handle_acquire_devices: Handler for the #XdpImplUsb::handle-acquire-devices signal.
 * @get_version: Getter for the #XdpImplUsb:version property.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-Usb.top_of_page">org.freedesktop.impl.portal.Usb</link>.
 */

typedef XdpImplUsbIface XdpImplUsbInterface;
G_DEFINE_INTERFACE (XdpImplUsb, xdp_impl_usb, G_TYPE_OBJECT)

static void
xdp_impl_usb_default_init (XdpImplUsbIface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * XdpImplUsb::handle-acquire-devices:
   * @object: A #XdpImplUsb.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_handle: Argument passed by remote caller.
   * @arg_parent_window: Argument passed by remote caller.
   * @arg_app_id: Argument passed by remote caller.
   * @arg_devices: Argument passed by remote caller.
   * @arg_options: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-impl-portal-Usb.AcquireDevices">AcquireDevices()</link> 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 xdp_impl_usb_complete_acquire_devices() 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.
   *
   * 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.
   */
  g_signal_new ("handle-acquire-devices",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpImplUsbIface, handle_acquire_devices),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_impl_usb_method_marshal_acquire_devices,
    G_TYPE_BOOLEAN,
    6,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_VARIANT, G_TYPE_VARIANT);

  /* GObject properties for D-Bus properties: */
  /**
   * XdpImplUsb:version:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-impl-portal-Usb.version">"version"</link>.
   *
   * 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.
   */
  g_object_interface_install_property (iface,
    g_param_spec_uint ("version", "version", "version", 0, G_MAXUINT32, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
}

/**
 * xdp_impl_usb_get_version: (skip)
 * @object: A #XdpImplUsb.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-impl-portal-Usb.version">"version"</link> D-Bus property.
 *
 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
 *
 * Returns: The property value.
 */
guint 
xdp_impl_usb_get_version (XdpImplUsb *object)
{
  g_return_val_if_fail (XDP_IMPL_IS_USB (object), 0);

  return XDP_IMPL_USB_GET_IFACE (object)->get_version (object);
}

/**
 * xdp_impl_usb_set_version: (skip)
 * @object: A #XdpImplUsb.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-freedesktop-impl-portal-Usb.version">"version"</link> 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.
 */
void
xdp_impl_usb_set_version (XdpImplUsb *object, guint value)
{
  g_object_set (G_OBJECT (object), "version", value, NULL);
}

/**
 * xdp_impl_usb_call_acquire_devices:
 * @proxy: A #XdpImplUsbProxy.
 * @arg_handle: Argument to pass with the method invocation.
 * @arg_parent_window: Argument to pass with the method invocation.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_devices: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-Usb.AcquireDevices">AcquireDevices()</link> 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 xdp_impl_usb_call_acquire_devices_finish() to get the result of the operation.
 *
 * See xdp_impl_usb_call_acquire_devices_sync() for the synchronous, blocking version of this method.
 */
void
xdp_impl_usb_call_acquire_devices (
    XdpImplUsb *proxy,
    const gchar *arg_handle,
    const gchar *arg_parent_window,
    const gchar *arg_app_id,
    GVariant *arg_devices,
    GVariant *arg_options,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "AcquireDevices",
    g_variant_new ("(oss@a(sa{sv}a{sv})@a{sv})",
                   arg_handle,
                   arg_parent_window,
                   arg_app_id,
                   arg_devices,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_impl_usb_call_acquire_devices_finish:
 * @proxy: A #XdpImplUsbProxy.
 * @out_response: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_results: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_usb_call_acquire_devices().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_impl_usb_call_acquire_devices().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_usb_call_acquire_devices_finish (
    XdpImplUsb *proxy,
    guint* out_response,
    GVariant ** out_results,
    GAsyncResult *res,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(u@a{sv})",
                 out_response,
                 out_results);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_usb_call_acquire_devices_sync:
 * @proxy: A #XdpImplUsbProxy.
 * @arg_handle: Argument to pass with the method invocation.
 * @arg_parent_window: Argument to pass with the method invocation.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_devices: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @out_response: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_results: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-Usb.AcquireDevices">AcquireDevices()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_usb_call_acquire_devices() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_usb_call_acquire_devices_sync (
    XdpImplUsb *proxy,
    const gchar *arg_handle,
    const gchar *arg_parent_window,
    const gchar *arg_app_id,
    GVariant *arg_devices,
    GVariant *arg_options,
    guint* out_response,
    GVariant ** out_results,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "AcquireDevices",
    g_variant_new ("(oss@a(sa{sv}a{sv})@a{sv})",
                   arg_handle,
                   arg_parent_window,
                   arg_app_id,
                   arg_devices,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(u@a{sv})",
                 out_response,
                 out_results);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_usb_complete_acquire_devices:
 * @object: A #XdpImplUsb.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @response: Parameter to return.
 * @results: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-impl-portal-Usb.AcquireDevices">AcquireDevices()</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
xdp_impl_usb_complete_acquire_devices (
    XdpImplUsb *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    guint response,
    GVariant *results)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(u@a{sv})",
                   response,
                   results));
}

/* ------------------------------------------------------------------------ */

/**
 * XdpImplUsbProxy:
 *
 * The #XdpImplUsbProxy structure contains only private data and should only be accessed using the provided API.
 */

/**
 * XdpImplUsbProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpImplUsbProxy.
 */

struct _XdpImplUsbProxyPrivate
{
  GData *qdata;
};

static void xdp_impl_usb_proxy_iface_init (XdpImplUsbIface *iface);

#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpImplUsbProxy, xdp_impl_usb_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (XdpImplUsbProxy)
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_USB, xdp_impl_usb_proxy_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpImplUsbProxy, xdp_impl_usb_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_USB, xdp_impl_usb_proxy_iface_init))

#endif
static void
xdp_impl_usb_proxy_finalize (GObject *object)
{
  XdpImplUsbProxy *proxy = XDP_IMPL_USB_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (xdp_impl_usb_proxy_parent_class)->finalize (object);
}

static void
xdp_impl_usb_proxy_get_property (GObject      *object,
  guint         prop_id,
  GValue       *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  const _ExtendedGDBusPropertyInfo *info;
  GVariant *variant;
  g_assert (prop_id != 0 && prop_id - 1 < 1);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_impl_usb_property_info_pointers[prop_id - 1];
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), info->parent_struct.name);
  if (info->use_gvariant)
    {
      g_value_set_variant (value, variant);
    }
  else
    {
      if (variant != NULL)
        g_dbus_gvariant_to_gvalue (variant, value);
    }
  if (variant != NULL)
    g_variant_unref (variant);
}

static void
xdp_impl_usb_proxy_set_property_cb (GDBusProxy *proxy,
  GAsyncResult *res,
  gpointer      user_data)
{
  const _ExtendedGDBusPropertyInfo *info = user_data;
  GError *error;
  GVariant *_ret;
  error = NULL;
  _ret = g_dbus_proxy_call_finish (proxy, res, &error);
  if (!_ret)
    {
      g_warning ("Error setting property '%s' on interface org.freedesktop.impl.portal.Usb: %s (%s, %d)",
                 info->parent_struct.name, 
                 error->message, g_quark_to_string (error->domain), error->code);
      g_error_free (error);
    }
  else
    {
      g_variant_unref (_ret);
    }
}

static void
xdp_impl_usb_proxy_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  const _ExtendedGDBusPropertyInfo *info;
  GVariant *variant;
  g_assert (prop_id != 0 && prop_id - 1 < 1);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_impl_usb_property_info_pointers[prop_id - 1];
  variant = g_dbus_gvalue_to_gvariant (value, G_VARIANT_TYPE (info->parent_struct.signature));
  g_dbus_proxy_call (G_DBUS_PROXY (object),
    "org.freedesktop.DBus.Properties.Set",
    g_variant_new ("(ssv)", "org.freedesktop.impl.portal.Usb", info->parent_struct.name, variant),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    NULL, (GAsyncReadyCallback) xdp_impl_usb_proxy_set_property_cb, (GDBusPropertyInfo *) &info->parent_struct);
  g_variant_unref (variant);
}

static void
xdp_impl_usb_proxy_g_signal (GDBusProxy *proxy,
  const gchar *sender_name G_GNUC_UNUSED,
  const gchar *signal_name,
  GVariant *parameters)
{
  _ExtendedGDBusSignalInfo *info;
  GVariantIter iter;
  GVariant *child;
  GValue *paramv;
  gsize num_params;
  gsize n;
  guint signal_id;
  info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_xdp_impl_usb_interface_info.parent_struct, signal_name);
  if (info == NULL)
    return;
  num_params = g_variant_n_children (parameters);
  paramv = g_new0 (GValue, num_params + 1);
  g_value_init (&paramv[0], XDP_IMPL_TYPE_USB);
  g_value_set_object (&paramv[0], proxy);
  g_variant_iter_init (&iter, parameters);
  n = 1;
  while ((child = g_variant_iter_next_value (&iter)) != NULL)
    {
      _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1];
      if (arg_info->use_gvariant)
        {
          g_value_init (&paramv[n], G_TYPE_VARIANT);
          g_value_set_variant (&paramv[n], child);
          n++;
        }
      else
        g_dbus_gvariant_to_gvalue (child, &paramv[n++]);
      g_variant_unref (child);
    }
  signal_id = g_signal_lookup (info->signal_name, XDP_IMPL_TYPE_USB);
  g_signal_emitv (paramv, signal_id, 0, NULL);
  for (n = 0; n < num_params + 1; n++)
    g_value_unset (&paramv[n]);
  g_free (paramv);
}

static void
xdp_impl_usb_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  XdpImplUsbProxy *proxy = XDP_IMPL_USB_PROXY (_proxy);
  guint n;
  const gchar *key;
  GVariantIter *iter;
  _ExtendedGDBusPropertyInfo *info;
  g_variant_get (changed_properties, "a{sv}", &iter);
  while (g_variant_iter_next (iter, "{&sv}", &key, NULL))
    {
      info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_usb_interface_info.parent_struct, key);
      g_datalist_remove_data (&proxy->priv->qdata, key);
      if (info != NULL)
        g_object_notify (G_OBJECT (proxy), info->hyphen_name);
    }
  g_variant_iter_free (iter);
  for (n = 0; invalidated_properties[n] != NULL; n++)
    {
      info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_usb_interface_info.parent_struct, invalidated_properties[n]);
      g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]);
      if (info != NULL)
        g_object_notify (G_OBJECT (proxy), info->hyphen_name);
    }
}

static guint 
xdp_impl_usb_proxy_get_version (XdpImplUsb *object)
{
  XdpImplUsbProxy *proxy = XDP_IMPL_USB_PROXY (object);
  GVariant *variant;
  guint value = 0;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "version");
  if (variant != NULL)
    {
      value = g_variant_get_uint32 (variant);
      g_variant_unref (variant);
    }
  return value;
}

static void
xdp_impl_usb_proxy_init (XdpImplUsbProxy *proxy)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  proxy->priv = xdp_impl_usb_proxy_get_instance_private (proxy);
#else
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, XDP_IMPL_TYPE_USB_PROXY, XdpImplUsbProxyPrivate);
#endif

  g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), xdp_impl_usb_interface_info ());
}

static void
xdp_impl_usb_proxy_class_init (XdpImplUsbProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = xdp_impl_usb_proxy_finalize;
  gobject_class->get_property = xdp_impl_usb_proxy_get_property;
  gobject_class->set_property = xdp_impl_usb_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = xdp_impl_usb_proxy_g_signal;
  proxy_class->g_properties_changed = xdp_impl_usb_proxy_g_properties_changed;

  xdp_impl_usb_override_properties (gobject_class, 1);

#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
  g_type_class_add_private (klass, sizeof (XdpImplUsbProxyPrivate));
#endif
}

static void
xdp_impl_usb_proxy_iface_init (XdpImplUsbIface *iface)
{
  iface->get_version = xdp_impl_usb_proxy_get_version;
}

/**
 * xdp_impl_usb_proxy_new:
 * @connection: A #GDBusConnection.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-Usb.top_of_page">org.freedesktop.impl.portal.Usb</link>. 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 xdp_impl_usb_proxy_new_finish() to get the result of the operation.
 *
 * See xdp_impl_usb_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_impl_usb_proxy_new (
    GDBusConnection     *connection,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GAsyncReadyCallback  callback,
    gpointer             user_data)
{
  g_async_initable_new_async (XDP_IMPL_TYPE_USB_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.Usb", NULL);
}

/**
 * xdp_impl_usb_proxy_new_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_usb_proxy_new().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_impl_usb_proxy_new().
 *
 * Returns: (transfer full) (type XdpImplUsbProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplUsb *
xdp_impl_usb_proxy_new_finish (
    GAsyncResult        *res,
    GError             **error)
{
  GObject *ret;
  GObject *source_object;
  source_object = g_async_result_get_source_object (res);
  ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
  g_object_unref (source_object);
  if (ret != NULL)
    return XDP_IMPL_USB (ret);
  else
    return NULL;
}

/**
 * xdp_impl_usb_proxy_new_sync:
 * @connection: A #GDBusConnection.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL
 *
 * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-Usb.top_of_page">org.freedesktop.impl.portal.Usb</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_usb_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpImplUsbProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplUsb *
xdp_impl_usb_proxy_new_sync (
    GDBusConnection     *connection,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GError             **error)
{
  GInitable *ret;
  ret = g_initable_new (XDP_IMPL_TYPE_USB_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.Usb", NULL);
  if (ret != NULL)
    return XDP_IMPL_USB (ret);
  else
    return NULL;
}


/**
 * xdp_impl_usb_proxy_new_for_bus:
 * @bus_type: A #GBusType.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: A bus name (well-known or unique).
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
 * @user_data: User data to pass to @callback.
 *
 * Like xdp_impl_usb_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 xdp_impl_usb_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See xdp_impl_usb_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_impl_usb_proxy_new_for_bus (
    GBusType             bus_type,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GAsyncReadyCallback  callback,
    gpointer             user_data)
{
  g_async_initable_new_async (XDP_IMPL_TYPE_USB_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.Usb", NULL);
}

/**
 * xdp_impl_usb_proxy_new_for_bus_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_usb_proxy_new_for_bus().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_impl_usb_proxy_new_for_bus().
 *
 * Returns: (transfer full) (type XdpImplUsbProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplUsb *
xdp_impl_usb_proxy_new_for_bus_finish (
    GAsyncResult        *res,
    GError             **error)
{
  GObject *ret;
  GObject *source_object;
  source_object = g_async_result_get_source_object (res);
  ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
  g_object_unref (source_object);
  if (ret != NULL)
    return XDP_IMPL_USB (ret);
  else
    return NULL;
}

/**
 * xdp_impl_usb_proxy_new_for_bus_sync:
 * @bus_type: A #GBusType.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: A bus name (well-known or unique).
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL
 *
 * Like xdp_impl_usb_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_usb_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpImplUsbProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplUsb *
xdp_impl_usb_proxy_new_for_bus_sync (
    GBusType             bus_type,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GError             **error)
{
  GInitable *ret;
  ret = g_initable_new (XDP_IMPL_TYPE_USB_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.Usb", NULL);
  if (ret != NULL)
    return XDP_IMPL_USB (ret);
  else
    return NULL;
}


/* ------------------------------------------------------------------------ */

/**
 * XdpImplUsbSkeleton:
 *
 * The #XdpImplUsbSkeleton structure contains only private data and should only be accessed using the provided API.
 */

/**
 * XdpImplUsbSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpImplUsbSkeleton.
 */

struct _XdpImplUsbSkeletonPrivate
{
  GValue *properties;
  GList *changed_properties;
  GSource *changed_properties_idle_source;
  GMainContext *context;
  GMutex lock;
};

static void
_xdp_impl_usb_skeleton_handle_method_call (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name,
  const gchar *method_name,
  GVariant *parameters,
  GDBusMethodInvocation *invocation,
  gpointer user_data)
{
  XdpImplUsbSkeleton *skeleton = XDP_IMPL_USB_SKELETON (user_data);
  _ExtendedGDBusMethodInfo *info;
  GVariantIter iter;
  GVariant *child;
  GValue *paramv;
  gsize num_params;
  guint num_extra;
  gsize n;
  guint signal_id;
  GValue return_value = G_VALUE_INIT;
  info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
  g_assert (info != NULL);
  num_params = g_variant_n_children (parameters);
  num_extra = info->pass_fdlist ? 3 : 2;  paramv = g_new0 (GValue, num_params + num_extra);
  n = 0;
  g_value_init (&paramv[n], XDP_IMPL_TYPE_USB);
  g_value_set_object (&paramv[n++], skeleton);
  g_value_init (&paramv[n], G_TYPE_DBUS_METHOD_INVOCATION);
  g_value_set_object (&paramv[n++], invocation);
  if (info->pass_fdlist)
    {
#ifdef G_OS_UNIX
      g_value_init (&paramv[n], G_TYPE_UNIX_FD_LIST);
      g_value_set_object (&paramv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation)));
#else
      g_assert_not_reached ();
#endif
    }
  g_variant_iter_init (&iter, parameters);
  while ((child = g_variant_iter_next_value (&iter)) != NULL)
    {
      _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra];
      if (arg_info->use_gvariant)
        {
          g_value_init (&paramv[n], G_TYPE_VARIANT);
          g_value_set_variant (&paramv[n], child);
          n++;
        }
      else
        g_dbus_gvariant_to_gvalue (child, &paramv[n++]);
      g_variant_unref (child);
    }
  signal_id = g_signal_lookup (info->signal_name, XDP_IMPL_TYPE_USB);
  g_value_init (&return_value, G_TYPE_BOOLEAN);
  g_signal_emitv (paramv, signal_id, 0, &return_value);
  if (!g_value_get_boolean (&return_value))
    g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD, "Method %s is not implemented on interface %s", method_name, interface_name);
  g_value_unset (&return_value);
  for (n = 0; n < num_params + num_extra; n++)
    g_value_unset (&paramv[n]);
  g_free (paramv);
}

static GVariant *
_xdp_impl_usb_skeleton_handle_get_property (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name G_GNUC_UNUSED,
  const gchar *property_name,
  GError **error,
  gpointer user_data)
{
  XdpImplUsbSkeleton *skeleton = XDP_IMPL_USB_SKELETON (user_data);
  GValue value = G_VALUE_INIT;
  GParamSpec *pspec;
  _ExtendedGDBusPropertyInfo *info;
  GVariant *ret;
  ret = NULL;
  info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_usb_interface_info.parent_struct, property_name);
  g_assert (info != NULL);
  pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
  if (pspec == NULL)
    {
      g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
    }
  else
    {
      g_value_init (&value, pspec->value_type);
      g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value);
      ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature));
      g_value_unset (&value);
    }
  return ret;
}

static gboolean
_xdp_impl_usb_skeleton_handle_set_property (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name G_GNUC_UNUSED,
  const gchar *property_name,
  GVariant *variant,
  GError **error,
  gpointer user_data)
{
  XdpImplUsbSkeleton *skeleton = XDP_IMPL_USB_SKELETON (user_data);
  GValue value = G_VALUE_INIT;
  GParamSpec *pspec;
  _ExtendedGDBusPropertyInfo *info;
  gboolean ret;
  ret = FALSE;
  info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_usb_interface_info.parent_struct, property_name);
  g_assert (info != NULL);
  pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
  if (pspec == NULL)
    {
      g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
    }
  else
    {
      if (info->use_gvariant)
        g_value_set_variant (&value, variant);
      else
        g_dbus_gvariant_to_gvalue (variant, &value);
      g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value);
      g_value_unset (&value);
      ret = TRUE;
    }
  return ret;
}

static const GDBusInterfaceVTable _xdp_impl_usb_skeleton_vtable =
{
  _xdp_impl_usb_skeleton_handle_method_call,
  _xdp_impl_usb_skeleton_handle_get_property,
  _xdp_impl_usb_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
xdp_impl_usb_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return xdp_impl_usb_interface_info ();
}

static GDBusInterfaceVTable *
xdp_impl_usb_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_xdp_impl_usb_skeleton_vtable;
}

static GVariant *
xdp_impl_usb_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  XdpImplUsbSkeleton *skeleton = XDP_IMPL_USB_SKELETON (_skeleton);

  GVariantBuilder builder;
  guint n;
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_84
  g_variant_builder_init_static (&builder, G_VARIANT_TYPE ("a{sv}"));
#else
  g_variant_builder_init(&builder, G_VARIANT_TYPE ("a{sv}"));
#endif
  if (_xdp_impl_usb_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _xdp_impl_usb_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _xdp_impl_usb_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _xdp_impl_usb_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.impl.portal.Usb", info->name, NULL, skeleton);
          if (value != NULL)
            {
              g_variant_take_ref (value);
              g_variant_builder_add (&builder, "{sv}", info->name, value);
              g_variant_unref (value);
            }
        }
    }
out:
  return g_variant_builder_end (&builder);
}

static gboolean _xdp_impl_usb_emit_changed (gpointer user_data);

static void
xdp_impl_usb_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
{
  XdpImplUsbSkeleton *skeleton = XDP_IMPL_USB_SKELETON (_skeleton);
  gboolean emit_changed = FALSE;

  g_mutex_lock (&skeleton->priv->lock);
  if (skeleton->priv->changed_properties_idle_source != NULL)
    {
      g_source_destroy (skeleton->priv->changed_properties_idle_source);
      skeleton->priv->changed_properties_idle_source = NULL;
      emit_changed = TRUE;
    }
  g_mutex_unlock (&skeleton->priv->lock);

  if (emit_changed)
    _xdp_impl_usb_emit_changed (skeleton);
}

static void xdp_impl_usb_skeleton_iface_init (XdpImplUsbIface *iface);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpImplUsbSkeleton, xdp_impl_usb_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (XdpImplUsbSkeleton)
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_USB, xdp_impl_usb_skeleton_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpImplUsbSkeleton, xdp_impl_usb_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_USB, xdp_impl_usb_skeleton_iface_init))

#endif
static void
xdp_impl_usb_skeleton_finalize (GObject *object)
{
  XdpImplUsbSkeleton *skeleton = XDP_IMPL_USB_SKELETON (object);
  guint n;
  for (n = 0; n < 1; n++)
    g_value_unset (&skeleton->priv->properties[n]);
  g_free (skeleton->priv->properties);
  g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  /* coverity[missing_lock : SUPPRESS] */
  g_clear_pointer (&skeleton->priv->changed_properties_idle_source, g_source_destroy);
#else
  if (skeleton->priv->changed_properties_idle_source != NULL)
    g_source_destroy (skeleton->priv->changed_properties_idle_source);
skeleton->priv->changed_properties_idle_source = NULL;
#endif
  g_main_context_unref (skeleton->priv->context);
  g_mutex_clear (&skeleton->priv->lock);
  G_OBJECT_CLASS (xdp_impl_usb_skeleton_parent_class)->finalize (object);
}

static void
xdp_impl_usb_skeleton_get_property (GObject      *object,
  guint         prop_id,
  GValue       *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  XdpImplUsbSkeleton *skeleton = XDP_IMPL_USB_SKELETON (object);
  g_assert (prop_id != 0 && prop_id - 1 < 1);
  g_mutex_lock (&skeleton->priv->lock);
  g_value_copy (&skeleton->priv->properties[prop_id - 1], value);
  g_mutex_unlock (&skeleton->priv->lock);
}

static gboolean
_xdp_impl_usb_emit_changed (gpointer user_data)
{
  XdpImplUsbSkeleton *skeleton = XDP_IMPL_USB_SKELETON (user_data);
  GList *l;
  GVariantBuilder builder;
  GVariantBuilder invalidated_builder;
  guint num_changes;

  g_mutex_lock (&skeleton->priv->lock);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_84
  g_variant_builder_init_static (&builder, G_VARIANT_TYPE ("a{sv}"));
  g_variant_builder_init_static (&invalidated_builder, G_VARIANT_TYPE ("as"));
#else
  g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
  g_variant_builder_init (&invalidated_builder, G_VARIANT_TYPE ("as"));
#endif
  for (l = skeleton->priv->changed_properties, num_changes = 0; l != NULL; l = l->next)
    {
      ChangedProperty *cp = l->data;
      GVariant *variant;
      const GValue *cur_value;

      cur_value = &skeleton->priv->properties[cp->prop_id - 1];
      if (!_g_value_equal (cur_value, &cp->orig_value))
        {
          variant = g_dbus_gvalue_to_gvariant (cur_value, G_VARIANT_TYPE (cp->info->parent_struct.signature));
          g_variant_builder_add (&builder, "{sv}", cp->info->parent_struct.name, variant);
          g_variant_unref (variant);
          num_changes++;
        }
    }
  if (num_changes > 0)
    {
      GList *connections, *ll;
      GVariant *signal_variant;
      signal_variant = g_variant_ref_sink (g_variant_new ("(sa{sv}as)", "org.freedesktop.impl.portal.Usb",
                                           &builder, &invalidated_builder));
      connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
      for (ll = connections; ll != NULL; ll = ll->next)
        {
          GDBusConnection *connection = ll->data;

          g_dbus_connection_emit_signal (connection,
                                         NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)),
                                         "org.freedesktop.DBus.Properties",
                                         "PropertiesChanged",
                                         signal_variant,
                                         NULL);
        }
      g_variant_unref (signal_variant);
      g_list_free_full (connections, g_object_unref);
    }
  else
    {
      g_variant_builder_clear (&builder);
      g_variant_builder_clear (&invalidated_builder);
    }
  g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
  skeleton->priv->changed_properties = NULL;
  skeleton->priv->changed_properties_idle_source = NULL;
  g_mutex_unlock (&skeleton->priv->lock);
  return FALSE;
}

static void
_xdp_impl_usb_schedule_emit_changed (XdpImplUsbSkeleton *skeleton, const _ExtendedGDBusPropertyInfo *info, guint prop_id, const GValue *orig_value)
{
  ChangedProperty *cp;
  GList *l;
  cp = NULL;
  for (l = skeleton->priv->changed_properties; l != NULL; l = l->next)
    {
      ChangedProperty *i_cp = l->data;
      if (i_cp->info == info)
        {
          cp = i_cp;
          break;
        }
    }
  if (cp == NULL)
    {
      cp = g_new0 (ChangedProperty, 1);
      cp->prop_id = prop_id;
      cp->info = info;
      skeleton->priv->changed_properties = g_list_prepend (skeleton->priv->changed_properties, cp);
      g_value_init (&cp->orig_value, G_VALUE_TYPE (orig_value));
      g_value_copy (orig_value, &cp->orig_value);
    }
}

static void
xdp_impl_usb_skeleton_notify (GObject      *object,
  GParamSpec *pspec G_GNUC_UNUSED)
{
  XdpImplUsbSkeleton *skeleton = XDP_IMPL_USB_SKELETON (object);
  g_mutex_lock (&skeleton->priv->lock);
  if (skeleton->priv->changed_properties != NULL &&
      skeleton->priv->changed_properties_idle_source == NULL)
    {
      skeleton->priv->changed_properties_idle_source = g_idle_source_new ();
      g_source_set_priority (skeleton->priv->changed_properties_idle_source, G_PRIORITY_DEFAULT);
      g_source_set_callback (skeleton->priv->changed_properties_idle_source, _xdp_impl_usb_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
      g_source_set_name (skeleton->priv->changed_properties_idle_source, "[generated] _xdp_impl_usb_emit_changed");
      g_source_attach (skeleton->priv->changed_properties_idle_source, skeleton->priv->context);
      g_source_unref (skeleton->priv->changed_properties_idle_source);
    }
  g_mutex_unlock (&skeleton->priv->lock);
}

static void
xdp_impl_usb_skeleton_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec)
{
  const _ExtendedGDBusPropertyInfo *info;
  XdpImplUsbSkeleton *skeleton = XDP_IMPL_USB_SKELETON (object);
  g_assert (prop_id != 0 && prop_id - 1 < 1);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_impl_usb_property_info_pointers[prop_id - 1];
  g_mutex_lock (&skeleton->priv->lock);
  g_object_freeze_notify (object);
  if (!_g_value_equal (value, &skeleton->priv->properties[prop_id - 1]))
    {
      if (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)) != NULL &&
          info->emits_changed_signal)
        _xdp_impl_usb_schedule_emit_changed (skeleton, info, prop_id, &skeleton->priv->properties[prop_id - 1]);
      g_value_copy (value, &skeleton->priv->properties[prop_id - 1]);
      g_object_notify_by_pspec (object, pspec);
    }
  g_mutex_unlock (&skeleton->priv->lock);
  g_object_thaw_notify (object);
}

static void
xdp_impl_usb_skeleton_init (XdpImplUsbSkeleton *skeleton)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  skeleton->priv = xdp_impl_usb_skeleton_get_instance_private (skeleton);
#else
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, XDP_IMPL_TYPE_USB_SKELETON, XdpImplUsbSkeletonPrivate);
#endif

  g_mutex_init (&skeleton->priv->lock);
  skeleton->priv->context = g_main_context_ref_thread_default ();
  skeleton->priv->properties = g_new0 (GValue, 1);
  g_value_init (&skeleton->priv->properties[0], G_TYPE_UINT);
}

static guint 
xdp_impl_usb_skeleton_get_version (XdpImplUsb *object)
{
  XdpImplUsbSkeleton *skeleton = XDP_IMPL_USB_SKELETON (object);
  guint value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_marshal_value_peek_uint (&(skeleton->priv->properties[0]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static void
xdp_impl_usb_skeleton_class_init (XdpImplUsbSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize = xdp_impl_usb_skeleton_finalize;
  gobject_class->get_property = xdp_impl_usb_skeleton_get_property;
  gobject_class->set_property = xdp_impl_usb_skeleton_set_property;
  gobject_class->notify       = xdp_impl_usb_skeleton_notify;


  xdp_impl_usb_override_properties (gobject_class, 1);

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = xdp_impl_usb_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = xdp_impl_usb_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = xdp_impl_usb_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = xdp_impl_usb_skeleton_dbus_interface_get_vtable;

#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
  g_type_class_add_private (klass, sizeof (XdpImplUsbSkeletonPrivate));
#endif
}

static void
xdp_impl_usb_skeleton_iface_init (XdpImplUsbIface *iface)
{
  iface->get_version = xdp_impl_usb_skeleton_get_version;
}

/**
 * xdp_impl_usb_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-Usb.top_of_page">org.freedesktop.impl.portal.Usb</link>.
 *
 * Returns: (transfer full) (type XdpImplUsbSkeleton): The skeleton object.
 */
XdpImplUsb *
xdp_impl_usb_skeleton_new (void)
{
  return XDP_IMPL_USB (g_object_new (XDP_IMPL_TYPE_USB_SKELETON, NULL));
}

/* ------------------------------------------------------------------------
 * Code for interface org.freedesktop.impl.portal.Wallpaper
 * ------------------------------------------------------------------------
 */

/**
 * SECTION:XdpImplWallpaper
 * @title: XdpImplWallpaper
 * @short_description: Generated C code for the org.freedesktop.impl.portal.Wallpaper D-Bus interface
 *
 * This section contains code for working with the <link linkend="gdbus-interface-org-freedesktop-impl-portal-Wallpaper.top_of_page">org.freedesktop.impl.portal.Wallpaper</link> D-Bus interface in C.
 */

/* ---- Introspection data for org.freedesktop.impl.portal.Wallpaper ---- */

static const _ExtendedGDBusArgInfo _xdp_impl_wallpaper_method_info_set_wallpaper_uri_IN_ARG_handle =
{
  {
    -1,
    (gchar *) "handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_wallpaper_method_info_set_wallpaper_uri_IN_ARG_app_id =
{
  {
    -1,
    (gchar *) "app_id",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_wallpaper_method_info_set_wallpaper_uri_IN_ARG_parent_window =
{
  {
    -1,
    (gchar *) "parent_window",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_wallpaper_method_info_set_wallpaper_uri_IN_ARG_uri =
{
  {
    -1,
    (gchar *) "uri",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_impl_wallpaper_method_info_set_wallpaper_uri_IN_ARG_options =
{
  {
    -1,
    (gchar *) "options",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_wallpaper_method_info_set_wallpaper_uri_IN_ARG_pointers[] =
{
  &_xdp_impl_wallpaper_method_info_set_wallpaper_uri_IN_ARG_handle.parent_struct,
  &_xdp_impl_wallpaper_method_info_set_wallpaper_uri_IN_ARG_app_id.parent_struct,
  &_xdp_impl_wallpaper_method_info_set_wallpaper_uri_IN_ARG_parent_window.parent_struct,
  &_xdp_impl_wallpaper_method_info_set_wallpaper_uri_IN_ARG_uri.parent_struct,
  &_xdp_impl_wallpaper_method_info_set_wallpaper_uri_IN_ARG_options.parent_struct,
  NULL
};

static const _ExtendedGDBusArgInfo _xdp_impl_wallpaper_method_info_set_wallpaper_uri_OUT_ARG_response =
{
  {
    -1,
    (gchar *) "response",
    (gchar *) "u",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_impl_wallpaper_method_info_set_wallpaper_uri_OUT_ARG_pointers[] =
{
  &_xdp_impl_wallpaper_method_info_set_wallpaper_uri_OUT_ARG_response.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_impl_wallpaper_method_set_wallpaper_uri_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.In4",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo * const _xdp_impl_wallpaper_method_set_wallpaper_uri_annotation_info_pointers[] =
{
  &_xdp_impl_wallpaper_method_set_wallpaper_uri_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_impl_wallpaper_method_info_set_wallpaper_uri =
{
  {
    -1,
    (gchar *) "SetWallpaperURI",
    (GDBusArgInfo **) &_xdp_impl_wallpaper_method_info_set_wallpaper_uri_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_impl_wallpaper_method_info_set_wallpaper_uri_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_impl_wallpaper_method_set_wallpaper_uri_annotation_info_pointers
  },
  "handle-set-wallpaper-uri",
  FALSE
};

static const GDBusMethodInfo * const _xdp_impl_wallpaper_method_info_pointers[] =
{
  &_xdp_impl_wallpaper_method_info_set_wallpaper_uri.parent_struct,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _xdp_impl_wallpaper_interface_info =
{
  {
    -1,
    (gchar *) "org.freedesktop.impl.portal.Wallpaper",
    (GDBusMethodInfo **) &_xdp_impl_wallpaper_method_info_pointers,
    NULL,
    NULL,
    NULL
  },
  "wallpaper",
};


/**
 * xdp_impl_wallpaper_interface_info:
 *
 * Gets a machine-readable description of the <link linkend="gdbus-interface-org-freedesktop-impl-portal-Wallpaper.top_of_page">org.freedesktop.impl.portal.Wallpaper</link> D-Bus interface.
 *
 * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
 */
GDBusInterfaceInfo *
xdp_impl_wallpaper_interface_info (void)
{
  return (GDBusInterfaceInfo *) &_xdp_impl_wallpaper_interface_info.parent_struct;
}

/**
 * xdp_impl_wallpaper_override_properties:
 * @klass: The class structure for a #GObject derived class.
 * @property_id_begin: The property id to assign to the first overridden property.
 *
 * Overrides all #GObject properties in the #XdpImplWallpaper interface for a concrete class.
 * The properties are overridden in the order they are defined.
 *
 * Returns: The last property id.
 */
guint
xdp_impl_wallpaper_override_properties (GObjectClass *klass G_GNUC_UNUSED, guint property_id_begin)
{
  return property_id_begin - 1;
}


inline static void
xdp_impl_wallpaper_method_marshal_set_wallpaper_uri (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  _g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_STRING_STRING_STRING_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}


/**
 * XdpImplWallpaper:
 *
 * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-Wallpaper.top_of_page">org.freedesktop.impl.portal.Wallpaper</link>.
 */

/**
 * XdpImplWallpaperIface:
 * @parent_iface: The parent interface.
 * @handle_set_wallpaper_uri: Handler for the #XdpImplWallpaper::handle-set-wallpaper-uri signal.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-Wallpaper.top_of_page">org.freedesktop.impl.portal.Wallpaper</link>.
 */

typedef XdpImplWallpaperIface XdpImplWallpaperInterface;
G_DEFINE_INTERFACE (XdpImplWallpaper, xdp_impl_wallpaper, G_TYPE_OBJECT)

static void
xdp_impl_wallpaper_default_init (XdpImplWallpaperIface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * XdpImplWallpaper::handle-set-wallpaper-uri:
   * @object: A #XdpImplWallpaper.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_handle: Argument passed by remote caller.
   * @arg_app_id: Argument passed by remote caller.
   * @arg_parent_window: Argument passed by remote caller.
   * @arg_uri: Argument passed by remote caller.
   * @arg_options: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-impl-portal-Wallpaper.SetWallpaperURI">SetWallpaperURI()</link> 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 xdp_impl_wallpaper_complete_set_wallpaper_uri() 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.
   *
   * 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.
   */
  g_signal_new ("handle-set-wallpaper-uri",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpImplWallpaperIface, handle_set_wallpaper_uri),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_impl_wallpaper_method_marshal_set_wallpaper_uri,
    G_TYPE_BOOLEAN,
    6,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_VARIANT);

}

/**
 * xdp_impl_wallpaper_call_set_wallpaper_uri:
 * @proxy: A #XdpImplWallpaperProxy.
 * @arg_handle: Argument to pass with the method invocation.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_parent_window: Argument to pass with the method invocation.
 * @arg_uri: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-Wallpaper.SetWallpaperURI">SetWallpaperURI()</link> 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 xdp_impl_wallpaper_call_set_wallpaper_uri_finish() to get the result of the operation.
 *
 * See xdp_impl_wallpaper_call_set_wallpaper_uri_sync() for the synchronous, blocking version of this method.
 */
void
xdp_impl_wallpaper_call_set_wallpaper_uri (
    XdpImplWallpaper *proxy,
    const gchar *arg_handle,
    const gchar *arg_app_id,
    const gchar *arg_parent_window,
    const gchar *arg_uri,
    GVariant *arg_options,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "SetWallpaperURI",
    g_variant_new ("(osss@a{sv})",
                   arg_handle,
                   arg_app_id,
                   arg_parent_window,
                   arg_uri,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_impl_wallpaper_call_set_wallpaper_uri_finish:
 * @proxy: A #XdpImplWallpaperProxy.
 * @out_response: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_wallpaper_call_set_wallpaper_uri().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_impl_wallpaper_call_set_wallpaper_uri().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_wallpaper_call_set_wallpaper_uri_finish (
    XdpImplWallpaper *proxy,
    guint* out_response,
    GAsyncResult *res,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(u)",
                 out_response);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_wallpaper_call_set_wallpaper_uri_sync:
 * @proxy: A #XdpImplWallpaperProxy.
 * @arg_handle: Argument to pass with the method invocation.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_parent_window: Argument to pass with the method invocation.
 * @arg_uri: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @out_response: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-impl-portal-Wallpaper.SetWallpaperURI">SetWallpaperURI()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_wallpaper_call_set_wallpaper_uri() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_impl_wallpaper_call_set_wallpaper_uri_sync (
    XdpImplWallpaper *proxy,
    const gchar *arg_handle,
    const gchar *arg_app_id,
    const gchar *arg_parent_window,
    const gchar *arg_uri,
    GVariant *arg_options,
    guint* out_response,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "SetWallpaperURI",
    g_variant_new ("(osss@a{sv})",
                   arg_handle,
                   arg_app_id,
                   arg_parent_window,
                   arg_uri,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(u)",
                 out_response);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_impl_wallpaper_complete_set_wallpaper_uri:
 * @object: A #XdpImplWallpaper.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @response: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-impl-portal-Wallpaper.SetWallpaperURI">SetWallpaperURI()</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
xdp_impl_wallpaper_complete_set_wallpaper_uri (
    XdpImplWallpaper *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    guint response)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(u)",
                   response));
}

/* ------------------------------------------------------------------------ */

/**
 * XdpImplWallpaperProxy:
 *
 * The #XdpImplWallpaperProxy structure contains only private data and should only be accessed using the provided API.
 */

/**
 * XdpImplWallpaperProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpImplWallpaperProxy.
 */

struct _XdpImplWallpaperProxyPrivate
{
  GData *qdata;
};

static void xdp_impl_wallpaper_proxy_iface_init (XdpImplWallpaperIface *iface);

#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpImplWallpaperProxy, xdp_impl_wallpaper_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (XdpImplWallpaperProxy)
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_WALLPAPER, xdp_impl_wallpaper_proxy_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpImplWallpaperProxy, xdp_impl_wallpaper_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_WALLPAPER, xdp_impl_wallpaper_proxy_iface_init))

#endif
static void
xdp_impl_wallpaper_proxy_finalize (GObject *object)
{
  XdpImplWallpaperProxy *proxy = XDP_IMPL_WALLPAPER_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (xdp_impl_wallpaper_proxy_parent_class)->finalize (object);
}

static void
xdp_impl_wallpaper_proxy_get_property (GObject      *object G_GNUC_UNUSED,
  guint         prop_id G_GNUC_UNUSED,
  GValue       *value G_GNUC_UNUSED,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
}

static void
xdp_impl_wallpaper_proxy_set_property (GObject      *object G_GNUC_UNUSED,
  guint         prop_id G_GNUC_UNUSED,
  const GValue *value G_GNUC_UNUSED,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
}

static void
xdp_impl_wallpaper_proxy_g_signal (GDBusProxy *proxy,
  const gchar *sender_name G_GNUC_UNUSED,
  const gchar *signal_name,
  GVariant *parameters)
{
  _ExtendedGDBusSignalInfo *info;
  GVariantIter iter;
  GVariant *child;
  GValue *paramv;
  gsize num_params;
  gsize n;
  guint signal_id;
  info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_xdp_impl_wallpaper_interface_info.parent_struct, signal_name);
  if (info == NULL)
    return;
  num_params = g_variant_n_children (parameters);
  paramv = g_new0 (GValue, num_params + 1);
  g_value_init (&paramv[0], XDP_IMPL_TYPE_WALLPAPER);
  g_value_set_object (&paramv[0], proxy);
  g_variant_iter_init (&iter, parameters);
  n = 1;
  while ((child = g_variant_iter_next_value (&iter)) != NULL)
    {
      _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1];
      if (arg_info->use_gvariant)
        {
          g_value_init (&paramv[n], G_TYPE_VARIANT);
          g_value_set_variant (&paramv[n], child);
          n++;
        }
      else
        g_dbus_gvariant_to_gvalue (child, &paramv[n++]);
      g_variant_unref (child);
    }
  signal_id = g_signal_lookup (info->signal_name, XDP_IMPL_TYPE_WALLPAPER);
  g_signal_emitv (paramv, signal_id, 0, NULL);
  for (n = 0; n < num_params + 1; n++)
    g_value_unset (&paramv[n]);
  g_free (paramv);
}

static void
xdp_impl_wallpaper_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  XdpImplWallpaperProxy *proxy = XDP_IMPL_WALLPAPER_PROXY (_proxy);
  guint n;
  const gchar *key;
  GVariantIter *iter;
  _ExtendedGDBusPropertyInfo *info;
  g_variant_get (changed_properties, "a{sv}", &iter);
  while (g_variant_iter_next (iter, "{&sv}", &key, NULL))
    {
      info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_wallpaper_interface_info.parent_struct, key);
      g_datalist_remove_data (&proxy->priv->qdata, key);
      if (info != NULL)
        g_object_notify (G_OBJECT (proxy), info->hyphen_name);
    }
  g_variant_iter_free (iter);
  for (n = 0; invalidated_properties[n] != NULL; n++)
    {
      info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_wallpaper_interface_info.parent_struct, invalidated_properties[n]);
      g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]);
      if (info != NULL)
        g_object_notify (G_OBJECT (proxy), info->hyphen_name);
    }
}

static void
xdp_impl_wallpaper_proxy_init (XdpImplWallpaperProxy *proxy)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  proxy->priv = xdp_impl_wallpaper_proxy_get_instance_private (proxy);
#else
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, XDP_IMPL_TYPE_WALLPAPER_PROXY, XdpImplWallpaperProxyPrivate);
#endif

  g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), xdp_impl_wallpaper_interface_info ());
}

static void
xdp_impl_wallpaper_proxy_class_init (XdpImplWallpaperProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = xdp_impl_wallpaper_proxy_finalize;
  gobject_class->get_property = xdp_impl_wallpaper_proxy_get_property;
  gobject_class->set_property = xdp_impl_wallpaper_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = xdp_impl_wallpaper_proxy_g_signal;
  proxy_class->g_properties_changed = xdp_impl_wallpaper_proxy_g_properties_changed;

#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
  g_type_class_add_private (klass, sizeof (XdpImplWallpaperProxyPrivate));
#endif
}

static void
xdp_impl_wallpaper_proxy_iface_init (XdpImplWallpaperIface *iface G_GNUC_UNUSED)
{
}

/**
 * xdp_impl_wallpaper_proxy_new:
 * @connection: A #GDBusConnection.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-Wallpaper.top_of_page">org.freedesktop.impl.portal.Wallpaper</link>. 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 xdp_impl_wallpaper_proxy_new_finish() to get the result of the operation.
 *
 * See xdp_impl_wallpaper_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_impl_wallpaper_proxy_new (
    GDBusConnection     *connection,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GAsyncReadyCallback  callback,
    gpointer             user_data)
{
  g_async_initable_new_async (XDP_IMPL_TYPE_WALLPAPER_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.Wallpaper", NULL);
}

/**
 * xdp_impl_wallpaper_proxy_new_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_wallpaper_proxy_new().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_impl_wallpaper_proxy_new().
 *
 * Returns: (transfer full) (type XdpImplWallpaperProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplWallpaper *
xdp_impl_wallpaper_proxy_new_finish (
    GAsyncResult        *res,
    GError             **error)
{
  GObject *ret;
  GObject *source_object;
  source_object = g_async_result_get_source_object (res);
  ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
  g_object_unref (source_object);
  if (ret != NULL)
    return XDP_IMPL_WALLPAPER (ret);
  else
    return NULL;
}

/**
 * xdp_impl_wallpaper_proxy_new_sync:
 * @connection: A #GDBusConnection.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL
 *
 * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-Wallpaper.top_of_page">org.freedesktop.impl.portal.Wallpaper</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_wallpaper_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpImplWallpaperProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplWallpaper *
xdp_impl_wallpaper_proxy_new_sync (
    GDBusConnection     *connection,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GError             **error)
{
  GInitable *ret;
  ret = g_initable_new (XDP_IMPL_TYPE_WALLPAPER_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.Wallpaper", NULL);
  if (ret != NULL)
    return XDP_IMPL_WALLPAPER (ret);
  else
    return NULL;
}


/**
 * xdp_impl_wallpaper_proxy_new_for_bus:
 * @bus_type: A #GBusType.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: A bus name (well-known or unique).
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
 * @user_data: User data to pass to @callback.
 *
 * Like xdp_impl_wallpaper_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 xdp_impl_wallpaper_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See xdp_impl_wallpaper_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_impl_wallpaper_proxy_new_for_bus (
    GBusType             bus_type,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GAsyncReadyCallback  callback,
    gpointer             user_data)
{
  g_async_initable_new_async (XDP_IMPL_TYPE_WALLPAPER_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.Wallpaper", NULL);
}

/**
 * xdp_impl_wallpaper_proxy_new_for_bus_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_impl_wallpaper_proxy_new_for_bus().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_impl_wallpaper_proxy_new_for_bus().
 *
 * Returns: (transfer full) (type XdpImplWallpaperProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplWallpaper *
xdp_impl_wallpaper_proxy_new_for_bus_finish (
    GAsyncResult        *res,
    GError             **error)
{
  GObject *ret;
  GObject *source_object;
  source_object = g_async_result_get_source_object (res);
  ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
  g_object_unref (source_object);
  if (ret != NULL)
    return XDP_IMPL_WALLPAPER (ret);
  else
    return NULL;
}

/**
 * xdp_impl_wallpaper_proxy_new_for_bus_sync:
 * @bus_type: A #GBusType.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: A bus name (well-known or unique).
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL
 *
 * Like xdp_impl_wallpaper_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_impl_wallpaper_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpImplWallpaperProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpImplWallpaper *
xdp_impl_wallpaper_proxy_new_for_bus_sync (
    GBusType             bus_type,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GError             **error)
{
  GInitable *ret;
  ret = g_initable_new (XDP_IMPL_TYPE_WALLPAPER_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.impl.portal.Wallpaper", NULL);
  if (ret != NULL)
    return XDP_IMPL_WALLPAPER (ret);
  else
    return NULL;
}


/* ------------------------------------------------------------------------ */

/**
 * XdpImplWallpaperSkeleton:
 *
 * The #XdpImplWallpaperSkeleton structure contains only private data and should only be accessed using the provided API.
 */

/**
 * XdpImplWallpaperSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpImplWallpaperSkeleton.
 */

struct _XdpImplWallpaperSkeletonPrivate
{
  GValue *properties;
  GList *changed_properties;
  GSource *changed_properties_idle_source;
  GMainContext *context;
  GMutex lock;
};

static void
_xdp_impl_wallpaper_skeleton_handle_method_call (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name,
  const gchar *method_name,
  GVariant *parameters,
  GDBusMethodInvocation *invocation,
  gpointer user_data)
{
  XdpImplWallpaperSkeleton *skeleton = XDP_IMPL_WALLPAPER_SKELETON (user_data);
  _ExtendedGDBusMethodInfo *info;
  GVariantIter iter;
  GVariant *child;
  GValue *paramv;
  gsize num_params;
  guint num_extra;
  gsize n;
  guint signal_id;
  GValue return_value = G_VALUE_INIT;
  info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
  g_assert (info != NULL);
  num_params = g_variant_n_children (parameters);
  num_extra = info->pass_fdlist ? 3 : 2;  paramv = g_new0 (GValue, num_params + num_extra);
  n = 0;
  g_value_init (&paramv[n], XDP_IMPL_TYPE_WALLPAPER);
  g_value_set_object (&paramv[n++], skeleton);
  g_value_init (&paramv[n], G_TYPE_DBUS_METHOD_INVOCATION);
  g_value_set_object (&paramv[n++], invocation);
  if (info->pass_fdlist)
    {
#ifdef G_OS_UNIX
      g_value_init (&paramv[n], G_TYPE_UNIX_FD_LIST);
      g_value_set_object (&paramv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation)));
#else
      g_assert_not_reached ();
#endif
    }
  g_variant_iter_init (&iter, parameters);
  while ((child = g_variant_iter_next_value (&iter)) != NULL)
    {
      _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra];
      if (arg_info->use_gvariant)
        {
          g_value_init (&paramv[n], G_TYPE_VARIANT);
          g_value_set_variant (&paramv[n], child);
          n++;
        }
      else
        g_dbus_gvariant_to_gvalue (child, &paramv[n++]);
      g_variant_unref (child);
    }
  signal_id = g_signal_lookup (info->signal_name, XDP_IMPL_TYPE_WALLPAPER);
  g_value_init (&return_value, G_TYPE_BOOLEAN);
  g_signal_emitv (paramv, signal_id, 0, &return_value);
  if (!g_value_get_boolean (&return_value))
    g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD, "Method %s is not implemented on interface %s", method_name, interface_name);
  g_value_unset (&return_value);
  for (n = 0; n < num_params + num_extra; n++)
    g_value_unset (&paramv[n]);
  g_free (paramv);
}

static GVariant *
_xdp_impl_wallpaper_skeleton_handle_get_property (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name G_GNUC_UNUSED,
  const gchar *property_name,
  GError **error,
  gpointer user_data)
{
  XdpImplWallpaperSkeleton *skeleton = XDP_IMPL_WALLPAPER_SKELETON (user_data);
  GValue value = G_VALUE_INIT;
  GParamSpec *pspec;
  _ExtendedGDBusPropertyInfo *info;
  GVariant *ret;
  ret = NULL;
  info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_wallpaper_interface_info.parent_struct, property_name);
  g_assert (info != NULL);
  pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
  if (pspec == NULL)
    {
      g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
    }
  else
    {
      g_value_init (&value, pspec->value_type);
      g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value);
      ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature));
      g_value_unset (&value);
    }
  return ret;
}

static gboolean
_xdp_impl_wallpaper_skeleton_handle_set_property (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name G_GNUC_UNUSED,
  const gchar *property_name,
  GVariant *variant,
  GError **error,
  gpointer user_data)
{
  XdpImplWallpaperSkeleton *skeleton = XDP_IMPL_WALLPAPER_SKELETON (user_data);
  GValue value = G_VALUE_INIT;
  GParamSpec *pspec;
  _ExtendedGDBusPropertyInfo *info;
  gboolean ret;
  ret = FALSE;
  info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_xdp_impl_wallpaper_interface_info.parent_struct, property_name);
  g_assert (info != NULL);
  pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
  if (pspec == NULL)
    {
      g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
    }
  else
    {
      if (info->use_gvariant)
        g_value_set_variant (&value, variant);
      else
        g_dbus_gvariant_to_gvalue (variant, &value);
      g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value);
      g_value_unset (&value);
      ret = TRUE;
    }
  return ret;
}

static const GDBusInterfaceVTable _xdp_impl_wallpaper_skeleton_vtable =
{
  _xdp_impl_wallpaper_skeleton_handle_method_call,
  _xdp_impl_wallpaper_skeleton_handle_get_property,
  _xdp_impl_wallpaper_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
xdp_impl_wallpaper_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return xdp_impl_wallpaper_interface_info ();
}

static GDBusInterfaceVTable *
xdp_impl_wallpaper_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_xdp_impl_wallpaper_skeleton_vtable;
}

static GVariant *
xdp_impl_wallpaper_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  XdpImplWallpaperSkeleton *skeleton = XDP_IMPL_WALLPAPER_SKELETON (_skeleton);

  GVariantBuilder builder;
  guint n;
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_84
  g_variant_builder_init_static (&builder, G_VARIANT_TYPE ("a{sv}"));
#else
  g_variant_builder_init(&builder, G_VARIANT_TYPE ("a{sv}"));
#endif
  if (_xdp_impl_wallpaper_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _xdp_impl_wallpaper_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _xdp_impl_wallpaper_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _xdp_impl_wallpaper_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.impl.portal.Wallpaper", info->name, NULL, skeleton);
          if (value != NULL)
            {
              g_variant_take_ref (value);
              g_variant_builder_add (&builder, "{sv}", info->name, value);
              g_variant_unref (value);
            }
        }
    }
out:
  return g_variant_builder_end (&builder);
}

static void
xdp_impl_wallpaper_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton G_GNUC_UNUSED)
{
}

static void xdp_impl_wallpaper_skeleton_iface_init (XdpImplWallpaperIface *iface);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpImplWallpaperSkeleton, xdp_impl_wallpaper_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (XdpImplWallpaperSkeleton)
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_WALLPAPER, xdp_impl_wallpaper_skeleton_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpImplWallpaperSkeleton, xdp_impl_wallpaper_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (XDP_IMPL_TYPE_WALLPAPER, xdp_impl_wallpaper_skeleton_iface_init))

#endif
static void
xdp_impl_wallpaper_skeleton_finalize (GObject *object)
{
  XdpImplWallpaperSkeleton *skeleton = XDP_IMPL_WALLPAPER_SKELETON (object);
  g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  /* coverity[missing_lock : SUPPRESS] */
  g_clear_pointer (&skeleton->priv->changed_properties_idle_source, g_source_destroy);
#else
  if (skeleton->priv->changed_properties_idle_source != NULL)
    g_source_destroy (skeleton->priv->changed_properties_idle_source);
skeleton->priv->changed_properties_idle_source = NULL;
#endif
  g_main_context_unref (skeleton->priv->context);
  g_mutex_clear (&skeleton->priv->lock);
  G_OBJECT_CLASS (xdp_impl_wallpaper_skeleton_parent_class)->finalize (object);
}

static void
xdp_impl_wallpaper_skeleton_init (XdpImplWallpaperSkeleton *skeleton)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  skeleton->priv = xdp_impl_wallpaper_skeleton_get_instance_private (skeleton);
#else
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, XDP_IMPL_TYPE_WALLPAPER_SKELETON, XdpImplWallpaperSkeletonPrivate);
#endif

  g_mutex_init (&skeleton->priv->lock);
  skeleton->priv->context = g_main_context_ref_thread_default ();
}

static void
xdp_impl_wallpaper_skeleton_class_init (XdpImplWallpaperSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize = xdp_impl_wallpaper_skeleton_finalize;

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = xdp_impl_wallpaper_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = xdp_impl_wallpaper_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = xdp_impl_wallpaper_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = xdp_impl_wallpaper_skeleton_dbus_interface_get_vtable;

#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
  g_type_class_add_private (klass, sizeof (XdpImplWallpaperSkeletonPrivate));
#endif
}

static void
xdp_impl_wallpaper_skeleton_iface_init (XdpImplWallpaperIface *iface G_GNUC_UNUSED)
{
}

/**
 * xdp_impl_wallpaper_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-impl-portal-Wallpaper.top_of_page">org.freedesktop.impl.portal.Wallpaper</link>.
 *
 * Returns: (transfer full) (type XdpImplWallpaperSkeleton): The skeleton object.
 */
XdpImplWallpaper *
xdp_impl_wallpaper_skeleton_new (void)
{
  return XDP_IMPL_WALLPAPER (g_object_new (XDP_IMPL_TYPE_WALLPAPER_SKELETON, NULL));
}

