/*
 * 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 "xdp-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_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_window,
        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_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_ObjectVariantFunc)
       (void *data1,
        GDBusMethodInvocation *arg_method_invocation,
        GVariant *arg_options,
        void *data2);
  _GDbusCodegenMarshalBoolean_ObjectVariantFunc 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_ObjectVariantFunc)
    (marshal_data ? marshal_data : cc->callback);

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

  g_value_set_boolean (return_value, v_return);
}

static void
_g_dbus_codegen_marshal_BOOLEAN__OBJECT_OBJECT_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_ObjectObjectVariantFunc)
       (void *data1,
        GDBusMethodInvocation *arg_method_invocation,
        GUnixFDList *arg_fd_list,
        GVariant *arg_options,
        void *data2);
  _GDbusCodegenMarshalBoolean_ObjectObjectVariantFunc 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_ObjectObjectVariantFunc)
    (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_variant (param_values + 3),
              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_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 (
    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_OBJECT_VARIANT_BOOLEAN_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_ObjectObjectVariantBooleanBooleanFunc)
       (void *data1,
        GDBusMethodInvocation *arg_method_invocation,
        GUnixFDList *arg_fd_list,
        GVariant *arg_o_path_fd,
        gboolean arg_reuse_existing,
        gboolean arg_persistent,
        void *data2);
  _GDbusCodegenMarshalBoolean_ObjectObjectVariantBooleanBooleanFunc 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_ObjectObjectVariantBooleanBooleanFunc)
    (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_variant (param_values + 3),
              g_marshal_value_peek_boolean (param_values + 4),
              g_marshal_value_peek_boolean (param_values + 5),
              data2);

  g_value_set_boolean (return_value, v_return);
}

static void
_g_dbus_codegen_marshal_BOOLEAN__OBJECT_OBJECT_VARIANT_STRING_BOOLEAN_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_ObjectObjectVariantStringBooleanBooleanFunc)
       (void *data1,
        GDBusMethodInvocation *arg_method_invocation,
        GUnixFDList *arg_fd_list,
        GVariant *arg_o_path_parent_fd,
        const gchar *arg_filename,
        gboolean arg_reuse_existing,
        gboolean arg_persistent,
        void *data2);
  _GDbusCodegenMarshalBoolean_ObjectObjectVariantStringBooleanBooleanFunc 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_ObjectObjectVariantStringBooleanBooleanFunc)
    (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_variant (param_values + 3),
              g_marshal_value_peek_string (param_values + 4),
              g_marshal_value_peek_boolean (param_values + 5),
              g_marshal_value_peek_boolean (param_values + 6),
              data2);

  g_value_set_boolean (return_value, v_return);
}

static void
_g_dbus_codegen_marshal_BOOLEAN__OBJECT_OBJECT_VARIANT_UINT_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_ObjectObjectVariantUintStringBoxedFunc)
       (void *data1,
        GDBusMethodInvocation *arg_method_invocation,
        GUnixFDList *arg_fd_list,
        GVariant *arg_o_path_fds,
        guint arg_flags,
        const gchar *arg_app_id,
        const gchar *const *arg_permissions,
        void *data2);
  _GDbusCodegenMarshalBoolean_ObjectObjectVariantUintStringBoxedFunc 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_ObjectObjectVariantUintStringBoxedFunc)
    (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_variant (param_values + 3),
              g_marshal_value_peek_uint (param_values + 4),
              g_marshal_value_peek_string (param_values + 5),
              g_marshal_value_peek_boxed (param_values + 6),
              data2);

  g_value_set_boolean (return_value, v_return);
}

static void
_g_dbus_codegen_marshal_BOOLEAN__OBJECT_OBJECT_VARIANT_STRING_UINT_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_ObjectObjectVariantStringUintStringBoxedFunc)
       (void *data1,
        GDBusMethodInvocation *arg_method_invocation,
        GUnixFDList *arg_fd_list,
        GVariant *arg_o_path_fd,
        const gchar *arg_filename,
        guint arg_flags,
        const gchar *arg_app_id,
        const gchar *const *arg_permissions,
        void *data2);
  _GDbusCodegenMarshalBoolean_ObjectObjectVariantStringUintStringBoxedFunc 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_ObjectObjectVariantStringUintStringBoxedFunc)
    (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_variant (param_values + 3),
              g_marshal_value_peek_string (param_values + 4),
              g_marshal_value_peek_uint (param_values + 5),
              g_marshal_value_peek_string (param_values + 6),
              g_marshal_value_peek_boxed (param_values + 7),
              data2);

  g_value_set_boolean (return_value, v_return);
}

static void
_g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_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_ObjectStringStringBoxedFunc)
       (void *data1,
        GDBusMethodInvocation *arg_method_invocation,
        const gchar *arg_doc_id,
        const gchar *arg_app_id,
        const gchar *const *arg_permissions,
        void *data2);
  _GDbusCodegenMarshalBoolean_ObjectStringStringBoxedFunc 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_ObjectStringStringBoxedFunc)
    (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_boxed (param_values + 4),
              data2);

  g_value_set_boolean (return_value, v_return);
}

static void
_g_dbus_codegen_marshal_BOOLEAN__OBJECT_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_ObjectStringFunc)
       (void *data1,
        GDBusMethodInvocation *arg_method_invocation,
        const gchar *arg_doc_id,
        void *data2);
  _GDbusCodegenMarshalBoolean_ObjectStringFunc 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_ObjectStringFunc)
    (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),
              data2);

  g_value_set_boolean (return_value, v_return);
}

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_doc_ids,
        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 (
    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_token,
        const gchar *arg_desktop_file_id,
        const gchar *arg_desktop_entry,
        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_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_ObjectStringStringVariantVariantFunc)
       (void *data1,
        GDBusMethodInvocation *arg_method_invocation,
        const gchar *arg_parent_window,
        const gchar *arg_name,
        GVariant *arg_icon_v,
        GVariant *arg_options,
        void *data2);
  _GDbusCodegenMarshalBoolean_ObjectStringStringVariantVariantFunc 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_ObjectStringStringVariantVariantFunc)
    (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_variant (param_values + 5),
              data2);

  g_value_set_boolean (return_value, v_return);
}

static void
_g_dbus_codegen_marshal_BOOLEAN__OBJECT_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_ObjectStringVariantVariantFunc)
       (void *data1,
        GDBusMethodInvocation *arg_method_invocation,
        const gchar *arg_name,
        GVariant *arg_icon_v,
        GVariant *arg_options,
        void *data2);
  _GDbusCodegenMarshalBoolean_ObjectStringVariantVariantFunc 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_ObjectStringVariantVariantFunc)
    (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_variant (param_values + 4),
              data2);

  g_value_set_boolean (return_value, v_return);
}

static void
_g_dbus_codegen_marshal_BOOLEAN__OBJECT_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_ObjectObjectStringVariantFunc)
       (void *data1,
        GDBusMethodInvocation *arg_method_invocation,
        GUnixFDList *arg_fd_list,
        const gchar *arg_parent_window,
        GVariant *arg_options,
        void *data2);
  _GDbusCodegenMarshalBoolean_ObjectObjectStringVariantFunc 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_ObjectObjectStringVariantFunc)
    (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_variant (param_values + 4),
              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_parent_window,
        const gchar *arg_title,
        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_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_ObjectObjectStringVariantVariantFunc)
       (void *data1,
        GDBusMethodInvocation *arg_method_invocation,
        GUnixFDList *arg_fd_list,
        const gchar *arg_key,
        GVariant *arg_fds,
        GVariant *arg_options,
        void *data2);
  _GDbusCodegenMarshalBoolean_ObjectObjectStringVariantVariantFunc 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_ObjectObjectStringVariantVariantFunc)
    (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_variant (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_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_ObjectIntFunc)
       (void *data1,
        GDBusMethodInvocation *arg_method_invocation,
        gint arg_pid,
        void *data2);
  _GDbusCodegenMarshalBoolean_ObjectIntFunc 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_ObjectIntFunc)
    (marshal_data ? marshal_data : cc->callback);

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

  g_value_set_boolean (return_value, v_return);
}

static void
_g_dbus_codegen_marshal_BOOLEAN__OBJECT_INT_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_ObjectIntIntFunc)
       (void *data1,
        GDBusMethodInvocation *arg_method_invocation,
        gint arg_target,
        gint arg_requester,
        void *data2);
  _GDbusCodegenMarshalBoolean_ObjectIntIntFunc 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_ObjectIntIntFunc)
    (marshal_data ? marshal_data : cc->callback);

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

  g_value_set_boolean (return_value, v_return);
}

static void
_g_dbus_codegen_marshal_BOOLEAN__OBJECT_OBJECT_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_ObjectObjectVariantVariantFunc)
       (void *data1,
        GDBusMethodInvocation *arg_method_invocation,
        GUnixFDList *arg_fd_list,
        GVariant *arg_target,
        GVariant *arg_requester,
        void *data2);
  _GDbusCodegenMarshalBoolean_ObjectObjectVariantVariantFunc 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_ObjectObjectVariantVariantFunc)
    (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_variant (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_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_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_ObjectStringVariantStringVariantFunc)
       (void *data1,
        GDBusMethodInvocation *arg_method_invocation,
        const gchar *arg_session_handle,
        GVariant *arg_shortcuts,
        const gchar *arg_parent_window,
        GVariant *arg_options,
        void *data2);
  _GDbusCodegenMarshalBoolean_ObjectStringVariantStringVariantFunc 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_ObjectStringVariantStringVariantFunc)
    (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_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_UINT_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_ObjectStringUintVariantFunc)
       (void *data1,
        GDBusMethodInvocation *arg_method_invocation,
        const gchar *arg_window,
        guint arg_flags,
        GVariant *arg_options,
        void *data2);
  _GDbusCodegenMarshalBoolean_ObjectStringUintVariantFunc 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_ObjectStringUintVariantFunc)
    (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_variant (param_values + 4),
              data2);

  g_value_set_boolean (return_value, v_return);
}

static void
_g_dbus_codegen_marshal_BOOLEAN__OBJECT_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_ObjectStringVariantVariantUintFunc)
       (void *data1,
        GDBusMethodInvocation *arg_method_invocation,
        const gchar *arg_session_handle,
        GVariant *arg_options,
        GVariant *arg_barriers,
        guint arg_zone_set,
        void *data2);
  _GDbusCodegenMarshalBoolean_ObjectStringVariantVariantUintFunc 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_ObjectStringVariantVariantUintFunc)
    (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_variant (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_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_ObjectStringUintFunc)
       (void *data1,
        GDBusMethodInvocation *arg_method_invocation,
        const gchar *arg_hostname,
        guint arg_port,
        void *data2);
  _GDbusCodegenMarshalBoolean_ObjectStringUintFunc 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_ObjectStringUintFunc)
    (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),
              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_id,
        const gchar *arg_action,
        GVariant *arg_parameter,
        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_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_ObjectStringStringVariantVariantVariantFunc)
       (void *data1,
        GDBusMethodInvocation *arg_method_invocation,
        const gchar *arg_parent_window,
        const gchar *arg_title,
        GVariant *arg_settings,
        GVariant *arg_page_setup,
        GVariant *arg_options,
        void *data2);
  _GDbusCodegenMarshalBoolean_ObjectStringStringVariantVariantVariantFunc 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_ObjectStringStringVariantVariantVariantFunc)
    (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_variant (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_OBJECT_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_ObjectObjectStringStringVariantVariantFunc)
       (void *data1,
        GDBusMethodInvocation *arg_method_invocation,
        GUnixFDList *arg_fd_list,
        const gchar *arg_parent_window,
        const gchar *arg_title,
        GVariant *arg_fd,
        GVariant *arg_options,
        void *data2);
  _GDbusCodegenMarshalBoolean_ObjectObjectStringStringVariantVariantFunc 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_ObjectObjectStringStringVariantVariantFunc)
    (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),
              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_UINT64_UINT64_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_ObjectUint64Uint64UintFunc)
       (void *data1,
        GDBusMethodInvocation *arg_method_invocation,
        guint64 arg_process,
        guint64 arg_thread,
        guint arg_priority,
        void *data2);
  _GDbusCodegenMarshalBoolean_ObjectUint64Uint64UintFunc 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_ObjectUint64Uint64UintFunc)
    (marshal_data ? marshal_data : cc->callback);

  v_return =
    callback (data1,
              g_marshal_value_peek_object (param_values + 1),
              g_marshal_value_peek_uint64 (param_values + 2),
              g_marshal_value_peek_uint64 (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_UINT64_UINT64_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_ObjectUint64Uint64IntFunc)
       (void *data1,
        GDBusMethodInvocation *arg_method_invocation,
        guint64 arg_process,
        guint64 arg_thread,
        gint arg_priority,
        void *data2);
  _GDbusCodegenMarshalBoolean_ObjectUint64Uint64IntFunc 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_ObjectUint64Uint64IntFunc)
    (marshal_data ? marshal_data : cc->callback);

  v_return =
    callback (data1,
              g_marshal_value_peek_object (param_values + 1),
              g_marshal_value_peek_uint64 (param_values + 2),
              g_marshal_value_peek_uint64 (param_values + 3),
              g_marshal_value_peek_int (param_values + 4),
              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__UINT_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_UintVariantFunc)
       (void *data1,
        guint arg_response,
        GVariant *arg_results,
        void *data2);
  _GDbusCodegenMarshalVoid_UintVariantFunc 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_UintVariantFunc)
    (marshal_data ? marshal_data : cc->callback);

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

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_namespace,
        const gchar *arg_key,
        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_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_ObjectBoxedVariantFunc)
       (void *data1,
        GDBusMethodInvocation *arg_method_invocation,
        const gchar *const *arg_devices,
        GVariant *arg_options,
        void *data2);
  _GDbusCodegenMarshalBoolean_ObjectBoxedVariantFunc 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_ObjectBoxedVariantFunc)
    (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),
              g_marshal_value_peek_variant (param_values + 3),
              data2);

  g_value_set_boolean (return_value, v_return);
}

static void
_g_dbus_codegen_marshal_VOID__UINT_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_UintUintFunc)
       (void *data1,
        guint arg_pid,
        guint arg_relpid,
        void *data2);
  _GDbusCodegenMarshalVoid_UintUintFunc 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_UintUintFunc)
    (marshal_data ? marshal_data : cc->callback);

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

static void
_g_dbus_codegen_marshal_BOOLEAN__OBJECT_OBJECT_STRING_BOXED_VARIANT_VARIANT_UINT_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_ObjectObjectStringBoxedVariantVariantUintVariantFunc)
       (void *data1,
        GDBusMethodInvocation *arg_method_invocation,
        GUnixFDList *arg_fd_list,
        const gchar *arg_cwd_path,
        const gchar *const *arg_argv,
        GVariant *arg_fds,
        GVariant *arg_envs,
        guint arg_flags,
        GVariant *arg_options,
        void *data2);
  _GDbusCodegenMarshalBoolean_ObjectObjectStringBoxedVariantVariantUintVariantFunc 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_ObjectObjectStringBoxedVariantVariantUintVariantFunc)
    (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_boxed (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),
              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_UINT_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_ObjectUintUintBooleanFunc)
       (void *data1,
        GDBusMethodInvocation *arg_method_invocation,
        guint arg_pid,
        guint arg_signal,
        gboolean arg_to_process_group,
        void *data2);
  _GDbusCodegenMarshalBoolean_ObjectUintUintBooleanFunc 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_ObjectUintUintBooleanFunc)
    (marshal_data ? marshal_data : cc->callback);

  v_return =
    callback (data1,
              g_marshal_value_peek_object (param_values + 1),
              g_marshal_value_peek_uint (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);
}

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

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

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

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

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

static const GDBusArgInfo * const _xdp_dbus_account_method_info_get_user_information_IN_ARG_pointers[] =
{
  &_xdp_dbus_account_method_info_get_user_information_IN_ARG_window.parent_struct,
  &_xdp_dbus_account_method_info_get_user_information_IN_ARG_options.parent_struct,
  NULL
};

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

static const GDBusArgInfo * const _xdp_dbus_account_method_info_get_user_information_OUT_ARG_pointers[] =
{
  &_xdp_dbus_account_method_info_get_user_information_OUT_ARG_handle.parent_struct,
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_account_method_get_user_information_annotation_info_pointers[] =
{
  &_xdp_dbus_account_method_get_user_information_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_account_method_info_get_user_information =
{
  {
    -1,
    (gchar *) "GetUserInformation",
    (GDBusArgInfo **) &_xdp_dbus_account_method_info_get_user_information_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_account_method_info_get_user_information_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_dbus_account_method_get_user_information_annotation_info_pointers
  },
  "handle-get-user-information",
  FALSE
};

static const GDBusMethodInfo * const _xdp_dbus_account_method_info_pointers[] =
{
  &_xdp_dbus_account_method_info_get_user_information.parent_struct,
  NULL
};

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

static const GDBusPropertyInfo * const _xdp_dbus_account_property_info_pointers[] =
{
  &_xdp_dbus_account_property_info_version.parent_struct,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _xdp_dbus_account_interface_info =
{
  {
    -1,
    (gchar *) "org.freedesktop.portal.Account",
    (GDBusMethodInfo **) &_xdp_dbus_account_method_info_pointers,
    NULL,
    (GDBusPropertyInfo **) &_xdp_dbus_account_property_info_pointers,
    NULL
  },
  "account",
};


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

/**
 * xdp_dbus_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 #XdpDbusAccount interface for a concrete class.
 * The properties are overridden in the order they are defined.
 *
 * Returns: The last property id.
 */
guint
xdp_dbus_account_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_dbus_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_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}


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

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

typedef XdpDbusAccountIface XdpDbusAccountInterface;
G_DEFINE_INTERFACE (XdpDbusAccount, xdp_dbus_account, G_TYPE_OBJECT)

static void
xdp_dbus_account_default_init (XdpDbusAccountIface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * XdpDbusAccount::handle-get-user-information:
   * @object: A #XdpDbusAccount.
   * @invocation: A #GDBusMethodInvocation.
   * @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-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_dbus_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 (XdpDbusAccountIface, handle_get_user_information),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_account_method_marshal_get_user_information,
    G_TYPE_BOOLEAN,
    3,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_VARIANT);

  /* GObject properties for D-Bus properties: */
  /**
   * XdpDbusAccount:version:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-portal-Account.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_dbus_account_get_version: (skip)
 * @object: A #XdpDbusAccount.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-portal-Account.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_dbus_account_get_version (XdpDbusAccount *object)
{
  g_return_val_if_fail (XDP_DBUS_IS_ACCOUNT (object), 0);

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

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

/**
 * xdp_dbus_account_call_get_user_information:
 * @proxy: A #XdpDbusAccountProxy.
 * @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-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_dbus_account_call_get_user_information_finish() to get the result of the operation.
 *
 * See xdp_dbus_account_call_get_user_information_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_account_call_get_user_information (
    XdpDbusAccount *proxy,
    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 ("(s@a{sv})",
                   arg_window,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_account_call_get_user_information_finish:
 * @proxy: A #XdpDbusAccountProxy.
 * @out_handle: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_account_call_get_user_information().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_account_call_get_user_information().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_account_call_get_user_information_finish (
    XdpDbusAccount *proxy,
    gchar ** out_handle,
    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,
                 "(o)",
                 out_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_account_call_get_user_information_sync:
 * @proxy: A #XdpDbusAccountProxy.
 * @arg_window: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @out_handle: (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-portal-Account.GetUserInformation">GetUserInformation()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_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_dbus_account_call_get_user_information_sync (
    XdpDbusAccount *proxy,
    const gchar *arg_window,
    GVariant *arg_options,
    gchar ** out_handle,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "GetUserInformation",
    g_variant_new ("(s@a{sv})",
                   arg_window,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(o)",
                 out_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_account_complete_get_user_information:
 * @object: A #XdpDbusAccount.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @handle: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-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_dbus_account_complete_get_user_information (
    XdpDbusAccount *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    const gchar *handle)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(o)",
                   handle));
}

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

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

/**
 * XdpDbusAccountProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpDbusAccountProxy.
 */

struct _XdpDbusAccountProxyPrivate
{
  GData *qdata;
};

static void xdp_dbus_account_proxy_iface_init (XdpDbusAccountIface *iface);

#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpDbusAccountProxy, xdp_dbus_account_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (XdpDbusAccountProxy)
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_ACCOUNT, xdp_dbus_account_proxy_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpDbusAccountProxy, xdp_dbus_account_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_ACCOUNT, xdp_dbus_account_proxy_iface_init))

#endif
static void
xdp_dbus_account_proxy_finalize (GObject *object)
{
  XdpDbusAccountProxy *proxy = XDP_DBUS_ACCOUNT_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (xdp_dbus_account_proxy_parent_class)->finalize (object);
}

static void
xdp_dbus_account_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_dbus_account_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_dbus_account_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.portal.Account: %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_dbus_account_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_dbus_account_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.portal.Account", info->parent_struct.name, variant),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    NULL, (GAsyncReadyCallback) xdp_dbus_account_proxy_set_property_cb, (GDBusPropertyInfo *) &info->parent_struct);
  g_variant_unref (variant);
}

static void
xdp_dbus_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_dbus_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_DBUS_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_DBUS_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_dbus_account_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  XdpDbusAccountProxy *proxy = XDP_DBUS_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_dbus_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_dbus_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 guint 
xdp_dbus_account_proxy_get_version (XdpDbusAccount *object)
{
  XdpDbusAccountProxy *proxy = XDP_DBUS_ACCOUNT_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_dbus_account_proxy_init (XdpDbusAccountProxy *proxy)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  proxy->priv = xdp_dbus_account_proxy_get_instance_private (proxy);
#else
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, XDP_DBUS_TYPE_ACCOUNT_PROXY, XdpDbusAccountProxyPrivate);
#endif

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

static void
xdp_dbus_account_proxy_class_init (XdpDbusAccountProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = xdp_dbus_account_proxy_finalize;
  gobject_class->get_property = xdp_dbus_account_proxy_get_property;
  gobject_class->set_property = xdp_dbus_account_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = xdp_dbus_account_proxy_g_signal;
  proxy_class->g_properties_changed = xdp_dbus_account_proxy_g_properties_changed;

  xdp_dbus_account_override_properties (gobject_class, 1);

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

static void
xdp_dbus_account_proxy_iface_init (XdpDbusAccountIface *iface)
{
  iface->get_version = xdp_dbus_account_proxy_get_version;
}

/**
 * xdp_dbus_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-portal-Account.top_of_page">org.freedesktop.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_dbus_account_proxy_new_finish() to get the result of the operation.
 *
 * See xdp_dbus_account_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_dbus_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_DBUS_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.portal.Account", NULL);
}

/**
 * xdp_dbus_account_proxy_new_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_account_proxy_new().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_dbus_account_proxy_new().
 *
 * Returns: (transfer full) (type XdpDbusAccountProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusAccount *
xdp_dbus_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_DBUS_ACCOUNT (ret);
  else
    return NULL;
}

/**
 * xdp_dbus_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-portal-Account.top_of_page">org.freedesktop.portal.Account</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_account_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpDbusAccountProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusAccount *
xdp_dbus_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_DBUS_TYPE_ACCOUNT_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.portal.Account", NULL);
  if (ret != NULL)
    return XDP_DBUS_ACCOUNT (ret);
  else
    return NULL;
}


/**
 * xdp_dbus_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_dbus_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_dbus_account_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See xdp_dbus_account_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_dbus_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_DBUS_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.portal.Account", NULL);
}

/**
 * xdp_dbus_account_proxy_new_for_bus_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_account_proxy_new_for_bus().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_dbus_account_proxy_new_for_bus().
 *
 * Returns: (transfer full) (type XdpDbusAccountProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusAccount *
xdp_dbus_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_DBUS_ACCOUNT (ret);
  else
    return NULL;
}

/**
 * xdp_dbus_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_dbus_account_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_account_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpDbusAccountProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusAccount *
xdp_dbus_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_DBUS_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.portal.Account", NULL);
  if (ret != NULL)
    return XDP_DBUS_ACCOUNT (ret);
  else
    return NULL;
}


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

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

/**
 * XdpDbusAccountSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpDbusAccountSkeleton.
 */

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

static void
_xdp_dbus_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)
{
  XdpDbusAccountSkeleton *skeleton = XDP_DBUS_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_DBUS_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_DBUS_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_dbus_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)
{
  XdpDbusAccountSkeleton *skeleton = XDP_DBUS_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_dbus_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_dbus_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)
{
  XdpDbusAccountSkeleton *skeleton = XDP_DBUS_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_dbus_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_dbus_account_skeleton_vtable =
{
  _xdp_dbus_account_skeleton_handle_method_call,
  _xdp_dbus_account_skeleton_handle_get_property,
  _xdp_dbus_account_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
xdp_dbus_account_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return xdp_dbus_account_interface_info ();
}

static GDBusInterfaceVTable *
xdp_dbus_account_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_xdp_dbus_account_skeleton_vtable;
}

static GVariant *
xdp_dbus_account_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  XdpDbusAccountSkeleton *skeleton = XDP_DBUS_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_dbus_account_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _xdp_dbus_account_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _xdp_dbus_account_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _xdp_dbus_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.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 gboolean _xdp_dbus_account_emit_changed (gpointer user_data);

static void
xdp_dbus_account_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
{
  XdpDbusAccountSkeleton *skeleton = XDP_DBUS_ACCOUNT_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_dbus_account_emit_changed (skeleton);
}

static void xdp_dbus_account_skeleton_iface_init (XdpDbusAccountIface *iface);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpDbusAccountSkeleton, xdp_dbus_account_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (XdpDbusAccountSkeleton)
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_ACCOUNT, xdp_dbus_account_skeleton_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpDbusAccountSkeleton, xdp_dbus_account_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_ACCOUNT, xdp_dbus_account_skeleton_iface_init))

#endif
static void
xdp_dbus_account_skeleton_finalize (GObject *object)
{
  XdpDbusAccountSkeleton *skeleton = XDP_DBUS_ACCOUNT_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_dbus_account_skeleton_parent_class)->finalize (object);
}

static void
xdp_dbus_account_skeleton_get_property (GObject      *object,
  guint         prop_id,
  GValue       *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  XdpDbusAccountSkeleton *skeleton = XDP_DBUS_ACCOUNT_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_dbus_account_emit_changed (gpointer user_data)
{
  XdpDbusAccountSkeleton *skeleton = XDP_DBUS_ACCOUNT_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.portal.Account",
                                           &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_dbus_account_schedule_emit_changed (XdpDbusAccountSkeleton *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_dbus_account_skeleton_notify (GObject      *object,
  GParamSpec *pspec G_GNUC_UNUSED)
{
  XdpDbusAccountSkeleton *skeleton = XDP_DBUS_ACCOUNT_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_dbus_account_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
      g_source_set_name (skeleton->priv->changed_properties_idle_source, "[generated] _xdp_dbus_account_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_dbus_account_skeleton_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec)
{
  const _ExtendedGDBusPropertyInfo *info;
  XdpDbusAccountSkeleton *skeleton = XDP_DBUS_ACCOUNT_SKELETON (object);
  g_assert (prop_id != 0 && prop_id - 1 < 1);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_dbus_account_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_dbus_account_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_dbus_account_skeleton_init (XdpDbusAccountSkeleton *skeleton)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  skeleton->priv = xdp_dbus_account_skeleton_get_instance_private (skeleton);
#else
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, XDP_DBUS_TYPE_ACCOUNT_SKELETON, XdpDbusAccountSkeletonPrivate);
#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_dbus_account_skeleton_get_version (XdpDbusAccount *object)
{
  XdpDbusAccountSkeleton *skeleton = XDP_DBUS_ACCOUNT_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_dbus_account_skeleton_class_init (XdpDbusAccountSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize = xdp_dbus_account_skeleton_finalize;
  gobject_class->get_property = xdp_dbus_account_skeleton_get_property;
  gobject_class->set_property = xdp_dbus_account_skeleton_set_property;
  gobject_class->notify       = xdp_dbus_account_skeleton_notify;


  xdp_dbus_account_override_properties (gobject_class, 1);

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = xdp_dbus_account_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = xdp_dbus_account_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = xdp_dbus_account_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = xdp_dbus_account_skeleton_dbus_interface_get_vtable;

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

static void
xdp_dbus_account_skeleton_iface_init (XdpDbusAccountIface *iface)
{
  iface->get_version = xdp_dbus_account_skeleton_get_version;
}

/**
 * xdp_dbus_account_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-Account.top_of_page">org.freedesktop.portal.Account</link>.
 *
 * Returns: (transfer full) (type XdpDbusAccountSkeleton): The skeleton object.
 */
XdpDbusAccount *
xdp_dbus_account_skeleton_new (void)
{
  return XDP_DBUS_ACCOUNT (g_object_new (XDP_DBUS_TYPE_ACCOUNT_SKELETON, NULL));
}

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

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

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

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

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

static const GDBusArgInfo * const _xdp_dbus_background_method_info_request_background_IN_ARG_pointers[] =
{
  &_xdp_dbus_background_method_info_request_background_IN_ARG_parent_window.parent_struct,
  &_xdp_dbus_background_method_info_request_background_IN_ARG_options.parent_struct,
  NULL
};

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

static const GDBusArgInfo * const _xdp_dbus_background_method_info_request_background_OUT_ARG_pointers[] =
{
  &_xdp_dbus_background_method_info_request_background_OUT_ARG_handle.parent_struct,
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_background_method_request_background_annotation_info_pointers[] =
{
  &_xdp_dbus_background_method_request_background_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_background_method_info_request_background =
{
  {
    -1,
    (gchar *) "RequestBackground",
    (GDBusArgInfo **) &_xdp_dbus_background_method_info_request_background_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_background_method_info_request_background_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_dbus_background_method_request_background_annotation_info_pointers
  },
  "handle-request-background",
  FALSE
};

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

static const GDBusArgInfo * const _xdp_dbus_background_method_info_set_status_IN_ARG_pointers[] =
{
  &_xdp_dbus_background_method_info_set_status_IN_ARG_options.parent_struct,
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_background_method_set_status_annotation_info_pointers[] =
{
  &_xdp_dbus_background_method_set_status_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_background_method_info_set_status =
{
  {
    -1,
    (gchar *) "SetStatus",
    (GDBusArgInfo **) &_xdp_dbus_background_method_info_set_status_IN_ARG_pointers,
    NULL,
    (GDBusAnnotationInfo **) &_xdp_dbus_background_method_set_status_annotation_info_pointers
  },
  "handle-set-status",
  FALSE
};

static const GDBusMethodInfo * const _xdp_dbus_background_method_info_pointers[] =
{
  &_xdp_dbus_background_method_info_request_background.parent_struct,
  &_xdp_dbus_background_method_info_set_status.parent_struct,
  NULL
};

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

static const GDBusPropertyInfo * const _xdp_dbus_background_property_info_pointers[] =
{
  &_xdp_dbus_background_property_info_version.parent_struct,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _xdp_dbus_background_interface_info =
{
  {
    -1,
    (gchar *) "org.freedesktop.portal.Background",
    (GDBusMethodInfo **) &_xdp_dbus_background_method_info_pointers,
    NULL,
    (GDBusPropertyInfo **) &_xdp_dbus_background_property_info_pointers,
    NULL
  },
  "background",
};


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

/**
 * xdp_dbus_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 #XdpDbusBackground interface for a concrete class.
 * The properties are overridden in the order they are defined.
 *
 * Returns: The last property id.
 */
guint
xdp_dbus_background_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_dbus_background_method_marshal_request_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_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_dbus_background_method_marshal_set_status (
    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_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}


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

/**
 * XdpDbusBackgroundIface:
 * @parent_iface: The parent interface.
 * @handle_request_background: Handler for the #XdpDbusBackground::handle-request-background signal.
 * @handle_set_status: Handler for the #XdpDbusBackground::handle-set-status signal.
 * @get_version: Getter for the #XdpDbusBackground:version property.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-Background.top_of_page">org.freedesktop.portal.Background</link>.
 */

typedef XdpDbusBackgroundIface XdpDbusBackgroundInterface;
G_DEFINE_INTERFACE (XdpDbusBackground, xdp_dbus_background, G_TYPE_OBJECT)

static void
xdp_dbus_background_default_init (XdpDbusBackgroundIface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * XdpDbusBackground::handle-request-background:
   * @object: A #XdpDbusBackground.
   * @invocation: A #GDBusMethodInvocation.
   * @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-portal-Background.RequestBackground">RequestBackground()</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_dbus_background_complete_request_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-request-background",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpDbusBackgroundIface, handle_request_background),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_background_method_marshal_request_background,
    G_TYPE_BOOLEAN,
    3,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_VARIANT);

  /**
   * XdpDbusBackground::handle-set-status:
   * @object: A #XdpDbusBackground.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_options: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-portal-Background.SetStatus">SetStatus()</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_dbus_background_complete_set_status() 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-status",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpDbusBackgroundIface, handle_set_status),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_background_method_marshal_set_status,
    G_TYPE_BOOLEAN,
    2,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_VARIANT);

  /* GObject properties for D-Bus properties: */
  /**
   * XdpDbusBackground:version:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-portal-Background.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_dbus_background_get_version: (skip)
 * @object: A #XdpDbusBackground.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-portal-Background.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_dbus_background_get_version (XdpDbusBackground *object)
{
  g_return_val_if_fail (XDP_DBUS_IS_BACKGROUND (object), 0);

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

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

/**
 * xdp_dbus_background_call_request_background:
 * @proxy: A #XdpDbusBackgroundProxy.
 * @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-portal-Background.RequestBackground">RequestBackground()</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_dbus_background_call_request_background_finish() to get the result of the operation.
 *
 * See xdp_dbus_background_call_request_background_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_background_call_request_background (
    XdpDbusBackground *proxy,
    const gchar *arg_parent_window,
    GVariant *arg_options,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "RequestBackground",
    g_variant_new ("(s@a{sv})",
                   arg_parent_window,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_background_call_request_background_finish:
 * @proxy: A #XdpDbusBackgroundProxy.
 * @out_handle: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_background_call_request_background().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_background_call_request_background().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_background_call_request_background_finish (
    XdpDbusBackground *proxy,
    gchar ** out_handle,
    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,
                 "(o)",
                 out_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_background_call_request_background_sync:
 * @proxy: A #XdpDbusBackgroundProxy.
 * @arg_parent_window: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @out_handle: (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-portal-Background.RequestBackground">RequestBackground()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_background_call_request_background() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_background_call_request_background_sync (
    XdpDbusBackground *proxy,
    const gchar *arg_parent_window,
    GVariant *arg_options,
    gchar ** out_handle,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "RequestBackground",
    g_variant_new ("(s@a{sv})",
                   arg_parent_window,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(o)",
                 out_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_background_call_set_status:
 * @proxy: A #XdpDbusBackgroundProxy.
 * @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-portal-Background.SetStatus">SetStatus()</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_dbus_background_call_set_status_finish() to get the result of the operation.
 *
 * See xdp_dbus_background_call_set_status_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_background_call_set_status (
    XdpDbusBackground *proxy,
    GVariant *arg_options,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "SetStatus",
    g_variant_new ("(@a{sv})",
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_background_call_set_status_finish:
 * @proxy: A #XdpDbusBackgroundProxy.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_background_call_set_status().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_background_call_set_status().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_background_call_set_status_finish (
    XdpDbusBackground *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_dbus_background_call_set_status_sync:
 * @proxy: A #XdpDbusBackgroundProxy.
 * @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-portal-Background.SetStatus">SetStatus()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_background_call_set_status() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_background_call_set_status_sync (
    XdpDbusBackground *proxy,
    GVariant *arg_options,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "SetStatus",
    g_variant_new ("(@a{sv})",
                   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_dbus_background_complete_request_background:
 * @object: A #XdpDbusBackground.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @handle: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-portal-Background.RequestBackground">RequestBackground()</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_dbus_background_complete_request_background (
    XdpDbusBackground *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    const gchar *handle)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(o)",
                   handle));
}

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

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

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

/**
 * XdpDbusBackgroundProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpDbusBackgroundProxy.
 */

struct _XdpDbusBackgroundProxyPrivate
{
  GData *qdata;
};

static void xdp_dbus_background_proxy_iface_init (XdpDbusBackgroundIface *iface);

#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpDbusBackgroundProxy, xdp_dbus_background_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (XdpDbusBackgroundProxy)
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_BACKGROUND, xdp_dbus_background_proxy_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpDbusBackgroundProxy, xdp_dbus_background_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_BACKGROUND, xdp_dbus_background_proxy_iface_init))

#endif
static void
xdp_dbus_background_proxy_finalize (GObject *object)
{
  XdpDbusBackgroundProxy *proxy = XDP_DBUS_BACKGROUND_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (xdp_dbus_background_proxy_parent_class)->finalize (object);
}

static void
xdp_dbus_background_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_dbus_background_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_dbus_background_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.portal.Background: %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_dbus_background_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_dbus_background_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.portal.Background", info->parent_struct.name, variant),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    NULL, (GAsyncReadyCallback) xdp_dbus_background_proxy_set_property_cb, (GDBusPropertyInfo *) &info->parent_struct);
  g_variant_unref (variant);
}

static void
xdp_dbus_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_dbus_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_DBUS_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_DBUS_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_dbus_background_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  XdpDbusBackgroundProxy *proxy = XDP_DBUS_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_dbus_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_dbus_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 guint 
xdp_dbus_background_proxy_get_version (XdpDbusBackground *object)
{
  XdpDbusBackgroundProxy *proxy = XDP_DBUS_BACKGROUND_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_dbus_background_proxy_init (XdpDbusBackgroundProxy *proxy)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  proxy->priv = xdp_dbus_background_proxy_get_instance_private (proxy);
#else
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, XDP_DBUS_TYPE_BACKGROUND_PROXY, XdpDbusBackgroundProxyPrivate);
#endif

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

static void
xdp_dbus_background_proxy_class_init (XdpDbusBackgroundProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = xdp_dbus_background_proxy_finalize;
  gobject_class->get_property = xdp_dbus_background_proxy_get_property;
  gobject_class->set_property = xdp_dbus_background_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = xdp_dbus_background_proxy_g_signal;
  proxy_class->g_properties_changed = xdp_dbus_background_proxy_g_properties_changed;

  xdp_dbus_background_override_properties (gobject_class, 1);

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

static void
xdp_dbus_background_proxy_iface_init (XdpDbusBackgroundIface *iface)
{
  iface->get_version = xdp_dbus_background_proxy_get_version;
}

/**
 * xdp_dbus_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-portal-Background.top_of_page">org.freedesktop.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_dbus_background_proxy_new_finish() to get the result of the operation.
 *
 * See xdp_dbus_background_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_dbus_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_DBUS_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.portal.Background", NULL);
}

/**
 * xdp_dbus_background_proxy_new_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_background_proxy_new().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_dbus_background_proxy_new().
 *
 * Returns: (transfer full) (type XdpDbusBackgroundProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusBackground *
xdp_dbus_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_DBUS_BACKGROUND (ret);
  else
    return NULL;
}

/**
 * xdp_dbus_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-portal-Background.top_of_page">org.freedesktop.portal.Background</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_background_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpDbusBackgroundProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusBackground *
xdp_dbus_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_DBUS_TYPE_BACKGROUND_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.portal.Background", NULL);
  if (ret != NULL)
    return XDP_DBUS_BACKGROUND (ret);
  else
    return NULL;
}


/**
 * xdp_dbus_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_dbus_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_dbus_background_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See xdp_dbus_background_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_dbus_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_DBUS_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.portal.Background", NULL);
}

/**
 * xdp_dbus_background_proxy_new_for_bus_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_background_proxy_new_for_bus().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_dbus_background_proxy_new_for_bus().
 *
 * Returns: (transfer full) (type XdpDbusBackgroundProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusBackground *
xdp_dbus_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_DBUS_BACKGROUND (ret);
  else
    return NULL;
}

/**
 * xdp_dbus_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_dbus_background_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_background_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpDbusBackgroundProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusBackground *
xdp_dbus_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_DBUS_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.portal.Background", NULL);
  if (ret != NULL)
    return XDP_DBUS_BACKGROUND (ret);
  else
    return NULL;
}


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

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

/**
 * XdpDbusBackgroundSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpDbusBackgroundSkeleton.
 */

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

static void
_xdp_dbus_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)
{
  XdpDbusBackgroundSkeleton *skeleton = XDP_DBUS_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_DBUS_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_DBUS_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_dbus_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)
{
  XdpDbusBackgroundSkeleton *skeleton = XDP_DBUS_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_dbus_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_dbus_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)
{
  XdpDbusBackgroundSkeleton *skeleton = XDP_DBUS_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_dbus_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_dbus_background_skeleton_vtable =
{
  _xdp_dbus_background_skeleton_handle_method_call,
  _xdp_dbus_background_skeleton_handle_get_property,
  _xdp_dbus_background_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
xdp_dbus_background_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return xdp_dbus_background_interface_info ();
}

static GDBusInterfaceVTable *
xdp_dbus_background_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_xdp_dbus_background_skeleton_vtable;
}

static GVariant *
xdp_dbus_background_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  XdpDbusBackgroundSkeleton *skeleton = XDP_DBUS_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_dbus_background_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _xdp_dbus_background_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _xdp_dbus_background_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _xdp_dbus_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.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 gboolean _xdp_dbus_background_emit_changed (gpointer user_data);

static void
xdp_dbus_background_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
{
  XdpDbusBackgroundSkeleton *skeleton = XDP_DBUS_BACKGROUND_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_dbus_background_emit_changed (skeleton);
}

static void xdp_dbus_background_skeleton_iface_init (XdpDbusBackgroundIface *iface);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpDbusBackgroundSkeleton, xdp_dbus_background_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (XdpDbusBackgroundSkeleton)
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_BACKGROUND, xdp_dbus_background_skeleton_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpDbusBackgroundSkeleton, xdp_dbus_background_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_BACKGROUND, xdp_dbus_background_skeleton_iface_init))

#endif
static void
xdp_dbus_background_skeleton_finalize (GObject *object)
{
  XdpDbusBackgroundSkeleton *skeleton = XDP_DBUS_BACKGROUND_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_dbus_background_skeleton_parent_class)->finalize (object);
}

static void
xdp_dbus_background_skeleton_get_property (GObject      *object,
  guint         prop_id,
  GValue       *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  XdpDbusBackgroundSkeleton *skeleton = XDP_DBUS_BACKGROUND_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_dbus_background_emit_changed (gpointer user_data)
{
  XdpDbusBackgroundSkeleton *skeleton = XDP_DBUS_BACKGROUND_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.portal.Background",
                                           &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_dbus_background_schedule_emit_changed (XdpDbusBackgroundSkeleton *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_dbus_background_skeleton_notify (GObject      *object,
  GParamSpec *pspec G_GNUC_UNUSED)
{
  XdpDbusBackgroundSkeleton *skeleton = XDP_DBUS_BACKGROUND_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_dbus_background_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
      g_source_set_name (skeleton->priv->changed_properties_idle_source, "[generated] _xdp_dbus_background_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_dbus_background_skeleton_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec)
{
  const _ExtendedGDBusPropertyInfo *info;
  XdpDbusBackgroundSkeleton *skeleton = XDP_DBUS_BACKGROUND_SKELETON (object);
  g_assert (prop_id != 0 && prop_id - 1 < 1);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_dbus_background_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_dbus_background_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_dbus_background_skeleton_init (XdpDbusBackgroundSkeleton *skeleton)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  skeleton->priv = xdp_dbus_background_skeleton_get_instance_private (skeleton);
#else
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, XDP_DBUS_TYPE_BACKGROUND_SKELETON, XdpDbusBackgroundSkeletonPrivate);
#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_dbus_background_skeleton_get_version (XdpDbusBackground *object)
{
  XdpDbusBackgroundSkeleton *skeleton = XDP_DBUS_BACKGROUND_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_dbus_background_skeleton_class_init (XdpDbusBackgroundSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize = xdp_dbus_background_skeleton_finalize;
  gobject_class->get_property = xdp_dbus_background_skeleton_get_property;
  gobject_class->set_property = xdp_dbus_background_skeleton_set_property;
  gobject_class->notify       = xdp_dbus_background_skeleton_notify;


  xdp_dbus_background_override_properties (gobject_class, 1);

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = xdp_dbus_background_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = xdp_dbus_background_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = xdp_dbus_background_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = xdp_dbus_background_skeleton_dbus_interface_get_vtable;

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

static void
xdp_dbus_background_skeleton_iface_init (XdpDbusBackgroundIface *iface)
{
  iface->get_version = xdp_dbus_background_skeleton_get_version;
}

/**
 * xdp_dbus_background_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-Background.top_of_page">org.freedesktop.portal.Background</link>.
 *
 * Returns: (transfer full) (type XdpDbusBackgroundSkeleton): The skeleton object.
 */
XdpDbusBackground *
xdp_dbus_background_skeleton_new (void)
{
  return XDP_DBUS_BACKGROUND (g_object_new (XDP_DBUS_TYPE_BACKGROUND_SKELETON, NULL));
}

/* ------------------------------------------------------------------------
 * Code for interface org.freedesktop.portal.Camera
 * ------------------------------------------------------------------------
 */

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

/* ---- Introspection data for org.freedesktop.portal.Camera ---- */

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

static const GDBusArgInfo * const _xdp_dbus_camera_method_info_access_camera_IN_ARG_pointers[] =
{
  &_xdp_dbus_camera_method_info_access_camera_IN_ARG_options.parent_struct,
  NULL
};

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

static const GDBusArgInfo * const _xdp_dbus_camera_method_info_access_camera_OUT_ARG_pointers[] =
{
  &_xdp_dbus_camera_method_info_access_camera_OUT_ARG_handle.parent_struct,
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_camera_method_access_camera_annotation_info_pointers[] =
{
  &_xdp_dbus_camera_method_access_camera_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_camera_method_info_access_camera =
{
  {
    -1,
    (gchar *) "AccessCamera",
    (GDBusArgInfo **) &_xdp_dbus_camera_method_info_access_camera_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_camera_method_info_access_camera_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_dbus_camera_method_access_camera_annotation_info_pointers
  },
  "handle-access-camera",
  FALSE
};

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

static const GDBusArgInfo * const _xdp_dbus_camera_method_info_open_pipewire_remote_IN_ARG_pointers[] =
{
  &_xdp_dbus_camera_method_info_open_pipewire_remote_IN_ARG_options.parent_struct,
  NULL
};

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

static const GDBusArgInfo * const _xdp_dbus_camera_method_info_open_pipewire_remote_OUT_ARG_pointers[] =
{
  &_xdp_dbus_camera_method_info_open_pipewire_remote_OUT_ARG_fd.parent_struct,
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_camera_method_open_pipewire_remote_annotation_info_pointers[] =
{
  &_xdp_dbus_camera_method_open_pipewire_remote_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_camera_method_info_open_pipewire_remote =
{
  {
    -1,
    (gchar *) "OpenPipeWireRemote",
    (GDBusArgInfo **) &_xdp_dbus_camera_method_info_open_pipewire_remote_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_camera_method_info_open_pipewire_remote_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_dbus_camera_method_open_pipewire_remote_annotation_info_pointers
  },
  "handle-open-pipewire-remote",
  TRUE
};

static const GDBusMethodInfo * const _xdp_dbus_camera_method_info_pointers[] =
{
  &_xdp_dbus_camera_method_info_access_camera.parent_struct,
  &_xdp_dbus_camera_method_info_open_pipewire_remote.parent_struct,
  NULL
};

static const _ExtendedGDBusPropertyInfo _xdp_dbus_camera_property_info_is_camera_present =
{
  {
    -1,
    (gchar *) "IsCameraPresent",
    (gchar *) "b",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "is-camera-present",
  FALSE,
  TRUE
};

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

static const GDBusPropertyInfo * const _xdp_dbus_camera_property_info_pointers[] =
{
  &_xdp_dbus_camera_property_info_is_camera_present.parent_struct,
  &_xdp_dbus_camera_property_info_version.parent_struct,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _xdp_dbus_camera_interface_info =
{
  {
    -1,
    (gchar *) "org.freedesktop.portal.Camera",
    (GDBusMethodInfo **) &_xdp_dbus_camera_method_info_pointers,
    NULL,
    (GDBusPropertyInfo **) &_xdp_dbus_camera_property_info_pointers,
    NULL
  },
  "camera",
};


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

/**
 * xdp_dbus_camera_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 #XdpDbusCamera interface for a concrete class.
 * The properties are overridden in the order they are defined.
 *
 * Returns: The last property id.
 */
guint
xdp_dbus_camera_override_properties (GObjectClass *klass, guint property_id_begin)
{
  g_object_class_override_property (klass, property_id_begin++, "is-camera-present");
  g_object_class_override_property (klass, property_id_begin++, "version");
  return property_id_begin - 1;
}


inline static void
xdp_dbus_camera_method_marshal_access_camera (
    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_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_dbus_camera_method_marshal_open_pipewire_remote (
    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_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}


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

/**
 * XdpDbusCameraIface:
 * @parent_iface: The parent interface.
 * @handle_access_camera: Handler for the #XdpDbusCamera::handle-access-camera signal.
 * @handle_open_pipewire_remote: Handler for the #XdpDbusCamera::handle-open-pipewire-remote signal.
 * @get_is_camera_present: Getter for the #XdpDbusCamera:is-camera-present property.
 * @get_version: Getter for the #XdpDbusCamera:version property.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-Camera.top_of_page">org.freedesktop.portal.Camera</link>.
 */

typedef XdpDbusCameraIface XdpDbusCameraInterface;
G_DEFINE_INTERFACE (XdpDbusCamera, xdp_dbus_camera, G_TYPE_OBJECT)

static void
xdp_dbus_camera_default_init (XdpDbusCameraIface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * XdpDbusCamera::handle-access-camera:
   * @object: A #XdpDbusCamera.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_options: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-portal-Camera.AccessCamera">AccessCamera()</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_dbus_camera_complete_access_camera() 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-camera",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpDbusCameraIface, handle_access_camera),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_camera_method_marshal_access_camera,
    G_TYPE_BOOLEAN,
    2,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_VARIANT);

  /**
   * XdpDbusCamera::handle-open-pipewire-remote:
   * @object: A #XdpDbusCamera.
   * @invocation: A #GDBusMethodInvocation.
   * @fd_list: (nullable): A #GUnixFDList or %NULL.
   * @arg_options: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-portal-Camera.OpenPipeWireRemote">OpenPipeWireRemote()</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_dbus_camera_complete_open_pipewire_remote() 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-pipewire-remote",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpDbusCameraIface, handle_open_pipewire_remote),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_camera_method_marshal_open_pipewire_remote,
    G_TYPE_BOOLEAN,
    3,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UNIX_FD_LIST, G_TYPE_VARIANT);

  /* GObject properties for D-Bus properties: */
  /**
   * XdpDbusCamera:is-camera-present:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-portal-Camera.IsCameraPresent">"IsCameraPresent"</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_boolean ("is-camera-present", "IsCameraPresent", "IsCameraPresent", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * XdpDbusCamera:version:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-portal-Camera.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_dbus_camera_get_is_camera_present: (skip)
 * @object: A #XdpDbusCamera.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-portal-Camera.IsCameraPresent">"IsCameraPresent"</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.
 */
gboolean 
xdp_dbus_camera_get_is_camera_present (XdpDbusCamera *object)
{
  g_return_val_if_fail (XDP_DBUS_IS_CAMERA (object), FALSE);

  return XDP_DBUS_CAMERA_GET_IFACE (object)->get_is_camera_present (object);
}

/**
 * xdp_dbus_camera_set_is_camera_present: (skip)
 * @object: A #XdpDbusCamera.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-freedesktop-portal-Camera.IsCameraPresent">"IsCameraPresent"</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_dbus_camera_set_is_camera_present (XdpDbusCamera *object, gboolean value)
{
  g_object_set (G_OBJECT (object), "is-camera-present", value, NULL);
}

/**
 * xdp_dbus_camera_get_version: (skip)
 * @object: A #XdpDbusCamera.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-portal-Camera.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_dbus_camera_get_version (XdpDbusCamera *object)
{
  g_return_val_if_fail (XDP_DBUS_IS_CAMERA (object), 0);

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

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

/**
 * xdp_dbus_camera_call_access_camera:
 * @proxy: A #XdpDbusCameraProxy.
 * @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-portal-Camera.AccessCamera">AccessCamera()</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_dbus_camera_call_access_camera_finish() to get the result of the operation.
 *
 * See xdp_dbus_camera_call_access_camera_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_camera_call_access_camera (
    XdpDbusCamera *proxy,
    GVariant *arg_options,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "AccessCamera",
    g_variant_new ("(@a{sv})",
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_camera_call_access_camera_finish:
 * @proxy: A #XdpDbusCameraProxy.
 * @out_handle: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_camera_call_access_camera().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_camera_call_access_camera().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_camera_call_access_camera_finish (
    XdpDbusCamera *proxy,
    gchar ** out_handle,
    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,
                 "(o)",
                 out_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_camera_call_access_camera_sync:
 * @proxy: A #XdpDbusCameraProxy.
 * @arg_options: Argument to pass with the method invocation.
 * @out_handle: (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-portal-Camera.AccessCamera">AccessCamera()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_camera_call_access_camera() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_camera_call_access_camera_sync (
    XdpDbusCamera *proxy,
    GVariant *arg_options,
    gchar ** out_handle,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "AccessCamera",
    g_variant_new ("(@a{sv})",
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(o)",
                 out_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_camera_call_open_pipewire_remote:
 * @proxy: A #XdpDbusCameraProxy.
 * @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-portal-Camera.OpenPipeWireRemote">OpenPipeWireRemote()</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_dbus_camera_call_open_pipewire_remote_finish() to get the result of the operation.
 *
 * See xdp_dbus_camera_call_open_pipewire_remote_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_camera_call_open_pipewire_remote (
    XdpDbusCamera *proxy,
    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),
    "OpenPipeWireRemote",
    g_variant_new ("(@a{sv})",
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    fd_list,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_camera_call_open_pipewire_remote_finish:
 * @proxy: A #XdpDbusCameraProxy.
 * @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_dbus_camera_call_open_pipewire_remote().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_camera_call_open_pipewire_remote().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_camera_call_open_pipewire_remote_finish (
    XdpDbusCamera *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_dbus_camera_call_open_pipewire_remote_sync:
 * @proxy: A #XdpDbusCameraProxy.
 * @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-portal-Camera.OpenPipeWireRemote">OpenPipeWireRemote()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_camera_call_open_pipewire_remote() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_camera_call_open_pipewire_remote_sync (
    XdpDbusCamera *proxy,
    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),
    "OpenPipeWireRemote",
    g_variant_new ("(@a{sv})",
                   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_dbus_camera_complete_access_camera:
 * @object: A #XdpDbusCamera.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @handle: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-portal-Camera.AccessCamera">AccessCamera()</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_dbus_camera_complete_access_camera (
    XdpDbusCamera *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    const gchar *handle)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(o)",
                   handle));
}

/**
 * xdp_dbus_camera_complete_open_pipewire_remote:
 * @object: A #XdpDbusCamera.
 * @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-portal-Camera.OpenPipeWireRemote">OpenPipeWireRemote()</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_dbus_camera_complete_open_pipewire_remote (
    XdpDbusCamera *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);
}

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

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

/**
 * XdpDbusCameraProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpDbusCameraProxy.
 */

struct _XdpDbusCameraProxyPrivate
{
  GData *qdata;
};

static void xdp_dbus_camera_proxy_iface_init (XdpDbusCameraIface *iface);

#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpDbusCameraProxy, xdp_dbus_camera_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (XdpDbusCameraProxy)
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_CAMERA, xdp_dbus_camera_proxy_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpDbusCameraProxy, xdp_dbus_camera_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_CAMERA, xdp_dbus_camera_proxy_iface_init))

#endif
static void
xdp_dbus_camera_proxy_finalize (GObject *object)
{
  XdpDbusCameraProxy *proxy = XDP_DBUS_CAMERA_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (xdp_dbus_camera_proxy_parent_class)->finalize (object);
}

static void
xdp_dbus_camera_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_dbus_camera_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_dbus_camera_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.portal.Camera: %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_dbus_camera_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_dbus_camera_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.portal.Camera", info->parent_struct.name, variant),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    NULL, (GAsyncReadyCallback) xdp_dbus_camera_proxy_set_property_cb, (GDBusPropertyInfo *) &info->parent_struct);
  g_variant_unref (variant);
}

static void
xdp_dbus_camera_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_dbus_camera_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_DBUS_TYPE_CAMERA);
  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_DBUS_TYPE_CAMERA);
  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_dbus_camera_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  XdpDbusCameraProxy *proxy = XDP_DBUS_CAMERA_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_dbus_camera_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_dbus_camera_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_dbus_camera_proxy_get_is_camera_present (XdpDbusCamera *object)
{
  XdpDbusCameraProxy *proxy = XDP_DBUS_CAMERA_PROXY (object);
  GVariant *variant;
  gboolean value = FALSE;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "IsCameraPresent");
  if (variant != NULL)
    {
      value = g_variant_get_boolean (variant);
      g_variant_unref (variant);
    }
  return value;
}

static guint 
xdp_dbus_camera_proxy_get_version (XdpDbusCamera *object)
{
  XdpDbusCameraProxy *proxy = XDP_DBUS_CAMERA_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_dbus_camera_proxy_init (XdpDbusCameraProxy *proxy)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  proxy->priv = xdp_dbus_camera_proxy_get_instance_private (proxy);
#else
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, XDP_DBUS_TYPE_CAMERA_PROXY, XdpDbusCameraProxyPrivate);
#endif

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

static void
xdp_dbus_camera_proxy_class_init (XdpDbusCameraProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = xdp_dbus_camera_proxy_finalize;
  gobject_class->get_property = xdp_dbus_camera_proxy_get_property;
  gobject_class->set_property = xdp_dbus_camera_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = xdp_dbus_camera_proxy_g_signal;
  proxy_class->g_properties_changed = xdp_dbus_camera_proxy_g_properties_changed;

  xdp_dbus_camera_override_properties (gobject_class, 1);

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

static void
xdp_dbus_camera_proxy_iface_init (XdpDbusCameraIface *iface)
{
  iface->get_is_camera_present = xdp_dbus_camera_proxy_get_is_camera_present;
  iface->get_version = xdp_dbus_camera_proxy_get_version;
}

/**
 * xdp_dbus_camera_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-portal-Camera.top_of_page">org.freedesktop.portal.Camera</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_dbus_camera_proxy_new_finish() to get the result of the operation.
 *
 * See xdp_dbus_camera_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_dbus_camera_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_DBUS_TYPE_CAMERA_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.portal.Camera", NULL);
}

/**
 * xdp_dbus_camera_proxy_new_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_camera_proxy_new().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_dbus_camera_proxy_new().
 *
 * Returns: (transfer full) (type XdpDbusCameraProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusCamera *
xdp_dbus_camera_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_DBUS_CAMERA (ret);
  else
    return NULL;
}

/**
 * xdp_dbus_camera_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-portal-Camera.top_of_page">org.freedesktop.portal.Camera</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_camera_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpDbusCameraProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusCamera *
xdp_dbus_camera_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_DBUS_TYPE_CAMERA_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.portal.Camera", NULL);
  if (ret != NULL)
    return XDP_DBUS_CAMERA (ret);
  else
    return NULL;
}


/**
 * xdp_dbus_camera_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_dbus_camera_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_dbus_camera_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See xdp_dbus_camera_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_dbus_camera_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_DBUS_TYPE_CAMERA_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.portal.Camera", NULL);
}

/**
 * xdp_dbus_camera_proxy_new_for_bus_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_camera_proxy_new_for_bus().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_dbus_camera_proxy_new_for_bus().
 *
 * Returns: (transfer full) (type XdpDbusCameraProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusCamera *
xdp_dbus_camera_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_DBUS_CAMERA (ret);
  else
    return NULL;
}

/**
 * xdp_dbus_camera_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_dbus_camera_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_camera_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpDbusCameraProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusCamera *
xdp_dbus_camera_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_DBUS_TYPE_CAMERA_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.portal.Camera", NULL);
  if (ret != NULL)
    return XDP_DBUS_CAMERA (ret);
  else
    return NULL;
}


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

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

/**
 * XdpDbusCameraSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpDbusCameraSkeleton.
 */

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

static void
_xdp_dbus_camera_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)
{
  XdpDbusCameraSkeleton *skeleton = XDP_DBUS_CAMERA_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_DBUS_TYPE_CAMERA);
  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_DBUS_TYPE_CAMERA);
  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_dbus_camera_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)
{
  XdpDbusCameraSkeleton *skeleton = XDP_DBUS_CAMERA_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_dbus_camera_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_dbus_camera_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)
{
  XdpDbusCameraSkeleton *skeleton = XDP_DBUS_CAMERA_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_dbus_camera_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_dbus_camera_skeleton_vtable =
{
  _xdp_dbus_camera_skeleton_handle_method_call,
  _xdp_dbus_camera_skeleton_handle_get_property,
  _xdp_dbus_camera_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
xdp_dbus_camera_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return xdp_dbus_camera_interface_info ();
}

static GDBusInterfaceVTable *
xdp_dbus_camera_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_xdp_dbus_camera_skeleton_vtable;
}

static GVariant *
xdp_dbus_camera_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  XdpDbusCameraSkeleton *skeleton = XDP_DBUS_CAMERA_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_dbus_camera_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _xdp_dbus_camera_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _xdp_dbus_camera_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _xdp_dbus_camera_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.portal.Camera", 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_dbus_camera_emit_changed (gpointer user_data);

static void
xdp_dbus_camera_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
{
  XdpDbusCameraSkeleton *skeleton = XDP_DBUS_CAMERA_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_dbus_camera_emit_changed (skeleton);
}

static void xdp_dbus_camera_skeleton_iface_init (XdpDbusCameraIface *iface);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpDbusCameraSkeleton, xdp_dbus_camera_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (XdpDbusCameraSkeleton)
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_CAMERA, xdp_dbus_camera_skeleton_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpDbusCameraSkeleton, xdp_dbus_camera_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_CAMERA, xdp_dbus_camera_skeleton_iface_init))

#endif
static void
xdp_dbus_camera_skeleton_finalize (GObject *object)
{
  XdpDbusCameraSkeleton *skeleton = XDP_DBUS_CAMERA_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_dbus_camera_skeleton_parent_class)->finalize (object);
}

static void
xdp_dbus_camera_skeleton_get_property (GObject      *object,
  guint         prop_id,
  GValue       *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  XdpDbusCameraSkeleton *skeleton = XDP_DBUS_CAMERA_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_dbus_camera_emit_changed (gpointer user_data)
{
  XdpDbusCameraSkeleton *skeleton = XDP_DBUS_CAMERA_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.portal.Camera",
                                           &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_dbus_camera_schedule_emit_changed (XdpDbusCameraSkeleton *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_dbus_camera_skeleton_notify (GObject      *object,
  GParamSpec *pspec G_GNUC_UNUSED)
{
  XdpDbusCameraSkeleton *skeleton = XDP_DBUS_CAMERA_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_dbus_camera_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
      g_source_set_name (skeleton->priv->changed_properties_idle_source, "[generated] _xdp_dbus_camera_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_dbus_camera_skeleton_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec)
{
  const _ExtendedGDBusPropertyInfo *info;
  XdpDbusCameraSkeleton *skeleton = XDP_DBUS_CAMERA_SKELETON (object);
  g_assert (prop_id != 0 && prop_id - 1 < 2);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_dbus_camera_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_dbus_camera_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_dbus_camera_skeleton_init (XdpDbusCameraSkeleton *skeleton)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  skeleton->priv = xdp_dbus_camera_skeleton_get_instance_private (skeleton);
#else
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, XDP_DBUS_TYPE_CAMERA_SKELETON, XdpDbusCameraSkeletonPrivate);
#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_BOOLEAN);
  g_value_init (&skeleton->priv->properties[1], G_TYPE_UINT);
}

static gboolean 
xdp_dbus_camera_skeleton_get_is_camera_present (XdpDbusCamera *object)
{
  XdpDbusCameraSkeleton *skeleton = XDP_DBUS_CAMERA_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 guint 
xdp_dbus_camera_skeleton_get_version (XdpDbusCamera *object)
{
  XdpDbusCameraSkeleton *skeleton = XDP_DBUS_CAMERA_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_dbus_camera_skeleton_class_init (XdpDbusCameraSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize = xdp_dbus_camera_skeleton_finalize;
  gobject_class->get_property = xdp_dbus_camera_skeleton_get_property;
  gobject_class->set_property = xdp_dbus_camera_skeleton_set_property;
  gobject_class->notify       = xdp_dbus_camera_skeleton_notify;


  xdp_dbus_camera_override_properties (gobject_class, 1);

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = xdp_dbus_camera_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = xdp_dbus_camera_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = xdp_dbus_camera_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = xdp_dbus_camera_skeleton_dbus_interface_get_vtable;

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

static void
xdp_dbus_camera_skeleton_iface_init (XdpDbusCameraIface *iface)
{
  iface->get_is_camera_present = xdp_dbus_camera_skeleton_get_is_camera_present;
  iface->get_version = xdp_dbus_camera_skeleton_get_version;
}

/**
 * xdp_dbus_camera_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-Camera.top_of_page">org.freedesktop.portal.Camera</link>.
 *
 * Returns: (transfer full) (type XdpDbusCameraSkeleton): The skeleton object.
 */
XdpDbusCamera *
xdp_dbus_camera_skeleton_new (void)
{
  return XDP_DBUS_CAMERA (g_object_new (XDP_DBUS_TYPE_CAMERA_SKELETON, NULL));
}

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

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

enum
{
  XDP_DBUS__CLIPBOARD_SELECTION_OWNER_CHANGED,
  XDP_DBUS__CLIPBOARD_SELECTION_TRANSFER,
};

static unsigned XDP_DBUS__CLIPBOARD_SIGNALS[2] = { 0 };

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

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

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

static const GDBusArgInfo * const _xdp_dbus_clipboard_method_info_request_clipboard_IN_ARG_pointers[] =
{
  &_xdp_dbus_clipboard_method_info_request_clipboard_IN_ARG_session_handle.parent_struct,
  &_xdp_dbus_clipboard_method_info_request_clipboard_IN_ARG_options.parent_struct,
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_clipboard_method_request_clipboard_annotation_info_pointers[] =
{
  &_xdp_dbus_clipboard_method_request_clipboard_annotation_info_0,
  NULL
};

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

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

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

static const GDBusArgInfo * const _xdp_dbus_clipboard_method_info_set_selection_IN_ARG_pointers[] =
{
  &_xdp_dbus_clipboard_method_info_set_selection_IN_ARG_session_handle.parent_struct,
  &_xdp_dbus_clipboard_method_info_set_selection_IN_ARG_options.parent_struct,
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_clipboard_method_set_selection_annotation_info_pointers[] =
{
  &_xdp_dbus_clipboard_method_set_selection_annotation_info_0,
  NULL
};

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

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

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

static const GDBusArgInfo * const _xdp_dbus_clipboard_method_info_selection_write_IN_ARG_pointers[] =
{
  &_xdp_dbus_clipboard_method_info_selection_write_IN_ARG_session_handle.parent_struct,
  &_xdp_dbus_clipboard_method_info_selection_write_IN_ARG_serial.parent_struct,
  NULL
};

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

static const GDBusArgInfo * const _xdp_dbus_clipboard_method_info_selection_write_OUT_ARG_pointers[] =
{
  &_xdp_dbus_clipboard_method_info_selection_write_OUT_ARG_fd.parent_struct,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_clipboard_method_info_selection_write =
{
  {
    -1,
    (gchar *) "SelectionWrite",
    (GDBusArgInfo **) &_xdp_dbus_clipboard_method_info_selection_write_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_clipboard_method_info_selection_write_OUT_ARG_pointers,
    NULL
  },
  "handle-selection-write",
  TRUE
};

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

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

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

static const GDBusArgInfo * const _xdp_dbus_clipboard_method_info_selection_write_done_IN_ARG_pointers[] =
{
  &_xdp_dbus_clipboard_method_info_selection_write_done_IN_ARG_session_handle.parent_struct,
  &_xdp_dbus_clipboard_method_info_selection_write_done_IN_ARG_serial.parent_struct,
  &_xdp_dbus_clipboard_method_info_selection_write_done_IN_ARG_success.parent_struct,
  NULL
};

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

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

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

static const GDBusArgInfo * const _xdp_dbus_clipboard_method_info_selection_read_IN_ARG_pointers[] =
{
  &_xdp_dbus_clipboard_method_info_selection_read_IN_ARG_session_handle.parent_struct,
  &_xdp_dbus_clipboard_method_info_selection_read_IN_ARG_mime_type.parent_struct,
  NULL
};

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

static const GDBusArgInfo * const _xdp_dbus_clipboard_method_info_selection_read_OUT_ARG_pointers[] =
{
  &_xdp_dbus_clipboard_method_info_selection_read_OUT_ARG_fd.parent_struct,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_clipboard_method_info_selection_read =
{
  {
    -1,
    (gchar *) "SelectionRead",
    (GDBusArgInfo **) &_xdp_dbus_clipboard_method_info_selection_read_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_clipboard_method_info_selection_read_OUT_ARG_pointers,
    NULL
  },
  "handle-selection-read",
  TRUE
};

static const GDBusMethodInfo * const _xdp_dbus_clipboard_method_info_pointers[] =
{
  &_xdp_dbus_clipboard_method_info_request_clipboard.parent_struct,
  &_xdp_dbus_clipboard_method_info_set_selection.parent_struct,
  &_xdp_dbus_clipboard_method_info_selection_write.parent_struct,
  &_xdp_dbus_clipboard_method_info_selection_write_done.parent_struct,
  &_xdp_dbus_clipboard_method_info_selection_read.parent_struct,
  NULL
};

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

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

static const GDBusArgInfo * const _xdp_dbus_clipboard_signal_info_selection_owner_changed_ARG_pointers[] =
{
  &_xdp_dbus_clipboard_signal_info_selection_owner_changed_ARG_session_handle.parent_struct,
  &_xdp_dbus_clipboard_signal_info_selection_owner_changed_ARG_options.parent_struct,
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_clipboard_signal_selection_owner_changed_annotation_info_pointers[] =
{
  &_xdp_dbus_clipboard_signal_selection_owner_changed_annotation_info_0,
  NULL
};

static const _ExtendedGDBusSignalInfo _xdp_dbus_clipboard_signal_info_selection_owner_changed =
{
  {
    -1,
    (gchar *) "SelectionOwnerChanged",
    (GDBusArgInfo **) &_xdp_dbus_clipboard_signal_info_selection_owner_changed_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_dbus_clipboard_signal_selection_owner_changed_annotation_info_pointers
  },
  "selection-owner-changed"
};

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

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

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

static const GDBusArgInfo * const _xdp_dbus_clipboard_signal_info_selection_transfer_ARG_pointers[] =
{
  &_xdp_dbus_clipboard_signal_info_selection_transfer_ARG_session_handle.parent_struct,
  &_xdp_dbus_clipboard_signal_info_selection_transfer_ARG_mime_type.parent_struct,
  &_xdp_dbus_clipboard_signal_info_selection_transfer_ARG_serial.parent_struct,
  NULL
};

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

static const GDBusSignalInfo * const _xdp_dbus_clipboard_signal_info_pointers[] =
{
  &_xdp_dbus_clipboard_signal_info_selection_owner_changed.parent_struct,
  &_xdp_dbus_clipboard_signal_info_selection_transfer.parent_struct,
  NULL
};

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

static const GDBusPropertyInfo * const _xdp_dbus_clipboard_property_info_pointers[] =
{
  &_xdp_dbus_clipboard_property_info_version.parent_struct,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _xdp_dbus_clipboard_interface_info =
{
  {
    -1,
    (gchar *) "org.freedesktop.portal.Clipboard",
    (GDBusMethodInfo **) &_xdp_dbus_clipboard_method_info_pointers,
    (GDBusSignalInfo **) &_xdp_dbus_clipboard_signal_info_pointers,
    (GDBusPropertyInfo **) &_xdp_dbus_clipboard_property_info_pointers,
    NULL
  },
  "clipboard",
};


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

/**
 * xdp_dbus_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 #XdpDbusClipboard interface for a concrete class.
 * The properties are overridden in the order they are defined.
 *
 * Returns: The last property id.
 */
guint
xdp_dbus_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_dbus_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_dbus_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_dbus_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_dbus_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_dbus_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_dbus_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_dbus_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);
}


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

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

typedef XdpDbusClipboardIface XdpDbusClipboardInterface;
G_DEFINE_INTERFACE (XdpDbusClipboard, xdp_dbus_clipboard, G_TYPE_OBJECT)

static void
xdp_dbus_clipboard_default_init (XdpDbusClipboardIface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * XdpDbusClipboard::handle-request-clipboard:
   * @object: A #XdpDbusClipboard.
   * @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-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_dbus_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 (XdpDbusClipboardIface, handle_request_clipboard),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_clipboard_method_marshal_request_clipboard,
    G_TYPE_BOOLEAN,
    3,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_VARIANT);

  /**
   * XdpDbusClipboard::handle-set-selection:
   * @object: A #XdpDbusClipboard.
   * @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-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_dbus_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 (XdpDbusClipboardIface, handle_set_selection),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_clipboard_method_marshal_set_selection,
    G_TYPE_BOOLEAN,
    3,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_VARIANT);

  /**
   * XdpDbusClipboard::handle-selection-write:
   * @object: A #XdpDbusClipboard.
   * @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-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_dbus_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 (XdpDbusClipboardIface, handle_selection_write),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_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);

  /**
   * XdpDbusClipboard::handle-selection-write-done:
   * @object: A #XdpDbusClipboard.
   * @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-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_dbus_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 (XdpDbusClipboardIface, handle_selection_write_done),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_clipboard_method_marshal_selection_write_done,
    G_TYPE_BOOLEAN,
    4,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_UINT, G_TYPE_BOOLEAN);

  /**
   * XdpDbusClipboard::handle-selection-read:
   * @object: A #XdpDbusClipboard.
   * @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-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_dbus_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 (XdpDbusClipboardIface, handle_selection_read),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_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: */
  /**
   * XdpDbusClipboard::selection-owner-changed:
   * @object: A #XdpDbusClipboard.
   * @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-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_DBUS__CLIPBOARD_SIGNALS[XDP_DBUS__CLIPBOARD_SELECTION_OWNER_CHANGED] =
    g_signal_new ("selection-owner-changed",
      G_TYPE_FROM_INTERFACE (iface),
      G_SIGNAL_RUN_LAST,
      G_STRUCT_OFFSET (XdpDbusClipboardIface, selection_owner_changed),
      NULL,
      NULL,
      xdp_dbus_clipboard_signal_marshal_selection_owner_changed,
      G_TYPE_NONE,
      2, G_TYPE_STRING, G_TYPE_VARIANT);

  /**
   * XdpDbusClipboard::selection-transfer:
   * @object: A #XdpDbusClipboard.
   * @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-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_DBUS__CLIPBOARD_SIGNALS[XDP_DBUS__CLIPBOARD_SELECTION_TRANSFER] =
    g_signal_new ("selection-transfer",
      G_TYPE_FROM_INTERFACE (iface),
      G_SIGNAL_RUN_LAST,
      G_STRUCT_OFFSET (XdpDbusClipboardIface, selection_transfer),
      NULL,
      NULL,
      xdp_dbus_clipboard_signal_marshal_selection_transfer,
      G_TYPE_NONE,
      3, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_UINT);

  /* GObject properties for D-Bus properties: */
  /**
   * XdpDbusClipboard:version:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-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_dbus_clipboard_get_version: (skip)
 * @object: A #XdpDbusClipboard.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-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_dbus_clipboard_get_version (XdpDbusClipboard *object)
{
  g_return_val_if_fail (XDP_DBUS_IS_CLIPBOARD (object), 0);

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

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

/**
 * xdp_dbus_clipboard_emit_selection_owner_changed:
 * @object: A #XdpDbusClipboard.
 * @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-portal-Clipboard.SelectionOwnerChanged">"SelectionOwnerChanged"</link> D-Bus signal.
 */
void
xdp_dbus_clipboard_emit_selection_owner_changed (
    XdpDbusClipboard *object,
    const gchar *arg_session_handle,
    GVariant *arg_options)
{
  g_signal_emit (object, XDP_DBUS__CLIPBOARD_SIGNALS[XDP_DBUS__CLIPBOARD_SELECTION_OWNER_CHANGED], 0, arg_session_handle, arg_options);
}

/**
 * xdp_dbus_clipboard_emit_selection_transfer:
 * @object: A #XdpDbusClipboard.
 * @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-portal-Clipboard.SelectionTransfer">"SelectionTransfer"</link> D-Bus signal.
 */
void
xdp_dbus_clipboard_emit_selection_transfer (
    XdpDbusClipboard *object,
    const gchar *arg_session_handle,
    const gchar *arg_mime_type,
    guint arg_serial)
{
  g_signal_emit (object, XDP_DBUS__CLIPBOARD_SIGNALS[XDP_DBUS__CLIPBOARD_SELECTION_TRANSFER], 0, arg_session_handle, arg_mime_type, arg_serial);
}

/**
 * xdp_dbus_clipboard_call_request_clipboard:
 * @proxy: A #XdpDbusClipboardProxy.
 * @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-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_dbus_clipboard_call_request_clipboard_finish() to get the result of the operation.
 *
 * See xdp_dbus_clipboard_call_request_clipboard_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_clipboard_call_request_clipboard (
    XdpDbusClipboard *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_dbus_clipboard_call_request_clipboard_finish:
 * @proxy: A #XdpDbusClipboardProxy.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_clipboard_call_request_clipboard().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_clipboard_call_request_clipboard().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_clipboard_call_request_clipboard_finish (
    XdpDbusClipboard *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_dbus_clipboard_call_request_clipboard_sync:
 * @proxy: A #XdpDbusClipboardProxy.
 * @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-portal-Clipboard.RequestClipboard">RequestClipboard()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_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_dbus_clipboard_call_request_clipboard_sync (
    XdpDbusClipboard *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_dbus_clipboard_call_set_selection:
 * @proxy: A #XdpDbusClipboardProxy.
 * @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-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_dbus_clipboard_call_set_selection_finish() to get the result of the operation.
 *
 * See xdp_dbus_clipboard_call_set_selection_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_clipboard_call_set_selection (
    XdpDbusClipboard *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_dbus_clipboard_call_set_selection_finish:
 * @proxy: A #XdpDbusClipboardProxy.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_clipboard_call_set_selection().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_clipboard_call_set_selection().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_clipboard_call_set_selection_finish (
    XdpDbusClipboard *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_dbus_clipboard_call_set_selection_sync:
 * @proxy: A #XdpDbusClipboardProxy.
 * @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-portal-Clipboard.SetSelection">SetSelection()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_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_dbus_clipboard_call_set_selection_sync (
    XdpDbusClipboard *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_dbus_clipboard_call_selection_write:
 * @proxy: A #XdpDbusClipboardProxy.
 * @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-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_dbus_clipboard_call_selection_write_finish() to get the result of the operation.
 *
 * See xdp_dbus_clipboard_call_selection_write_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_clipboard_call_selection_write (
    XdpDbusClipboard *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_dbus_clipboard_call_selection_write_finish:
 * @proxy: A #XdpDbusClipboardProxy.
 * @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_dbus_clipboard_call_selection_write().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_clipboard_call_selection_write().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_clipboard_call_selection_write_finish (
    XdpDbusClipboard *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_dbus_clipboard_call_selection_write_sync:
 * @proxy: A #XdpDbusClipboardProxy.
 * @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-portal-Clipboard.SelectionWrite">SelectionWrite()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_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_dbus_clipboard_call_selection_write_sync (
    XdpDbusClipboard *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_dbus_clipboard_call_selection_write_done:
 * @proxy: A #XdpDbusClipboardProxy.
 * @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-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_dbus_clipboard_call_selection_write_done_finish() to get the result of the operation.
 *
 * See xdp_dbus_clipboard_call_selection_write_done_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_clipboard_call_selection_write_done (
    XdpDbusClipboard *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_dbus_clipboard_call_selection_write_done_finish:
 * @proxy: A #XdpDbusClipboardProxy.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_clipboard_call_selection_write_done().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_clipboard_call_selection_write_done().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_clipboard_call_selection_write_done_finish (
    XdpDbusClipboard *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_dbus_clipboard_call_selection_write_done_sync:
 * @proxy: A #XdpDbusClipboardProxy.
 * @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-portal-Clipboard.SelectionWriteDone">SelectionWriteDone()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_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_dbus_clipboard_call_selection_write_done_sync (
    XdpDbusClipboard *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_dbus_clipboard_call_selection_read:
 * @proxy: A #XdpDbusClipboardProxy.
 * @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-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_dbus_clipboard_call_selection_read_finish() to get the result of the operation.
 *
 * See xdp_dbus_clipboard_call_selection_read_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_clipboard_call_selection_read (
    XdpDbusClipboard *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_dbus_clipboard_call_selection_read_finish:
 * @proxy: A #XdpDbusClipboardProxy.
 * @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_dbus_clipboard_call_selection_read().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_clipboard_call_selection_read().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_clipboard_call_selection_read_finish (
    XdpDbusClipboard *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_dbus_clipboard_call_selection_read_sync:
 * @proxy: A #XdpDbusClipboardProxy.
 * @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-portal-Clipboard.SelectionRead">SelectionRead()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_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_dbus_clipboard_call_selection_read_sync (
    XdpDbusClipboard *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_dbus_clipboard_complete_request_clipboard:
 * @object: A #XdpDbusClipboard.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-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_dbus_clipboard_complete_request_clipboard (
    XdpDbusClipboard *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("()"));
}

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

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

/**
 * xdp_dbus_clipboard_complete_selection_read:
 * @object: A #XdpDbusClipboard.
 * @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-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_dbus_clipboard_complete_selection_read (
    XdpDbusClipboard *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);
}

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

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

/**
 * XdpDbusClipboardProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpDbusClipboardProxy.
 */

struct _XdpDbusClipboardProxyPrivate
{
  GData *qdata;
};

static void xdp_dbus_clipboard_proxy_iface_init (XdpDbusClipboardIface *iface);

#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpDbusClipboardProxy, xdp_dbus_clipboard_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (XdpDbusClipboardProxy)
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_CLIPBOARD, xdp_dbus_clipboard_proxy_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpDbusClipboardProxy, xdp_dbus_clipboard_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_CLIPBOARD, xdp_dbus_clipboard_proxy_iface_init))

#endif
static void
xdp_dbus_clipboard_proxy_finalize (GObject *object)
{
  XdpDbusClipboardProxy *proxy = XDP_DBUS_CLIPBOARD_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (xdp_dbus_clipboard_proxy_parent_class)->finalize (object);
}

static void
xdp_dbus_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_dbus_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_dbus_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.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_dbus_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_dbus_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.portal.Clipboard", info->parent_struct.name, variant),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    NULL, (GAsyncReadyCallback) xdp_dbus_clipboard_proxy_set_property_cb, (GDBusPropertyInfo *) &info->parent_struct);
  g_variant_unref (variant);
}

static void
xdp_dbus_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_dbus_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_DBUS_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_DBUS_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_dbus_clipboard_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  XdpDbusClipboardProxy *proxy = XDP_DBUS_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_dbus_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_dbus_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_dbus_clipboard_proxy_get_version (XdpDbusClipboard *object)
{
  XdpDbusClipboardProxy *proxy = XDP_DBUS_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_dbus_clipboard_proxy_init (XdpDbusClipboardProxy *proxy)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  proxy->priv = xdp_dbus_clipboard_proxy_get_instance_private (proxy);
#else
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, XDP_DBUS_TYPE_CLIPBOARD_PROXY, XdpDbusClipboardProxyPrivate);
#endif

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

static void
xdp_dbus_clipboard_proxy_class_init (XdpDbusClipboardProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = xdp_dbus_clipboard_proxy_finalize;
  gobject_class->get_property = xdp_dbus_clipboard_proxy_get_property;
  gobject_class->set_property = xdp_dbus_clipboard_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = xdp_dbus_clipboard_proxy_g_signal;
  proxy_class->g_properties_changed = xdp_dbus_clipboard_proxy_g_properties_changed;

  xdp_dbus_clipboard_override_properties (gobject_class, 1);

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

static void
xdp_dbus_clipboard_proxy_iface_init (XdpDbusClipboardIface *iface)
{
  iface->get_version = xdp_dbus_clipboard_proxy_get_version;
}

/**
 * xdp_dbus_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-portal-Clipboard.top_of_page">org.freedesktop.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_dbus_clipboard_proxy_new_finish() to get the result of the operation.
 *
 * See xdp_dbus_clipboard_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_dbus_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_DBUS_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.portal.Clipboard", NULL);
}

/**
 * xdp_dbus_clipboard_proxy_new_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_clipboard_proxy_new().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_dbus_clipboard_proxy_new().
 *
 * Returns: (transfer full) (type XdpDbusClipboardProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusClipboard *
xdp_dbus_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_DBUS_CLIPBOARD (ret);
  else
    return NULL;
}

/**
 * xdp_dbus_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-portal-Clipboard.top_of_page">org.freedesktop.portal.Clipboard</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_clipboard_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpDbusClipboardProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusClipboard *
xdp_dbus_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_DBUS_TYPE_CLIPBOARD_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.portal.Clipboard", NULL);
  if (ret != NULL)
    return XDP_DBUS_CLIPBOARD (ret);
  else
    return NULL;
}


/**
 * xdp_dbus_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_dbus_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_dbus_clipboard_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See xdp_dbus_clipboard_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_dbus_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_DBUS_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.portal.Clipboard", NULL);
}

/**
 * xdp_dbus_clipboard_proxy_new_for_bus_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_clipboard_proxy_new_for_bus().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_dbus_clipboard_proxy_new_for_bus().
 *
 * Returns: (transfer full) (type XdpDbusClipboardProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusClipboard *
xdp_dbus_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_DBUS_CLIPBOARD (ret);
  else
    return NULL;
}

/**
 * xdp_dbus_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_dbus_clipboard_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_clipboard_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpDbusClipboardProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusClipboard *
xdp_dbus_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_DBUS_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.portal.Clipboard", NULL);
  if (ret != NULL)
    return XDP_DBUS_CLIPBOARD (ret);
  else
    return NULL;
}


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

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

/**
 * XdpDbusClipboardSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpDbusClipboardSkeleton.
 */

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

static void
_xdp_dbus_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)
{
  XdpDbusClipboardSkeleton *skeleton = XDP_DBUS_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_DBUS_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_DBUS_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_dbus_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)
{
  XdpDbusClipboardSkeleton *skeleton = XDP_DBUS_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_dbus_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_dbus_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)
{
  XdpDbusClipboardSkeleton *skeleton = XDP_DBUS_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_dbus_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_dbus_clipboard_skeleton_vtable =
{
  _xdp_dbus_clipboard_skeleton_handle_method_call,
  _xdp_dbus_clipboard_skeleton_handle_get_property,
  _xdp_dbus_clipboard_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
xdp_dbus_clipboard_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return xdp_dbus_clipboard_interface_info ();
}

static GDBusInterfaceVTable *
xdp_dbus_clipboard_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_xdp_dbus_clipboard_skeleton_vtable;
}

static GVariant *
xdp_dbus_clipboard_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  XdpDbusClipboardSkeleton *skeleton = XDP_DBUS_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_dbus_clipboard_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _xdp_dbus_clipboard_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _xdp_dbus_clipboard_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _xdp_dbus_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.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_dbus_clipboard_emit_changed (gpointer user_data);

static void
xdp_dbus_clipboard_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
{
  XdpDbusClipboardSkeleton *skeleton = XDP_DBUS_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_dbus_clipboard_emit_changed (skeleton);
}

static void
_xdp_dbus_clipboard_on_signal_selection_owner_changed (
    XdpDbusClipboard *object,
    const gchar *arg_session_handle,
    GVariant *arg_options)
{
  XdpDbusClipboardSkeleton *skeleton = XDP_DBUS_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.portal.Clipboard", "SelectionOwnerChanged",
        signal_variant, NULL);
    }
  g_variant_unref (signal_variant);
  g_list_free_full (connections, g_object_unref);
}

static void
_xdp_dbus_clipboard_on_signal_selection_transfer (
    XdpDbusClipboard *object,
    const gchar *arg_session_handle,
    const gchar *arg_mime_type,
    guint arg_serial)
{
  XdpDbusClipboardSkeleton *skeleton = XDP_DBUS_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.portal.Clipboard", "SelectionTransfer",
        signal_variant, NULL);
    }
  g_variant_unref (signal_variant);
  g_list_free_full (connections, g_object_unref);
}

static void xdp_dbus_clipboard_skeleton_iface_init (XdpDbusClipboardIface *iface);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpDbusClipboardSkeleton, xdp_dbus_clipboard_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (XdpDbusClipboardSkeleton)
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_CLIPBOARD, xdp_dbus_clipboard_skeleton_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpDbusClipboardSkeleton, xdp_dbus_clipboard_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_CLIPBOARD, xdp_dbus_clipboard_skeleton_iface_init))

#endif
static void
xdp_dbus_clipboard_skeleton_finalize (GObject *object)
{
  XdpDbusClipboardSkeleton *skeleton = XDP_DBUS_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_dbus_clipboard_skeleton_parent_class)->finalize (object);
}

static void
xdp_dbus_clipboard_skeleton_get_property (GObject      *object,
  guint         prop_id,
  GValue       *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  XdpDbusClipboardSkeleton *skeleton = XDP_DBUS_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_dbus_clipboard_emit_changed (gpointer user_data)
{
  XdpDbusClipboardSkeleton *skeleton = XDP_DBUS_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.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_dbus_clipboard_schedule_emit_changed (XdpDbusClipboardSkeleton *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_dbus_clipboard_skeleton_notify (GObject      *object,
  GParamSpec *pspec G_GNUC_UNUSED)
{
  XdpDbusClipboardSkeleton *skeleton = XDP_DBUS_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_dbus_clipboard_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
      g_source_set_name (skeleton->priv->changed_properties_idle_source, "[generated] _xdp_dbus_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_dbus_clipboard_skeleton_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec)
{
  const _ExtendedGDBusPropertyInfo *info;
  XdpDbusClipboardSkeleton *skeleton = XDP_DBUS_CLIPBOARD_SKELETON (object);
  g_assert (prop_id != 0 && prop_id - 1 < 1);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_dbus_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_dbus_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_dbus_clipboard_skeleton_init (XdpDbusClipboardSkeleton *skeleton)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  skeleton->priv = xdp_dbus_clipboard_skeleton_get_instance_private (skeleton);
#else
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, XDP_DBUS_TYPE_CLIPBOARD_SKELETON, XdpDbusClipboardSkeletonPrivate);
#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_dbus_clipboard_skeleton_get_version (XdpDbusClipboard *object)
{
  XdpDbusClipboardSkeleton *skeleton = XDP_DBUS_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_dbus_clipboard_skeleton_class_init (XdpDbusClipboardSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize = xdp_dbus_clipboard_skeleton_finalize;
  gobject_class->get_property = xdp_dbus_clipboard_skeleton_get_property;
  gobject_class->set_property = xdp_dbus_clipboard_skeleton_set_property;
  gobject_class->notify       = xdp_dbus_clipboard_skeleton_notify;


  xdp_dbus_clipboard_override_properties (gobject_class, 1);

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = xdp_dbus_clipboard_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = xdp_dbus_clipboard_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = xdp_dbus_clipboard_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = xdp_dbus_clipboard_skeleton_dbus_interface_get_vtable;

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

static void
xdp_dbus_clipboard_skeleton_iface_init (XdpDbusClipboardIface *iface)
{
  iface->selection_owner_changed = _xdp_dbus_clipboard_on_signal_selection_owner_changed;
  iface->selection_transfer = _xdp_dbus_clipboard_on_signal_selection_transfer;
  iface->get_version = xdp_dbus_clipboard_skeleton_get_version;
}

/**
 * xdp_dbus_clipboard_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-Clipboard.top_of_page">org.freedesktop.portal.Clipboard</link>.
 *
 * Returns: (transfer full) (type XdpDbusClipboardSkeleton): The skeleton object.
 */
XdpDbusClipboard *
xdp_dbus_clipboard_skeleton_new (void)
{
  return XDP_DBUS_CLIPBOARD (g_object_new (XDP_DBUS_TYPE_CLIPBOARD_SKELETON, NULL));
}

/* ------------------------------------------------------------------------
 * Code for interface org.freedesktop.portal.Documents
 * ------------------------------------------------------------------------
 */

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

/* ---- Introspection data for org.freedesktop.portal.Documents ---- */

static const _ExtendedGDBusArgInfo _xdp_dbus_documents_method_info_get_mount_point_OUT_ARG_path =
{
  {
    -1,
    (gchar *) "path",
    (gchar *) "ay",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_dbus_documents_method_info_get_mount_point_OUT_ARG_pointers[] =
{
  &_xdp_dbus_documents_method_info_get_mount_point_OUT_ARG_path.parent_struct,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_documents_method_info_get_mount_point =
{
  {
    -1,
    (gchar *) "GetMountPoint",
    NULL,
    (GDBusArgInfo **) &_xdp_dbus_documents_method_info_get_mount_point_OUT_ARG_pointers,
    NULL
  },
  "handle-get-mount-point",
  FALSE
};

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

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

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

static const GDBusArgInfo * const _xdp_dbus_documents_method_info_add_IN_ARG_pointers[] =
{
  &_xdp_dbus_documents_method_info_add_IN_ARG_o_path_fd.parent_struct,
  &_xdp_dbus_documents_method_info_add_IN_ARG_reuse_existing.parent_struct,
  &_xdp_dbus_documents_method_info_add_IN_ARG_persistent.parent_struct,
  NULL
};

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

static const GDBusArgInfo * const _xdp_dbus_documents_method_info_add_OUT_ARG_pointers[] =
{
  &_xdp_dbus_documents_method_info_add_OUT_ARG_doc_id.parent_struct,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_documents_method_info_add =
{
  {
    -1,
    (gchar *) "Add",
    (GDBusArgInfo **) &_xdp_dbus_documents_method_info_add_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_documents_method_info_add_OUT_ARG_pointers,
    NULL
  },
  "handle-add",
  TRUE
};

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

static const _ExtendedGDBusArgInfo _xdp_dbus_documents_method_info_add_named_IN_ARG_filename =
{
  {
    -1,
    (gchar *) "filename",
    (gchar *) "ay",
    NULL
  },
  FALSE
};

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

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

static const GDBusArgInfo * const _xdp_dbus_documents_method_info_add_named_IN_ARG_pointers[] =
{
  &_xdp_dbus_documents_method_info_add_named_IN_ARG_o_path_parent_fd.parent_struct,
  &_xdp_dbus_documents_method_info_add_named_IN_ARG_filename.parent_struct,
  &_xdp_dbus_documents_method_info_add_named_IN_ARG_reuse_existing.parent_struct,
  &_xdp_dbus_documents_method_info_add_named_IN_ARG_persistent.parent_struct,
  NULL
};

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

static const GDBusArgInfo * const _xdp_dbus_documents_method_info_add_named_OUT_ARG_pointers[] =
{
  &_xdp_dbus_documents_method_info_add_named_OUT_ARG_doc_id.parent_struct,
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_documents_method_add_named_annotation_info_pointers[] =
{
  &_xdp_dbus_documents_method_add_named_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_documents_method_info_add_named =
{
  {
    -1,
    (gchar *) "AddNamed",
    (GDBusArgInfo **) &_xdp_dbus_documents_method_info_add_named_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_documents_method_info_add_named_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_dbus_documents_method_add_named_annotation_info_pointers
  },
  "handle-add-named",
  TRUE
};

static const _ExtendedGDBusArgInfo _xdp_dbus_documents_method_info_add_full_IN_ARG_o_path_fds =
{
  {
    -1,
    (gchar *) "o_path_fds",
    (gchar *) "ah",
    NULL
  },
  FALSE
};

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

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

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

static const GDBusArgInfo * const _xdp_dbus_documents_method_info_add_full_IN_ARG_pointers[] =
{
  &_xdp_dbus_documents_method_info_add_full_IN_ARG_o_path_fds.parent_struct,
  &_xdp_dbus_documents_method_info_add_full_IN_ARG_flags.parent_struct,
  &_xdp_dbus_documents_method_info_add_full_IN_ARG_app_id.parent_struct,
  &_xdp_dbus_documents_method_info_add_full_IN_ARG_permissions.parent_struct,
  NULL
};

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

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

static const GDBusArgInfo * const _xdp_dbus_documents_method_info_add_full_OUT_ARG_pointers[] =
{
  &_xdp_dbus_documents_method_info_add_full_OUT_ARG_doc_ids.parent_struct,
  &_xdp_dbus_documents_method_info_add_full_OUT_ARG_extra_out.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_dbus_documents_method_add_full_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.In0",
  (gchar *) "QList<QDBusUnixFileDescriptor>",
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_documents_method_add_full_annotation_info_pointers[] =
{
  &_xdp_dbus_documents_method_add_full_annotation_info_0,
  &_xdp_dbus_documents_method_add_full_annotation_info_1,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_documents_method_info_add_full =
{
  {
    -1,
    (gchar *) "AddFull",
    (GDBusArgInfo **) &_xdp_dbus_documents_method_info_add_full_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_documents_method_info_add_full_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_dbus_documents_method_add_full_annotation_info_pointers
  },
  "handle-add-full",
  TRUE
};

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

static const _ExtendedGDBusArgInfo _xdp_dbus_documents_method_info_add_named_full_IN_ARG_filename =
{
  {
    -1,
    (gchar *) "filename",
    (gchar *) "ay",
    NULL
  },
  FALSE
};

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

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

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

static const GDBusArgInfo * const _xdp_dbus_documents_method_info_add_named_full_IN_ARG_pointers[] =
{
  &_xdp_dbus_documents_method_info_add_named_full_IN_ARG_o_path_fd.parent_struct,
  &_xdp_dbus_documents_method_info_add_named_full_IN_ARG_filename.parent_struct,
  &_xdp_dbus_documents_method_info_add_named_full_IN_ARG_flags.parent_struct,
  &_xdp_dbus_documents_method_info_add_named_full_IN_ARG_app_id.parent_struct,
  &_xdp_dbus_documents_method_info_add_named_full_IN_ARG_permissions.parent_struct,
  NULL
};

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

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

static const GDBusArgInfo * const _xdp_dbus_documents_method_info_add_named_full_OUT_ARG_pointers[] =
{
  &_xdp_dbus_documents_method_info_add_named_full_OUT_ARG_doc_id.parent_struct,
  &_xdp_dbus_documents_method_info_add_named_full_OUT_ARG_extra_out.parent_struct,
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_documents_method_add_named_full_annotation_info_pointers[] =
{
  &_xdp_dbus_documents_method_add_named_full_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_documents_method_info_add_named_full =
{
  {
    -1,
    (gchar *) "AddNamedFull",
    (GDBusArgInfo **) &_xdp_dbus_documents_method_info_add_named_full_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_documents_method_info_add_named_full_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_dbus_documents_method_add_named_full_annotation_info_pointers
  },
  "handle-add-named-full",
  TRUE
};

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

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

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

static const GDBusArgInfo * const _xdp_dbus_documents_method_info_grant_permissions_IN_ARG_pointers[] =
{
  &_xdp_dbus_documents_method_info_grant_permissions_IN_ARG_doc_id.parent_struct,
  &_xdp_dbus_documents_method_info_grant_permissions_IN_ARG_app_id.parent_struct,
  &_xdp_dbus_documents_method_info_grant_permissions_IN_ARG_permissions.parent_struct,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_documents_method_info_grant_permissions =
{
  {
    -1,
    (gchar *) "GrantPermissions",
    (GDBusArgInfo **) &_xdp_dbus_documents_method_info_grant_permissions_IN_ARG_pointers,
    NULL,
    NULL
  },
  "handle-grant-permissions",
  FALSE
};

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

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

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

static const GDBusArgInfo * const _xdp_dbus_documents_method_info_revoke_permissions_IN_ARG_pointers[] =
{
  &_xdp_dbus_documents_method_info_revoke_permissions_IN_ARG_doc_id.parent_struct,
  &_xdp_dbus_documents_method_info_revoke_permissions_IN_ARG_app_id.parent_struct,
  &_xdp_dbus_documents_method_info_revoke_permissions_IN_ARG_permissions.parent_struct,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_documents_method_info_revoke_permissions =
{
  {
    -1,
    (gchar *) "RevokePermissions",
    (GDBusArgInfo **) &_xdp_dbus_documents_method_info_revoke_permissions_IN_ARG_pointers,
    NULL,
    NULL
  },
  "handle-revoke-permissions",
  FALSE
};

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

static const GDBusArgInfo * const _xdp_dbus_documents_method_info_delete_IN_ARG_pointers[] =
{
  &_xdp_dbus_documents_method_info_delete_IN_ARG_doc_id.parent_struct,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_documents_method_info_delete =
{
  {
    -1,
    (gchar *) "Delete",
    (GDBusArgInfo **) &_xdp_dbus_documents_method_info_delete_IN_ARG_pointers,
    NULL,
    NULL
  },
  "handle-delete",
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_dbus_documents_method_info_lookup_IN_ARG_filename =
{
  {
    -1,
    (gchar *) "filename",
    (gchar *) "ay",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_dbus_documents_method_info_lookup_IN_ARG_pointers[] =
{
  &_xdp_dbus_documents_method_info_lookup_IN_ARG_filename.parent_struct,
  NULL
};

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

static const GDBusArgInfo * const _xdp_dbus_documents_method_info_lookup_OUT_ARG_pointers[] =
{
  &_xdp_dbus_documents_method_info_lookup_OUT_ARG_doc_id.parent_struct,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_documents_method_info_lookup =
{
  {
    -1,
    (gchar *) "Lookup",
    (GDBusArgInfo **) &_xdp_dbus_documents_method_info_lookup_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_documents_method_info_lookup_OUT_ARG_pointers,
    NULL
  },
  "handle-lookup",
  FALSE
};

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

static const GDBusArgInfo * const _xdp_dbus_documents_method_info_info_IN_ARG_pointers[] =
{
  &_xdp_dbus_documents_method_info_info_IN_ARG_doc_id.parent_struct,
  NULL
};

static const _ExtendedGDBusArgInfo _xdp_dbus_documents_method_info_info_OUT_ARG_path =
{
  {
    -1,
    (gchar *) "path",
    (gchar *) "ay",
    NULL
  },
  FALSE
};

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

static const GDBusArgInfo * const _xdp_dbus_documents_method_info_info_OUT_ARG_pointers[] =
{
  &_xdp_dbus_documents_method_info_info_OUT_ARG_path.parent_struct,
  &_xdp_dbus_documents_method_info_info_OUT_ARG_apps.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_dbus_documents_method_info_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.Out1",
  (gchar *) "QMap<QString,QStringList>",
  NULL
};

static const GDBusAnnotationInfo * const _xdp_dbus_documents_method_info_annotation_info_pointers[] =
{
  &_xdp_dbus_documents_method_info_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_documents_method_info_info =
{
  {
    -1,
    (gchar *) "Info",
    (GDBusArgInfo **) &_xdp_dbus_documents_method_info_info_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_documents_method_info_info_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_dbus_documents_method_info_annotation_info_pointers
  },
  "handle-info",
  FALSE
};

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

static const GDBusArgInfo * const _xdp_dbus_documents_method_info_list_IN_ARG_pointers[] =
{
  &_xdp_dbus_documents_method_info_list_IN_ARG_app_id.parent_struct,
  NULL
};

static const _ExtendedGDBusArgInfo _xdp_dbus_documents_method_info_list_OUT_ARG_docs =
{
  {
    -1,
    (gchar *) "docs",
    (gchar *) "a{say}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_dbus_documents_method_info_list_OUT_ARG_pointers[] =
{
  &_xdp_dbus_documents_method_info_list_OUT_ARG_docs.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_dbus_documents_method_list_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.Out0",
  (gchar *) "QMap<QString,QByteArray>",
  NULL
};

static const GDBusAnnotationInfo * const _xdp_dbus_documents_method_list_annotation_info_pointers[] =
{
  &_xdp_dbus_documents_method_list_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_documents_method_info_list =
{
  {
    -1,
    (gchar *) "List",
    (GDBusArgInfo **) &_xdp_dbus_documents_method_info_list_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_documents_method_info_list_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_dbus_documents_method_list_annotation_info_pointers
  },
  "handle-list",
  FALSE
};

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

static const GDBusArgInfo * const _xdp_dbus_documents_method_info_get_host_paths_IN_ARG_pointers[] =
{
  &_xdp_dbus_documents_method_info_get_host_paths_IN_ARG_doc_ids.parent_struct,
  NULL
};

static const _ExtendedGDBusArgInfo _xdp_dbus_documents_method_info_get_host_paths_OUT_ARG_paths =
{
  {
    -1,
    (gchar *) "paths",
    (gchar *) "a{say}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_dbus_documents_method_info_get_host_paths_OUT_ARG_pointers[] =
{
  &_xdp_dbus_documents_method_info_get_host_paths_OUT_ARG_paths.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_dbus_documents_method_get_host_paths_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.Out0",
  (gchar *) "QMap<QString,QByteArray>",
  NULL
};

static const GDBusAnnotationInfo * const _xdp_dbus_documents_method_get_host_paths_annotation_info_pointers[] =
{
  &_xdp_dbus_documents_method_get_host_paths_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_documents_method_info_get_host_paths =
{
  {
    -1,
    (gchar *) "GetHostPaths",
    (GDBusArgInfo **) &_xdp_dbus_documents_method_info_get_host_paths_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_documents_method_info_get_host_paths_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_dbus_documents_method_get_host_paths_annotation_info_pointers
  },
  "handle-get-host-paths",
  FALSE
};

static const GDBusMethodInfo * const _xdp_dbus_documents_method_info_pointers[] =
{
  &_xdp_dbus_documents_method_info_get_mount_point.parent_struct,
  &_xdp_dbus_documents_method_info_add.parent_struct,
  &_xdp_dbus_documents_method_info_add_named.parent_struct,
  &_xdp_dbus_documents_method_info_add_full.parent_struct,
  &_xdp_dbus_documents_method_info_add_named_full.parent_struct,
  &_xdp_dbus_documents_method_info_grant_permissions.parent_struct,
  &_xdp_dbus_documents_method_info_revoke_permissions.parent_struct,
  &_xdp_dbus_documents_method_info_delete.parent_struct,
  &_xdp_dbus_documents_method_info_lookup.parent_struct,
  &_xdp_dbus_documents_method_info_info.parent_struct,
  &_xdp_dbus_documents_method_info_list.parent_struct,
  &_xdp_dbus_documents_method_info_get_host_paths.parent_struct,
  NULL
};

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

static const GDBusPropertyInfo * const _xdp_dbus_documents_property_info_pointers[] =
{
  &_xdp_dbus_documents_property_info_version.parent_struct,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _xdp_dbus_documents_interface_info =
{
  {
    -1,
    (gchar *) "org.freedesktop.portal.Documents",
    (GDBusMethodInfo **) &_xdp_dbus_documents_method_info_pointers,
    NULL,
    (GDBusPropertyInfo **) &_xdp_dbus_documents_property_info_pointers,
    NULL
  },
  "documents",
};


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

/**
 * xdp_dbus_documents_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 #XdpDbusDocuments interface for a concrete class.
 * The properties are overridden in the order they are defined.
 *
 * Returns: The last property id.
 */
guint
xdp_dbus_documents_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_dbus_documents_method_marshal_get_mount_point (
    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_dbus_documents_method_marshal_add (
    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_VARIANT_BOOLEAN_BOOLEAN (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_dbus_documents_method_marshal_add_named (
    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_VARIANT_STRING_BOOLEAN_BOOLEAN (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_dbus_documents_method_marshal_add_full (
    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_VARIANT_UINT_STRING_BOXED (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_dbus_documents_method_marshal_add_named_full (
    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_VARIANT_STRING_UINT_STRING_BOXED (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_dbus_documents_method_marshal_grant_permissions (
    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_BOXED (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_dbus_documents_method_marshal_revoke_permissions (
    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_BOXED (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_dbus_documents_method_marshal_delete (
    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 (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_dbus_documents_method_marshal_lookup (
    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 (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_dbus_documents_method_marshal_info (
    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 (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_dbus_documents_method_marshal_list (
    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 (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_dbus_documents_method_marshal_get_host_paths (
    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);
}


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

/**
 * XdpDbusDocumentsIface:
 * @parent_iface: The parent interface.
 * @handle_add: Handler for the #XdpDbusDocuments::handle-add signal.
 * @handle_add_full: Handler for the #XdpDbusDocuments::handle-add-full signal.
 * @handle_add_named: Handler for the #XdpDbusDocuments::handle-add-named signal.
 * @handle_add_named_full: Handler for the #XdpDbusDocuments::handle-add-named-full signal.
 * @handle_delete: Handler for the #XdpDbusDocuments::handle-delete signal.
 * @handle_get_host_paths: Handler for the #XdpDbusDocuments::handle-get-host-paths signal.
 * @handle_get_mount_point: Handler for the #XdpDbusDocuments::handle-get-mount-point signal.
 * @handle_grant_permissions: Handler for the #XdpDbusDocuments::handle-grant-permissions signal.
 * @handle_info: Handler for the #XdpDbusDocuments::handle-info signal.
 * @handle_list: Handler for the #XdpDbusDocuments::handle-list signal.
 * @handle_lookup: Handler for the #XdpDbusDocuments::handle-lookup signal.
 * @handle_revoke_permissions: Handler for the #XdpDbusDocuments::handle-revoke-permissions signal.
 * @get_version: Getter for the #XdpDbusDocuments:version property.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-Documents.top_of_page">org.freedesktop.portal.Documents</link>.
 */

typedef XdpDbusDocumentsIface XdpDbusDocumentsInterface;
G_DEFINE_INTERFACE (XdpDbusDocuments, xdp_dbus_documents, G_TYPE_OBJECT)

static void
xdp_dbus_documents_default_init (XdpDbusDocumentsIface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * XdpDbusDocuments::handle-get-mount-point:
   * @object: A #XdpDbusDocuments.
   * @invocation: A #GDBusMethodInvocation.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-portal-Documents.GetMountPoint">GetMountPoint()</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_dbus_documents_complete_get_mount_point() 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-mount-point",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpDbusDocumentsIface, handle_get_mount_point),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_documents_method_marshal_get_mount_point,
    G_TYPE_BOOLEAN,
    1,
    G_TYPE_DBUS_METHOD_INVOCATION);

  /**
   * XdpDbusDocuments::handle-add:
   * @object: A #XdpDbusDocuments.
   * @invocation: A #GDBusMethodInvocation.
   * @fd_list: (nullable): A #GUnixFDList or %NULL.
   * @arg_o_path_fd: Argument passed by remote caller.
   * @arg_reuse_existing: Argument passed by remote caller.
   * @arg_persistent: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-portal-Documents.Add">Add()</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_dbus_documents_complete_add() 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",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpDbusDocumentsIface, handle_add),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_documents_method_marshal_add,
    G_TYPE_BOOLEAN,
    5,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UNIX_FD_LIST, G_TYPE_VARIANT, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN);

  /**
   * XdpDbusDocuments::handle-add-named:
   * @object: A #XdpDbusDocuments.
   * @invocation: A #GDBusMethodInvocation.
   * @fd_list: (nullable): A #GUnixFDList or %NULL.
   * @arg_o_path_parent_fd: Argument passed by remote caller.
   * @arg_filename: Argument passed by remote caller.
   * @arg_reuse_existing: Argument passed by remote caller.
   * @arg_persistent: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-portal-Documents.AddNamed">AddNamed()</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_dbus_documents_complete_add_named() 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-named",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpDbusDocumentsIface, handle_add_named),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_documents_method_marshal_add_named,
    G_TYPE_BOOLEAN,
    6,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UNIX_FD_LIST, G_TYPE_VARIANT, G_TYPE_STRING, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN);

  /**
   * XdpDbusDocuments::handle-add-full:
   * @object: A #XdpDbusDocuments.
   * @invocation: A #GDBusMethodInvocation.
   * @fd_list: (nullable): A #GUnixFDList or %NULL.
   * @arg_o_path_fds: Argument passed by remote caller.
   * @arg_flags: Argument passed by remote caller.
   * @arg_app_id: Argument passed by remote caller.
   * @arg_permissions: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-portal-Documents.AddFull">AddFull()</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_dbus_documents_complete_add_full() 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-full",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpDbusDocumentsIface, handle_add_full),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_documents_method_marshal_add_full,
    G_TYPE_BOOLEAN,
    6,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UNIX_FD_LIST, G_TYPE_VARIANT, G_TYPE_UINT, G_TYPE_STRING, G_TYPE_STRV);

  /**
   * XdpDbusDocuments::handle-add-named-full:
   * @object: A #XdpDbusDocuments.
   * @invocation: A #GDBusMethodInvocation.
   * @fd_list: (nullable): A #GUnixFDList or %NULL.
   * @arg_o_path_fd: Argument passed by remote caller.
   * @arg_filename: Argument passed by remote caller.
   * @arg_flags: Argument passed by remote caller.
   * @arg_app_id: Argument passed by remote caller.
   * @arg_permissions: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-portal-Documents.AddNamedFull">AddNamedFull()</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_dbus_documents_complete_add_named_full() 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-named-full",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpDbusDocumentsIface, handle_add_named_full),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_documents_method_marshal_add_named_full,
    G_TYPE_BOOLEAN,
    7,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UNIX_FD_LIST, G_TYPE_VARIANT, G_TYPE_STRING, G_TYPE_UINT, G_TYPE_STRING, G_TYPE_STRV);

  /**
   * XdpDbusDocuments::handle-grant-permissions:
   * @object: A #XdpDbusDocuments.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_doc_id: Argument passed by remote caller.
   * @arg_app_id: Argument passed by remote caller.
   * @arg_permissions: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-portal-Documents.GrantPermissions">GrantPermissions()</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_dbus_documents_complete_grant_permissions() 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-grant-permissions",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpDbusDocumentsIface, handle_grant_permissions),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_documents_method_marshal_grant_permissions,
    G_TYPE_BOOLEAN,
    4,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRV);

  /**
   * XdpDbusDocuments::handle-revoke-permissions:
   * @object: A #XdpDbusDocuments.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_doc_id: Argument passed by remote caller.
   * @arg_app_id: Argument passed by remote caller.
   * @arg_permissions: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-portal-Documents.RevokePermissions">RevokePermissions()</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_dbus_documents_complete_revoke_permissions() 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-revoke-permissions",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpDbusDocumentsIface, handle_revoke_permissions),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_documents_method_marshal_revoke_permissions,
    G_TYPE_BOOLEAN,
    4,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRV);

  /**
   * XdpDbusDocuments::handle-delete:
   * @object: A #XdpDbusDocuments.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_doc_id: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-portal-Documents.Delete">Delete()</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_dbus_documents_complete_delete() 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-delete",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpDbusDocumentsIface, handle_delete),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_documents_method_marshal_delete,
    G_TYPE_BOOLEAN,
    2,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING);

  /**
   * XdpDbusDocuments::handle-lookup:
   * @object: A #XdpDbusDocuments.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_filename: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-portal-Documents.Lookup">Lookup()</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_dbus_documents_complete_lookup() 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-lookup",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpDbusDocumentsIface, handle_lookup),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_documents_method_marshal_lookup,
    G_TYPE_BOOLEAN,
    2,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING);

  /**
   * XdpDbusDocuments::handle-info:
   * @object: A #XdpDbusDocuments.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_doc_id: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-portal-Documents.Info">Info()</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_dbus_documents_complete_info() 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-info",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpDbusDocumentsIface, handle_info),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_documents_method_marshal_info,
    G_TYPE_BOOLEAN,
    2,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING);

  /**
   * XdpDbusDocuments::handle-list:
   * @object: A #XdpDbusDocuments.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_app_id: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-portal-Documents.List">List()</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_dbus_documents_complete_list() 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",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpDbusDocumentsIface, handle_list),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_documents_method_marshal_list,
    G_TYPE_BOOLEAN,
    2,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING);

  /**
   * XdpDbusDocuments::handle-get-host-paths:
   * @object: A #XdpDbusDocuments.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_doc_ids: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-portal-Documents.GetHostPaths">GetHostPaths()</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_dbus_documents_complete_get_host_paths() 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-host-paths",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpDbusDocumentsIface, handle_get_host_paths),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_documents_method_marshal_get_host_paths,
    G_TYPE_BOOLEAN,
    2,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRV);

  /* GObject properties for D-Bus properties: */
  /**
   * XdpDbusDocuments:version:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-portal-Documents.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_dbus_documents_get_version: (skip)
 * @object: A #XdpDbusDocuments.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-portal-Documents.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_dbus_documents_get_version (XdpDbusDocuments *object)
{
  g_return_val_if_fail (XDP_DBUS_IS_DOCUMENTS (object), 0);

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

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

/**
 * xdp_dbus_documents_call_get_mount_point:
 * @proxy: A #XdpDbusDocumentsProxy.
 * @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-portal-Documents.GetMountPoint">GetMountPoint()</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_dbus_documents_call_get_mount_point_finish() to get the result of the operation.
 *
 * See xdp_dbus_documents_call_get_mount_point_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_documents_call_get_mount_point (
    XdpDbusDocuments *proxy,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "GetMountPoint",
    g_variant_new ("()"),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_documents_call_get_mount_point_finish:
 * @proxy: A #XdpDbusDocumentsProxy.
 * @out_path: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_documents_call_get_mount_point().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_documents_call_get_mount_point().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_documents_call_get_mount_point_finish (
    XdpDbusDocuments *proxy,
    gchar ** out_path,
    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,
                 "(^ay)",
                 out_path);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_documents_call_get_mount_point_sync:
 * @proxy: A #XdpDbusDocumentsProxy.
 * @out_path: (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-portal-Documents.GetMountPoint">GetMountPoint()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_documents_call_get_mount_point() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_documents_call_get_mount_point_sync (
    XdpDbusDocuments *proxy,
    gchar ** out_path,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "GetMountPoint",
    g_variant_new ("()"),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(^ay)",
                 out_path);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_documents_call_add:
 * @proxy: A #XdpDbusDocumentsProxy.
 * @arg_o_path_fd: Argument to pass with the method invocation.
 * @arg_reuse_existing: Argument to pass with the method invocation.
 * @arg_persistent: 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-portal-Documents.Add">Add()</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_dbus_documents_call_add_finish() to get the result of the operation.
 *
 * See xdp_dbus_documents_call_add_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_documents_call_add (
    XdpDbusDocuments *proxy,
    GVariant *arg_o_path_fd,
    gboolean arg_reuse_existing,
    gboolean arg_persistent,
    GUnixFDList *fd_list,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call_with_unix_fd_list (G_DBUS_PROXY (proxy),
    "Add",
    g_variant_new ("(@hbb)",
                   arg_o_path_fd,
                   arg_reuse_existing,
                   arg_persistent),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    fd_list,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_documents_call_add_finish:
 * @proxy: A #XdpDbusDocumentsProxy.
 * @out_doc_id: (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_dbus_documents_call_add().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_documents_call_add().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_documents_call_add_finish (
    XdpDbusDocuments *proxy,
    gchar ** out_doc_id,
    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,
                 "(s)",
                 out_doc_id);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_documents_call_add_sync:
 * @proxy: A #XdpDbusDocumentsProxy.
 * @arg_o_path_fd: Argument to pass with the method invocation.
 * @arg_reuse_existing: Argument to pass with the method invocation.
 * @arg_persistent: Argument to pass with the method invocation.
 * @fd_list: (nullable): A #GUnixFDList or %NULL.
 * @out_doc_id: (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-portal-Documents.Add">Add()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_documents_call_add() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_documents_call_add_sync (
    XdpDbusDocuments *proxy,
    GVariant *arg_o_path_fd,
    gboolean arg_reuse_existing,
    gboolean arg_persistent,
    GUnixFDList  *fd_list,
    gchar ** out_doc_id,
    GUnixFDList **out_fd_list,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_with_unix_fd_list_sync (G_DBUS_PROXY (proxy),
    "Add",
    g_variant_new ("(@hbb)",
                   arg_o_path_fd,
                   arg_reuse_existing,
                   arg_persistent),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    fd_list,
    out_fd_list,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(s)",
                 out_doc_id);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_documents_call_add_named:
 * @proxy: A #XdpDbusDocumentsProxy.
 * @arg_o_path_parent_fd: Argument to pass with the method invocation.
 * @arg_filename: Argument to pass with the method invocation.
 * @arg_reuse_existing: Argument to pass with the method invocation.
 * @arg_persistent: 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-portal-Documents.AddNamed">AddNamed()</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_dbus_documents_call_add_named_finish() to get the result of the operation.
 *
 * See xdp_dbus_documents_call_add_named_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_documents_call_add_named (
    XdpDbusDocuments *proxy,
    GVariant *arg_o_path_parent_fd,
    const gchar *arg_filename,
    gboolean arg_reuse_existing,
    gboolean arg_persistent,
    GUnixFDList *fd_list,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call_with_unix_fd_list (G_DBUS_PROXY (proxy),
    "AddNamed",
    g_variant_new ("(@h^aybb)",
                   arg_o_path_parent_fd,
                   arg_filename,
                   arg_reuse_existing,
                   arg_persistent),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    fd_list,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_documents_call_add_named_finish:
 * @proxy: A #XdpDbusDocumentsProxy.
 * @out_doc_id: (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_dbus_documents_call_add_named().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_documents_call_add_named().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_documents_call_add_named_finish (
    XdpDbusDocuments *proxy,
    gchar ** out_doc_id,
    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,
                 "(s)",
                 out_doc_id);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_documents_call_add_named_sync:
 * @proxy: A #XdpDbusDocumentsProxy.
 * @arg_o_path_parent_fd: Argument to pass with the method invocation.
 * @arg_filename: Argument to pass with the method invocation.
 * @arg_reuse_existing: Argument to pass with the method invocation.
 * @arg_persistent: Argument to pass with the method invocation.
 * @fd_list: (nullable): A #GUnixFDList or %NULL.
 * @out_doc_id: (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-portal-Documents.AddNamed">AddNamed()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_documents_call_add_named() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_documents_call_add_named_sync (
    XdpDbusDocuments *proxy,
    GVariant *arg_o_path_parent_fd,
    const gchar *arg_filename,
    gboolean arg_reuse_existing,
    gboolean arg_persistent,
    GUnixFDList  *fd_list,
    gchar ** out_doc_id,
    GUnixFDList **out_fd_list,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_with_unix_fd_list_sync (G_DBUS_PROXY (proxy),
    "AddNamed",
    g_variant_new ("(@h^aybb)",
                   arg_o_path_parent_fd,
                   arg_filename,
                   arg_reuse_existing,
                   arg_persistent),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    fd_list,
    out_fd_list,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(s)",
                 out_doc_id);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_documents_call_add_full:
 * @proxy: A #XdpDbusDocumentsProxy.
 * @arg_o_path_fds: Argument to pass with the method invocation.
 * @arg_flags: Argument to pass with the method invocation.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_permissions: 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-portal-Documents.AddFull">AddFull()</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_dbus_documents_call_add_full_finish() to get the result of the operation.
 *
 * See xdp_dbus_documents_call_add_full_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_documents_call_add_full (
    XdpDbusDocuments *proxy,
    GVariant *arg_o_path_fds,
    guint arg_flags,
    const gchar *arg_app_id,
    const gchar *const *arg_permissions,
    GUnixFDList *fd_list,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call_with_unix_fd_list (G_DBUS_PROXY (proxy),
    "AddFull",
    g_variant_new ("(@ahus^as)",
                   arg_o_path_fds,
                   arg_flags,
                   arg_app_id,
                   arg_permissions),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    fd_list,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_documents_call_add_full_finish:
 * @proxy: A #XdpDbusDocumentsProxy.
 * @out_doc_ids: (out) (optional) (array zero-terminated=1): Return location for return parameter or %NULL to ignore.
 * @out_extra_out: (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_dbus_documents_call_add_full().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_documents_call_add_full().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_documents_call_add_full_finish (
    XdpDbusDocuments *proxy,
    gchar *** out_doc_ids,
    GVariant ** out_extra_out,
    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,
                 "(^as@a{sv})",
                 out_doc_ids,
                 out_extra_out);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_documents_call_add_full_sync:
 * @proxy: A #XdpDbusDocumentsProxy.
 * @arg_o_path_fds: Argument to pass with the method invocation.
 * @arg_flags: Argument to pass with the method invocation.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_permissions: Argument to pass with the method invocation.
 * @fd_list: (nullable): A #GUnixFDList or %NULL.
 * @out_doc_ids: (out) (optional) (array zero-terminated=1): Return location for return parameter or %NULL to ignore.
 * @out_extra_out: (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-portal-Documents.AddFull">AddFull()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_documents_call_add_full() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_documents_call_add_full_sync (
    XdpDbusDocuments *proxy,
    GVariant *arg_o_path_fds,
    guint arg_flags,
    const gchar *arg_app_id,
    const gchar *const *arg_permissions,
    GUnixFDList  *fd_list,
    gchar *** out_doc_ids,
    GVariant ** out_extra_out,
    GUnixFDList **out_fd_list,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_with_unix_fd_list_sync (G_DBUS_PROXY (proxy),
    "AddFull",
    g_variant_new ("(@ahus^as)",
                   arg_o_path_fds,
                   arg_flags,
                   arg_app_id,
                   arg_permissions),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    fd_list,
    out_fd_list,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(^as@a{sv})",
                 out_doc_ids,
                 out_extra_out);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_documents_call_add_named_full:
 * @proxy: A #XdpDbusDocumentsProxy.
 * @arg_o_path_fd: Argument to pass with the method invocation.
 * @arg_filename: Argument to pass with the method invocation.
 * @arg_flags: Argument to pass with the method invocation.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_permissions: 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-portal-Documents.AddNamedFull">AddNamedFull()</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_dbus_documents_call_add_named_full_finish() to get the result of the operation.
 *
 * See xdp_dbus_documents_call_add_named_full_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_documents_call_add_named_full (
    XdpDbusDocuments *proxy,
    GVariant *arg_o_path_fd,
    const gchar *arg_filename,
    guint arg_flags,
    const gchar *arg_app_id,
    const gchar *const *arg_permissions,
    GUnixFDList *fd_list,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call_with_unix_fd_list (G_DBUS_PROXY (proxy),
    "AddNamedFull",
    g_variant_new ("(@h^ayus^as)",
                   arg_o_path_fd,
                   arg_filename,
                   arg_flags,
                   arg_app_id,
                   arg_permissions),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    fd_list,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_documents_call_add_named_full_finish:
 * @proxy: A #XdpDbusDocumentsProxy.
 * @out_doc_id: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_extra_out: (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_dbus_documents_call_add_named_full().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_documents_call_add_named_full().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_documents_call_add_named_full_finish (
    XdpDbusDocuments *proxy,
    gchar ** out_doc_id,
    GVariant ** out_extra_out,
    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,
                 "(s@a{sv})",
                 out_doc_id,
                 out_extra_out);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_documents_call_add_named_full_sync:
 * @proxy: A #XdpDbusDocumentsProxy.
 * @arg_o_path_fd: Argument to pass with the method invocation.
 * @arg_filename: Argument to pass with the method invocation.
 * @arg_flags: Argument to pass with the method invocation.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_permissions: Argument to pass with the method invocation.
 * @fd_list: (nullable): A #GUnixFDList or %NULL.
 * @out_doc_id: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_extra_out: (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-portal-Documents.AddNamedFull">AddNamedFull()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_documents_call_add_named_full() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_documents_call_add_named_full_sync (
    XdpDbusDocuments *proxy,
    GVariant *arg_o_path_fd,
    const gchar *arg_filename,
    guint arg_flags,
    const gchar *arg_app_id,
    const gchar *const *arg_permissions,
    GUnixFDList  *fd_list,
    gchar ** out_doc_id,
    GVariant ** out_extra_out,
    GUnixFDList **out_fd_list,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_with_unix_fd_list_sync (G_DBUS_PROXY (proxy),
    "AddNamedFull",
    g_variant_new ("(@h^ayus^as)",
                   arg_o_path_fd,
                   arg_filename,
                   arg_flags,
                   arg_app_id,
                   arg_permissions),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    fd_list,
    out_fd_list,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(s@a{sv})",
                 out_doc_id,
                 out_extra_out);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_documents_call_grant_permissions:
 * @proxy: A #XdpDbusDocumentsProxy.
 * @arg_doc_id: Argument to pass with the method invocation.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_permissions: 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-portal-Documents.GrantPermissions">GrantPermissions()</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_dbus_documents_call_grant_permissions_finish() to get the result of the operation.
 *
 * See xdp_dbus_documents_call_grant_permissions_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_documents_call_grant_permissions (
    XdpDbusDocuments *proxy,
    const gchar *arg_doc_id,
    const gchar *arg_app_id,
    const gchar *const *arg_permissions,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "GrantPermissions",
    g_variant_new ("(ss^as)",
                   arg_doc_id,
                   arg_app_id,
                   arg_permissions),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_documents_call_grant_permissions_finish:
 * @proxy: A #XdpDbusDocumentsProxy.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_documents_call_grant_permissions().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_documents_call_grant_permissions().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_documents_call_grant_permissions_finish (
    XdpDbusDocuments *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_dbus_documents_call_grant_permissions_sync:
 * @proxy: A #XdpDbusDocumentsProxy.
 * @arg_doc_id: Argument to pass with the method invocation.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_permissions: 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-portal-Documents.GrantPermissions">GrantPermissions()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_documents_call_grant_permissions() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_documents_call_grant_permissions_sync (
    XdpDbusDocuments *proxy,
    const gchar *arg_doc_id,
    const gchar *arg_app_id,
    const gchar *const *arg_permissions,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "GrantPermissions",
    g_variant_new ("(ss^as)",
                   arg_doc_id,
                   arg_app_id,
                   arg_permissions),
    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_dbus_documents_call_revoke_permissions:
 * @proxy: A #XdpDbusDocumentsProxy.
 * @arg_doc_id: Argument to pass with the method invocation.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_permissions: 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-portal-Documents.RevokePermissions">RevokePermissions()</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_dbus_documents_call_revoke_permissions_finish() to get the result of the operation.
 *
 * See xdp_dbus_documents_call_revoke_permissions_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_documents_call_revoke_permissions (
    XdpDbusDocuments *proxy,
    const gchar *arg_doc_id,
    const gchar *arg_app_id,
    const gchar *const *arg_permissions,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "RevokePermissions",
    g_variant_new ("(ss^as)",
                   arg_doc_id,
                   arg_app_id,
                   arg_permissions),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_documents_call_revoke_permissions_finish:
 * @proxy: A #XdpDbusDocumentsProxy.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_documents_call_revoke_permissions().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_documents_call_revoke_permissions().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_documents_call_revoke_permissions_finish (
    XdpDbusDocuments *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_dbus_documents_call_revoke_permissions_sync:
 * @proxy: A #XdpDbusDocumentsProxy.
 * @arg_doc_id: Argument to pass with the method invocation.
 * @arg_app_id: Argument to pass with the method invocation.
 * @arg_permissions: 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-portal-Documents.RevokePermissions">RevokePermissions()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_documents_call_revoke_permissions() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_documents_call_revoke_permissions_sync (
    XdpDbusDocuments *proxy,
    const gchar *arg_doc_id,
    const gchar *arg_app_id,
    const gchar *const *arg_permissions,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "RevokePermissions",
    g_variant_new ("(ss^as)",
                   arg_doc_id,
                   arg_app_id,
                   arg_permissions),
    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_dbus_documents_call_delete:
 * @proxy: A #XdpDbusDocumentsProxy.
 * @arg_doc_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-portal-Documents.Delete">Delete()</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_dbus_documents_call_delete_finish() to get the result of the operation.
 *
 * See xdp_dbus_documents_call_delete_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_documents_call_delete (
    XdpDbusDocuments *proxy,
    const gchar *arg_doc_id,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "Delete",
    g_variant_new ("(s)",
                   arg_doc_id),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_documents_call_delete_finish:
 * @proxy: A #XdpDbusDocumentsProxy.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_documents_call_delete().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_documents_call_delete().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_documents_call_delete_finish (
    XdpDbusDocuments *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_dbus_documents_call_delete_sync:
 * @proxy: A #XdpDbusDocumentsProxy.
 * @arg_doc_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-portal-Documents.Delete">Delete()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_documents_call_delete() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_documents_call_delete_sync (
    XdpDbusDocuments *proxy,
    const gchar *arg_doc_id,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "Delete",
    g_variant_new ("(s)",
                   arg_doc_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_dbus_documents_call_lookup:
 * @proxy: A #XdpDbusDocumentsProxy.
 * @arg_filename: 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-portal-Documents.Lookup">Lookup()</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_dbus_documents_call_lookup_finish() to get the result of the operation.
 *
 * See xdp_dbus_documents_call_lookup_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_documents_call_lookup (
    XdpDbusDocuments *proxy,
    const gchar *arg_filename,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "Lookup",
    g_variant_new ("(^ay)",
                   arg_filename),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_documents_call_lookup_finish:
 * @proxy: A #XdpDbusDocumentsProxy.
 * @out_doc_id: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_documents_call_lookup().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_documents_call_lookup().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_documents_call_lookup_finish (
    XdpDbusDocuments *proxy,
    gchar ** out_doc_id,
    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,
                 "(s)",
                 out_doc_id);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_documents_call_lookup_sync:
 * @proxy: A #XdpDbusDocumentsProxy.
 * @arg_filename: Argument to pass with the method invocation.
 * @out_doc_id: (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-portal-Documents.Lookup">Lookup()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_documents_call_lookup() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_documents_call_lookup_sync (
    XdpDbusDocuments *proxy,
    const gchar *arg_filename,
    gchar ** out_doc_id,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "Lookup",
    g_variant_new ("(^ay)",
                   arg_filename),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(s)",
                 out_doc_id);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_documents_call_info:
 * @proxy: A #XdpDbusDocumentsProxy.
 * @arg_doc_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-portal-Documents.Info">Info()</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_dbus_documents_call_info_finish() to get the result of the operation.
 *
 * See xdp_dbus_documents_call_info_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_documents_call_info (
    XdpDbusDocuments *proxy,
    const gchar *arg_doc_id,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "Info",
    g_variant_new ("(s)",
                   arg_doc_id),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_documents_call_info_finish:
 * @proxy: A #XdpDbusDocumentsProxy.
 * @out_path: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_apps: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_documents_call_info().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_documents_call_info().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_documents_call_info_finish (
    XdpDbusDocuments *proxy,
    gchar ** out_path,
    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,
                 "(^ay@a{sas})",
                 out_path,
                 out_apps);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_documents_call_info_sync:
 * @proxy: A #XdpDbusDocumentsProxy.
 * @arg_doc_id: Argument to pass with the method invocation.
 * @out_path: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @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-portal-Documents.Info">Info()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_documents_call_info() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_documents_call_info_sync (
    XdpDbusDocuments *proxy,
    const gchar *arg_doc_id,
    gchar ** out_path,
    GVariant ** out_apps,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "Info",
    g_variant_new ("(s)",
                   arg_doc_id),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(^ay@a{sas})",
                 out_path,
                 out_apps);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_documents_call_list:
 * @proxy: A #XdpDbusDocumentsProxy.
 * @arg_app_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-portal-Documents.List">List()</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_dbus_documents_call_list_finish() to get the result of the operation.
 *
 * See xdp_dbus_documents_call_list_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_documents_call_list (
    XdpDbusDocuments *proxy,
    const gchar *arg_app_id,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "List",
    g_variant_new ("(s)",
                   arg_app_id),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_documents_call_list_finish:
 * @proxy: A #XdpDbusDocumentsProxy.
 * @out_docs: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_documents_call_list().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_documents_call_list().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_documents_call_list_finish (
    XdpDbusDocuments *proxy,
    GVariant ** out_docs,
    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{say})",
                 out_docs);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_documents_call_list_sync:
 * @proxy: A #XdpDbusDocumentsProxy.
 * @arg_app_id: Argument to pass with the method invocation.
 * @out_docs: (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-portal-Documents.List">List()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_documents_call_list() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_documents_call_list_sync (
    XdpDbusDocuments *proxy,
    const gchar *arg_app_id,
    GVariant ** out_docs,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "List",
    g_variant_new ("(s)",
                   arg_app_id),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(@a{say})",
                 out_docs);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_documents_call_get_host_paths:
 * @proxy: A #XdpDbusDocumentsProxy.
 * @arg_doc_ids: 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-portal-Documents.GetHostPaths">GetHostPaths()</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_dbus_documents_call_get_host_paths_finish() to get the result of the operation.
 *
 * See xdp_dbus_documents_call_get_host_paths_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_documents_call_get_host_paths (
    XdpDbusDocuments *proxy,
    const gchar *const *arg_doc_ids,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "GetHostPaths",
    g_variant_new ("(^as)",
                   arg_doc_ids),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_documents_call_get_host_paths_finish:
 * @proxy: A #XdpDbusDocumentsProxy.
 * @out_paths: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_documents_call_get_host_paths().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_documents_call_get_host_paths().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_documents_call_get_host_paths_finish (
    XdpDbusDocuments *proxy,
    GVariant ** out_paths,
    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{say})",
                 out_paths);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_documents_call_get_host_paths_sync:
 * @proxy: A #XdpDbusDocumentsProxy.
 * @arg_doc_ids: Argument to pass with the method invocation.
 * @out_paths: (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-portal-Documents.GetHostPaths">GetHostPaths()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_documents_call_get_host_paths() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_documents_call_get_host_paths_sync (
    XdpDbusDocuments *proxy,
    const gchar *const *arg_doc_ids,
    GVariant ** out_paths,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "GetHostPaths",
    g_variant_new ("(^as)",
                   arg_doc_ids),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(@a{say})",
                 out_paths);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_documents_complete_get_mount_point:
 * @object: A #XdpDbusDocuments.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @path: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-portal-Documents.GetMountPoint">GetMountPoint()</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_dbus_documents_complete_get_mount_point (
    XdpDbusDocuments *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    const gchar *path)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(^ay)",
                   path));
}

/**
 * xdp_dbus_documents_complete_add:
 * @object: A #XdpDbusDocuments.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @fd_list: (nullable): A #GUnixFDList or %NULL.
 * @doc_id: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-portal-Documents.Add">Add()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
 *
 * This method will free @invocation, you cannot use it afterwards.
 */
void
xdp_dbus_documents_complete_add (
    XdpDbusDocuments *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    GUnixFDList *fd_list,
    const gchar *doc_id)
{
  g_dbus_method_invocation_return_value_with_unix_fd_list (invocation,
    g_variant_new ("(s)",
                   doc_id),
    fd_list);
}

/**
 * xdp_dbus_documents_complete_add_named:
 * @object: A #XdpDbusDocuments.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @fd_list: (nullable): A #GUnixFDList or %NULL.
 * @doc_id: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-portal-Documents.AddNamed">AddNamed()</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_dbus_documents_complete_add_named (
    XdpDbusDocuments *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    GUnixFDList *fd_list,
    const gchar *doc_id)
{
  g_dbus_method_invocation_return_value_with_unix_fd_list (invocation,
    g_variant_new ("(s)",
                   doc_id),
    fd_list);
}

/**
 * xdp_dbus_documents_complete_add_full:
 * @object: A #XdpDbusDocuments.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @fd_list: (nullable): A #GUnixFDList or %NULL.
 * @doc_ids: Parameter to return.
 * @extra_out: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-portal-Documents.AddFull">AddFull()</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_dbus_documents_complete_add_full (
    XdpDbusDocuments *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    GUnixFDList *fd_list,
    const gchar *const *doc_ids,
    GVariant *extra_out)
{
  g_dbus_method_invocation_return_value_with_unix_fd_list (invocation,
    g_variant_new ("(^as@a{sv})",
                   doc_ids,
                   extra_out),
    fd_list);
}

/**
 * xdp_dbus_documents_complete_add_named_full:
 * @object: A #XdpDbusDocuments.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @fd_list: (nullable): A #GUnixFDList or %NULL.
 * @doc_id: Parameter to return.
 * @extra_out: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-portal-Documents.AddNamedFull">AddNamedFull()</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_dbus_documents_complete_add_named_full (
    XdpDbusDocuments *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    GUnixFDList *fd_list,
    const gchar *doc_id,
    GVariant *extra_out)
{
  g_dbus_method_invocation_return_value_with_unix_fd_list (invocation,
    g_variant_new ("(s@a{sv})",
                   doc_id,
                   extra_out),
    fd_list);
}

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

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

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

/**
 * xdp_dbus_documents_complete_lookup:
 * @object: A #XdpDbusDocuments.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @doc_id: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-portal-Documents.Lookup">Lookup()</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_dbus_documents_complete_lookup (
    XdpDbusDocuments *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    const gchar *doc_id)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(s)",
                   doc_id));
}

/**
 * xdp_dbus_documents_complete_info:
 * @object: A #XdpDbusDocuments.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @path: Parameter to return.
 * @apps: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-portal-Documents.Info">Info()</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_dbus_documents_complete_info (
    XdpDbusDocuments *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    const gchar *path,
    GVariant *apps)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(^ay@a{sas})",
                   path,
                   apps));
}

/**
 * xdp_dbus_documents_complete_list:
 * @object: A #XdpDbusDocuments.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @docs: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-portal-Documents.List">List()</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_dbus_documents_complete_list (
    XdpDbusDocuments *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    GVariant *docs)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(@a{say})",
                   docs));
}

/**
 * xdp_dbus_documents_complete_get_host_paths:
 * @object: A #XdpDbusDocuments.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @paths: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-portal-Documents.GetHostPaths">GetHostPaths()</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_dbus_documents_complete_get_host_paths (
    XdpDbusDocuments *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    GVariant *paths)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(@a{say})",
                   paths));
}

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

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

/**
 * XdpDbusDocumentsProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpDbusDocumentsProxy.
 */

struct _XdpDbusDocumentsProxyPrivate
{
  GData *qdata;
};

static void xdp_dbus_documents_proxy_iface_init (XdpDbusDocumentsIface *iface);

#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpDbusDocumentsProxy, xdp_dbus_documents_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (XdpDbusDocumentsProxy)
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_DOCUMENTS, xdp_dbus_documents_proxy_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpDbusDocumentsProxy, xdp_dbus_documents_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_DOCUMENTS, xdp_dbus_documents_proxy_iface_init))

#endif
static void
xdp_dbus_documents_proxy_finalize (GObject *object)
{
  XdpDbusDocumentsProxy *proxy = XDP_DBUS_DOCUMENTS_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (xdp_dbus_documents_proxy_parent_class)->finalize (object);
}

static void
xdp_dbus_documents_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_dbus_documents_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_dbus_documents_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.portal.Documents: %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_dbus_documents_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_dbus_documents_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.portal.Documents", info->parent_struct.name, variant),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    NULL, (GAsyncReadyCallback) xdp_dbus_documents_proxy_set_property_cb, (GDBusPropertyInfo *) &info->parent_struct);
  g_variant_unref (variant);
}

static void
xdp_dbus_documents_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_dbus_documents_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_DBUS_TYPE_DOCUMENTS);
  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_DBUS_TYPE_DOCUMENTS);
  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_dbus_documents_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  XdpDbusDocumentsProxy *proxy = XDP_DBUS_DOCUMENTS_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_dbus_documents_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_dbus_documents_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_dbus_documents_proxy_get_version (XdpDbusDocuments *object)
{
  XdpDbusDocumentsProxy *proxy = XDP_DBUS_DOCUMENTS_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_dbus_documents_proxy_init (XdpDbusDocumentsProxy *proxy)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  proxy->priv = xdp_dbus_documents_proxy_get_instance_private (proxy);
#else
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, XDP_DBUS_TYPE_DOCUMENTS_PROXY, XdpDbusDocumentsProxyPrivate);
#endif

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

static void
xdp_dbus_documents_proxy_class_init (XdpDbusDocumentsProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = xdp_dbus_documents_proxy_finalize;
  gobject_class->get_property = xdp_dbus_documents_proxy_get_property;
  gobject_class->set_property = xdp_dbus_documents_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = xdp_dbus_documents_proxy_g_signal;
  proxy_class->g_properties_changed = xdp_dbus_documents_proxy_g_properties_changed;

  xdp_dbus_documents_override_properties (gobject_class, 1);

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

static void
xdp_dbus_documents_proxy_iface_init (XdpDbusDocumentsIface *iface)
{
  iface->get_version = xdp_dbus_documents_proxy_get_version;
}

/**
 * xdp_dbus_documents_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-portal-Documents.top_of_page">org.freedesktop.portal.Documents</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_dbus_documents_proxy_new_finish() to get the result of the operation.
 *
 * See xdp_dbus_documents_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_dbus_documents_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_DBUS_TYPE_DOCUMENTS_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.portal.Documents", NULL);
}

/**
 * xdp_dbus_documents_proxy_new_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_documents_proxy_new().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_dbus_documents_proxy_new().
 *
 * Returns: (transfer full) (type XdpDbusDocumentsProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusDocuments *
xdp_dbus_documents_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_DBUS_DOCUMENTS (ret);
  else
    return NULL;
}

/**
 * xdp_dbus_documents_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-portal-Documents.top_of_page">org.freedesktop.portal.Documents</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_documents_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpDbusDocumentsProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusDocuments *
xdp_dbus_documents_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_DBUS_TYPE_DOCUMENTS_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.portal.Documents", NULL);
  if (ret != NULL)
    return XDP_DBUS_DOCUMENTS (ret);
  else
    return NULL;
}


/**
 * xdp_dbus_documents_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_dbus_documents_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_dbus_documents_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See xdp_dbus_documents_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_dbus_documents_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_DBUS_TYPE_DOCUMENTS_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.portal.Documents", NULL);
}

/**
 * xdp_dbus_documents_proxy_new_for_bus_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_documents_proxy_new_for_bus().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_dbus_documents_proxy_new_for_bus().
 *
 * Returns: (transfer full) (type XdpDbusDocumentsProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusDocuments *
xdp_dbus_documents_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_DBUS_DOCUMENTS (ret);
  else
    return NULL;
}

/**
 * xdp_dbus_documents_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_dbus_documents_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_documents_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpDbusDocumentsProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusDocuments *
xdp_dbus_documents_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_DBUS_TYPE_DOCUMENTS_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.portal.Documents", NULL);
  if (ret != NULL)
    return XDP_DBUS_DOCUMENTS (ret);
  else
    return NULL;
}


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

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

/**
 * XdpDbusDocumentsSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpDbusDocumentsSkeleton.
 */

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

static void
_xdp_dbus_documents_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)
{
  XdpDbusDocumentsSkeleton *skeleton = XDP_DBUS_DOCUMENTS_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_DBUS_TYPE_DOCUMENTS);
  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_DBUS_TYPE_DOCUMENTS);
  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_dbus_documents_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)
{
  XdpDbusDocumentsSkeleton *skeleton = XDP_DBUS_DOCUMENTS_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_dbus_documents_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_dbus_documents_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)
{
  XdpDbusDocumentsSkeleton *skeleton = XDP_DBUS_DOCUMENTS_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_dbus_documents_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_dbus_documents_skeleton_vtable =
{
  _xdp_dbus_documents_skeleton_handle_method_call,
  _xdp_dbus_documents_skeleton_handle_get_property,
  _xdp_dbus_documents_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
xdp_dbus_documents_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return xdp_dbus_documents_interface_info ();
}

static GDBusInterfaceVTable *
xdp_dbus_documents_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_xdp_dbus_documents_skeleton_vtable;
}

static GVariant *
xdp_dbus_documents_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  XdpDbusDocumentsSkeleton *skeleton = XDP_DBUS_DOCUMENTS_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_dbus_documents_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _xdp_dbus_documents_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _xdp_dbus_documents_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _xdp_dbus_documents_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.portal.Documents", 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_dbus_documents_emit_changed (gpointer user_data);

static void
xdp_dbus_documents_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
{
  XdpDbusDocumentsSkeleton *skeleton = XDP_DBUS_DOCUMENTS_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_dbus_documents_emit_changed (skeleton);
}

static void xdp_dbus_documents_skeleton_iface_init (XdpDbusDocumentsIface *iface);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpDbusDocumentsSkeleton, xdp_dbus_documents_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (XdpDbusDocumentsSkeleton)
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_DOCUMENTS, xdp_dbus_documents_skeleton_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpDbusDocumentsSkeleton, xdp_dbus_documents_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_DOCUMENTS, xdp_dbus_documents_skeleton_iface_init))

#endif
static void
xdp_dbus_documents_skeleton_finalize (GObject *object)
{
  XdpDbusDocumentsSkeleton *skeleton = XDP_DBUS_DOCUMENTS_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_dbus_documents_skeleton_parent_class)->finalize (object);
}

static void
xdp_dbus_documents_skeleton_get_property (GObject      *object,
  guint         prop_id,
  GValue       *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  XdpDbusDocumentsSkeleton *skeleton = XDP_DBUS_DOCUMENTS_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_dbus_documents_emit_changed (gpointer user_data)
{
  XdpDbusDocumentsSkeleton *skeleton = XDP_DBUS_DOCUMENTS_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.portal.Documents",
                                           &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_dbus_documents_schedule_emit_changed (XdpDbusDocumentsSkeleton *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_dbus_documents_skeleton_notify (GObject      *object,
  GParamSpec *pspec G_GNUC_UNUSED)
{
  XdpDbusDocumentsSkeleton *skeleton = XDP_DBUS_DOCUMENTS_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_dbus_documents_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
      g_source_set_name (skeleton->priv->changed_properties_idle_source, "[generated] _xdp_dbus_documents_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_dbus_documents_skeleton_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec)
{
  const _ExtendedGDBusPropertyInfo *info;
  XdpDbusDocumentsSkeleton *skeleton = XDP_DBUS_DOCUMENTS_SKELETON (object);
  g_assert (prop_id != 0 && prop_id - 1 < 1);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_dbus_documents_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_dbus_documents_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_dbus_documents_skeleton_init (XdpDbusDocumentsSkeleton *skeleton)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  skeleton->priv = xdp_dbus_documents_skeleton_get_instance_private (skeleton);
#else
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, XDP_DBUS_TYPE_DOCUMENTS_SKELETON, XdpDbusDocumentsSkeletonPrivate);
#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_dbus_documents_skeleton_get_version (XdpDbusDocuments *object)
{
  XdpDbusDocumentsSkeleton *skeleton = XDP_DBUS_DOCUMENTS_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_dbus_documents_skeleton_class_init (XdpDbusDocumentsSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize = xdp_dbus_documents_skeleton_finalize;
  gobject_class->get_property = xdp_dbus_documents_skeleton_get_property;
  gobject_class->set_property = xdp_dbus_documents_skeleton_set_property;
  gobject_class->notify       = xdp_dbus_documents_skeleton_notify;


  xdp_dbus_documents_override_properties (gobject_class, 1);

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = xdp_dbus_documents_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = xdp_dbus_documents_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = xdp_dbus_documents_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = xdp_dbus_documents_skeleton_dbus_interface_get_vtable;

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

static void
xdp_dbus_documents_skeleton_iface_init (XdpDbusDocumentsIface *iface)
{
  iface->get_version = xdp_dbus_documents_skeleton_get_version;
}

/**
 * xdp_dbus_documents_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-Documents.top_of_page">org.freedesktop.portal.Documents</link>.
 *
 * Returns: (transfer full) (type XdpDbusDocumentsSkeleton): The skeleton object.
 */
XdpDbusDocuments *
xdp_dbus_documents_skeleton_new (void)
{
  return XDP_DBUS_DOCUMENTS (g_object_new (XDP_DBUS_TYPE_DOCUMENTS_SKELETON, NULL));
}

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

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

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

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

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

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

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

static const GDBusArgInfo * const _xdp_dbus_dynamic_launcher_method_info_install_IN_ARG_pointers[] =
{
  &_xdp_dbus_dynamic_launcher_method_info_install_IN_ARG_token.parent_struct,
  &_xdp_dbus_dynamic_launcher_method_info_install_IN_ARG_desktop_file_id.parent_struct,
  &_xdp_dbus_dynamic_launcher_method_info_install_IN_ARG_desktop_entry.parent_struct,
  &_xdp_dbus_dynamic_launcher_method_info_install_IN_ARG_options.parent_struct,
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_dynamic_launcher_method_install_annotation_info_pointers[] =
{
  &_xdp_dbus_dynamic_launcher_method_install_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_dynamic_launcher_method_info_install =
{
  {
    -1,
    (gchar *) "Install",
    (GDBusArgInfo **) &_xdp_dbus_dynamic_launcher_method_info_install_IN_ARG_pointers,
    NULL,
    (GDBusAnnotationInfo **) &_xdp_dbus_dynamic_launcher_method_install_annotation_info_pointers
  },
  "handle-install",
  FALSE
};

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

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

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

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

static const GDBusArgInfo * const _xdp_dbus_dynamic_launcher_method_info_prepare_install_IN_ARG_pointers[] =
{
  &_xdp_dbus_dynamic_launcher_method_info_prepare_install_IN_ARG_parent_window.parent_struct,
  &_xdp_dbus_dynamic_launcher_method_info_prepare_install_IN_ARG_name.parent_struct,
  &_xdp_dbus_dynamic_launcher_method_info_prepare_install_IN_ARG_icon_v.parent_struct,
  &_xdp_dbus_dynamic_launcher_method_info_prepare_install_IN_ARG_options.parent_struct,
  NULL
};

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

static const GDBusArgInfo * const _xdp_dbus_dynamic_launcher_method_info_prepare_install_OUT_ARG_pointers[] =
{
  &_xdp_dbus_dynamic_launcher_method_info_prepare_install_OUT_ARG_handle.parent_struct,
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_dynamic_launcher_method_prepare_install_annotation_info_pointers[] =
{
  &_xdp_dbus_dynamic_launcher_method_prepare_install_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_dynamic_launcher_method_info_prepare_install =
{
  {
    -1,
    (gchar *) "PrepareInstall",
    (GDBusArgInfo **) &_xdp_dbus_dynamic_launcher_method_info_prepare_install_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_dynamic_launcher_method_info_prepare_install_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_dbus_dynamic_launcher_method_prepare_install_annotation_info_pointers
  },
  "handle-prepare-install",
  FALSE
};

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

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

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

static const GDBusArgInfo * const _xdp_dbus_dynamic_launcher_method_info_request_install_token_IN_ARG_pointers[] =
{
  &_xdp_dbus_dynamic_launcher_method_info_request_install_token_IN_ARG_name.parent_struct,
  &_xdp_dbus_dynamic_launcher_method_info_request_install_token_IN_ARG_icon_v.parent_struct,
  &_xdp_dbus_dynamic_launcher_method_info_request_install_token_IN_ARG_options.parent_struct,
  NULL
};

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

static const GDBusArgInfo * const _xdp_dbus_dynamic_launcher_method_info_request_install_token_OUT_ARG_pointers[] =
{
  &_xdp_dbus_dynamic_launcher_method_info_request_install_token_OUT_ARG_token.parent_struct,
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_dynamic_launcher_method_request_install_token_annotation_info_pointers[] =
{
  &_xdp_dbus_dynamic_launcher_method_request_install_token_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_dynamic_launcher_method_info_request_install_token =
{
  {
    -1,
    (gchar *) "RequestInstallToken",
    (GDBusArgInfo **) &_xdp_dbus_dynamic_launcher_method_info_request_install_token_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_dynamic_launcher_method_info_request_install_token_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_dbus_dynamic_launcher_method_request_install_token_annotation_info_pointers
  },
  "handle-request-install-token",
  FALSE
};

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

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

static const GDBusArgInfo * const _xdp_dbus_dynamic_launcher_method_info_uninstall_IN_ARG_pointers[] =
{
  &_xdp_dbus_dynamic_launcher_method_info_uninstall_IN_ARG_desktop_file_id.parent_struct,
  &_xdp_dbus_dynamic_launcher_method_info_uninstall_IN_ARG_options.parent_struct,
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_dynamic_launcher_method_uninstall_annotation_info_pointers[] =
{
  &_xdp_dbus_dynamic_launcher_method_uninstall_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_dynamic_launcher_method_info_uninstall =
{
  {
    -1,
    (gchar *) "Uninstall",
    (GDBusArgInfo **) &_xdp_dbus_dynamic_launcher_method_info_uninstall_IN_ARG_pointers,
    NULL,
    (GDBusAnnotationInfo **) &_xdp_dbus_dynamic_launcher_method_uninstall_annotation_info_pointers
  },
  "handle-uninstall",
  FALSE
};

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

static const GDBusArgInfo * const _xdp_dbus_dynamic_launcher_method_info_get_desktop_entry_IN_ARG_pointers[] =
{
  &_xdp_dbus_dynamic_launcher_method_info_get_desktop_entry_IN_ARG_desktop_file_id.parent_struct,
  NULL
};

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

static const GDBusArgInfo * const _xdp_dbus_dynamic_launcher_method_info_get_desktop_entry_OUT_ARG_pointers[] =
{
  &_xdp_dbus_dynamic_launcher_method_info_get_desktop_entry_OUT_ARG_contents.parent_struct,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_dynamic_launcher_method_info_get_desktop_entry =
{
  {
    -1,
    (gchar *) "GetDesktopEntry",
    (GDBusArgInfo **) &_xdp_dbus_dynamic_launcher_method_info_get_desktop_entry_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_dynamic_launcher_method_info_get_desktop_entry_OUT_ARG_pointers,
    NULL
  },
  "handle-get-desktop-entry",
  FALSE
};

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

static const GDBusArgInfo * const _xdp_dbus_dynamic_launcher_method_info_get_icon_IN_ARG_pointers[] =
{
  &_xdp_dbus_dynamic_launcher_method_info_get_icon_IN_ARG_desktop_file_id.parent_struct,
  NULL
};

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

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

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

static const GDBusArgInfo * const _xdp_dbus_dynamic_launcher_method_info_get_icon_OUT_ARG_pointers[] =
{
  &_xdp_dbus_dynamic_launcher_method_info_get_icon_OUT_ARG_icon_v.parent_struct,
  &_xdp_dbus_dynamic_launcher_method_info_get_icon_OUT_ARG_icon_format.parent_struct,
  &_xdp_dbus_dynamic_launcher_method_info_get_icon_OUT_ARG_icon_size.parent_struct,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_dynamic_launcher_method_info_get_icon =
{
  {
    -1,
    (gchar *) "GetIcon",
    (GDBusArgInfo **) &_xdp_dbus_dynamic_launcher_method_info_get_icon_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_dynamic_launcher_method_info_get_icon_OUT_ARG_pointers,
    NULL
  },
  "handle-get-icon",
  FALSE
};

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

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

static const GDBusArgInfo * const _xdp_dbus_dynamic_launcher_method_info_launch_IN_ARG_pointers[] =
{
  &_xdp_dbus_dynamic_launcher_method_info_launch_IN_ARG_desktop_file_id.parent_struct,
  &_xdp_dbus_dynamic_launcher_method_info_launch_IN_ARG_options.parent_struct,
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_dynamic_launcher_method_launch_annotation_info_pointers[] =
{
  &_xdp_dbus_dynamic_launcher_method_launch_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_dynamic_launcher_method_info_launch =
{
  {
    -1,
    (gchar *) "Launch",
    (GDBusArgInfo **) &_xdp_dbus_dynamic_launcher_method_info_launch_IN_ARG_pointers,
    NULL,
    (GDBusAnnotationInfo **) &_xdp_dbus_dynamic_launcher_method_launch_annotation_info_pointers
  },
  "handle-launch",
  FALSE
};

static const GDBusMethodInfo * const _xdp_dbus_dynamic_launcher_method_info_pointers[] =
{
  &_xdp_dbus_dynamic_launcher_method_info_install.parent_struct,
  &_xdp_dbus_dynamic_launcher_method_info_prepare_install.parent_struct,
  &_xdp_dbus_dynamic_launcher_method_info_request_install_token.parent_struct,
  &_xdp_dbus_dynamic_launcher_method_info_uninstall.parent_struct,
  &_xdp_dbus_dynamic_launcher_method_info_get_desktop_entry.parent_struct,
  &_xdp_dbus_dynamic_launcher_method_info_get_icon.parent_struct,
  &_xdp_dbus_dynamic_launcher_method_info_launch.parent_struct,
  NULL
};

static const _ExtendedGDBusPropertyInfo _xdp_dbus_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_dbus_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_dbus_dynamic_launcher_property_info_pointers[] =
{
  &_xdp_dbus_dynamic_launcher_property_info_supported_launcher_types.parent_struct,
  &_xdp_dbus_dynamic_launcher_property_info_version.parent_struct,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _xdp_dbus_dynamic_launcher_interface_info =
{
  {
    -1,
    (gchar *) "org.freedesktop.portal.DynamicLauncher",
    (GDBusMethodInfo **) &_xdp_dbus_dynamic_launcher_method_info_pointers,
    NULL,
    (GDBusPropertyInfo **) &_xdp_dbus_dynamic_launcher_property_info_pointers,
    NULL
  },
  "dynamic-launcher",
};


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

/**
 * xdp_dbus_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 #XdpDbusDynamicLauncher interface for a concrete class.
 * The properties are overridden in the order they are defined.
 *
 * Returns: The last property id.
 */
guint
xdp_dbus_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_dbus_dynamic_launcher_method_marshal_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_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_dbus_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_VARIANT_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_dbus_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_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_dbus_dynamic_launcher_method_marshal_uninstall (
    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_dbus_dynamic_launcher_method_marshal_get_desktop_entry (
    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 (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_dbus_dynamic_launcher_method_marshal_get_icon (
    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 (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_dbus_dynamic_launcher_method_marshal_launch (
    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);
}


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

/**
 * XdpDbusDynamicLauncherIface:
 * @parent_iface: The parent interface.
 * @handle_get_desktop_entry: Handler for the #XdpDbusDynamicLauncher::handle-get-desktop-entry signal.
 * @handle_get_icon: Handler for the #XdpDbusDynamicLauncher::handle-get-icon signal.
 * @handle_install: Handler for the #XdpDbusDynamicLauncher::handle-install signal.
 * @handle_launch: Handler for the #XdpDbusDynamicLauncher::handle-launch signal.
 * @handle_prepare_install: Handler for the #XdpDbusDynamicLauncher::handle-prepare-install signal.
 * @handle_request_install_token: Handler for the #XdpDbusDynamicLauncher::handle-request-install-token signal.
 * @handle_uninstall: Handler for the #XdpDbusDynamicLauncher::handle-uninstall signal.
 * @get_supported_launcher_types: Getter for the #XdpDbusDynamicLauncher:supported-launcher-types property.
 * @get_version: Getter for the #XdpDbusDynamicLauncher:version property.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-DynamicLauncher.top_of_page">org.freedesktop.portal.DynamicLauncher</link>.
 */

typedef XdpDbusDynamicLauncherIface XdpDbusDynamicLauncherInterface;
G_DEFINE_INTERFACE (XdpDbusDynamicLauncher, xdp_dbus_dynamic_launcher, G_TYPE_OBJECT)

static void
xdp_dbus_dynamic_launcher_default_init (XdpDbusDynamicLauncherIface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * XdpDbusDynamicLauncher::handle-install:
   * @object: A #XdpDbusDynamicLauncher.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_token: Argument passed by remote caller.
   * @arg_desktop_file_id: Argument passed by remote caller.
   * @arg_desktop_entry: 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-portal-DynamicLauncher.Install">Install()</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_dbus_dynamic_launcher_complete_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-install",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpDbusDynamicLauncherIface, handle_install),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_dynamic_launcher_method_marshal_install,
    G_TYPE_BOOLEAN,
    5,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_VARIANT);

  /**
   * XdpDbusDynamicLauncher::handle-prepare-install:
   * @object: A #XdpDbusDynamicLauncher.
   * @invocation: A #GDBusMethodInvocation.
   * @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-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_dbus_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 (XdpDbusDynamicLauncherIface, handle_prepare_install),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_dynamic_launcher_method_marshal_prepare_install,
    G_TYPE_BOOLEAN,
    5,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_VARIANT, G_TYPE_VARIANT);

  /**
   * XdpDbusDynamicLauncher::handle-request-install-token:
   * @object: A #XdpDbusDynamicLauncher.
   * @invocation: A #GDBusMethodInvocation.
   * @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-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_dbus_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 (XdpDbusDynamicLauncherIface, handle_request_install_token),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_dynamic_launcher_method_marshal_request_install_token,
    G_TYPE_BOOLEAN,
    4,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_VARIANT, G_TYPE_VARIANT);

  /**
   * XdpDbusDynamicLauncher::handle-uninstall:
   * @object: A #XdpDbusDynamicLauncher.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_desktop_file_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-portal-DynamicLauncher.Uninstall">Uninstall()</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_dbus_dynamic_launcher_complete_uninstall() 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-uninstall",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpDbusDynamicLauncherIface, handle_uninstall),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_dynamic_launcher_method_marshal_uninstall,
    G_TYPE_BOOLEAN,
    3,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_VARIANT);

  /**
   * XdpDbusDynamicLauncher::handle-get-desktop-entry:
   * @object: A #XdpDbusDynamicLauncher.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_desktop_file_id: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-portal-DynamicLauncher.GetDesktopEntry">GetDesktopEntry()</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_dbus_dynamic_launcher_complete_get_desktop_entry() 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-desktop-entry",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpDbusDynamicLauncherIface, handle_get_desktop_entry),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_dynamic_launcher_method_marshal_get_desktop_entry,
    G_TYPE_BOOLEAN,
    2,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING);

  /**
   * XdpDbusDynamicLauncher::handle-get-icon:
   * @object: A #XdpDbusDynamicLauncher.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_desktop_file_id: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-portal-DynamicLauncher.GetIcon">GetIcon()</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_dbus_dynamic_launcher_complete_get_icon() 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-icon",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpDbusDynamicLauncherIface, handle_get_icon),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_dynamic_launcher_method_marshal_get_icon,
    G_TYPE_BOOLEAN,
    2,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING);

  /**
   * XdpDbusDynamicLauncher::handle-launch:
   * @object: A #XdpDbusDynamicLauncher.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_desktop_file_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-portal-DynamicLauncher.Launch">Launch()</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_dbus_dynamic_launcher_complete_launch() 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-launch",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpDbusDynamicLauncherIface, handle_launch),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_dynamic_launcher_method_marshal_launch,
    G_TYPE_BOOLEAN,
    3,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_VARIANT);

  /* GObject properties for D-Bus properties: */
  /**
   * XdpDbusDynamicLauncher:supported-launcher-types:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-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));
  /**
   * XdpDbusDynamicLauncher:version:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-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_dbus_dynamic_launcher_get_supported_launcher_types: (skip)
 * @object: A #XdpDbusDynamicLauncher.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-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_dbus_dynamic_launcher_get_supported_launcher_types (XdpDbusDynamicLauncher *object)
{
  g_return_val_if_fail (XDP_DBUS_IS_DYNAMIC_LAUNCHER (object), 0);

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

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

/**
 * xdp_dbus_dynamic_launcher_get_version: (skip)
 * @object: A #XdpDbusDynamicLauncher.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-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_dbus_dynamic_launcher_get_version (XdpDbusDynamicLauncher *object)
{
  g_return_val_if_fail (XDP_DBUS_IS_DYNAMIC_LAUNCHER (object), 0);

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

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

/**
 * xdp_dbus_dynamic_launcher_call_install:
 * @proxy: A #XdpDbusDynamicLauncherProxy.
 * @arg_token: Argument to pass with the method invocation.
 * @arg_desktop_file_id: Argument to pass with the method invocation.
 * @arg_desktop_entry: 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-portal-DynamicLauncher.Install">Install()</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_dbus_dynamic_launcher_call_install_finish() to get the result of the operation.
 *
 * See xdp_dbus_dynamic_launcher_call_install_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_dynamic_launcher_call_install (
    XdpDbusDynamicLauncher *proxy,
    const gchar *arg_token,
    const gchar *arg_desktop_file_id,
    const gchar *arg_desktop_entry,
    GVariant *arg_options,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "Install",
    g_variant_new ("(sss@a{sv})",
                   arg_token,
                   arg_desktop_file_id,
                   arg_desktop_entry,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_dynamic_launcher_call_install_finish:
 * @proxy: A #XdpDbusDynamicLauncherProxy.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_dynamic_launcher_call_install().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_dynamic_launcher_call_install().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_dynamic_launcher_call_install_finish (
    XdpDbusDynamicLauncher *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_dbus_dynamic_launcher_call_install_sync:
 * @proxy: A #XdpDbusDynamicLauncherProxy.
 * @arg_token: Argument to pass with the method invocation.
 * @arg_desktop_file_id: Argument to pass with the method invocation.
 * @arg_desktop_entry: 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-portal-DynamicLauncher.Install">Install()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_dynamic_launcher_call_install() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_dynamic_launcher_call_install_sync (
    XdpDbusDynamicLauncher *proxy,
    const gchar *arg_token,
    const gchar *arg_desktop_file_id,
    const gchar *arg_desktop_entry,
    GVariant *arg_options,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "Install",
    g_variant_new ("(sss@a{sv})",
                   arg_token,
                   arg_desktop_file_id,
                   arg_desktop_entry,
                   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_dbus_dynamic_launcher_call_prepare_install:
 * @proxy: A #XdpDbusDynamicLauncherProxy.
 * @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-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_dbus_dynamic_launcher_call_prepare_install_finish() to get the result of the operation.
 *
 * See xdp_dbus_dynamic_launcher_call_prepare_install_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_dynamic_launcher_call_prepare_install (
    XdpDbusDynamicLauncher *proxy,
    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 ("(ss@v@a{sv})",
                   arg_parent_window,
                   arg_name,
                   arg_icon_v,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_dynamic_launcher_call_prepare_install_finish:
 * @proxy: A #XdpDbusDynamicLauncherProxy.
 * @out_handle: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_dynamic_launcher_call_prepare_install().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_dynamic_launcher_call_prepare_install().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_dynamic_launcher_call_prepare_install_finish (
    XdpDbusDynamicLauncher *proxy,
    gchar ** out_handle,
    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,
                 "(o)",
                 out_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_dynamic_launcher_call_prepare_install_sync:
 * @proxy: A #XdpDbusDynamicLauncherProxy.
 * @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_handle: (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-portal-DynamicLauncher.PrepareInstall">PrepareInstall()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_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_dbus_dynamic_launcher_call_prepare_install_sync (
    XdpDbusDynamicLauncher *proxy,
    const gchar *arg_parent_window,
    const gchar *arg_name,
    GVariant *arg_icon_v,
    GVariant *arg_options,
    gchar ** out_handle,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "PrepareInstall",
    g_variant_new ("(ss@v@a{sv})",
                   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,
                 "(o)",
                 out_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_dynamic_launcher_call_request_install_token:
 * @proxy: A #XdpDbusDynamicLauncherProxy.
 * @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-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_dbus_dynamic_launcher_call_request_install_token_finish() to get the result of the operation.
 *
 * See xdp_dbus_dynamic_launcher_call_request_install_token_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_dynamic_launcher_call_request_install_token (
    XdpDbusDynamicLauncher *proxy,
    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),
    "RequestInstallToken",
    g_variant_new ("(s@v@a{sv})",
                   arg_name,
                   arg_icon_v,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_dynamic_launcher_call_request_install_token_finish:
 * @proxy: A #XdpDbusDynamicLauncherProxy.
 * @out_token: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_dynamic_launcher_call_request_install_token().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_dynamic_launcher_call_request_install_token().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_dynamic_launcher_call_request_install_token_finish (
    XdpDbusDynamicLauncher *proxy,
    gchar ** out_token,
    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,
                 "(s)",
                 out_token);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_dynamic_launcher_call_request_install_token_sync:
 * @proxy: A #XdpDbusDynamicLauncherProxy.
 * @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_token: (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-portal-DynamicLauncher.RequestInstallToken">RequestInstallToken()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_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_dbus_dynamic_launcher_call_request_install_token_sync (
    XdpDbusDynamicLauncher *proxy,
    const gchar *arg_name,
    GVariant *arg_icon_v,
    GVariant *arg_options,
    gchar ** out_token,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "RequestInstallToken",
    g_variant_new ("(s@v@a{sv})",
                   arg_name,
                   arg_icon_v,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(s)",
                 out_token);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_dynamic_launcher_call_uninstall:
 * @proxy: A #XdpDbusDynamicLauncherProxy.
 * @arg_desktop_file_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-portal-DynamicLauncher.Uninstall">Uninstall()</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_dbus_dynamic_launcher_call_uninstall_finish() to get the result of the operation.
 *
 * See xdp_dbus_dynamic_launcher_call_uninstall_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_dynamic_launcher_call_uninstall (
    XdpDbusDynamicLauncher *proxy,
    const gchar *arg_desktop_file_id,
    GVariant *arg_options,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "Uninstall",
    g_variant_new ("(s@a{sv})",
                   arg_desktop_file_id,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_dynamic_launcher_call_uninstall_finish:
 * @proxy: A #XdpDbusDynamicLauncherProxy.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_dynamic_launcher_call_uninstall().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_dynamic_launcher_call_uninstall().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_dynamic_launcher_call_uninstall_finish (
    XdpDbusDynamicLauncher *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_dbus_dynamic_launcher_call_uninstall_sync:
 * @proxy: A #XdpDbusDynamicLauncherProxy.
 * @arg_desktop_file_id: 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-portal-DynamicLauncher.Uninstall">Uninstall()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_dynamic_launcher_call_uninstall() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_dynamic_launcher_call_uninstall_sync (
    XdpDbusDynamicLauncher *proxy,
    const gchar *arg_desktop_file_id,
    GVariant *arg_options,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "Uninstall",
    g_variant_new ("(s@a{sv})",
                   arg_desktop_file_id,
                   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_dbus_dynamic_launcher_call_get_desktop_entry:
 * @proxy: A #XdpDbusDynamicLauncherProxy.
 * @arg_desktop_file_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-portal-DynamicLauncher.GetDesktopEntry">GetDesktopEntry()</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_dbus_dynamic_launcher_call_get_desktop_entry_finish() to get the result of the operation.
 *
 * See xdp_dbus_dynamic_launcher_call_get_desktop_entry_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_dynamic_launcher_call_get_desktop_entry (
    XdpDbusDynamicLauncher *proxy,
    const gchar *arg_desktop_file_id,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "GetDesktopEntry",
    g_variant_new ("(s)",
                   arg_desktop_file_id),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_dynamic_launcher_call_get_desktop_entry_finish:
 * @proxy: A #XdpDbusDynamicLauncherProxy.
 * @out_contents: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_dynamic_launcher_call_get_desktop_entry().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_dynamic_launcher_call_get_desktop_entry().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_dynamic_launcher_call_get_desktop_entry_finish (
    XdpDbusDynamicLauncher *proxy,
    gchar ** out_contents,
    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,
                 "(s)",
                 out_contents);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_dynamic_launcher_call_get_desktop_entry_sync:
 * @proxy: A #XdpDbusDynamicLauncherProxy.
 * @arg_desktop_file_id: Argument to pass with the method invocation.
 * @out_contents: (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-portal-DynamicLauncher.GetDesktopEntry">GetDesktopEntry()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_dynamic_launcher_call_get_desktop_entry() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_dynamic_launcher_call_get_desktop_entry_sync (
    XdpDbusDynamicLauncher *proxy,
    const gchar *arg_desktop_file_id,
    gchar ** out_contents,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "GetDesktopEntry",
    g_variant_new ("(s)",
                   arg_desktop_file_id),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(s)",
                 out_contents);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_dynamic_launcher_call_get_icon:
 * @proxy: A #XdpDbusDynamicLauncherProxy.
 * @arg_desktop_file_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-portal-DynamicLauncher.GetIcon">GetIcon()</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_dbus_dynamic_launcher_call_get_icon_finish() to get the result of the operation.
 *
 * See xdp_dbus_dynamic_launcher_call_get_icon_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_dynamic_launcher_call_get_icon (
    XdpDbusDynamicLauncher *proxy,
    const gchar *arg_desktop_file_id,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "GetIcon",
    g_variant_new ("(s)",
                   arg_desktop_file_id),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_dynamic_launcher_call_get_icon_finish:
 * @proxy: A #XdpDbusDynamicLauncherProxy.
 * @out_icon_v: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_icon_format: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_icon_size: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_dynamic_launcher_call_get_icon().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_dynamic_launcher_call_get_icon().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_dynamic_launcher_call_get_icon_finish (
    XdpDbusDynamicLauncher *proxy,
    GVariant ** out_icon_v,
    gchar ** out_icon_format,
    guint* out_icon_size,
    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,
                 "(@vsu)",
                 out_icon_v,
                 out_icon_format,
                 out_icon_size);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_dynamic_launcher_call_get_icon_sync:
 * @proxy: A #XdpDbusDynamicLauncherProxy.
 * @arg_desktop_file_id: Argument to pass with the method invocation.
 * @out_icon_v: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_icon_format: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_icon_size: (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-portal-DynamicLauncher.GetIcon">GetIcon()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_dynamic_launcher_call_get_icon() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_dynamic_launcher_call_get_icon_sync (
    XdpDbusDynamicLauncher *proxy,
    const gchar *arg_desktop_file_id,
    GVariant ** out_icon_v,
    gchar ** out_icon_format,
    guint* out_icon_size,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "GetIcon",
    g_variant_new ("(s)",
                   arg_desktop_file_id),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(@vsu)",
                 out_icon_v,
                 out_icon_format,
                 out_icon_size);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_dynamic_launcher_call_launch:
 * @proxy: A #XdpDbusDynamicLauncherProxy.
 * @arg_desktop_file_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-portal-DynamicLauncher.Launch">Launch()</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_dbus_dynamic_launcher_call_launch_finish() to get the result of the operation.
 *
 * See xdp_dbus_dynamic_launcher_call_launch_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_dynamic_launcher_call_launch (
    XdpDbusDynamicLauncher *proxy,
    const gchar *arg_desktop_file_id,
    GVariant *arg_options,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "Launch",
    g_variant_new ("(s@a{sv})",
                   arg_desktop_file_id,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_dynamic_launcher_call_launch_finish:
 * @proxy: A #XdpDbusDynamicLauncherProxy.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_dynamic_launcher_call_launch().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_dynamic_launcher_call_launch().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_dynamic_launcher_call_launch_finish (
    XdpDbusDynamicLauncher *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_dbus_dynamic_launcher_call_launch_sync:
 * @proxy: A #XdpDbusDynamicLauncherProxy.
 * @arg_desktop_file_id: 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-portal-DynamicLauncher.Launch">Launch()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_dynamic_launcher_call_launch() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_dynamic_launcher_call_launch_sync (
    XdpDbusDynamicLauncher *proxy,
    const gchar *arg_desktop_file_id,
    GVariant *arg_options,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "Launch",
    g_variant_new ("(s@a{sv})",
                   arg_desktop_file_id,
                   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_dbus_dynamic_launcher_complete_install:
 * @object: A #XdpDbusDynamicLauncher.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-portal-DynamicLauncher.Install">Install()</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_dbus_dynamic_launcher_complete_install (
    XdpDbusDynamicLauncher *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("()"));
}

/**
 * xdp_dbus_dynamic_launcher_complete_prepare_install:
 * @object: A #XdpDbusDynamicLauncher.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @handle: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-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_dbus_dynamic_launcher_complete_prepare_install (
    XdpDbusDynamicLauncher *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    const gchar *handle)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(o)",
                   handle));
}

/**
 * xdp_dbus_dynamic_launcher_complete_request_install_token:
 * @object: A #XdpDbusDynamicLauncher.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @token: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-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_dbus_dynamic_launcher_complete_request_install_token (
    XdpDbusDynamicLauncher *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    const gchar *token)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(s)",
                   token));
}

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

/**
 * xdp_dbus_dynamic_launcher_complete_get_desktop_entry:
 * @object: A #XdpDbusDynamicLauncher.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @contents: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-portal-DynamicLauncher.GetDesktopEntry">GetDesktopEntry()</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_dbus_dynamic_launcher_complete_get_desktop_entry (
    XdpDbusDynamicLauncher *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    const gchar *contents)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(s)",
                   contents));
}

/**
 * xdp_dbus_dynamic_launcher_complete_get_icon:
 * @object: A #XdpDbusDynamicLauncher.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @icon_v: Parameter to return.
 * @icon_format: Parameter to return.
 * @icon_size: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-portal-DynamicLauncher.GetIcon">GetIcon()</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_dbus_dynamic_launcher_complete_get_icon (
    XdpDbusDynamicLauncher *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    GVariant *icon_v,
    const gchar *icon_format,
    guint icon_size)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(@vsu)",
                   icon_v,
                   icon_format,
                   icon_size));
}

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

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

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

/**
 * XdpDbusDynamicLauncherProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpDbusDynamicLauncherProxy.
 */

struct _XdpDbusDynamicLauncherProxyPrivate
{
  GData *qdata;
};

static void xdp_dbus_dynamic_launcher_proxy_iface_init (XdpDbusDynamicLauncherIface *iface);

#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpDbusDynamicLauncherProxy, xdp_dbus_dynamic_launcher_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (XdpDbusDynamicLauncherProxy)
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_DYNAMIC_LAUNCHER, xdp_dbus_dynamic_launcher_proxy_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpDbusDynamicLauncherProxy, xdp_dbus_dynamic_launcher_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_DYNAMIC_LAUNCHER, xdp_dbus_dynamic_launcher_proxy_iface_init))

#endif
static void
xdp_dbus_dynamic_launcher_proxy_finalize (GObject *object)
{
  XdpDbusDynamicLauncherProxy *proxy = XDP_DBUS_DYNAMIC_LAUNCHER_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (xdp_dbus_dynamic_launcher_proxy_parent_class)->finalize (object);
}

static void
xdp_dbus_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_dbus_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_dbus_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.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_dbus_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_dbus_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.portal.DynamicLauncher", info->parent_struct.name, variant),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    NULL, (GAsyncReadyCallback) xdp_dbus_dynamic_launcher_proxy_set_property_cb, (GDBusPropertyInfo *) &info->parent_struct);
  g_variant_unref (variant);
}

static void
xdp_dbus_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_dbus_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_DBUS_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_DBUS_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_dbus_dynamic_launcher_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  XdpDbusDynamicLauncherProxy *proxy = XDP_DBUS_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_dbus_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_dbus_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_dbus_dynamic_launcher_proxy_get_supported_launcher_types (XdpDbusDynamicLauncher *object)
{
  XdpDbusDynamicLauncherProxy *proxy = XDP_DBUS_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_dbus_dynamic_launcher_proxy_get_version (XdpDbusDynamicLauncher *object)
{
  XdpDbusDynamicLauncherProxy *proxy = XDP_DBUS_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_dbus_dynamic_launcher_proxy_init (XdpDbusDynamicLauncherProxy *proxy)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  proxy->priv = xdp_dbus_dynamic_launcher_proxy_get_instance_private (proxy);
#else
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, XDP_DBUS_TYPE_DYNAMIC_LAUNCHER_PROXY, XdpDbusDynamicLauncherProxyPrivate);
#endif

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

static void
xdp_dbus_dynamic_launcher_proxy_class_init (XdpDbusDynamicLauncherProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = xdp_dbus_dynamic_launcher_proxy_finalize;
  gobject_class->get_property = xdp_dbus_dynamic_launcher_proxy_get_property;
  gobject_class->set_property = xdp_dbus_dynamic_launcher_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = xdp_dbus_dynamic_launcher_proxy_g_signal;
  proxy_class->g_properties_changed = xdp_dbus_dynamic_launcher_proxy_g_properties_changed;

  xdp_dbus_dynamic_launcher_override_properties (gobject_class, 1);

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

static void
xdp_dbus_dynamic_launcher_proxy_iface_init (XdpDbusDynamicLauncherIface *iface)
{
  iface->get_supported_launcher_types = xdp_dbus_dynamic_launcher_proxy_get_supported_launcher_types;
  iface->get_version = xdp_dbus_dynamic_launcher_proxy_get_version;
}

/**
 * xdp_dbus_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-portal-DynamicLauncher.top_of_page">org.freedesktop.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_dbus_dynamic_launcher_proxy_new_finish() to get the result of the operation.
 *
 * See xdp_dbus_dynamic_launcher_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_dbus_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_DBUS_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.portal.DynamicLauncher", NULL);
}

/**
 * xdp_dbus_dynamic_launcher_proxy_new_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_dynamic_launcher_proxy_new().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_dbus_dynamic_launcher_proxy_new().
 *
 * Returns: (transfer full) (type XdpDbusDynamicLauncherProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusDynamicLauncher *
xdp_dbus_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_DBUS_DYNAMIC_LAUNCHER (ret);
  else
    return NULL;
}

/**
 * xdp_dbus_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-portal-DynamicLauncher.top_of_page">org.freedesktop.portal.DynamicLauncher</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_dynamic_launcher_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpDbusDynamicLauncherProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusDynamicLauncher *
xdp_dbus_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_DBUS_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.portal.DynamicLauncher", NULL);
  if (ret != NULL)
    return XDP_DBUS_DYNAMIC_LAUNCHER (ret);
  else
    return NULL;
}


/**
 * xdp_dbus_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_dbus_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_dbus_dynamic_launcher_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See xdp_dbus_dynamic_launcher_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_dbus_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_DBUS_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.portal.DynamicLauncher", NULL);
}

/**
 * xdp_dbus_dynamic_launcher_proxy_new_for_bus_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_dynamic_launcher_proxy_new_for_bus().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_dbus_dynamic_launcher_proxy_new_for_bus().
 *
 * Returns: (transfer full) (type XdpDbusDynamicLauncherProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusDynamicLauncher *
xdp_dbus_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_DBUS_DYNAMIC_LAUNCHER (ret);
  else
    return NULL;
}

/**
 * xdp_dbus_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_dbus_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_dbus_dynamic_launcher_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpDbusDynamicLauncherProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusDynamicLauncher *
xdp_dbus_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_DBUS_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.portal.DynamicLauncher", NULL);
  if (ret != NULL)
    return XDP_DBUS_DYNAMIC_LAUNCHER (ret);
  else
    return NULL;
}


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

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

/**
 * XdpDbusDynamicLauncherSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpDbusDynamicLauncherSkeleton.
 */

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

static void
_xdp_dbus_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)
{
  XdpDbusDynamicLauncherSkeleton *skeleton = XDP_DBUS_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_DBUS_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_DBUS_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_dbus_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)
{
  XdpDbusDynamicLauncherSkeleton *skeleton = XDP_DBUS_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_dbus_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_dbus_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)
{
  XdpDbusDynamicLauncherSkeleton *skeleton = XDP_DBUS_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_dbus_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_dbus_dynamic_launcher_skeleton_vtable =
{
  _xdp_dbus_dynamic_launcher_skeleton_handle_method_call,
  _xdp_dbus_dynamic_launcher_skeleton_handle_get_property,
  _xdp_dbus_dynamic_launcher_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
xdp_dbus_dynamic_launcher_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return xdp_dbus_dynamic_launcher_interface_info ();
}

static GDBusInterfaceVTable *
xdp_dbus_dynamic_launcher_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_xdp_dbus_dynamic_launcher_skeleton_vtable;
}

static GVariant *
xdp_dbus_dynamic_launcher_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  XdpDbusDynamicLauncherSkeleton *skeleton = XDP_DBUS_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_dbus_dynamic_launcher_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _xdp_dbus_dynamic_launcher_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _xdp_dbus_dynamic_launcher_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _xdp_dbus_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.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_dbus_dynamic_launcher_emit_changed (gpointer user_data);

static void
xdp_dbus_dynamic_launcher_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
{
  XdpDbusDynamicLauncherSkeleton *skeleton = XDP_DBUS_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_dbus_dynamic_launcher_emit_changed (skeleton);
}

static void xdp_dbus_dynamic_launcher_skeleton_iface_init (XdpDbusDynamicLauncherIface *iface);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpDbusDynamicLauncherSkeleton, xdp_dbus_dynamic_launcher_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (XdpDbusDynamicLauncherSkeleton)
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_DYNAMIC_LAUNCHER, xdp_dbus_dynamic_launcher_skeleton_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpDbusDynamicLauncherSkeleton, xdp_dbus_dynamic_launcher_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_DYNAMIC_LAUNCHER, xdp_dbus_dynamic_launcher_skeleton_iface_init))

#endif
static void
xdp_dbus_dynamic_launcher_skeleton_finalize (GObject *object)
{
  XdpDbusDynamicLauncherSkeleton *skeleton = XDP_DBUS_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_dbus_dynamic_launcher_skeleton_parent_class)->finalize (object);
}

static void
xdp_dbus_dynamic_launcher_skeleton_get_property (GObject      *object,
  guint         prop_id,
  GValue       *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  XdpDbusDynamicLauncherSkeleton *skeleton = XDP_DBUS_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_dbus_dynamic_launcher_emit_changed (gpointer user_data)
{
  XdpDbusDynamicLauncherSkeleton *skeleton = XDP_DBUS_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.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_dbus_dynamic_launcher_schedule_emit_changed (XdpDbusDynamicLauncherSkeleton *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_dbus_dynamic_launcher_skeleton_notify (GObject      *object,
  GParamSpec *pspec G_GNUC_UNUSED)
{
  XdpDbusDynamicLauncherSkeleton *skeleton = XDP_DBUS_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_dbus_dynamic_launcher_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
      g_source_set_name (skeleton->priv->changed_properties_idle_source, "[generated] _xdp_dbus_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_dbus_dynamic_launcher_skeleton_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec)
{
  const _ExtendedGDBusPropertyInfo *info;
  XdpDbusDynamicLauncherSkeleton *skeleton = XDP_DBUS_DYNAMIC_LAUNCHER_SKELETON (object);
  g_assert (prop_id != 0 && prop_id - 1 < 2);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_dbus_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_dbus_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_dbus_dynamic_launcher_skeleton_init (XdpDbusDynamicLauncherSkeleton *skeleton)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  skeleton->priv = xdp_dbus_dynamic_launcher_skeleton_get_instance_private (skeleton);
#else
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, XDP_DBUS_TYPE_DYNAMIC_LAUNCHER_SKELETON, XdpDbusDynamicLauncherSkeletonPrivate);
#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_dbus_dynamic_launcher_skeleton_get_supported_launcher_types (XdpDbusDynamicLauncher *object)
{
  XdpDbusDynamicLauncherSkeleton *skeleton = XDP_DBUS_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_dbus_dynamic_launcher_skeleton_get_version (XdpDbusDynamicLauncher *object)
{
  XdpDbusDynamicLauncherSkeleton *skeleton = XDP_DBUS_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_dbus_dynamic_launcher_skeleton_class_init (XdpDbusDynamicLauncherSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize = xdp_dbus_dynamic_launcher_skeleton_finalize;
  gobject_class->get_property = xdp_dbus_dynamic_launcher_skeleton_get_property;
  gobject_class->set_property = xdp_dbus_dynamic_launcher_skeleton_set_property;
  gobject_class->notify       = xdp_dbus_dynamic_launcher_skeleton_notify;


  xdp_dbus_dynamic_launcher_override_properties (gobject_class, 1);

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = xdp_dbus_dynamic_launcher_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = xdp_dbus_dynamic_launcher_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = xdp_dbus_dynamic_launcher_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = xdp_dbus_dynamic_launcher_skeleton_dbus_interface_get_vtable;

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

static void
xdp_dbus_dynamic_launcher_skeleton_iface_init (XdpDbusDynamicLauncherIface *iface)
{
  iface->get_supported_launcher_types = xdp_dbus_dynamic_launcher_skeleton_get_supported_launcher_types;
  iface->get_version = xdp_dbus_dynamic_launcher_skeleton_get_version;
}

/**
 * xdp_dbus_dynamic_launcher_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-DynamicLauncher.top_of_page">org.freedesktop.portal.DynamicLauncher</link>.
 *
 * Returns: (transfer full) (type XdpDbusDynamicLauncherSkeleton): The skeleton object.
 */
XdpDbusDynamicLauncher *
xdp_dbus_dynamic_launcher_skeleton_new (void)
{
  return XDP_DBUS_DYNAMIC_LAUNCHER (g_object_new (XDP_DBUS_TYPE_DYNAMIC_LAUNCHER_SKELETON, NULL));
}

/* ------------------------------------------------------------------------
 * Code for interface org.freedesktop.portal.Email
 * ------------------------------------------------------------------------
 */

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

/* ---- Introspection data for org.freedesktop.portal.Email ---- */

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

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

static const GDBusArgInfo * const _xdp_dbus_email_method_info_compose_email_IN_ARG_pointers[] =
{
  &_xdp_dbus_email_method_info_compose_email_IN_ARG_parent_window.parent_struct,
  &_xdp_dbus_email_method_info_compose_email_IN_ARG_options.parent_struct,
  NULL
};

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

static const GDBusArgInfo * const _xdp_dbus_email_method_info_compose_email_OUT_ARG_pointers[] =
{
  &_xdp_dbus_email_method_info_compose_email_OUT_ARG_handle.parent_struct,
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_email_method_compose_email_annotation_info_pointers[] =
{
  &_xdp_dbus_email_method_compose_email_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_email_method_info_compose_email =
{
  {
    -1,
    (gchar *) "ComposeEmail",
    (GDBusArgInfo **) &_xdp_dbus_email_method_info_compose_email_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_email_method_info_compose_email_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_dbus_email_method_compose_email_annotation_info_pointers
  },
  "handle-compose-email",
  TRUE
};

static const GDBusMethodInfo * const _xdp_dbus_email_method_info_pointers[] =
{
  &_xdp_dbus_email_method_info_compose_email.parent_struct,
  NULL
};

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

static const GDBusPropertyInfo * const _xdp_dbus_email_property_info_pointers[] =
{
  &_xdp_dbus_email_property_info_version.parent_struct,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _xdp_dbus_email_interface_info =
{
  {
    -1,
    (gchar *) "org.freedesktop.portal.Email",
    (GDBusMethodInfo **) &_xdp_dbus_email_method_info_pointers,
    NULL,
    (GDBusPropertyInfo **) &_xdp_dbus_email_property_info_pointers,
    NULL
  },
  "email",
};


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

/**
 * xdp_dbus_email_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 #XdpDbusEmail interface for a concrete class.
 * The properties are overridden in the order they are defined.
 *
 * Returns: The last property id.
 */
guint
xdp_dbus_email_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_dbus_email_method_marshal_compose_email (
    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_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}


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

/**
 * XdpDbusEmailIface:
 * @parent_iface: The parent interface.
 * @handle_compose_email: Handler for the #XdpDbusEmail::handle-compose-email signal.
 * @get_version: Getter for the #XdpDbusEmail:version property.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-Email.top_of_page">org.freedesktop.portal.Email</link>.
 */

typedef XdpDbusEmailIface XdpDbusEmailInterface;
G_DEFINE_INTERFACE (XdpDbusEmail, xdp_dbus_email, G_TYPE_OBJECT)

static void
xdp_dbus_email_default_init (XdpDbusEmailIface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * XdpDbusEmail::handle-compose-email:
   * @object: A #XdpDbusEmail.
   * @invocation: A #GDBusMethodInvocation.
   * @fd_list: (nullable): A #GUnixFDList or %NULL.
   * @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-portal-Email.ComposeEmail">ComposeEmail()</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_dbus_email_complete_compose_email() 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-compose-email",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpDbusEmailIface, handle_compose_email),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_email_method_marshal_compose_email,
    G_TYPE_BOOLEAN,
    4,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UNIX_FD_LIST, G_TYPE_STRING, G_TYPE_VARIANT);

  /* GObject properties for D-Bus properties: */
  /**
   * XdpDbusEmail:version:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-portal-Email.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_dbus_email_get_version: (skip)
 * @object: A #XdpDbusEmail.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-portal-Email.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_dbus_email_get_version (XdpDbusEmail *object)
{
  g_return_val_if_fail (XDP_DBUS_IS_EMAIL (object), 0);

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

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

/**
 * xdp_dbus_email_call_compose_email:
 * @proxy: A #XdpDbusEmailProxy.
 * @arg_parent_window: 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-portal-Email.ComposeEmail">ComposeEmail()</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_dbus_email_call_compose_email_finish() to get the result of the operation.
 *
 * See xdp_dbus_email_call_compose_email_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_email_call_compose_email (
    XdpDbusEmail *proxy,
    const gchar *arg_parent_window,
    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),
    "ComposeEmail",
    g_variant_new ("(s@a{sv})",
                   arg_parent_window,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    fd_list,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_email_call_compose_email_finish:
 * @proxy: A #XdpDbusEmailProxy.
 * @out_handle: (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_dbus_email_call_compose_email().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_email_call_compose_email().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_email_call_compose_email_finish (
    XdpDbusEmail *proxy,
    gchar ** out_handle,
    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,
                 "(o)",
                 out_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_email_call_compose_email_sync:
 * @proxy: A #XdpDbusEmailProxy.
 * @arg_parent_window: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @fd_list: (nullable): A #GUnixFDList or %NULL.
 * @out_handle: (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-portal-Email.ComposeEmail">ComposeEmail()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_email_call_compose_email() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_email_call_compose_email_sync (
    XdpDbusEmail *proxy,
    const gchar *arg_parent_window,
    GVariant *arg_options,
    GUnixFDList  *fd_list,
    gchar ** out_handle,
    GUnixFDList **out_fd_list,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_with_unix_fd_list_sync (G_DBUS_PROXY (proxy),
    "ComposeEmail",
    g_variant_new ("(s@a{sv})",
                   arg_parent_window,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    fd_list,
    out_fd_list,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(o)",
                 out_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_email_complete_compose_email:
 * @object: A #XdpDbusEmail.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @fd_list: (nullable): A #GUnixFDList or %NULL.
 * @handle: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-portal-Email.ComposeEmail">ComposeEmail()</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_dbus_email_complete_compose_email (
    XdpDbusEmail *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    GUnixFDList *fd_list,
    const gchar *handle)
{
  g_dbus_method_invocation_return_value_with_unix_fd_list (invocation,
    g_variant_new ("(o)",
                   handle),
    fd_list);
}

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

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

/**
 * XdpDbusEmailProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpDbusEmailProxy.
 */

struct _XdpDbusEmailProxyPrivate
{
  GData *qdata;
};

static void xdp_dbus_email_proxy_iface_init (XdpDbusEmailIface *iface);

#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpDbusEmailProxy, xdp_dbus_email_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (XdpDbusEmailProxy)
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_EMAIL, xdp_dbus_email_proxy_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpDbusEmailProxy, xdp_dbus_email_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_EMAIL, xdp_dbus_email_proxy_iface_init))

#endif
static void
xdp_dbus_email_proxy_finalize (GObject *object)
{
  XdpDbusEmailProxy *proxy = XDP_DBUS_EMAIL_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (xdp_dbus_email_proxy_parent_class)->finalize (object);
}

static void
xdp_dbus_email_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_dbus_email_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_dbus_email_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.portal.Email: %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_dbus_email_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_dbus_email_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.portal.Email", info->parent_struct.name, variant),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    NULL, (GAsyncReadyCallback) xdp_dbus_email_proxy_set_property_cb, (GDBusPropertyInfo *) &info->parent_struct);
  g_variant_unref (variant);
}

static void
xdp_dbus_email_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_dbus_email_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_DBUS_TYPE_EMAIL);
  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_DBUS_TYPE_EMAIL);
  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_dbus_email_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  XdpDbusEmailProxy *proxy = XDP_DBUS_EMAIL_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_dbus_email_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_dbus_email_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_dbus_email_proxy_get_version (XdpDbusEmail *object)
{
  XdpDbusEmailProxy *proxy = XDP_DBUS_EMAIL_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_dbus_email_proxy_init (XdpDbusEmailProxy *proxy)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  proxy->priv = xdp_dbus_email_proxy_get_instance_private (proxy);
#else
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, XDP_DBUS_TYPE_EMAIL_PROXY, XdpDbusEmailProxyPrivate);
#endif

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

static void
xdp_dbus_email_proxy_class_init (XdpDbusEmailProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = xdp_dbus_email_proxy_finalize;
  gobject_class->get_property = xdp_dbus_email_proxy_get_property;
  gobject_class->set_property = xdp_dbus_email_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = xdp_dbus_email_proxy_g_signal;
  proxy_class->g_properties_changed = xdp_dbus_email_proxy_g_properties_changed;

  xdp_dbus_email_override_properties (gobject_class, 1);

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

static void
xdp_dbus_email_proxy_iface_init (XdpDbusEmailIface *iface)
{
  iface->get_version = xdp_dbus_email_proxy_get_version;
}

/**
 * xdp_dbus_email_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-portal-Email.top_of_page">org.freedesktop.portal.Email</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_dbus_email_proxy_new_finish() to get the result of the operation.
 *
 * See xdp_dbus_email_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_dbus_email_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_DBUS_TYPE_EMAIL_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.portal.Email", NULL);
}

/**
 * xdp_dbus_email_proxy_new_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_email_proxy_new().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_dbus_email_proxy_new().
 *
 * Returns: (transfer full) (type XdpDbusEmailProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusEmail *
xdp_dbus_email_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_DBUS_EMAIL (ret);
  else
    return NULL;
}

/**
 * xdp_dbus_email_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-portal-Email.top_of_page">org.freedesktop.portal.Email</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_email_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpDbusEmailProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusEmail *
xdp_dbus_email_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_DBUS_TYPE_EMAIL_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.portal.Email", NULL);
  if (ret != NULL)
    return XDP_DBUS_EMAIL (ret);
  else
    return NULL;
}


/**
 * xdp_dbus_email_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_dbus_email_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_dbus_email_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See xdp_dbus_email_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_dbus_email_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_DBUS_TYPE_EMAIL_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.portal.Email", NULL);
}

/**
 * xdp_dbus_email_proxy_new_for_bus_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_email_proxy_new_for_bus().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_dbus_email_proxy_new_for_bus().
 *
 * Returns: (transfer full) (type XdpDbusEmailProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusEmail *
xdp_dbus_email_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_DBUS_EMAIL (ret);
  else
    return NULL;
}

/**
 * xdp_dbus_email_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_dbus_email_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_email_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpDbusEmailProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusEmail *
xdp_dbus_email_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_DBUS_TYPE_EMAIL_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.portal.Email", NULL);
  if (ret != NULL)
    return XDP_DBUS_EMAIL (ret);
  else
    return NULL;
}


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

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

/**
 * XdpDbusEmailSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpDbusEmailSkeleton.
 */

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

static void
_xdp_dbus_email_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)
{
  XdpDbusEmailSkeleton *skeleton = XDP_DBUS_EMAIL_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_DBUS_TYPE_EMAIL);
  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_DBUS_TYPE_EMAIL);
  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_dbus_email_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)
{
  XdpDbusEmailSkeleton *skeleton = XDP_DBUS_EMAIL_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_dbus_email_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_dbus_email_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)
{
  XdpDbusEmailSkeleton *skeleton = XDP_DBUS_EMAIL_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_dbus_email_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_dbus_email_skeleton_vtable =
{
  _xdp_dbus_email_skeleton_handle_method_call,
  _xdp_dbus_email_skeleton_handle_get_property,
  _xdp_dbus_email_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
xdp_dbus_email_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return xdp_dbus_email_interface_info ();
}

static GDBusInterfaceVTable *
xdp_dbus_email_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_xdp_dbus_email_skeleton_vtable;
}

static GVariant *
xdp_dbus_email_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  XdpDbusEmailSkeleton *skeleton = XDP_DBUS_EMAIL_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_dbus_email_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _xdp_dbus_email_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _xdp_dbus_email_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _xdp_dbus_email_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.portal.Email", 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_dbus_email_emit_changed (gpointer user_data);

static void
xdp_dbus_email_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
{
  XdpDbusEmailSkeleton *skeleton = XDP_DBUS_EMAIL_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_dbus_email_emit_changed (skeleton);
}

static void xdp_dbus_email_skeleton_iface_init (XdpDbusEmailIface *iface);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpDbusEmailSkeleton, xdp_dbus_email_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (XdpDbusEmailSkeleton)
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_EMAIL, xdp_dbus_email_skeleton_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpDbusEmailSkeleton, xdp_dbus_email_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_EMAIL, xdp_dbus_email_skeleton_iface_init))

#endif
static void
xdp_dbus_email_skeleton_finalize (GObject *object)
{
  XdpDbusEmailSkeleton *skeleton = XDP_DBUS_EMAIL_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_dbus_email_skeleton_parent_class)->finalize (object);
}

static void
xdp_dbus_email_skeleton_get_property (GObject      *object,
  guint         prop_id,
  GValue       *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  XdpDbusEmailSkeleton *skeleton = XDP_DBUS_EMAIL_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_dbus_email_emit_changed (gpointer user_data)
{
  XdpDbusEmailSkeleton *skeleton = XDP_DBUS_EMAIL_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.portal.Email",
                                           &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_dbus_email_schedule_emit_changed (XdpDbusEmailSkeleton *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_dbus_email_skeleton_notify (GObject      *object,
  GParamSpec *pspec G_GNUC_UNUSED)
{
  XdpDbusEmailSkeleton *skeleton = XDP_DBUS_EMAIL_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_dbus_email_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
      g_source_set_name (skeleton->priv->changed_properties_idle_source, "[generated] _xdp_dbus_email_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_dbus_email_skeleton_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec)
{
  const _ExtendedGDBusPropertyInfo *info;
  XdpDbusEmailSkeleton *skeleton = XDP_DBUS_EMAIL_SKELETON (object);
  g_assert (prop_id != 0 && prop_id - 1 < 1);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_dbus_email_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_dbus_email_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_dbus_email_skeleton_init (XdpDbusEmailSkeleton *skeleton)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  skeleton->priv = xdp_dbus_email_skeleton_get_instance_private (skeleton);
#else
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, XDP_DBUS_TYPE_EMAIL_SKELETON, XdpDbusEmailSkeletonPrivate);
#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_dbus_email_skeleton_get_version (XdpDbusEmail *object)
{
  XdpDbusEmailSkeleton *skeleton = XDP_DBUS_EMAIL_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_dbus_email_skeleton_class_init (XdpDbusEmailSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize = xdp_dbus_email_skeleton_finalize;
  gobject_class->get_property = xdp_dbus_email_skeleton_get_property;
  gobject_class->set_property = xdp_dbus_email_skeleton_set_property;
  gobject_class->notify       = xdp_dbus_email_skeleton_notify;


  xdp_dbus_email_override_properties (gobject_class, 1);

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = xdp_dbus_email_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = xdp_dbus_email_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = xdp_dbus_email_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = xdp_dbus_email_skeleton_dbus_interface_get_vtable;

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

static void
xdp_dbus_email_skeleton_iface_init (XdpDbusEmailIface *iface)
{
  iface->get_version = xdp_dbus_email_skeleton_get_version;
}

/**
 * xdp_dbus_email_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-Email.top_of_page">org.freedesktop.portal.Email</link>.
 *
 * Returns: (transfer full) (type XdpDbusEmailSkeleton): The skeleton object.
 */
XdpDbusEmail *
xdp_dbus_email_skeleton_new (void)
{
  return XDP_DBUS_EMAIL (g_object_new (XDP_DBUS_TYPE_EMAIL_SKELETON, NULL));
}

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

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

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

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

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

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

static const GDBusArgInfo * const _xdp_dbus_file_chooser_method_info_open_file_IN_ARG_pointers[] =
{
  &_xdp_dbus_file_chooser_method_info_open_file_IN_ARG_parent_window.parent_struct,
  &_xdp_dbus_file_chooser_method_info_open_file_IN_ARG_title.parent_struct,
  &_xdp_dbus_file_chooser_method_info_open_file_IN_ARG_options.parent_struct,
  NULL
};

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

static const GDBusArgInfo * const _xdp_dbus_file_chooser_method_info_open_file_OUT_ARG_pointers[] =
{
  &_xdp_dbus_file_chooser_method_info_open_file_OUT_ARG_handle.parent_struct,
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_file_chooser_method_open_file_annotation_info_pointers[] =
{
  &_xdp_dbus_file_chooser_method_open_file_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_file_chooser_method_info_open_file =
{
  {
    -1,
    (gchar *) "OpenFile",
    (GDBusArgInfo **) &_xdp_dbus_file_chooser_method_info_open_file_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_file_chooser_method_info_open_file_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_dbus_file_chooser_method_open_file_annotation_info_pointers
  },
  "handle-open-file",
  FALSE
};

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

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

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

static const GDBusArgInfo * const _xdp_dbus_file_chooser_method_info_save_file_IN_ARG_pointers[] =
{
  &_xdp_dbus_file_chooser_method_info_save_file_IN_ARG_parent_window.parent_struct,
  &_xdp_dbus_file_chooser_method_info_save_file_IN_ARG_title.parent_struct,
  &_xdp_dbus_file_chooser_method_info_save_file_IN_ARG_options.parent_struct,
  NULL
};

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

static const GDBusArgInfo * const _xdp_dbus_file_chooser_method_info_save_file_OUT_ARG_pointers[] =
{
  &_xdp_dbus_file_chooser_method_info_save_file_OUT_ARG_handle.parent_struct,
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_file_chooser_method_save_file_annotation_info_pointers[] =
{
  &_xdp_dbus_file_chooser_method_save_file_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_file_chooser_method_info_save_file =
{
  {
    -1,
    (gchar *) "SaveFile",
    (GDBusArgInfo **) &_xdp_dbus_file_chooser_method_info_save_file_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_file_chooser_method_info_save_file_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_dbus_file_chooser_method_save_file_annotation_info_pointers
  },
  "handle-save-file",
  FALSE
};

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

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

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

static const GDBusArgInfo * const _xdp_dbus_file_chooser_method_info_save_files_IN_ARG_pointers[] =
{
  &_xdp_dbus_file_chooser_method_info_save_files_IN_ARG_parent_window.parent_struct,
  &_xdp_dbus_file_chooser_method_info_save_files_IN_ARG_title.parent_struct,
  &_xdp_dbus_file_chooser_method_info_save_files_IN_ARG_options.parent_struct,
  NULL
};

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

static const GDBusArgInfo * const _xdp_dbus_file_chooser_method_info_save_files_OUT_ARG_pointers[] =
{
  &_xdp_dbus_file_chooser_method_info_save_files_OUT_ARG_handle.parent_struct,
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_file_chooser_method_save_files_annotation_info_pointers[] =
{
  &_xdp_dbus_file_chooser_method_save_files_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_file_chooser_method_info_save_files =
{
  {
    -1,
    (gchar *) "SaveFiles",
    (GDBusArgInfo **) &_xdp_dbus_file_chooser_method_info_save_files_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_file_chooser_method_info_save_files_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_dbus_file_chooser_method_save_files_annotation_info_pointers
  },
  "handle-save-files",
  FALSE
};

static const GDBusMethodInfo * const _xdp_dbus_file_chooser_method_info_pointers[] =
{
  &_xdp_dbus_file_chooser_method_info_open_file.parent_struct,
  &_xdp_dbus_file_chooser_method_info_save_file.parent_struct,
  &_xdp_dbus_file_chooser_method_info_save_files.parent_struct,
  NULL
};

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

static const GDBusPropertyInfo * const _xdp_dbus_file_chooser_property_info_pointers[] =
{
  &_xdp_dbus_file_chooser_property_info_version.parent_struct,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _xdp_dbus_file_chooser_interface_info =
{
  {
    -1,
    (gchar *) "org.freedesktop.portal.FileChooser",
    (GDBusMethodInfo **) &_xdp_dbus_file_chooser_method_info_pointers,
    NULL,
    (GDBusPropertyInfo **) &_xdp_dbus_file_chooser_property_info_pointers,
    NULL
  },
  "file-chooser",
};


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

/**
 * xdp_dbus_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 #XdpDbusFileChooser interface for a concrete class.
 * The properties are overridden in the order they are defined.
 *
 * Returns: The last property id.
 */
guint
xdp_dbus_file_chooser_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_dbus_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_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_dbus_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_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_dbus_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_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}


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

/**
 * XdpDbusFileChooserIface:
 * @parent_iface: The parent interface.
 * @handle_open_file: Handler for the #XdpDbusFileChooser::handle-open-file signal.
 * @handle_save_file: Handler for the #XdpDbusFileChooser::handle-save-file signal.
 * @handle_save_files: Handler for the #XdpDbusFileChooser::handle-save-files signal.
 * @get_version: Getter for the #XdpDbusFileChooser:version property.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-FileChooser.top_of_page">org.freedesktop.portal.FileChooser</link>.
 */

typedef XdpDbusFileChooserIface XdpDbusFileChooserInterface;
G_DEFINE_INTERFACE (XdpDbusFileChooser, xdp_dbus_file_chooser, G_TYPE_OBJECT)

static void
xdp_dbus_file_chooser_default_init (XdpDbusFileChooserIface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * XdpDbusFileChooser::handle-open-file:
   * @object: A #XdpDbusFileChooser.
   * @invocation: A #GDBusMethodInvocation.
   * @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-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_dbus_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 (XdpDbusFileChooserIface, handle_open_file),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_file_chooser_method_marshal_open_file,
    G_TYPE_BOOLEAN,
    4,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_VARIANT);

  /**
   * XdpDbusFileChooser::handle-save-file:
   * @object: A #XdpDbusFileChooser.
   * @invocation: A #GDBusMethodInvocation.
   * @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-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_dbus_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 (XdpDbusFileChooserIface, handle_save_file),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_file_chooser_method_marshal_save_file,
    G_TYPE_BOOLEAN,
    4,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_VARIANT);

  /**
   * XdpDbusFileChooser::handle-save-files:
   * @object: A #XdpDbusFileChooser.
   * @invocation: A #GDBusMethodInvocation.
   * @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-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_dbus_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 (XdpDbusFileChooserIface, handle_save_files),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_file_chooser_method_marshal_save_files,
    G_TYPE_BOOLEAN,
    4,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_VARIANT);

  /* GObject properties for D-Bus properties: */
  /**
   * XdpDbusFileChooser:version:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-portal-FileChooser.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_dbus_file_chooser_get_version: (skip)
 * @object: A #XdpDbusFileChooser.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-portal-FileChooser.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_dbus_file_chooser_get_version (XdpDbusFileChooser *object)
{
  g_return_val_if_fail (XDP_DBUS_IS_FILE_CHOOSER (object), 0);

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

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

/**
 * xdp_dbus_file_chooser_call_open_file:
 * @proxy: A #XdpDbusFileChooserProxy.
 * @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-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_dbus_file_chooser_call_open_file_finish() to get the result of the operation.
 *
 * See xdp_dbus_file_chooser_call_open_file_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_file_chooser_call_open_file (
    XdpDbusFileChooser *proxy,
    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 ("(ss@a{sv})",
                   arg_parent_window,
                   arg_title,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_file_chooser_call_open_file_finish:
 * @proxy: A #XdpDbusFileChooserProxy.
 * @out_handle: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_file_chooser_call_open_file().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_file_chooser_call_open_file().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_file_chooser_call_open_file_finish (
    XdpDbusFileChooser *proxy,
    gchar ** out_handle,
    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,
                 "(o)",
                 out_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_file_chooser_call_open_file_sync:
 * @proxy: A #XdpDbusFileChooserProxy.
 * @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_handle: (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-portal-FileChooser.OpenFile">OpenFile()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_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_dbus_file_chooser_call_open_file_sync (
    XdpDbusFileChooser *proxy,
    const gchar *arg_parent_window,
    const gchar *arg_title,
    GVariant *arg_options,
    gchar ** out_handle,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "OpenFile",
    g_variant_new ("(ss@a{sv})",
                   arg_parent_window,
                   arg_title,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(o)",
                 out_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_file_chooser_call_save_file:
 * @proxy: A #XdpDbusFileChooserProxy.
 * @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-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_dbus_file_chooser_call_save_file_finish() to get the result of the operation.
 *
 * See xdp_dbus_file_chooser_call_save_file_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_file_chooser_call_save_file (
    XdpDbusFileChooser *proxy,
    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 ("(ss@a{sv})",
                   arg_parent_window,
                   arg_title,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_file_chooser_call_save_file_finish:
 * @proxy: A #XdpDbusFileChooserProxy.
 * @out_handle: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_file_chooser_call_save_file().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_file_chooser_call_save_file().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_file_chooser_call_save_file_finish (
    XdpDbusFileChooser *proxy,
    gchar ** out_handle,
    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,
                 "(o)",
                 out_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_file_chooser_call_save_file_sync:
 * @proxy: A #XdpDbusFileChooserProxy.
 * @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_handle: (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-portal-FileChooser.SaveFile">SaveFile()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_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_dbus_file_chooser_call_save_file_sync (
    XdpDbusFileChooser *proxy,
    const gchar *arg_parent_window,
    const gchar *arg_title,
    GVariant *arg_options,
    gchar ** out_handle,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "SaveFile",
    g_variant_new ("(ss@a{sv})",
                   arg_parent_window,
                   arg_title,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(o)",
                 out_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_file_chooser_call_save_files:
 * @proxy: A #XdpDbusFileChooserProxy.
 * @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-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_dbus_file_chooser_call_save_files_finish() to get the result of the operation.
 *
 * See xdp_dbus_file_chooser_call_save_files_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_file_chooser_call_save_files (
    XdpDbusFileChooser *proxy,
    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 ("(ss@a{sv})",
                   arg_parent_window,
                   arg_title,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_file_chooser_call_save_files_finish:
 * @proxy: A #XdpDbusFileChooserProxy.
 * @out_handle: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_file_chooser_call_save_files().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_file_chooser_call_save_files().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_file_chooser_call_save_files_finish (
    XdpDbusFileChooser *proxy,
    gchar ** out_handle,
    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,
                 "(o)",
                 out_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_file_chooser_call_save_files_sync:
 * @proxy: A #XdpDbusFileChooserProxy.
 * @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_handle: (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-portal-FileChooser.SaveFiles">SaveFiles()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_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_dbus_file_chooser_call_save_files_sync (
    XdpDbusFileChooser *proxy,
    const gchar *arg_parent_window,
    const gchar *arg_title,
    GVariant *arg_options,
    gchar ** out_handle,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "SaveFiles",
    g_variant_new ("(ss@a{sv})",
                   arg_parent_window,
                   arg_title,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(o)",
                 out_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_file_chooser_complete_open_file:
 * @object: A #XdpDbusFileChooser.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @handle: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-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_dbus_file_chooser_complete_open_file (
    XdpDbusFileChooser *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    const gchar *handle)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(o)",
                   handle));
}

/**
 * xdp_dbus_file_chooser_complete_save_file:
 * @object: A #XdpDbusFileChooser.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @handle: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-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_dbus_file_chooser_complete_save_file (
    XdpDbusFileChooser *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    const gchar *handle)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(o)",
                   handle));
}

/**
 * xdp_dbus_file_chooser_complete_save_files:
 * @object: A #XdpDbusFileChooser.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @handle: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-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_dbus_file_chooser_complete_save_files (
    XdpDbusFileChooser *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    const gchar *handle)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(o)",
                   handle));
}

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

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

/**
 * XdpDbusFileChooserProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpDbusFileChooserProxy.
 */

struct _XdpDbusFileChooserProxyPrivate
{
  GData *qdata;
};

static void xdp_dbus_file_chooser_proxy_iface_init (XdpDbusFileChooserIface *iface);

#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpDbusFileChooserProxy, xdp_dbus_file_chooser_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (XdpDbusFileChooserProxy)
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_FILE_CHOOSER, xdp_dbus_file_chooser_proxy_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpDbusFileChooserProxy, xdp_dbus_file_chooser_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_FILE_CHOOSER, xdp_dbus_file_chooser_proxy_iface_init))

#endif
static void
xdp_dbus_file_chooser_proxy_finalize (GObject *object)
{
  XdpDbusFileChooserProxy *proxy = XDP_DBUS_FILE_CHOOSER_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (xdp_dbus_file_chooser_proxy_parent_class)->finalize (object);
}

static void
xdp_dbus_file_chooser_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_dbus_file_chooser_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_dbus_file_chooser_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.portal.FileChooser: %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_dbus_file_chooser_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_dbus_file_chooser_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.portal.FileChooser", info->parent_struct.name, variant),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    NULL, (GAsyncReadyCallback) xdp_dbus_file_chooser_proxy_set_property_cb, (GDBusPropertyInfo *) &info->parent_struct);
  g_variant_unref (variant);
}

static void
xdp_dbus_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_dbus_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_DBUS_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_DBUS_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_dbus_file_chooser_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  XdpDbusFileChooserProxy *proxy = XDP_DBUS_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_dbus_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_dbus_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 guint 
xdp_dbus_file_chooser_proxy_get_version (XdpDbusFileChooser *object)
{
  XdpDbusFileChooserProxy *proxy = XDP_DBUS_FILE_CHOOSER_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_dbus_file_chooser_proxy_init (XdpDbusFileChooserProxy *proxy)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  proxy->priv = xdp_dbus_file_chooser_proxy_get_instance_private (proxy);
#else
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, XDP_DBUS_TYPE_FILE_CHOOSER_PROXY, XdpDbusFileChooserProxyPrivate);
#endif

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

static void
xdp_dbus_file_chooser_proxy_class_init (XdpDbusFileChooserProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = xdp_dbus_file_chooser_proxy_finalize;
  gobject_class->get_property = xdp_dbus_file_chooser_proxy_get_property;
  gobject_class->set_property = xdp_dbus_file_chooser_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = xdp_dbus_file_chooser_proxy_g_signal;
  proxy_class->g_properties_changed = xdp_dbus_file_chooser_proxy_g_properties_changed;

  xdp_dbus_file_chooser_override_properties (gobject_class, 1);

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

static void
xdp_dbus_file_chooser_proxy_iface_init (XdpDbusFileChooserIface *iface)
{
  iface->get_version = xdp_dbus_file_chooser_proxy_get_version;
}

/**
 * xdp_dbus_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-portal-FileChooser.top_of_page">org.freedesktop.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_dbus_file_chooser_proxy_new_finish() to get the result of the operation.
 *
 * See xdp_dbus_file_chooser_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_dbus_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_DBUS_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.portal.FileChooser", NULL);
}

/**
 * xdp_dbus_file_chooser_proxy_new_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_file_chooser_proxy_new().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_dbus_file_chooser_proxy_new().
 *
 * Returns: (transfer full) (type XdpDbusFileChooserProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusFileChooser *
xdp_dbus_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_DBUS_FILE_CHOOSER (ret);
  else
    return NULL;
}

/**
 * xdp_dbus_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-portal-FileChooser.top_of_page">org.freedesktop.portal.FileChooser</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_file_chooser_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpDbusFileChooserProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusFileChooser *
xdp_dbus_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_DBUS_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.portal.FileChooser", NULL);
  if (ret != NULL)
    return XDP_DBUS_FILE_CHOOSER (ret);
  else
    return NULL;
}


/**
 * xdp_dbus_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_dbus_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_dbus_file_chooser_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See xdp_dbus_file_chooser_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_dbus_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_DBUS_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.portal.FileChooser", NULL);
}

/**
 * xdp_dbus_file_chooser_proxy_new_for_bus_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_file_chooser_proxy_new_for_bus().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_dbus_file_chooser_proxy_new_for_bus().
 *
 * Returns: (transfer full) (type XdpDbusFileChooserProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusFileChooser *
xdp_dbus_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_DBUS_FILE_CHOOSER (ret);
  else
    return NULL;
}

/**
 * xdp_dbus_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_dbus_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_dbus_file_chooser_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpDbusFileChooserProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusFileChooser *
xdp_dbus_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_DBUS_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.portal.FileChooser", NULL);
  if (ret != NULL)
    return XDP_DBUS_FILE_CHOOSER (ret);
  else
    return NULL;
}


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

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

/**
 * XdpDbusFileChooserSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpDbusFileChooserSkeleton.
 */

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

static void
_xdp_dbus_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)
{
  XdpDbusFileChooserSkeleton *skeleton = XDP_DBUS_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_DBUS_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_DBUS_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_dbus_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)
{
  XdpDbusFileChooserSkeleton *skeleton = XDP_DBUS_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_dbus_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_dbus_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)
{
  XdpDbusFileChooserSkeleton *skeleton = XDP_DBUS_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_dbus_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_dbus_file_chooser_skeleton_vtable =
{
  _xdp_dbus_file_chooser_skeleton_handle_method_call,
  _xdp_dbus_file_chooser_skeleton_handle_get_property,
  _xdp_dbus_file_chooser_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
xdp_dbus_file_chooser_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return xdp_dbus_file_chooser_interface_info ();
}

static GDBusInterfaceVTable *
xdp_dbus_file_chooser_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_xdp_dbus_file_chooser_skeleton_vtable;
}

static GVariant *
xdp_dbus_file_chooser_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  XdpDbusFileChooserSkeleton *skeleton = XDP_DBUS_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_dbus_file_chooser_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _xdp_dbus_file_chooser_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _xdp_dbus_file_chooser_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _xdp_dbus_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.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 gboolean _xdp_dbus_file_chooser_emit_changed (gpointer user_data);

static void
xdp_dbus_file_chooser_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
{
  XdpDbusFileChooserSkeleton *skeleton = XDP_DBUS_FILE_CHOOSER_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_dbus_file_chooser_emit_changed (skeleton);
}

static void xdp_dbus_file_chooser_skeleton_iface_init (XdpDbusFileChooserIface *iface);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpDbusFileChooserSkeleton, xdp_dbus_file_chooser_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (XdpDbusFileChooserSkeleton)
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_FILE_CHOOSER, xdp_dbus_file_chooser_skeleton_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpDbusFileChooserSkeleton, xdp_dbus_file_chooser_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_FILE_CHOOSER, xdp_dbus_file_chooser_skeleton_iface_init))

#endif
static void
xdp_dbus_file_chooser_skeleton_finalize (GObject *object)
{
  XdpDbusFileChooserSkeleton *skeleton = XDP_DBUS_FILE_CHOOSER_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_dbus_file_chooser_skeleton_parent_class)->finalize (object);
}

static void
xdp_dbus_file_chooser_skeleton_get_property (GObject      *object,
  guint         prop_id,
  GValue       *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  XdpDbusFileChooserSkeleton *skeleton = XDP_DBUS_FILE_CHOOSER_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_dbus_file_chooser_emit_changed (gpointer user_data)
{
  XdpDbusFileChooserSkeleton *skeleton = XDP_DBUS_FILE_CHOOSER_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.portal.FileChooser",
                                           &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_dbus_file_chooser_schedule_emit_changed (XdpDbusFileChooserSkeleton *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_dbus_file_chooser_skeleton_notify (GObject      *object,
  GParamSpec *pspec G_GNUC_UNUSED)
{
  XdpDbusFileChooserSkeleton *skeleton = XDP_DBUS_FILE_CHOOSER_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_dbus_file_chooser_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
      g_source_set_name (skeleton->priv->changed_properties_idle_source, "[generated] _xdp_dbus_file_chooser_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_dbus_file_chooser_skeleton_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec)
{
  const _ExtendedGDBusPropertyInfo *info;
  XdpDbusFileChooserSkeleton *skeleton = XDP_DBUS_FILE_CHOOSER_SKELETON (object);
  g_assert (prop_id != 0 && prop_id - 1 < 1);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_dbus_file_chooser_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_dbus_file_chooser_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_dbus_file_chooser_skeleton_init (XdpDbusFileChooserSkeleton *skeleton)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  skeleton->priv = xdp_dbus_file_chooser_skeleton_get_instance_private (skeleton);
#else
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, XDP_DBUS_TYPE_FILE_CHOOSER_SKELETON, XdpDbusFileChooserSkeletonPrivate);
#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_dbus_file_chooser_skeleton_get_version (XdpDbusFileChooser *object)
{
  XdpDbusFileChooserSkeleton *skeleton = XDP_DBUS_FILE_CHOOSER_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_dbus_file_chooser_skeleton_class_init (XdpDbusFileChooserSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize = xdp_dbus_file_chooser_skeleton_finalize;
  gobject_class->get_property = xdp_dbus_file_chooser_skeleton_get_property;
  gobject_class->set_property = xdp_dbus_file_chooser_skeleton_set_property;
  gobject_class->notify       = xdp_dbus_file_chooser_skeleton_notify;


  xdp_dbus_file_chooser_override_properties (gobject_class, 1);

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = xdp_dbus_file_chooser_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = xdp_dbus_file_chooser_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = xdp_dbus_file_chooser_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = xdp_dbus_file_chooser_skeleton_dbus_interface_get_vtable;

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

static void
xdp_dbus_file_chooser_skeleton_iface_init (XdpDbusFileChooserIface *iface)
{
  iface->get_version = xdp_dbus_file_chooser_skeleton_get_version;
}

/**
 * xdp_dbus_file_chooser_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-FileChooser.top_of_page">org.freedesktop.portal.FileChooser</link>.
 *
 * Returns: (transfer full) (type XdpDbusFileChooserSkeleton): The skeleton object.
 */
XdpDbusFileChooser *
xdp_dbus_file_chooser_skeleton_new (void)
{
  return XDP_DBUS_FILE_CHOOSER (g_object_new (XDP_DBUS_TYPE_FILE_CHOOSER_SKELETON, NULL));
}

/* ------------------------------------------------------------------------
 * Code for interface org.freedesktop.portal.FileTransfer
 * ------------------------------------------------------------------------
 */

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

enum
{
  XDP_DBUS__FILE_TRANSFER_TRANSFER_CLOSED,
};

static unsigned XDP_DBUS__FILE_TRANSFER_SIGNALS[1] = { 0 };

/* ---- Introspection data for org.freedesktop.portal.FileTransfer ---- */

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

static const GDBusArgInfo * const _xdp_dbus_file_transfer_method_info_start_transfer_IN_ARG_pointers[] =
{
  &_xdp_dbus_file_transfer_method_info_start_transfer_IN_ARG_options.parent_struct,
  NULL
};

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

static const GDBusArgInfo * const _xdp_dbus_file_transfer_method_info_start_transfer_OUT_ARG_pointers[] =
{
  &_xdp_dbus_file_transfer_method_info_start_transfer_OUT_ARG_key.parent_struct,
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_file_transfer_method_start_transfer_annotation_info_pointers[] =
{
  &_xdp_dbus_file_transfer_method_start_transfer_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_file_transfer_method_info_start_transfer =
{
  {
    -1,
    (gchar *) "StartTransfer",
    (GDBusArgInfo **) &_xdp_dbus_file_transfer_method_info_start_transfer_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_file_transfer_method_info_start_transfer_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_dbus_file_transfer_method_start_transfer_annotation_info_pointers
  },
  "handle-start-transfer",
  FALSE
};

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

static const _ExtendedGDBusArgInfo _xdp_dbus_file_transfer_method_info_add_files_IN_ARG_fds =
{
  {
    -1,
    (gchar *) "fds",
    (gchar *) "ah",
    NULL
  },
  FALSE
};

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

static const GDBusArgInfo * const _xdp_dbus_file_transfer_method_info_add_files_IN_ARG_pointers[] =
{
  &_xdp_dbus_file_transfer_method_info_add_files_IN_ARG_key.parent_struct,
  &_xdp_dbus_file_transfer_method_info_add_files_IN_ARG_fds.parent_struct,
  &_xdp_dbus_file_transfer_method_info_add_files_IN_ARG_options.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_dbus_file_transfer_method_add_files_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.In1",
  (gchar *) "QList<QDBusUnixFileDescriptor>",
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_file_transfer_method_add_files_annotation_info_pointers[] =
{
  &_xdp_dbus_file_transfer_method_add_files_annotation_info_0,
  &_xdp_dbus_file_transfer_method_add_files_annotation_info_1,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_file_transfer_method_info_add_files =
{
  {
    -1,
    (gchar *) "AddFiles",
    (GDBusArgInfo **) &_xdp_dbus_file_transfer_method_info_add_files_IN_ARG_pointers,
    NULL,
    (GDBusAnnotationInfo **) &_xdp_dbus_file_transfer_method_add_files_annotation_info_pointers
  },
  "handle-add-files",
  TRUE
};

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

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

static const GDBusArgInfo * const _xdp_dbus_file_transfer_method_info_retrieve_files_IN_ARG_pointers[] =
{
  &_xdp_dbus_file_transfer_method_info_retrieve_files_IN_ARG_key.parent_struct,
  &_xdp_dbus_file_transfer_method_info_retrieve_files_IN_ARG_options.parent_struct,
  NULL
};

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

static const GDBusArgInfo * const _xdp_dbus_file_transfer_method_info_retrieve_files_OUT_ARG_pointers[] =
{
  &_xdp_dbus_file_transfer_method_info_retrieve_files_OUT_ARG_files.parent_struct,
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_file_transfer_method_retrieve_files_annotation_info_pointers[] =
{
  &_xdp_dbus_file_transfer_method_retrieve_files_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_file_transfer_method_info_retrieve_files =
{
  {
    -1,
    (gchar *) "RetrieveFiles",
    (GDBusArgInfo **) &_xdp_dbus_file_transfer_method_info_retrieve_files_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_file_transfer_method_info_retrieve_files_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_dbus_file_transfer_method_retrieve_files_annotation_info_pointers
  },
  "handle-retrieve-files",
  FALSE
};

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

static const GDBusArgInfo * const _xdp_dbus_file_transfer_method_info_stop_transfer_IN_ARG_pointers[] =
{
  &_xdp_dbus_file_transfer_method_info_stop_transfer_IN_ARG_key.parent_struct,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_file_transfer_method_info_stop_transfer =
{
  {
    -1,
    (gchar *) "StopTransfer",
    (GDBusArgInfo **) &_xdp_dbus_file_transfer_method_info_stop_transfer_IN_ARG_pointers,
    NULL,
    NULL
  },
  "handle-stop-transfer",
  FALSE
};

static const GDBusMethodInfo * const _xdp_dbus_file_transfer_method_info_pointers[] =
{
  &_xdp_dbus_file_transfer_method_info_start_transfer.parent_struct,
  &_xdp_dbus_file_transfer_method_info_add_files.parent_struct,
  &_xdp_dbus_file_transfer_method_info_retrieve_files.parent_struct,
  &_xdp_dbus_file_transfer_method_info_stop_transfer.parent_struct,
  NULL
};

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

static const GDBusArgInfo * const _xdp_dbus_file_transfer_signal_info_transfer_closed_ARG_pointers[] =
{
  &_xdp_dbus_file_transfer_signal_info_transfer_closed_ARG_key.parent_struct,
  NULL
};

static const _ExtendedGDBusSignalInfo _xdp_dbus_file_transfer_signal_info_transfer_closed =
{
  {
    -1,
    (gchar *) "TransferClosed",
    (GDBusArgInfo **) &_xdp_dbus_file_transfer_signal_info_transfer_closed_ARG_pointers,
    NULL
  },
  "transfer-closed"
};

static const GDBusSignalInfo * const _xdp_dbus_file_transfer_signal_info_pointers[] =
{
  &_xdp_dbus_file_transfer_signal_info_transfer_closed.parent_struct,
  NULL
};

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

static const GDBusPropertyInfo * const _xdp_dbus_file_transfer_property_info_pointers[] =
{
  &_xdp_dbus_file_transfer_property_info_version.parent_struct,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _xdp_dbus_file_transfer_interface_info =
{
  {
    -1,
    (gchar *) "org.freedesktop.portal.FileTransfer",
    (GDBusMethodInfo **) &_xdp_dbus_file_transfer_method_info_pointers,
    (GDBusSignalInfo **) &_xdp_dbus_file_transfer_signal_info_pointers,
    (GDBusPropertyInfo **) &_xdp_dbus_file_transfer_property_info_pointers,
    NULL
  },
  "file-transfer",
};


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

/**
 * xdp_dbus_file_transfer_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 #XdpDbusFileTransfer interface for a concrete class.
 * The properties are overridden in the order they are defined.
 *
 * Returns: The last property id.
 */
guint
xdp_dbus_file_transfer_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_dbus_file_transfer_signal_marshal_transfer_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__STRING (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_dbus_file_transfer_method_marshal_start_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_BOOLEAN__OBJECT_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_dbus_file_transfer_method_marshal_add_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_OBJECT_STRING_VARIANT_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_dbus_file_transfer_method_marshal_retrieve_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_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_dbus_file_transfer_method_marshal_stop_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_BOOLEAN__OBJECT_STRING (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}


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

/**
 * XdpDbusFileTransferIface:
 * @parent_iface: The parent interface.
 * @handle_add_files: Handler for the #XdpDbusFileTransfer::handle-add-files signal.
 * @handle_retrieve_files: Handler for the #XdpDbusFileTransfer::handle-retrieve-files signal.
 * @handle_start_transfer: Handler for the #XdpDbusFileTransfer::handle-start-transfer signal.
 * @handle_stop_transfer: Handler for the #XdpDbusFileTransfer::handle-stop-transfer signal.
 * @get_version: Getter for the #XdpDbusFileTransfer:version property.
 * @transfer_closed: Handler for the #XdpDbusFileTransfer::transfer-closed signal.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-FileTransfer.top_of_page">org.freedesktop.portal.FileTransfer</link>.
 */

typedef XdpDbusFileTransferIface XdpDbusFileTransferInterface;
G_DEFINE_INTERFACE (XdpDbusFileTransfer, xdp_dbus_file_transfer, G_TYPE_OBJECT)

static void
xdp_dbus_file_transfer_default_init (XdpDbusFileTransferIface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * XdpDbusFileTransfer::handle-start-transfer:
   * @object: A #XdpDbusFileTransfer.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_options: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-portal-FileTransfer.StartTransfer">StartTransfer()</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_dbus_file_transfer_complete_start_transfer() 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-transfer",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpDbusFileTransferIface, handle_start_transfer),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_file_transfer_method_marshal_start_transfer,
    G_TYPE_BOOLEAN,
    2,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_VARIANT);

  /**
   * XdpDbusFileTransfer::handle-add-files:
   * @object: A #XdpDbusFileTransfer.
   * @invocation: A #GDBusMethodInvocation.
   * @fd_list: (nullable): A #GUnixFDList or %NULL.
   * @arg_key: Argument passed by remote caller.
   * @arg_fds: 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-portal-FileTransfer.AddFiles">AddFiles()</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_dbus_file_transfer_complete_add_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-add-files",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpDbusFileTransferIface, handle_add_files),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_file_transfer_method_marshal_add_files,
    G_TYPE_BOOLEAN,
    5,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UNIX_FD_LIST, G_TYPE_STRING, G_TYPE_VARIANT, G_TYPE_VARIANT);

  /**
   * XdpDbusFileTransfer::handle-retrieve-files:
   * @object: A #XdpDbusFileTransfer.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_key: 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-portal-FileTransfer.RetrieveFiles">RetrieveFiles()</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_dbus_file_transfer_complete_retrieve_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-retrieve-files",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpDbusFileTransferIface, handle_retrieve_files),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_file_transfer_method_marshal_retrieve_files,
    G_TYPE_BOOLEAN,
    3,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_VARIANT);

  /**
   * XdpDbusFileTransfer::handle-stop-transfer:
   * @object: A #XdpDbusFileTransfer.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_key: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-portal-FileTransfer.StopTransfer">StopTransfer()</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_dbus_file_transfer_complete_stop_transfer() 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-stop-transfer",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpDbusFileTransferIface, handle_stop_transfer),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_file_transfer_method_marshal_stop_transfer,
    G_TYPE_BOOLEAN,
    2,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING);

  /* GObject signals for received D-Bus signals: */
  /**
   * XdpDbusFileTransfer::transfer-closed:
   * @object: A #XdpDbusFileTransfer.
   * @arg_key: Argument.
   *
   * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-freedesktop-portal-FileTransfer.TransferClosed">"TransferClosed"</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_DBUS__FILE_TRANSFER_SIGNALS[XDP_DBUS__FILE_TRANSFER_TRANSFER_CLOSED] =
    g_signal_new ("transfer-closed",
      G_TYPE_FROM_INTERFACE (iface),
      G_SIGNAL_RUN_LAST,
      G_STRUCT_OFFSET (XdpDbusFileTransferIface, transfer_closed),
      NULL,
      NULL,
      xdp_dbus_file_transfer_signal_marshal_transfer_closed,
      G_TYPE_NONE,
      1, G_TYPE_STRING);

  /* GObject properties for D-Bus properties: */
  /**
   * XdpDbusFileTransfer:version:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-portal-FileTransfer.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_dbus_file_transfer_get_version: (skip)
 * @object: A #XdpDbusFileTransfer.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-portal-FileTransfer.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_dbus_file_transfer_get_version (XdpDbusFileTransfer *object)
{
  g_return_val_if_fail (XDP_DBUS_IS_FILE_TRANSFER (object), 0);

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

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

/**
 * xdp_dbus_file_transfer_emit_transfer_closed:
 * @object: A #XdpDbusFileTransfer.
 * @arg_key: Argument to pass with the signal.
 *
 * Emits the <link linkend="gdbus-signal-org-freedesktop-portal-FileTransfer.TransferClosed">"TransferClosed"</link> D-Bus signal.
 */
void
xdp_dbus_file_transfer_emit_transfer_closed (
    XdpDbusFileTransfer *object,
    const gchar *arg_key)
{
  g_signal_emit (object, XDP_DBUS__FILE_TRANSFER_SIGNALS[XDP_DBUS__FILE_TRANSFER_TRANSFER_CLOSED], 0, arg_key);
}

/**
 * xdp_dbus_file_transfer_call_start_transfer:
 * @proxy: A #XdpDbusFileTransferProxy.
 * @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-portal-FileTransfer.StartTransfer">StartTransfer()</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_dbus_file_transfer_call_start_transfer_finish() to get the result of the operation.
 *
 * See xdp_dbus_file_transfer_call_start_transfer_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_file_transfer_call_start_transfer (
    XdpDbusFileTransfer *proxy,
    GVariant *arg_options,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "StartTransfer",
    g_variant_new ("(@a{sv})",
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_file_transfer_call_start_transfer_finish:
 * @proxy: A #XdpDbusFileTransferProxy.
 * @out_key: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_file_transfer_call_start_transfer().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_file_transfer_call_start_transfer().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_file_transfer_call_start_transfer_finish (
    XdpDbusFileTransfer *proxy,
    gchar ** out_key,
    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,
                 "(s)",
                 out_key);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_file_transfer_call_start_transfer_sync:
 * @proxy: A #XdpDbusFileTransferProxy.
 * @arg_options: Argument to pass with the method invocation.
 * @out_key: (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-portal-FileTransfer.StartTransfer">StartTransfer()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_file_transfer_call_start_transfer() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_file_transfer_call_start_transfer_sync (
    XdpDbusFileTransfer *proxy,
    GVariant *arg_options,
    gchar ** out_key,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "StartTransfer",
    g_variant_new ("(@a{sv})",
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(s)",
                 out_key);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_file_transfer_call_add_files:
 * @proxy: A #XdpDbusFileTransferProxy.
 * @arg_key: Argument to pass with the method invocation.
 * @arg_fds: 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-portal-FileTransfer.AddFiles">AddFiles()</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_dbus_file_transfer_call_add_files_finish() to get the result of the operation.
 *
 * See xdp_dbus_file_transfer_call_add_files_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_file_transfer_call_add_files (
    XdpDbusFileTransfer *proxy,
    const gchar *arg_key,
    GVariant *arg_fds,
    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),
    "AddFiles",
    g_variant_new ("(s@ah@a{sv})",
                   arg_key,
                   arg_fds,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    fd_list,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_file_transfer_call_add_files_finish:
 * @proxy: A #XdpDbusFileTransferProxy.
 * @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_dbus_file_transfer_call_add_files().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_file_transfer_call_add_files().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_file_transfer_call_add_files_finish (
    XdpDbusFileTransfer *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_dbus_file_transfer_call_add_files_sync:
 * @proxy: A #XdpDbusFileTransferProxy.
 * @arg_key: Argument to pass with the method invocation.
 * @arg_fds: 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_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-portal-FileTransfer.AddFiles">AddFiles()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_file_transfer_call_add_files() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_file_transfer_call_add_files_sync (
    XdpDbusFileTransfer *proxy,
    const gchar *arg_key,
    GVariant *arg_fds,
    GVariant *arg_options,
    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),
    "AddFiles",
    g_variant_new ("(s@ah@a{sv})",
                   arg_key,
                   arg_fds,
                   arg_options),
    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_dbus_file_transfer_call_retrieve_files:
 * @proxy: A #XdpDbusFileTransferProxy.
 * @arg_key: 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-portal-FileTransfer.RetrieveFiles">RetrieveFiles()</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_dbus_file_transfer_call_retrieve_files_finish() to get the result of the operation.
 *
 * See xdp_dbus_file_transfer_call_retrieve_files_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_file_transfer_call_retrieve_files (
    XdpDbusFileTransfer *proxy,
    const gchar *arg_key,
    GVariant *arg_options,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "RetrieveFiles",
    g_variant_new ("(s@a{sv})",
                   arg_key,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_file_transfer_call_retrieve_files_finish:
 * @proxy: A #XdpDbusFileTransferProxy.
 * @out_files: (out) (optional) (array zero-terminated=1): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_file_transfer_call_retrieve_files().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_file_transfer_call_retrieve_files().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_file_transfer_call_retrieve_files_finish (
    XdpDbusFileTransfer *proxy,
    gchar *** out_files,
    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,
                 "(^as)",
                 out_files);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_file_transfer_call_retrieve_files_sync:
 * @proxy: A #XdpDbusFileTransferProxy.
 * @arg_key: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @out_files: (out) (optional) (array zero-terminated=1): 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-portal-FileTransfer.RetrieveFiles">RetrieveFiles()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_file_transfer_call_retrieve_files() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_file_transfer_call_retrieve_files_sync (
    XdpDbusFileTransfer *proxy,
    const gchar *arg_key,
    GVariant *arg_options,
    gchar *** out_files,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "RetrieveFiles",
    g_variant_new ("(s@a{sv})",
                   arg_key,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(^as)",
                 out_files);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_file_transfer_call_stop_transfer:
 * @proxy: A #XdpDbusFileTransferProxy.
 * @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-portal-FileTransfer.StopTransfer">StopTransfer()</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_dbus_file_transfer_call_stop_transfer_finish() to get the result of the operation.
 *
 * See xdp_dbus_file_transfer_call_stop_transfer_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_file_transfer_call_stop_transfer (
    XdpDbusFileTransfer *proxy,
    const gchar *arg_key,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "StopTransfer",
    g_variant_new ("(s)",
                   arg_key),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_file_transfer_call_stop_transfer_finish:
 * @proxy: A #XdpDbusFileTransferProxy.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_file_transfer_call_stop_transfer().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_file_transfer_call_stop_transfer().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_file_transfer_call_stop_transfer_finish (
    XdpDbusFileTransfer *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_dbus_file_transfer_call_stop_transfer_sync:
 * @proxy: A #XdpDbusFileTransferProxy.
 * @arg_key: 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-portal-FileTransfer.StopTransfer">StopTransfer()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_file_transfer_call_stop_transfer() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_file_transfer_call_stop_transfer_sync (
    XdpDbusFileTransfer *proxy,
    const gchar *arg_key,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "StopTransfer",
    g_variant_new ("(s)",
                   arg_key),
    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_dbus_file_transfer_complete_start_transfer:
 * @object: A #XdpDbusFileTransfer.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @key: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-portal-FileTransfer.StartTransfer">StartTransfer()</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_dbus_file_transfer_complete_start_transfer (
    XdpDbusFileTransfer *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    const gchar *key)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(s)",
                   key));
}

/**
 * xdp_dbus_file_transfer_complete_add_files:
 * @object: A #XdpDbusFileTransfer.
 * @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-portal-FileTransfer.AddFiles">AddFiles()</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_dbus_file_transfer_complete_add_files (
    XdpDbusFileTransfer *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_dbus_file_transfer_complete_retrieve_files:
 * @object: A #XdpDbusFileTransfer.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @files: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-portal-FileTransfer.RetrieveFiles">RetrieveFiles()</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_dbus_file_transfer_complete_retrieve_files (
    XdpDbusFileTransfer *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    const gchar *const *files)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(^as)",
                   files));
}

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

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

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

/**
 * XdpDbusFileTransferProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpDbusFileTransferProxy.
 */

struct _XdpDbusFileTransferProxyPrivate
{
  GData *qdata;
};

static void xdp_dbus_file_transfer_proxy_iface_init (XdpDbusFileTransferIface *iface);

#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpDbusFileTransferProxy, xdp_dbus_file_transfer_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (XdpDbusFileTransferProxy)
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_FILE_TRANSFER, xdp_dbus_file_transfer_proxy_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpDbusFileTransferProxy, xdp_dbus_file_transfer_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_FILE_TRANSFER, xdp_dbus_file_transfer_proxy_iface_init))

#endif
static void
xdp_dbus_file_transfer_proxy_finalize (GObject *object)
{
  XdpDbusFileTransferProxy *proxy = XDP_DBUS_FILE_TRANSFER_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (xdp_dbus_file_transfer_proxy_parent_class)->finalize (object);
}

static void
xdp_dbus_file_transfer_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_dbus_file_transfer_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_dbus_file_transfer_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.portal.FileTransfer: %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_dbus_file_transfer_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_dbus_file_transfer_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.portal.FileTransfer", info->parent_struct.name, variant),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    NULL, (GAsyncReadyCallback) xdp_dbus_file_transfer_proxy_set_property_cb, (GDBusPropertyInfo *) &info->parent_struct);
  g_variant_unref (variant);
}

static void
xdp_dbus_file_transfer_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_dbus_file_transfer_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_DBUS_TYPE_FILE_TRANSFER);
  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_DBUS_TYPE_FILE_TRANSFER);
  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_dbus_file_transfer_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  XdpDbusFileTransferProxy *proxy = XDP_DBUS_FILE_TRANSFER_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_dbus_file_transfer_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_dbus_file_transfer_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_dbus_file_transfer_proxy_get_version (XdpDbusFileTransfer *object)
{
  XdpDbusFileTransferProxy *proxy = XDP_DBUS_FILE_TRANSFER_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_dbus_file_transfer_proxy_init (XdpDbusFileTransferProxy *proxy)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  proxy->priv = xdp_dbus_file_transfer_proxy_get_instance_private (proxy);
#else
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, XDP_DBUS_TYPE_FILE_TRANSFER_PROXY, XdpDbusFileTransferProxyPrivate);
#endif

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

static void
xdp_dbus_file_transfer_proxy_class_init (XdpDbusFileTransferProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = xdp_dbus_file_transfer_proxy_finalize;
  gobject_class->get_property = xdp_dbus_file_transfer_proxy_get_property;
  gobject_class->set_property = xdp_dbus_file_transfer_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = xdp_dbus_file_transfer_proxy_g_signal;
  proxy_class->g_properties_changed = xdp_dbus_file_transfer_proxy_g_properties_changed;

  xdp_dbus_file_transfer_override_properties (gobject_class, 1);

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

static void
xdp_dbus_file_transfer_proxy_iface_init (XdpDbusFileTransferIface *iface)
{
  iface->get_version = xdp_dbus_file_transfer_proxy_get_version;
}

/**
 * xdp_dbus_file_transfer_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-portal-FileTransfer.top_of_page">org.freedesktop.portal.FileTransfer</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_dbus_file_transfer_proxy_new_finish() to get the result of the operation.
 *
 * See xdp_dbus_file_transfer_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_dbus_file_transfer_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_DBUS_TYPE_FILE_TRANSFER_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.portal.FileTransfer", NULL);
}

/**
 * xdp_dbus_file_transfer_proxy_new_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_file_transfer_proxy_new().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_dbus_file_transfer_proxy_new().
 *
 * Returns: (transfer full) (type XdpDbusFileTransferProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusFileTransfer *
xdp_dbus_file_transfer_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_DBUS_FILE_TRANSFER (ret);
  else
    return NULL;
}

/**
 * xdp_dbus_file_transfer_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-portal-FileTransfer.top_of_page">org.freedesktop.portal.FileTransfer</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_file_transfer_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpDbusFileTransferProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusFileTransfer *
xdp_dbus_file_transfer_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_DBUS_TYPE_FILE_TRANSFER_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.portal.FileTransfer", NULL);
  if (ret != NULL)
    return XDP_DBUS_FILE_TRANSFER (ret);
  else
    return NULL;
}


/**
 * xdp_dbus_file_transfer_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_dbus_file_transfer_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_dbus_file_transfer_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See xdp_dbus_file_transfer_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_dbus_file_transfer_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_DBUS_TYPE_FILE_TRANSFER_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.portal.FileTransfer", NULL);
}

/**
 * xdp_dbus_file_transfer_proxy_new_for_bus_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_file_transfer_proxy_new_for_bus().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_dbus_file_transfer_proxy_new_for_bus().
 *
 * Returns: (transfer full) (type XdpDbusFileTransferProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusFileTransfer *
xdp_dbus_file_transfer_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_DBUS_FILE_TRANSFER (ret);
  else
    return NULL;
}

/**
 * xdp_dbus_file_transfer_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_dbus_file_transfer_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_file_transfer_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpDbusFileTransferProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusFileTransfer *
xdp_dbus_file_transfer_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_DBUS_TYPE_FILE_TRANSFER_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.portal.FileTransfer", NULL);
  if (ret != NULL)
    return XDP_DBUS_FILE_TRANSFER (ret);
  else
    return NULL;
}


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

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

/**
 * XdpDbusFileTransferSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpDbusFileTransferSkeleton.
 */

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

static void
_xdp_dbus_file_transfer_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)
{
  XdpDbusFileTransferSkeleton *skeleton = XDP_DBUS_FILE_TRANSFER_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_DBUS_TYPE_FILE_TRANSFER);
  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_DBUS_TYPE_FILE_TRANSFER);
  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_dbus_file_transfer_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)
{
  XdpDbusFileTransferSkeleton *skeleton = XDP_DBUS_FILE_TRANSFER_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_dbus_file_transfer_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_dbus_file_transfer_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)
{
  XdpDbusFileTransferSkeleton *skeleton = XDP_DBUS_FILE_TRANSFER_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_dbus_file_transfer_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_dbus_file_transfer_skeleton_vtable =
{
  _xdp_dbus_file_transfer_skeleton_handle_method_call,
  _xdp_dbus_file_transfer_skeleton_handle_get_property,
  _xdp_dbus_file_transfer_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
xdp_dbus_file_transfer_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return xdp_dbus_file_transfer_interface_info ();
}

static GDBusInterfaceVTable *
xdp_dbus_file_transfer_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_xdp_dbus_file_transfer_skeleton_vtable;
}

static GVariant *
xdp_dbus_file_transfer_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  XdpDbusFileTransferSkeleton *skeleton = XDP_DBUS_FILE_TRANSFER_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_dbus_file_transfer_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _xdp_dbus_file_transfer_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _xdp_dbus_file_transfer_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _xdp_dbus_file_transfer_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.portal.FileTransfer", 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_dbus_file_transfer_emit_changed (gpointer user_data);

static void
xdp_dbus_file_transfer_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
{
  XdpDbusFileTransferSkeleton *skeleton = XDP_DBUS_FILE_TRANSFER_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_dbus_file_transfer_emit_changed (skeleton);
}

static void
_xdp_dbus_file_transfer_on_signal_transfer_closed (
    XdpDbusFileTransfer *object,
    const gchar *arg_key)
{
  XdpDbusFileTransferSkeleton *skeleton = XDP_DBUS_FILE_TRANSFER_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 ("(s)",
                   arg_key));
  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.portal.FileTransfer", "TransferClosed",
        signal_variant, NULL);
    }
  g_variant_unref (signal_variant);
  g_list_free_full (connections, g_object_unref);
}

static void xdp_dbus_file_transfer_skeleton_iface_init (XdpDbusFileTransferIface *iface);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpDbusFileTransferSkeleton, xdp_dbus_file_transfer_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (XdpDbusFileTransferSkeleton)
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_FILE_TRANSFER, xdp_dbus_file_transfer_skeleton_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpDbusFileTransferSkeleton, xdp_dbus_file_transfer_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_FILE_TRANSFER, xdp_dbus_file_transfer_skeleton_iface_init))

#endif
static void
xdp_dbus_file_transfer_skeleton_finalize (GObject *object)
{
  XdpDbusFileTransferSkeleton *skeleton = XDP_DBUS_FILE_TRANSFER_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_dbus_file_transfer_skeleton_parent_class)->finalize (object);
}

static void
xdp_dbus_file_transfer_skeleton_get_property (GObject      *object,
  guint         prop_id,
  GValue       *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  XdpDbusFileTransferSkeleton *skeleton = XDP_DBUS_FILE_TRANSFER_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_dbus_file_transfer_emit_changed (gpointer user_data)
{
  XdpDbusFileTransferSkeleton *skeleton = XDP_DBUS_FILE_TRANSFER_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.portal.FileTransfer",
                                           &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_dbus_file_transfer_schedule_emit_changed (XdpDbusFileTransferSkeleton *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_dbus_file_transfer_skeleton_notify (GObject      *object,
  GParamSpec *pspec G_GNUC_UNUSED)
{
  XdpDbusFileTransferSkeleton *skeleton = XDP_DBUS_FILE_TRANSFER_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_dbus_file_transfer_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
      g_source_set_name (skeleton->priv->changed_properties_idle_source, "[generated] _xdp_dbus_file_transfer_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_dbus_file_transfer_skeleton_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec)
{
  const _ExtendedGDBusPropertyInfo *info;
  XdpDbusFileTransferSkeleton *skeleton = XDP_DBUS_FILE_TRANSFER_SKELETON (object);
  g_assert (prop_id != 0 && prop_id - 1 < 1);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_dbus_file_transfer_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_dbus_file_transfer_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_dbus_file_transfer_skeleton_init (XdpDbusFileTransferSkeleton *skeleton)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  skeleton->priv = xdp_dbus_file_transfer_skeleton_get_instance_private (skeleton);
#else
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, XDP_DBUS_TYPE_FILE_TRANSFER_SKELETON, XdpDbusFileTransferSkeletonPrivate);
#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_dbus_file_transfer_skeleton_get_version (XdpDbusFileTransfer *object)
{
  XdpDbusFileTransferSkeleton *skeleton = XDP_DBUS_FILE_TRANSFER_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_dbus_file_transfer_skeleton_class_init (XdpDbusFileTransferSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize = xdp_dbus_file_transfer_skeleton_finalize;
  gobject_class->get_property = xdp_dbus_file_transfer_skeleton_get_property;
  gobject_class->set_property = xdp_dbus_file_transfer_skeleton_set_property;
  gobject_class->notify       = xdp_dbus_file_transfer_skeleton_notify;


  xdp_dbus_file_transfer_override_properties (gobject_class, 1);

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = xdp_dbus_file_transfer_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = xdp_dbus_file_transfer_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = xdp_dbus_file_transfer_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = xdp_dbus_file_transfer_skeleton_dbus_interface_get_vtable;

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

static void
xdp_dbus_file_transfer_skeleton_iface_init (XdpDbusFileTransferIface *iface)
{
  iface->transfer_closed = _xdp_dbus_file_transfer_on_signal_transfer_closed;
  iface->get_version = xdp_dbus_file_transfer_skeleton_get_version;
}

/**
 * xdp_dbus_file_transfer_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-FileTransfer.top_of_page">org.freedesktop.portal.FileTransfer</link>.
 *
 * Returns: (transfer full) (type XdpDbusFileTransferSkeleton): The skeleton object.
 */
XdpDbusFileTransfer *
xdp_dbus_file_transfer_skeleton_new (void)
{
  return XDP_DBUS_FILE_TRANSFER (g_object_new (XDP_DBUS_TYPE_FILE_TRANSFER_SKELETON, NULL));
}

/* ------------------------------------------------------------------------
 * Code for interface org.freedesktop.portal.GameMode
 * ------------------------------------------------------------------------
 */

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

/* ---- Introspection data for org.freedesktop.portal.GameMode ---- */

static const _ExtendedGDBusArgInfo _xdp_dbus_game_mode_method_info_query_status_IN_ARG_pid =
{
  {
    -1,
    (gchar *) "pid",
    (gchar *) "i",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_dbus_game_mode_method_info_query_status_IN_ARG_pointers[] =
{
  &_xdp_dbus_game_mode_method_info_query_status_IN_ARG_pid.parent_struct,
  NULL
};

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

static const GDBusArgInfo * const _xdp_dbus_game_mode_method_info_query_status_OUT_ARG_pointers[] =
{
  &_xdp_dbus_game_mode_method_info_query_status_OUT_ARG_result.parent_struct,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_game_mode_method_info_query_status =
{
  {
    -1,
    (gchar *) "QueryStatus",
    (GDBusArgInfo **) &_xdp_dbus_game_mode_method_info_query_status_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_game_mode_method_info_query_status_OUT_ARG_pointers,
    NULL
  },
  "handle-query-status",
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_dbus_game_mode_method_info_register_game_IN_ARG_pid =
{
  {
    -1,
    (gchar *) "pid",
    (gchar *) "i",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_dbus_game_mode_method_info_register_game_IN_ARG_pointers[] =
{
  &_xdp_dbus_game_mode_method_info_register_game_IN_ARG_pid.parent_struct,
  NULL
};

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

static const GDBusArgInfo * const _xdp_dbus_game_mode_method_info_register_game_OUT_ARG_pointers[] =
{
  &_xdp_dbus_game_mode_method_info_register_game_OUT_ARG_result.parent_struct,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_game_mode_method_info_register_game =
{
  {
    -1,
    (gchar *) "RegisterGame",
    (GDBusArgInfo **) &_xdp_dbus_game_mode_method_info_register_game_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_game_mode_method_info_register_game_OUT_ARG_pointers,
    NULL
  },
  "handle-register-game",
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_dbus_game_mode_method_info_unregister_game_IN_ARG_pid =
{
  {
    -1,
    (gchar *) "pid",
    (gchar *) "i",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_dbus_game_mode_method_info_unregister_game_IN_ARG_pointers[] =
{
  &_xdp_dbus_game_mode_method_info_unregister_game_IN_ARG_pid.parent_struct,
  NULL
};

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

static const GDBusArgInfo * const _xdp_dbus_game_mode_method_info_unregister_game_OUT_ARG_pointers[] =
{
  &_xdp_dbus_game_mode_method_info_unregister_game_OUT_ARG_result.parent_struct,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_game_mode_method_info_unregister_game =
{
  {
    -1,
    (gchar *) "UnregisterGame",
    (GDBusArgInfo **) &_xdp_dbus_game_mode_method_info_unregister_game_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_game_mode_method_info_unregister_game_OUT_ARG_pointers,
    NULL
  },
  "handle-unregister-game",
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_dbus_game_mode_method_info_query_status_by_pid_IN_ARG_target =
{
  {
    -1,
    (gchar *) "target",
    (gchar *) "i",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_dbus_game_mode_method_info_query_status_by_pid_IN_ARG_requester =
{
  {
    -1,
    (gchar *) "requester",
    (gchar *) "i",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_dbus_game_mode_method_info_query_status_by_pid_IN_ARG_pointers[] =
{
  &_xdp_dbus_game_mode_method_info_query_status_by_pid_IN_ARG_target.parent_struct,
  &_xdp_dbus_game_mode_method_info_query_status_by_pid_IN_ARG_requester.parent_struct,
  NULL
};

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

static const GDBusArgInfo * const _xdp_dbus_game_mode_method_info_query_status_by_pid_OUT_ARG_pointers[] =
{
  &_xdp_dbus_game_mode_method_info_query_status_by_pid_OUT_ARG_result.parent_struct,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_game_mode_method_info_query_status_by_pid =
{
  {
    -1,
    (gchar *) "QueryStatusByPid",
    (GDBusArgInfo **) &_xdp_dbus_game_mode_method_info_query_status_by_pid_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_game_mode_method_info_query_status_by_pid_OUT_ARG_pointers,
    NULL
  },
  "handle-query-status-by-pid",
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_dbus_game_mode_method_info_register_game_by_pid_IN_ARG_target =
{
  {
    -1,
    (gchar *) "target",
    (gchar *) "i",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_dbus_game_mode_method_info_register_game_by_pid_IN_ARG_requester =
{
  {
    -1,
    (gchar *) "requester",
    (gchar *) "i",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_dbus_game_mode_method_info_register_game_by_pid_IN_ARG_pointers[] =
{
  &_xdp_dbus_game_mode_method_info_register_game_by_pid_IN_ARG_target.parent_struct,
  &_xdp_dbus_game_mode_method_info_register_game_by_pid_IN_ARG_requester.parent_struct,
  NULL
};

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

static const GDBusArgInfo * const _xdp_dbus_game_mode_method_info_register_game_by_pid_OUT_ARG_pointers[] =
{
  &_xdp_dbus_game_mode_method_info_register_game_by_pid_OUT_ARG_result.parent_struct,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_game_mode_method_info_register_game_by_pid =
{
  {
    -1,
    (gchar *) "RegisterGameByPid",
    (GDBusArgInfo **) &_xdp_dbus_game_mode_method_info_register_game_by_pid_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_game_mode_method_info_register_game_by_pid_OUT_ARG_pointers,
    NULL
  },
  "handle-register-game-by-pid",
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_dbus_game_mode_method_info_unregister_game_by_pid_IN_ARG_target =
{
  {
    -1,
    (gchar *) "target",
    (gchar *) "i",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_dbus_game_mode_method_info_unregister_game_by_pid_IN_ARG_requester =
{
  {
    -1,
    (gchar *) "requester",
    (gchar *) "i",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_dbus_game_mode_method_info_unregister_game_by_pid_IN_ARG_pointers[] =
{
  &_xdp_dbus_game_mode_method_info_unregister_game_by_pid_IN_ARG_target.parent_struct,
  &_xdp_dbus_game_mode_method_info_unregister_game_by_pid_IN_ARG_requester.parent_struct,
  NULL
};

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

static const GDBusArgInfo * const _xdp_dbus_game_mode_method_info_unregister_game_by_pid_OUT_ARG_pointers[] =
{
  &_xdp_dbus_game_mode_method_info_unregister_game_by_pid_OUT_ARG_result.parent_struct,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_game_mode_method_info_unregister_game_by_pid =
{
  {
    -1,
    (gchar *) "UnregisterGameByPid",
    (GDBusArgInfo **) &_xdp_dbus_game_mode_method_info_unregister_game_by_pid_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_game_mode_method_info_unregister_game_by_pid_OUT_ARG_pointers,
    NULL
  },
  "handle-unregister-game-by-pid",
  FALSE
};

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

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

static const GDBusArgInfo * const _xdp_dbus_game_mode_method_info_query_status_by_pidfd_IN_ARG_pointers[] =
{
  &_xdp_dbus_game_mode_method_info_query_status_by_pidfd_IN_ARG_target.parent_struct,
  &_xdp_dbus_game_mode_method_info_query_status_by_pidfd_IN_ARG_requester.parent_struct,
  NULL
};

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

static const GDBusArgInfo * const _xdp_dbus_game_mode_method_info_query_status_by_pidfd_OUT_ARG_pointers[] =
{
  &_xdp_dbus_game_mode_method_info_query_status_by_pidfd_OUT_ARG_result.parent_struct,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_game_mode_method_info_query_status_by_pidfd =
{
  {
    -1,
    (gchar *) "QueryStatusByPIDFd",
    (GDBusArgInfo **) &_xdp_dbus_game_mode_method_info_query_status_by_pidfd_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_game_mode_method_info_query_status_by_pidfd_OUT_ARG_pointers,
    NULL
  },
  "handle-query-status-by-pidfd",
  TRUE
};

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

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

static const GDBusArgInfo * const _xdp_dbus_game_mode_method_info_register_game_by_pidfd_IN_ARG_pointers[] =
{
  &_xdp_dbus_game_mode_method_info_register_game_by_pidfd_IN_ARG_target.parent_struct,
  &_xdp_dbus_game_mode_method_info_register_game_by_pidfd_IN_ARG_requester.parent_struct,
  NULL
};

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

static const GDBusArgInfo * const _xdp_dbus_game_mode_method_info_register_game_by_pidfd_OUT_ARG_pointers[] =
{
  &_xdp_dbus_game_mode_method_info_register_game_by_pidfd_OUT_ARG_result.parent_struct,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_game_mode_method_info_register_game_by_pidfd =
{
  {
    -1,
    (gchar *) "RegisterGameByPIDFd",
    (GDBusArgInfo **) &_xdp_dbus_game_mode_method_info_register_game_by_pidfd_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_game_mode_method_info_register_game_by_pidfd_OUT_ARG_pointers,
    NULL
  },
  "handle-register-game-by-pidfd",
  TRUE
};

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

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

static const GDBusArgInfo * const _xdp_dbus_game_mode_method_info_unregister_game_by_pidfd_IN_ARG_pointers[] =
{
  &_xdp_dbus_game_mode_method_info_unregister_game_by_pidfd_IN_ARG_target.parent_struct,
  &_xdp_dbus_game_mode_method_info_unregister_game_by_pidfd_IN_ARG_requester.parent_struct,
  NULL
};

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

static const GDBusArgInfo * const _xdp_dbus_game_mode_method_info_unregister_game_by_pidfd_OUT_ARG_pointers[] =
{
  &_xdp_dbus_game_mode_method_info_unregister_game_by_pidfd_OUT_ARG_result.parent_struct,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_game_mode_method_info_unregister_game_by_pidfd =
{
  {
    -1,
    (gchar *) "UnregisterGameByPIDFd",
    (GDBusArgInfo **) &_xdp_dbus_game_mode_method_info_unregister_game_by_pidfd_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_game_mode_method_info_unregister_game_by_pidfd_OUT_ARG_pointers,
    NULL
  },
  "handle-unregister-game-by-pidfd",
  TRUE
};

static const GDBusMethodInfo * const _xdp_dbus_game_mode_method_info_pointers[] =
{
  &_xdp_dbus_game_mode_method_info_query_status.parent_struct,
  &_xdp_dbus_game_mode_method_info_register_game.parent_struct,
  &_xdp_dbus_game_mode_method_info_unregister_game.parent_struct,
  &_xdp_dbus_game_mode_method_info_query_status_by_pid.parent_struct,
  &_xdp_dbus_game_mode_method_info_register_game_by_pid.parent_struct,
  &_xdp_dbus_game_mode_method_info_unregister_game_by_pid.parent_struct,
  &_xdp_dbus_game_mode_method_info_query_status_by_pidfd.parent_struct,
  &_xdp_dbus_game_mode_method_info_register_game_by_pidfd.parent_struct,
  &_xdp_dbus_game_mode_method_info_unregister_game_by_pidfd.parent_struct,
  NULL
};

static const _ExtendedGDBusPropertyInfo _xdp_dbus_game_mode_property_info_active =
{
  {
    -1,
    (gchar *) "Active",
    (gchar *) "b",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "active",
  FALSE,
  TRUE
};

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

static const GDBusPropertyInfo * const _xdp_dbus_game_mode_property_info_pointers[] =
{
  &_xdp_dbus_game_mode_property_info_active.parent_struct,
  &_xdp_dbus_game_mode_property_info_version.parent_struct,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _xdp_dbus_game_mode_interface_info =
{
  {
    -1,
    (gchar *) "org.freedesktop.portal.GameMode",
    (GDBusMethodInfo **) &_xdp_dbus_game_mode_method_info_pointers,
    NULL,
    (GDBusPropertyInfo **) &_xdp_dbus_game_mode_property_info_pointers,
    NULL
  },
  "game-mode",
};


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

/**
 * xdp_dbus_game_mode_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 #XdpDbusGameMode interface for a concrete class.
 * The properties are overridden in the order they are defined.
 *
 * Returns: The last property id.
 */
guint
xdp_dbus_game_mode_override_properties (GObjectClass *klass, guint property_id_begin)
{
  g_object_class_override_property (klass, property_id_begin++, "active");
  g_object_class_override_property (klass, property_id_begin++, "version");
  return property_id_begin - 1;
}


inline static void
xdp_dbus_game_mode_method_marshal_query_status (
    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_INT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_dbus_game_mode_method_marshal_register_game (
    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_INT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_dbus_game_mode_method_marshal_unregister_game (
    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_INT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_dbus_game_mode_method_marshal_query_status_by_pid (
    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_INT_INT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_dbus_game_mode_method_marshal_register_game_by_pid (
    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_INT_INT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_dbus_game_mode_method_marshal_unregister_game_by_pid (
    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_INT_INT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_dbus_game_mode_method_marshal_query_status_by_pidfd (
    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_VARIANT_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_dbus_game_mode_method_marshal_register_game_by_pidfd (
    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_VARIANT_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_dbus_game_mode_method_marshal_unregister_game_by_pidfd (
    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_VARIANT_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}


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

/**
 * XdpDbusGameModeIface:
 * @parent_iface: The parent interface.
 * @handle_query_status: Handler for the #XdpDbusGameMode::handle-query-status signal.
 * @handle_query_status_by_pid: Handler for the #XdpDbusGameMode::handle-query-status-by-pid signal.
 * @handle_query_status_by_pidfd: Handler for the #XdpDbusGameMode::handle-query-status-by-pidfd signal.
 * @handle_register_game: Handler for the #XdpDbusGameMode::handle-register-game signal.
 * @handle_register_game_by_pid: Handler for the #XdpDbusGameMode::handle-register-game-by-pid signal.
 * @handle_register_game_by_pidfd: Handler for the #XdpDbusGameMode::handle-register-game-by-pidfd signal.
 * @handle_unregister_game: Handler for the #XdpDbusGameMode::handle-unregister-game signal.
 * @handle_unregister_game_by_pid: Handler for the #XdpDbusGameMode::handle-unregister-game-by-pid signal.
 * @handle_unregister_game_by_pidfd: Handler for the #XdpDbusGameMode::handle-unregister-game-by-pidfd signal.
 * @get_active: Getter for the #XdpDbusGameMode:active property.
 * @get_version: Getter for the #XdpDbusGameMode:version property.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-GameMode.top_of_page">org.freedesktop.portal.GameMode</link>.
 */

typedef XdpDbusGameModeIface XdpDbusGameModeInterface;
G_DEFINE_INTERFACE (XdpDbusGameMode, xdp_dbus_game_mode, G_TYPE_OBJECT)

static void
xdp_dbus_game_mode_default_init (XdpDbusGameModeIface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * XdpDbusGameMode::handle-query-status:
   * @object: A #XdpDbusGameMode.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_pid: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-portal-GameMode.QueryStatus">QueryStatus()</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_dbus_game_mode_complete_query_status() 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-query-status",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpDbusGameModeIface, handle_query_status),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_game_mode_method_marshal_query_status,
    G_TYPE_BOOLEAN,
    2,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_INT);

  /**
   * XdpDbusGameMode::handle-register-game:
   * @object: A #XdpDbusGameMode.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_pid: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-portal-GameMode.RegisterGame">RegisterGame()</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_dbus_game_mode_complete_register_game() 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-register-game",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpDbusGameModeIface, handle_register_game),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_game_mode_method_marshal_register_game,
    G_TYPE_BOOLEAN,
    2,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_INT);

  /**
   * XdpDbusGameMode::handle-unregister-game:
   * @object: A #XdpDbusGameMode.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_pid: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-portal-GameMode.UnregisterGame">UnregisterGame()</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_dbus_game_mode_complete_unregister_game() 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-unregister-game",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpDbusGameModeIface, handle_unregister_game),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_game_mode_method_marshal_unregister_game,
    G_TYPE_BOOLEAN,
    2,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_INT);

  /**
   * XdpDbusGameMode::handle-query-status-by-pid:
   * @object: A #XdpDbusGameMode.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_target: Argument passed by remote caller.
   * @arg_requester: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-portal-GameMode.QueryStatusByPid">QueryStatusByPid()</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_dbus_game_mode_complete_query_status_by_pid() 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-query-status-by-pid",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpDbusGameModeIface, handle_query_status_by_pid),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_game_mode_method_marshal_query_status_by_pid,
    G_TYPE_BOOLEAN,
    3,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_INT, G_TYPE_INT);

  /**
   * XdpDbusGameMode::handle-register-game-by-pid:
   * @object: A #XdpDbusGameMode.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_target: Argument passed by remote caller.
   * @arg_requester: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-portal-GameMode.RegisterGameByPid">RegisterGameByPid()</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_dbus_game_mode_complete_register_game_by_pid() 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-register-game-by-pid",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpDbusGameModeIface, handle_register_game_by_pid),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_game_mode_method_marshal_register_game_by_pid,
    G_TYPE_BOOLEAN,
    3,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_INT, G_TYPE_INT);

  /**
   * XdpDbusGameMode::handle-unregister-game-by-pid:
   * @object: A #XdpDbusGameMode.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_target: Argument passed by remote caller.
   * @arg_requester: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-portal-GameMode.UnregisterGameByPid">UnregisterGameByPid()</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_dbus_game_mode_complete_unregister_game_by_pid() 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-unregister-game-by-pid",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpDbusGameModeIface, handle_unregister_game_by_pid),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_game_mode_method_marshal_unregister_game_by_pid,
    G_TYPE_BOOLEAN,
    3,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_INT, G_TYPE_INT);

  /**
   * XdpDbusGameMode::handle-query-status-by-pidfd:
   * @object: A #XdpDbusGameMode.
   * @invocation: A #GDBusMethodInvocation.
   * @fd_list: (nullable): A #GUnixFDList or %NULL.
   * @arg_target: Argument passed by remote caller.
   * @arg_requester: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-portal-GameMode.QueryStatusByPIDFd">QueryStatusByPIDFd()</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_dbus_game_mode_complete_query_status_by_pidfd() 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-query-status-by-pidfd",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpDbusGameModeIface, handle_query_status_by_pidfd),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_game_mode_method_marshal_query_status_by_pidfd,
    G_TYPE_BOOLEAN,
    4,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UNIX_FD_LIST, G_TYPE_VARIANT, G_TYPE_VARIANT);

  /**
   * XdpDbusGameMode::handle-register-game-by-pidfd:
   * @object: A #XdpDbusGameMode.
   * @invocation: A #GDBusMethodInvocation.
   * @fd_list: (nullable): A #GUnixFDList or %NULL.
   * @arg_target: Argument passed by remote caller.
   * @arg_requester: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-portal-GameMode.RegisterGameByPIDFd">RegisterGameByPIDFd()</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_dbus_game_mode_complete_register_game_by_pidfd() 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-register-game-by-pidfd",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpDbusGameModeIface, handle_register_game_by_pidfd),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_game_mode_method_marshal_register_game_by_pidfd,
    G_TYPE_BOOLEAN,
    4,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UNIX_FD_LIST, G_TYPE_VARIANT, G_TYPE_VARIANT);

  /**
   * XdpDbusGameMode::handle-unregister-game-by-pidfd:
   * @object: A #XdpDbusGameMode.
   * @invocation: A #GDBusMethodInvocation.
   * @fd_list: (nullable): A #GUnixFDList or %NULL.
   * @arg_target: Argument passed by remote caller.
   * @arg_requester: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-portal-GameMode.UnregisterGameByPIDFd">UnregisterGameByPIDFd()</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_dbus_game_mode_complete_unregister_game_by_pidfd() 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-unregister-game-by-pidfd",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpDbusGameModeIface, handle_unregister_game_by_pidfd),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_game_mode_method_marshal_unregister_game_by_pidfd,
    G_TYPE_BOOLEAN,
    4,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UNIX_FD_LIST, G_TYPE_VARIANT, G_TYPE_VARIANT);

  /* GObject properties for D-Bus properties: */
  /**
   * XdpDbusGameMode:active:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-portal-GameMode.Active">"Active"</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_boolean ("active", "Active", "Active", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * XdpDbusGameMode:version:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-portal-GameMode.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_dbus_game_mode_get_active: (skip)
 * @object: A #XdpDbusGameMode.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-portal-GameMode.Active">"Active"</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.
 */
gboolean 
xdp_dbus_game_mode_get_active (XdpDbusGameMode *object)
{
  g_return_val_if_fail (XDP_DBUS_IS_GAME_MODE (object), FALSE);

  return XDP_DBUS_GAME_MODE_GET_IFACE (object)->get_active (object);
}

/**
 * xdp_dbus_game_mode_set_active: (skip)
 * @object: A #XdpDbusGameMode.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-freedesktop-portal-GameMode.Active">"Active"</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_dbus_game_mode_set_active (XdpDbusGameMode *object, gboolean value)
{
  g_object_set (G_OBJECT (object), "active", value, NULL);
}

/**
 * xdp_dbus_game_mode_get_version: (skip)
 * @object: A #XdpDbusGameMode.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-portal-GameMode.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_dbus_game_mode_get_version (XdpDbusGameMode *object)
{
  g_return_val_if_fail (XDP_DBUS_IS_GAME_MODE (object), 0);

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

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

/**
 * xdp_dbus_game_mode_call_query_status:
 * @proxy: A #XdpDbusGameModeProxy.
 * @arg_pid: 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-portal-GameMode.QueryStatus">QueryStatus()</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_dbus_game_mode_call_query_status_finish() to get the result of the operation.
 *
 * See xdp_dbus_game_mode_call_query_status_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_game_mode_call_query_status (
    XdpDbusGameMode *proxy,
    gint arg_pid,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "QueryStatus",
    g_variant_new ("(i)",
                   arg_pid),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_game_mode_call_query_status_finish:
 * @proxy: A #XdpDbusGameModeProxy.
 * @out_result: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_game_mode_call_query_status().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_game_mode_call_query_status().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_game_mode_call_query_status_finish (
    XdpDbusGameMode *proxy,
    gint* 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,
                 "(i)",
                 out_result);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_game_mode_call_query_status_sync:
 * @proxy: A #XdpDbusGameModeProxy.
 * @arg_pid: 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-portal-GameMode.QueryStatus">QueryStatus()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_game_mode_call_query_status() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_game_mode_call_query_status_sync (
    XdpDbusGameMode *proxy,
    gint arg_pid,
    gint* out_result,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "QueryStatus",
    g_variant_new ("(i)",
                   arg_pid),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(i)",
                 out_result);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_game_mode_call_register_game:
 * @proxy: A #XdpDbusGameModeProxy.
 * @arg_pid: 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-portal-GameMode.RegisterGame">RegisterGame()</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_dbus_game_mode_call_register_game_finish() to get the result of the operation.
 *
 * See xdp_dbus_game_mode_call_register_game_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_game_mode_call_register_game (
    XdpDbusGameMode *proxy,
    gint arg_pid,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "RegisterGame",
    g_variant_new ("(i)",
                   arg_pid),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_game_mode_call_register_game_finish:
 * @proxy: A #XdpDbusGameModeProxy.
 * @out_result: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_game_mode_call_register_game().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_game_mode_call_register_game().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_game_mode_call_register_game_finish (
    XdpDbusGameMode *proxy,
    gint* 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,
                 "(i)",
                 out_result);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_game_mode_call_register_game_sync:
 * @proxy: A #XdpDbusGameModeProxy.
 * @arg_pid: 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-portal-GameMode.RegisterGame">RegisterGame()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_game_mode_call_register_game() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_game_mode_call_register_game_sync (
    XdpDbusGameMode *proxy,
    gint arg_pid,
    gint* out_result,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "RegisterGame",
    g_variant_new ("(i)",
                   arg_pid),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(i)",
                 out_result);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_game_mode_call_unregister_game:
 * @proxy: A #XdpDbusGameModeProxy.
 * @arg_pid: 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-portal-GameMode.UnregisterGame">UnregisterGame()</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_dbus_game_mode_call_unregister_game_finish() to get the result of the operation.
 *
 * See xdp_dbus_game_mode_call_unregister_game_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_game_mode_call_unregister_game (
    XdpDbusGameMode *proxy,
    gint arg_pid,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "UnregisterGame",
    g_variant_new ("(i)",
                   arg_pid),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_game_mode_call_unregister_game_finish:
 * @proxy: A #XdpDbusGameModeProxy.
 * @out_result: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_game_mode_call_unregister_game().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_game_mode_call_unregister_game().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_game_mode_call_unregister_game_finish (
    XdpDbusGameMode *proxy,
    gint* 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,
                 "(i)",
                 out_result);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_game_mode_call_unregister_game_sync:
 * @proxy: A #XdpDbusGameModeProxy.
 * @arg_pid: 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-portal-GameMode.UnregisterGame">UnregisterGame()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_game_mode_call_unregister_game() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_game_mode_call_unregister_game_sync (
    XdpDbusGameMode *proxy,
    gint arg_pid,
    gint* out_result,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "UnregisterGame",
    g_variant_new ("(i)",
                   arg_pid),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(i)",
                 out_result);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_game_mode_call_query_status_by_pid:
 * @proxy: A #XdpDbusGameModeProxy.
 * @arg_target: Argument to pass with the method invocation.
 * @arg_requester: 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-portal-GameMode.QueryStatusByPid">QueryStatusByPid()</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_dbus_game_mode_call_query_status_by_pid_finish() to get the result of the operation.
 *
 * See xdp_dbus_game_mode_call_query_status_by_pid_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_game_mode_call_query_status_by_pid (
    XdpDbusGameMode *proxy,
    gint arg_target,
    gint arg_requester,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "QueryStatusByPid",
    g_variant_new ("(ii)",
                   arg_target,
                   arg_requester),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_game_mode_call_query_status_by_pid_finish:
 * @proxy: A #XdpDbusGameModeProxy.
 * @out_result: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_game_mode_call_query_status_by_pid().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_game_mode_call_query_status_by_pid().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_game_mode_call_query_status_by_pid_finish (
    XdpDbusGameMode *proxy,
    gint* 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,
                 "(i)",
                 out_result);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_game_mode_call_query_status_by_pid_sync:
 * @proxy: A #XdpDbusGameModeProxy.
 * @arg_target: Argument to pass with the method invocation.
 * @arg_requester: 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-portal-GameMode.QueryStatusByPid">QueryStatusByPid()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_game_mode_call_query_status_by_pid() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_game_mode_call_query_status_by_pid_sync (
    XdpDbusGameMode *proxy,
    gint arg_target,
    gint arg_requester,
    gint* out_result,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "QueryStatusByPid",
    g_variant_new ("(ii)",
                   arg_target,
                   arg_requester),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(i)",
                 out_result);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_game_mode_call_register_game_by_pid:
 * @proxy: A #XdpDbusGameModeProxy.
 * @arg_target: Argument to pass with the method invocation.
 * @arg_requester: 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-portal-GameMode.RegisterGameByPid">RegisterGameByPid()</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_dbus_game_mode_call_register_game_by_pid_finish() to get the result of the operation.
 *
 * See xdp_dbus_game_mode_call_register_game_by_pid_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_game_mode_call_register_game_by_pid (
    XdpDbusGameMode *proxy,
    gint arg_target,
    gint arg_requester,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "RegisterGameByPid",
    g_variant_new ("(ii)",
                   arg_target,
                   arg_requester),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_game_mode_call_register_game_by_pid_finish:
 * @proxy: A #XdpDbusGameModeProxy.
 * @out_result: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_game_mode_call_register_game_by_pid().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_game_mode_call_register_game_by_pid().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_game_mode_call_register_game_by_pid_finish (
    XdpDbusGameMode *proxy,
    gint* 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,
                 "(i)",
                 out_result);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_game_mode_call_register_game_by_pid_sync:
 * @proxy: A #XdpDbusGameModeProxy.
 * @arg_target: Argument to pass with the method invocation.
 * @arg_requester: 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-portal-GameMode.RegisterGameByPid">RegisterGameByPid()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_game_mode_call_register_game_by_pid() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_game_mode_call_register_game_by_pid_sync (
    XdpDbusGameMode *proxy,
    gint arg_target,
    gint arg_requester,
    gint* out_result,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "RegisterGameByPid",
    g_variant_new ("(ii)",
                   arg_target,
                   arg_requester),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(i)",
                 out_result);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_game_mode_call_unregister_game_by_pid:
 * @proxy: A #XdpDbusGameModeProxy.
 * @arg_target: Argument to pass with the method invocation.
 * @arg_requester: 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-portal-GameMode.UnregisterGameByPid">UnregisterGameByPid()</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_dbus_game_mode_call_unregister_game_by_pid_finish() to get the result of the operation.
 *
 * See xdp_dbus_game_mode_call_unregister_game_by_pid_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_game_mode_call_unregister_game_by_pid (
    XdpDbusGameMode *proxy,
    gint arg_target,
    gint arg_requester,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "UnregisterGameByPid",
    g_variant_new ("(ii)",
                   arg_target,
                   arg_requester),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_game_mode_call_unregister_game_by_pid_finish:
 * @proxy: A #XdpDbusGameModeProxy.
 * @out_result: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_game_mode_call_unregister_game_by_pid().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_game_mode_call_unregister_game_by_pid().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_game_mode_call_unregister_game_by_pid_finish (
    XdpDbusGameMode *proxy,
    gint* 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,
                 "(i)",
                 out_result);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_game_mode_call_unregister_game_by_pid_sync:
 * @proxy: A #XdpDbusGameModeProxy.
 * @arg_target: Argument to pass with the method invocation.
 * @arg_requester: 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-portal-GameMode.UnregisterGameByPid">UnregisterGameByPid()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_game_mode_call_unregister_game_by_pid() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_game_mode_call_unregister_game_by_pid_sync (
    XdpDbusGameMode *proxy,
    gint arg_target,
    gint arg_requester,
    gint* out_result,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "UnregisterGameByPid",
    g_variant_new ("(ii)",
                   arg_target,
                   arg_requester),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(i)",
                 out_result);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_game_mode_call_query_status_by_pidfd:
 * @proxy: A #XdpDbusGameModeProxy.
 * @arg_target: Argument to pass with the method invocation.
 * @arg_requester: 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-portal-GameMode.QueryStatusByPIDFd">QueryStatusByPIDFd()</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_dbus_game_mode_call_query_status_by_pidfd_finish() to get the result of the operation.
 *
 * See xdp_dbus_game_mode_call_query_status_by_pidfd_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_game_mode_call_query_status_by_pidfd (
    XdpDbusGameMode *proxy,
    GVariant *arg_target,
    GVariant *arg_requester,
    GUnixFDList *fd_list,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call_with_unix_fd_list (G_DBUS_PROXY (proxy),
    "QueryStatusByPIDFd",
    g_variant_new ("(@h@h)",
                   arg_target,
                   arg_requester),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    fd_list,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_game_mode_call_query_status_by_pidfd_finish:
 * @proxy: A #XdpDbusGameModeProxy.
 * @out_result: (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_dbus_game_mode_call_query_status_by_pidfd().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_game_mode_call_query_status_by_pidfd().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_game_mode_call_query_status_by_pidfd_finish (
    XdpDbusGameMode *proxy,
    gint* out_result,
    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,
                 "(i)",
                 out_result);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_game_mode_call_query_status_by_pidfd_sync:
 * @proxy: A #XdpDbusGameModeProxy.
 * @arg_target: Argument to pass with the method invocation.
 * @arg_requester: Argument to pass with the method invocation.
 * @fd_list: (nullable): A #GUnixFDList or %NULL.
 * @out_result: (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-portal-GameMode.QueryStatusByPIDFd">QueryStatusByPIDFd()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_game_mode_call_query_status_by_pidfd() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_game_mode_call_query_status_by_pidfd_sync (
    XdpDbusGameMode *proxy,
    GVariant *arg_target,
    GVariant *arg_requester,
    GUnixFDList  *fd_list,
    gint* out_result,
    GUnixFDList **out_fd_list,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_with_unix_fd_list_sync (G_DBUS_PROXY (proxy),
    "QueryStatusByPIDFd",
    g_variant_new ("(@h@h)",
                   arg_target,
                   arg_requester),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    fd_list,
    out_fd_list,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(i)",
                 out_result);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_game_mode_call_register_game_by_pidfd:
 * @proxy: A #XdpDbusGameModeProxy.
 * @arg_target: Argument to pass with the method invocation.
 * @arg_requester: 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-portal-GameMode.RegisterGameByPIDFd">RegisterGameByPIDFd()</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_dbus_game_mode_call_register_game_by_pidfd_finish() to get the result of the operation.
 *
 * See xdp_dbus_game_mode_call_register_game_by_pidfd_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_game_mode_call_register_game_by_pidfd (
    XdpDbusGameMode *proxy,
    GVariant *arg_target,
    GVariant *arg_requester,
    GUnixFDList *fd_list,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call_with_unix_fd_list (G_DBUS_PROXY (proxy),
    "RegisterGameByPIDFd",
    g_variant_new ("(@h@h)",
                   arg_target,
                   arg_requester),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    fd_list,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_game_mode_call_register_game_by_pidfd_finish:
 * @proxy: A #XdpDbusGameModeProxy.
 * @out_result: (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_dbus_game_mode_call_register_game_by_pidfd().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_game_mode_call_register_game_by_pidfd().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_game_mode_call_register_game_by_pidfd_finish (
    XdpDbusGameMode *proxy,
    gint* out_result,
    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,
                 "(i)",
                 out_result);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_game_mode_call_register_game_by_pidfd_sync:
 * @proxy: A #XdpDbusGameModeProxy.
 * @arg_target: Argument to pass with the method invocation.
 * @arg_requester: Argument to pass with the method invocation.
 * @fd_list: (nullable): A #GUnixFDList or %NULL.
 * @out_result: (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-portal-GameMode.RegisterGameByPIDFd">RegisterGameByPIDFd()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_game_mode_call_register_game_by_pidfd() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_game_mode_call_register_game_by_pidfd_sync (
    XdpDbusGameMode *proxy,
    GVariant *arg_target,
    GVariant *arg_requester,
    GUnixFDList  *fd_list,
    gint* out_result,
    GUnixFDList **out_fd_list,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_with_unix_fd_list_sync (G_DBUS_PROXY (proxy),
    "RegisterGameByPIDFd",
    g_variant_new ("(@h@h)",
                   arg_target,
                   arg_requester),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    fd_list,
    out_fd_list,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(i)",
                 out_result);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_game_mode_call_unregister_game_by_pidfd:
 * @proxy: A #XdpDbusGameModeProxy.
 * @arg_target: Argument to pass with the method invocation.
 * @arg_requester: 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-portal-GameMode.UnregisterGameByPIDFd">UnregisterGameByPIDFd()</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_dbus_game_mode_call_unregister_game_by_pidfd_finish() to get the result of the operation.
 *
 * See xdp_dbus_game_mode_call_unregister_game_by_pidfd_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_game_mode_call_unregister_game_by_pidfd (
    XdpDbusGameMode *proxy,
    GVariant *arg_target,
    GVariant *arg_requester,
    GUnixFDList *fd_list,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call_with_unix_fd_list (G_DBUS_PROXY (proxy),
    "UnregisterGameByPIDFd",
    g_variant_new ("(@h@h)",
                   arg_target,
                   arg_requester),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    fd_list,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_game_mode_call_unregister_game_by_pidfd_finish:
 * @proxy: A #XdpDbusGameModeProxy.
 * @out_result: (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_dbus_game_mode_call_unregister_game_by_pidfd().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_game_mode_call_unregister_game_by_pidfd().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_game_mode_call_unregister_game_by_pidfd_finish (
    XdpDbusGameMode *proxy,
    gint* out_result,
    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,
                 "(i)",
                 out_result);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_game_mode_call_unregister_game_by_pidfd_sync:
 * @proxy: A #XdpDbusGameModeProxy.
 * @arg_target: Argument to pass with the method invocation.
 * @arg_requester: Argument to pass with the method invocation.
 * @fd_list: (nullable): A #GUnixFDList or %NULL.
 * @out_result: (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-portal-GameMode.UnregisterGameByPIDFd">UnregisterGameByPIDFd()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_game_mode_call_unregister_game_by_pidfd() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_game_mode_call_unregister_game_by_pidfd_sync (
    XdpDbusGameMode *proxy,
    GVariant *arg_target,
    GVariant *arg_requester,
    GUnixFDList  *fd_list,
    gint* out_result,
    GUnixFDList **out_fd_list,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_with_unix_fd_list_sync (G_DBUS_PROXY (proxy),
    "UnregisterGameByPIDFd",
    g_variant_new ("(@h@h)",
                   arg_target,
                   arg_requester),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    fd_list,
    out_fd_list,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(i)",
                 out_result);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_game_mode_complete_query_status:
 * @object: A #XdpDbusGameMode.
 * @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-portal-GameMode.QueryStatus">QueryStatus()</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_dbus_game_mode_complete_query_status (
    XdpDbusGameMode *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    gint result)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(i)",
                   result));
}

/**
 * xdp_dbus_game_mode_complete_register_game:
 * @object: A #XdpDbusGameMode.
 * @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-portal-GameMode.RegisterGame">RegisterGame()</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_dbus_game_mode_complete_register_game (
    XdpDbusGameMode *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    gint result)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(i)",
                   result));
}

/**
 * xdp_dbus_game_mode_complete_unregister_game:
 * @object: A #XdpDbusGameMode.
 * @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-portal-GameMode.UnregisterGame">UnregisterGame()</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_dbus_game_mode_complete_unregister_game (
    XdpDbusGameMode *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    gint result)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(i)",
                   result));
}

/**
 * xdp_dbus_game_mode_complete_query_status_by_pid:
 * @object: A #XdpDbusGameMode.
 * @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-portal-GameMode.QueryStatusByPid">QueryStatusByPid()</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_dbus_game_mode_complete_query_status_by_pid (
    XdpDbusGameMode *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    gint result)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(i)",
                   result));
}

/**
 * xdp_dbus_game_mode_complete_register_game_by_pid:
 * @object: A #XdpDbusGameMode.
 * @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-portal-GameMode.RegisterGameByPid">RegisterGameByPid()</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_dbus_game_mode_complete_register_game_by_pid (
    XdpDbusGameMode *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    gint result)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(i)",
                   result));
}

/**
 * xdp_dbus_game_mode_complete_unregister_game_by_pid:
 * @object: A #XdpDbusGameMode.
 * @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-portal-GameMode.UnregisterGameByPid">UnregisterGameByPid()</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_dbus_game_mode_complete_unregister_game_by_pid (
    XdpDbusGameMode *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    gint result)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(i)",
                   result));
}

/**
 * xdp_dbus_game_mode_complete_query_status_by_pidfd:
 * @object: A #XdpDbusGameMode.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @fd_list: (nullable): A #GUnixFDList or %NULL.
 * @result: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-portal-GameMode.QueryStatusByPIDFd">QueryStatusByPIDFd()</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_dbus_game_mode_complete_query_status_by_pidfd (
    XdpDbusGameMode *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    GUnixFDList *fd_list,
    gint result)
{
  g_dbus_method_invocation_return_value_with_unix_fd_list (invocation,
    g_variant_new ("(i)",
                   result),
    fd_list);
}

/**
 * xdp_dbus_game_mode_complete_register_game_by_pidfd:
 * @object: A #XdpDbusGameMode.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @fd_list: (nullable): A #GUnixFDList or %NULL.
 * @result: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-portal-GameMode.RegisterGameByPIDFd">RegisterGameByPIDFd()</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_dbus_game_mode_complete_register_game_by_pidfd (
    XdpDbusGameMode *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    GUnixFDList *fd_list,
    gint result)
{
  g_dbus_method_invocation_return_value_with_unix_fd_list (invocation,
    g_variant_new ("(i)",
                   result),
    fd_list);
}

/**
 * xdp_dbus_game_mode_complete_unregister_game_by_pidfd:
 * @object: A #XdpDbusGameMode.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @fd_list: (nullable): A #GUnixFDList or %NULL.
 * @result: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-portal-GameMode.UnregisterGameByPIDFd">UnregisterGameByPIDFd()</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_dbus_game_mode_complete_unregister_game_by_pidfd (
    XdpDbusGameMode *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    GUnixFDList *fd_list,
    gint result)
{
  g_dbus_method_invocation_return_value_with_unix_fd_list (invocation,
    g_variant_new ("(i)",
                   result),
    fd_list);
}

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

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

/**
 * XdpDbusGameModeProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpDbusGameModeProxy.
 */

struct _XdpDbusGameModeProxyPrivate
{
  GData *qdata;
};

static void xdp_dbus_game_mode_proxy_iface_init (XdpDbusGameModeIface *iface);

#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpDbusGameModeProxy, xdp_dbus_game_mode_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (XdpDbusGameModeProxy)
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_GAME_MODE, xdp_dbus_game_mode_proxy_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpDbusGameModeProxy, xdp_dbus_game_mode_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_GAME_MODE, xdp_dbus_game_mode_proxy_iface_init))

#endif
static void
xdp_dbus_game_mode_proxy_finalize (GObject *object)
{
  XdpDbusGameModeProxy *proxy = XDP_DBUS_GAME_MODE_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (xdp_dbus_game_mode_proxy_parent_class)->finalize (object);
}

static void
xdp_dbus_game_mode_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_dbus_game_mode_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_dbus_game_mode_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.portal.GameMode: %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_dbus_game_mode_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_dbus_game_mode_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.portal.GameMode", info->parent_struct.name, variant),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    NULL, (GAsyncReadyCallback) xdp_dbus_game_mode_proxy_set_property_cb, (GDBusPropertyInfo *) &info->parent_struct);
  g_variant_unref (variant);
}

static void
xdp_dbus_game_mode_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_dbus_game_mode_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_DBUS_TYPE_GAME_MODE);
  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_DBUS_TYPE_GAME_MODE);
  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_dbus_game_mode_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  XdpDbusGameModeProxy *proxy = XDP_DBUS_GAME_MODE_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_dbus_game_mode_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_dbus_game_mode_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_dbus_game_mode_proxy_get_active (XdpDbusGameMode *object)
{
  XdpDbusGameModeProxy *proxy = XDP_DBUS_GAME_MODE_PROXY (object);
  GVariant *variant;
  gboolean value = FALSE;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Active");
  if (variant != NULL)
    {
      value = g_variant_get_boolean (variant);
      g_variant_unref (variant);
    }
  return value;
}

static guint 
xdp_dbus_game_mode_proxy_get_version (XdpDbusGameMode *object)
{
  XdpDbusGameModeProxy *proxy = XDP_DBUS_GAME_MODE_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_dbus_game_mode_proxy_init (XdpDbusGameModeProxy *proxy)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  proxy->priv = xdp_dbus_game_mode_proxy_get_instance_private (proxy);
#else
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, XDP_DBUS_TYPE_GAME_MODE_PROXY, XdpDbusGameModeProxyPrivate);
#endif

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

static void
xdp_dbus_game_mode_proxy_class_init (XdpDbusGameModeProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = xdp_dbus_game_mode_proxy_finalize;
  gobject_class->get_property = xdp_dbus_game_mode_proxy_get_property;
  gobject_class->set_property = xdp_dbus_game_mode_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = xdp_dbus_game_mode_proxy_g_signal;
  proxy_class->g_properties_changed = xdp_dbus_game_mode_proxy_g_properties_changed;

  xdp_dbus_game_mode_override_properties (gobject_class, 1);

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

static void
xdp_dbus_game_mode_proxy_iface_init (XdpDbusGameModeIface *iface)
{
  iface->get_active = xdp_dbus_game_mode_proxy_get_active;
  iface->get_version = xdp_dbus_game_mode_proxy_get_version;
}

/**
 * xdp_dbus_game_mode_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-portal-GameMode.top_of_page">org.freedesktop.portal.GameMode</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_dbus_game_mode_proxy_new_finish() to get the result of the operation.
 *
 * See xdp_dbus_game_mode_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_dbus_game_mode_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_DBUS_TYPE_GAME_MODE_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.portal.GameMode", NULL);
}

/**
 * xdp_dbus_game_mode_proxy_new_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_game_mode_proxy_new().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_dbus_game_mode_proxy_new().
 *
 * Returns: (transfer full) (type XdpDbusGameModeProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusGameMode *
xdp_dbus_game_mode_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_DBUS_GAME_MODE (ret);
  else
    return NULL;
}

/**
 * xdp_dbus_game_mode_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-portal-GameMode.top_of_page">org.freedesktop.portal.GameMode</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_game_mode_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpDbusGameModeProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusGameMode *
xdp_dbus_game_mode_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_DBUS_TYPE_GAME_MODE_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.portal.GameMode", NULL);
  if (ret != NULL)
    return XDP_DBUS_GAME_MODE (ret);
  else
    return NULL;
}


/**
 * xdp_dbus_game_mode_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_dbus_game_mode_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_dbus_game_mode_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See xdp_dbus_game_mode_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_dbus_game_mode_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_DBUS_TYPE_GAME_MODE_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.portal.GameMode", NULL);
}

/**
 * xdp_dbus_game_mode_proxy_new_for_bus_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_game_mode_proxy_new_for_bus().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_dbus_game_mode_proxy_new_for_bus().
 *
 * Returns: (transfer full) (type XdpDbusGameModeProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusGameMode *
xdp_dbus_game_mode_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_DBUS_GAME_MODE (ret);
  else
    return NULL;
}

/**
 * xdp_dbus_game_mode_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_dbus_game_mode_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_game_mode_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpDbusGameModeProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusGameMode *
xdp_dbus_game_mode_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_DBUS_TYPE_GAME_MODE_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.portal.GameMode", NULL);
  if (ret != NULL)
    return XDP_DBUS_GAME_MODE (ret);
  else
    return NULL;
}


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

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

/**
 * XdpDbusGameModeSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpDbusGameModeSkeleton.
 */

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

static void
_xdp_dbus_game_mode_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)
{
  XdpDbusGameModeSkeleton *skeleton = XDP_DBUS_GAME_MODE_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_DBUS_TYPE_GAME_MODE);
  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_DBUS_TYPE_GAME_MODE);
  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_dbus_game_mode_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)
{
  XdpDbusGameModeSkeleton *skeleton = XDP_DBUS_GAME_MODE_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_dbus_game_mode_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_dbus_game_mode_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)
{
  XdpDbusGameModeSkeleton *skeleton = XDP_DBUS_GAME_MODE_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_dbus_game_mode_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_dbus_game_mode_skeleton_vtable =
{
  _xdp_dbus_game_mode_skeleton_handle_method_call,
  _xdp_dbus_game_mode_skeleton_handle_get_property,
  _xdp_dbus_game_mode_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
xdp_dbus_game_mode_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return xdp_dbus_game_mode_interface_info ();
}

static GDBusInterfaceVTable *
xdp_dbus_game_mode_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_xdp_dbus_game_mode_skeleton_vtable;
}

static GVariant *
xdp_dbus_game_mode_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  XdpDbusGameModeSkeleton *skeleton = XDP_DBUS_GAME_MODE_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_dbus_game_mode_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _xdp_dbus_game_mode_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _xdp_dbus_game_mode_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _xdp_dbus_game_mode_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.portal.GameMode", 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_dbus_game_mode_emit_changed (gpointer user_data);

static void
xdp_dbus_game_mode_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
{
  XdpDbusGameModeSkeleton *skeleton = XDP_DBUS_GAME_MODE_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_dbus_game_mode_emit_changed (skeleton);
}

static void xdp_dbus_game_mode_skeleton_iface_init (XdpDbusGameModeIface *iface);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpDbusGameModeSkeleton, xdp_dbus_game_mode_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (XdpDbusGameModeSkeleton)
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_GAME_MODE, xdp_dbus_game_mode_skeleton_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpDbusGameModeSkeleton, xdp_dbus_game_mode_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_GAME_MODE, xdp_dbus_game_mode_skeleton_iface_init))

#endif
static void
xdp_dbus_game_mode_skeleton_finalize (GObject *object)
{
  XdpDbusGameModeSkeleton *skeleton = XDP_DBUS_GAME_MODE_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_dbus_game_mode_skeleton_parent_class)->finalize (object);
}

static void
xdp_dbus_game_mode_skeleton_get_property (GObject      *object,
  guint         prop_id,
  GValue       *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  XdpDbusGameModeSkeleton *skeleton = XDP_DBUS_GAME_MODE_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_dbus_game_mode_emit_changed (gpointer user_data)
{
  XdpDbusGameModeSkeleton *skeleton = XDP_DBUS_GAME_MODE_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.portal.GameMode",
                                           &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_dbus_game_mode_schedule_emit_changed (XdpDbusGameModeSkeleton *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_dbus_game_mode_skeleton_notify (GObject      *object,
  GParamSpec *pspec G_GNUC_UNUSED)
{
  XdpDbusGameModeSkeleton *skeleton = XDP_DBUS_GAME_MODE_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_dbus_game_mode_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
      g_source_set_name (skeleton->priv->changed_properties_idle_source, "[generated] _xdp_dbus_game_mode_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_dbus_game_mode_skeleton_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec)
{
  const _ExtendedGDBusPropertyInfo *info;
  XdpDbusGameModeSkeleton *skeleton = XDP_DBUS_GAME_MODE_SKELETON (object);
  g_assert (prop_id != 0 && prop_id - 1 < 2);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_dbus_game_mode_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_dbus_game_mode_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_dbus_game_mode_skeleton_init (XdpDbusGameModeSkeleton *skeleton)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  skeleton->priv = xdp_dbus_game_mode_skeleton_get_instance_private (skeleton);
#else
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, XDP_DBUS_TYPE_GAME_MODE_SKELETON, XdpDbusGameModeSkeletonPrivate);
#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_BOOLEAN);
  g_value_init (&skeleton->priv->properties[1], G_TYPE_UINT);
}

static gboolean 
xdp_dbus_game_mode_skeleton_get_active (XdpDbusGameMode *object)
{
  XdpDbusGameModeSkeleton *skeleton = XDP_DBUS_GAME_MODE_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 guint 
xdp_dbus_game_mode_skeleton_get_version (XdpDbusGameMode *object)
{
  XdpDbusGameModeSkeleton *skeleton = XDP_DBUS_GAME_MODE_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_dbus_game_mode_skeleton_class_init (XdpDbusGameModeSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize = xdp_dbus_game_mode_skeleton_finalize;
  gobject_class->get_property = xdp_dbus_game_mode_skeleton_get_property;
  gobject_class->set_property = xdp_dbus_game_mode_skeleton_set_property;
  gobject_class->notify       = xdp_dbus_game_mode_skeleton_notify;


  xdp_dbus_game_mode_override_properties (gobject_class, 1);

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = xdp_dbus_game_mode_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = xdp_dbus_game_mode_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = xdp_dbus_game_mode_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = xdp_dbus_game_mode_skeleton_dbus_interface_get_vtable;

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

static void
xdp_dbus_game_mode_skeleton_iface_init (XdpDbusGameModeIface *iface)
{
  iface->get_active = xdp_dbus_game_mode_skeleton_get_active;
  iface->get_version = xdp_dbus_game_mode_skeleton_get_version;
}

/**
 * xdp_dbus_game_mode_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-GameMode.top_of_page">org.freedesktop.portal.GameMode</link>.
 *
 * Returns: (transfer full) (type XdpDbusGameModeSkeleton): The skeleton object.
 */
XdpDbusGameMode *
xdp_dbus_game_mode_skeleton_new (void)
{
  return XDP_DBUS_GAME_MODE (g_object_new (XDP_DBUS_TYPE_GAME_MODE_SKELETON, NULL));
}

/* ------------------------------------------------------------------------
 * Code for interface org.freedesktop.portal.GlobalShortcuts
 * ------------------------------------------------------------------------
 */

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

enum
{
  XDP_DBUS__GLOBAL_SHORTCUTS_ACTIVATED,
  XDP_DBUS__GLOBAL_SHORTCUTS_DEACTIVATED,
  XDP_DBUS__GLOBAL_SHORTCUTS_SHORTCUTS_CHANGED,
};

static unsigned XDP_DBUS__GLOBAL_SHORTCUTS_SIGNALS[3] = { 0 };

/* ---- Introspection data for org.freedesktop.portal.GlobalShortcuts ---- */

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

static const GDBusArgInfo * const _xdp_dbus_global_shortcuts_method_info_create_session_IN_ARG_pointers[] =
{
  &_xdp_dbus_global_shortcuts_method_info_create_session_IN_ARG_options.parent_struct,
  NULL
};

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

static const GDBusArgInfo * const _xdp_dbus_global_shortcuts_method_info_create_session_OUT_ARG_pointers[] =
{
  &_xdp_dbus_global_shortcuts_method_info_create_session_OUT_ARG_handle.parent_struct,
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_global_shortcuts_method_create_session_annotation_info_pointers[] =
{
  &_xdp_dbus_global_shortcuts_method_create_session_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_global_shortcuts_method_info_create_session =
{
  {
    -1,
    (gchar *) "CreateSession",
    (GDBusArgInfo **) &_xdp_dbus_global_shortcuts_method_info_create_session_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_global_shortcuts_method_info_create_session_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_dbus_global_shortcuts_method_create_session_annotation_info_pointers
  },
  "handle-create-session",
  FALSE
};

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

static const _ExtendedGDBusArgInfo _xdp_dbus_global_shortcuts_method_info_bind_shortcuts_IN_ARG_shortcuts =
{
  {
    -1,
    (gchar *) "shortcuts",
    (gchar *) "a(sa{sv})",
    NULL
  },
  FALSE
};

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

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

static const GDBusArgInfo * const _xdp_dbus_global_shortcuts_method_info_bind_shortcuts_IN_ARG_pointers[] =
{
  &_xdp_dbus_global_shortcuts_method_info_bind_shortcuts_IN_ARG_session_handle.parent_struct,
  &_xdp_dbus_global_shortcuts_method_info_bind_shortcuts_IN_ARG_shortcuts.parent_struct,
  &_xdp_dbus_global_shortcuts_method_info_bind_shortcuts_IN_ARG_parent_window.parent_struct,
  &_xdp_dbus_global_shortcuts_method_info_bind_shortcuts_IN_ARG_options.parent_struct,
  NULL
};

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

static const GDBusArgInfo * const _xdp_dbus_global_shortcuts_method_info_bind_shortcuts_OUT_ARG_pointers[] =
{
  &_xdp_dbus_global_shortcuts_method_info_bind_shortcuts_OUT_ARG_request_handle.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_dbus_global_shortcuts_method_bind_shortcuts_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.In1",
  (gchar *) "QList<QPair<QString,QVariantMap>>",
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_global_shortcuts_method_bind_shortcuts_annotation_info_pointers[] =
{
  &_xdp_dbus_global_shortcuts_method_bind_shortcuts_annotation_info_0,
  &_xdp_dbus_global_shortcuts_method_bind_shortcuts_annotation_info_1,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_global_shortcuts_method_info_bind_shortcuts =
{
  {
    -1,
    (gchar *) "BindShortcuts",
    (GDBusArgInfo **) &_xdp_dbus_global_shortcuts_method_info_bind_shortcuts_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_global_shortcuts_method_info_bind_shortcuts_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_dbus_global_shortcuts_method_bind_shortcuts_annotation_info_pointers
  },
  "handle-bind-shortcuts",
  FALSE
};

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

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

static const GDBusArgInfo * const _xdp_dbus_global_shortcuts_method_info_list_shortcuts_IN_ARG_pointers[] =
{
  &_xdp_dbus_global_shortcuts_method_info_list_shortcuts_IN_ARG_session_handle.parent_struct,
  &_xdp_dbus_global_shortcuts_method_info_list_shortcuts_IN_ARG_options.parent_struct,
  NULL
};

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

static const GDBusArgInfo * const _xdp_dbus_global_shortcuts_method_info_list_shortcuts_OUT_ARG_pointers[] =
{
  &_xdp_dbus_global_shortcuts_method_info_list_shortcuts_OUT_ARG_request_handle.parent_struct,
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_global_shortcuts_method_list_shortcuts_annotation_info_pointers[] =
{
  &_xdp_dbus_global_shortcuts_method_list_shortcuts_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_global_shortcuts_method_info_list_shortcuts =
{
  {
    -1,
    (gchar *) "ListShortcuts",
    (GDBusArgInfo **) &_xdp_dbus_global_shortcuts_method_info_list_shortcuts_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_global_shortcuts_method_info_list_shortcuts_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_dbus_global_shortcuts_method_list_shortcuts_annotation_info_pointers
  },
  "handle-list-shortcuts",
  FALSE
};

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

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

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

static const GDBusArgInfo * const _xdp_dbus_global_shortcuts_method_info_configure_shortcuts_IN_ARG_pointers[] =
{
  &_xdp_dbus_global_shortcuts_method_info_configure_shortcuts_IN_ARG_session_handle.parent_struct,
  &_xdp_dbus_global_shortcuts_method_info_configure_shortcuts_IN_ARG_parent_window.parent_struct,
  &_xdp_dbus_global_shortcuts_method_info_configure_shortcuts_IN_ARG_options.parent_struct,
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_global_shortcuts_method_configure_shortcuts_annotation_info_pointers[] =
{
  &_xdp_dbus_global_shortcuts_method_configure_shortcuts_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_global_shortcuts_method_info_configure_shortcuts =
{
  {
    -1,
    (gchar *) "ConfigureShortcuts",
    (GDBusArgInfo **) &_xdp_dbus_global_shortcuts_method_info_configure_shortcuts_IN_ARG_pointers,
    NULL,
    (GDBusAnnotationInfo **) &_xdp_dbus_global_shortcuts_method_configure_shortcuts_annotation_info_pointers
  },
  "handle-configure-shortcuts",
  FALSE
};

static const GDBusMethodInfo * const _xdp_dbus_global_shortcuts_method_info_pointers[] =
{
  &_xdp_dbus_global_shortcuts_method_info_create_session.parent_struct,
  &_xdp_dbus_global_shortcuts_method_info_bind_shortcuts.parent_struct,
  &_xdp_dbus_global_shortcuts_method_info_list_shortcuts.parent_struct,
  &_xdp_dbus_global_shortcuts_method_info_configure_shortcuts.parent_struct,
  NULL
};

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

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

static const _ExtendedGDBusArgInfo _xdp_dbus_global_shortcuts_signal_info_activated_ARG_timestamp =
{
  {
    -1,
    (gchar *) "timestamp",
    (gchar *) "t",
    NULL
  },
  FALSE
};

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

static const GDBusArgInfo * const _xdp_dbus_global_shortcuts_signal_info_activated_ARG_pointers[] =
{
  &_xdp_dbus_global_shortcuts_signal_info_activated_ARG_session_handle.parent_struct,
  &_xdp_dbus_global_shortcuts_signal_info_activated_ARG_shortcut_id.parent_struct,
  &_xdp_dbus_global_shortcuts_signal_info_activated_ARG_timestamp.parent_struct,
  &_xdp_dbus_global_shortcuts_signal_info_activated_ARG_options.parent_struct,
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_global_shortcuts_signal_activated_annotation_info_pointers[] =
{
  &_xdp_dbus_global_shortcuts_signal_activated_annotation_info_0,
  NULL
};

static const _ExtendedGDBusSignalInfo _xdp_dbus_global_shortcuts_signal_info_activated =
{
  {
    -1,
    (gchar *) "Activated",
    (GDBusArgInfo **) &_xdp_dbus_global_shortcuts_signal_info_activated_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_dbus_global_shortcuts_signal_activated_annotation_info_pointers
  },
  "activated"
};

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

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

static const _ExtendedGDBusArgInfo _xdp_dbus_global_shortcuts_signal_info_deactivated_ARG_timestamp =
{
  {
    -1,
    (gchar *) "timestamp",
    (gchar *) "t",
    NULL
  },
  FALSE
};

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

static const GDBusArgInfo * const _xdp_dbus_global_shortcuts_signal_info_deactivated_ARG_pointers[] =
{
  &_xdp_dbus_global_shortcuts_signal_info_deactivated_ARG_session_handle.parent_struct,
  &_xdp_dbus_global_shortcuts_signal_info_deactivated_ARG_shortcut_id.parent_struct,
  &_xdp_dbus_global_shortcuts_signal_info_deactivated_ARG_timestamp.parent_struct,
  &_xdp_dbus_global_shortcuts_signal_info_deactivated_ARG_options.parent_struct,
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_global_shortcuts_signal_deactivated_annotation_info_pointers[] =
{
  &_xdp_dbus_global_shortcuts_signal_deactivated_annotation_info_0,
  NULL
};

static const _ExtendedGDBusSignalInfo _xdp_dbus_global_shortcuts_signal_info_deactivated =
{
  {
    -1,
    (gchar *) "Deactivated",
    (GDBusArgInfo **) &_xdp_dbus_global_shortcuts_signal_info_deactivated_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_dbus_global_shortcuts_signal_deactivated_annotation_info_pointers
  },
  "deactivated"
};

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

static const _ExtendedGDBusArgInfo _xdp_dbus_global_shortcuts_signal_info_shortcuts_changed_ARG_shortcuts =
{
  {
    -1,
    (gchar *) "shortcuts",
    (gchar *) "a(sa{sv})",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_dbus_global_shortcuts_signal_info_shortcuts_changed_ARG_pointers[] =
{
  &_xdp_dbus_global_shortcuts_signal_info_shortcuts_changed_ARG_session_handle.parent_struct,
  &_xdp_dbus_global_shortcuts_signal_info_shortcuts_changed_ARG_shortcuts.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_dbus_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_dbus_global_shortcuts_signal_shortcuts_changed_annotation_info_pointers[] =
{
  &_xdp_dbus_global_shortcuts_signal_shortcuts_changed_annotation_info_0,
  NULL
};

static const _ExtendedGDBusSignalInfo _xdp_dbus_global_shortcuts_signal_info_shortcuts_changed =
{
  {
    -1,
    (gchar *) "ShortcutsChanged",
    (GDBusArgInfo **) &_xdp_dbus_global_shortcuts_signal_info_shortcuts_changed_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_dbus_global_shortcuts_signal_shortcuts_changed_annotation_info_pointers
  },
  "shortcuts-changed"
};

static const GDBusSignalInfo * const _xdp_dbus_global_shortcuts_signal_info_pointers[] =
{
  &_xdp_dbus_global_shortcuts_signal_info_activated.parent_struct,
  &_xdp_dbus_global_shortcuts_signal_info_deactivated.parent_struct,
  &_xdp_dbus_global_shortcuts_signal_info_shortcuts_changed.parent_struct,
  NULL
};

static const _ExtendedGDBusPropertyInfo _xdp_dbus_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_dbus_global_shortcuts_property_info_pointers[] =
{
  &_xdp_dbus_global_shortcuts_property_info_version.parent_struct,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _xdp_dbus_global_shortcuts_interface_info =
{
  {
    -1,
    (gchar *) "org.freedesktop.portal.GlobalShortcuts",
    (GDBusMethodInfo **) &_xdp_dbus_global_shortcuts_method_info_pointers,
    (GDBusSignalInfo **) &_xdp_dbus_global_shortcuts_signal_info_pointers,
    (GDBusPropertyInfo **) &_xdp_dbus_global_shortcuts_property_info_pointers,
    NULL
  },
  "global-shortcuts",
};


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

/**
 * xdp_dbus_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 #XdpDbusGlobalShortcuts interface for a concrete class.
 * The properties are overridden in the order they are defined.
 *
 * Returns: The last property id.
 */
guint
xdp_dbus_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_dbus_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_dbus_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_dbus_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_dbus_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_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_dbus_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_VARIANT_STRING_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_dbus_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_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_dbus_global_shortcuts_method_marshal_configure_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 (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}


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

/**
 * XdpDbusGlobalShortcutsIface:
 * @parent_iface: The parent interface.
 * @handle_bind_shortcuts: Handler for the #XdpDbusGlobalShortcuts::handle-bind-shortcuts signal.
 * @handle_configure_shortcuts: Handler for the #XdpDbusGlobalShortcuts::handle-configure-shortcuts signal.
 * @handle_create_session: Handler for the #XdpDbusGlobalShortcuts::handle-create-session signal.
 * @handle_list_shortcuts: Handler for the #XdpDbusGlobalShortcuts::handle-list-shortcuts signal.
 * @get_version: Getter for the #XdpDbusGlobalShortcuts:version property.
 * @activated: Handler for the #XdpDbusGlobalShortcuts::activated signal.
 * @deactivated: Handler for the #XdpDbusGlobalShortcuts::deactivated signal.
 * @shortcuts_changed: Handler for the #XdpDbusGlobalShortcuts::shortcuts-changed signal.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-GlobalShortcuts.top_of_page">org.freedesktop.portal.GlobalShortcuts</link>.
 */

typedef XdpDbusGlobalShortcutsIface XdpDbusGlobalShortcutsInterface;
G_DEFINE_INTERFACE (XdpDbusGlobalShortcuts, xdp_dbus_global_shortcuts, G_TYPE_OBJECT)

static void
xdp_dbus_global_shortcuts_default_init (XdpDbusGlobalShortcutsIface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * XdpDbusGlobalShortcuts::handle-create-session:
   * @object: A #XdpDbusGlobalShortcuts.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_options: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-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_dbus_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 (XdpDbusGlobalShortcutsIface, handle_create_session),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_global_shortcuts_method_marshal_create_session,
    G_TYPE_BOOLEAN,
    2,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_VARIANT);

  /**
   * XdpDbusGlobalShortcuts::handle-bind-shortcuts:
   * @object: A #XdpDbusGlobalShortcuts.
   * @invocation: A #GDBusMethodInvocation.
   * @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-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_dbus_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 (XdpDbusGlobalShortcutsIface, handle_bind_shortcuts),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_global_shortcuts_method_marshal_bind_shortcuts,
    G_TYPE_BOOLEAN,
    5,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_VARIANT, G_TYPE_STRING, G_TYPE_VARIANT);

  /**
   * XdpDbusGlobalShortcuts::handle-list-shortcuts:
   * @object: A #XdpDbusGlobalShortcuts.
   * @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-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_dbus_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 (XdpDbusGlobalShortcutsIface, handle_list_shortcuts),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_global_shortcuts_method_marshal_list_shortcuts,
    G_TYPE_BOOLEAN,
    3,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_VARIANT);

  /**
   * XdpDbusGlobalShortcuts::handle-configure-shortcuts:
   * @object: A #XdpDbusGlobalShortcuts.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_session_handle: 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-portal-GlobalShortcuts.ConfigureShortcuts">ConfigureShortcuts()</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_dbus_global_shortcuts_complete_configure_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-configure-shortcuts",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpDbusGlobalShortcutsIface, handle_configure_shortcuts),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_global_shortcuts_method_marshal_configure_shortcuts,
    G_TYPE_BOOLEAN,
    4,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_VARIANT);

  /* GObject signals for received D-Bus signals: */
  /**
   * XdpDbusGlobalShortcuts::activated:
   * @object: A #XdpDbusGlobalShortcuts.
   * @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-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_DBUS__GLOBAL_SHORTCUTS_SIGNALS[XDP_DBUS__GLOBAL_SHORTCUTS_ACTIVATED] =
    g_signal_new ("activated",
      G_TYPE_FROM_INTERFACE (iface),
      G_SIGNAL_RUN_LAST,
      G_STRUCT_OFFSET (XdpDbusGlobalShortcutsIface, activated),
      NULL,
      NULL,
      xdp_dbus_global_shortcuts_signal_marshal_activated,
      G_TYPE_NONE,
      4, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_UINT64, G_TYPE_VARIANT);

  /**
   * XdpDbusGlobalShortcuts::deactivated:
   * @object: A #XdpDbusGlobalShortcuts.
   * @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-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_DBUS__GLOBAL_SHORTCUTS_SIGNALS[XDP_DBUS__GLOBAL_SHORTCUTS_DEACTIVATED] =
    g_signal_new ("deactivated",
      G_TYPE_FROM_INTERFACE (iface),
      G_SIGNAL_RUN_LAST,
      G_STRUCT_OFFSET (XdpDbusGlobalShortcutsIface, deactivated),
      NULL,
      NULL,
      xdp_dbus_global_shortcuts_signal_marshal_deactivated,
      G_TYPE_NONE,
      4, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_UINT64, G_TYPE_VARIANT);

  /**
   * XdpDbusGlobalShortcuts::shortcuts-changed:
   * @object: A #XdpDbusGlobalShortcuts.
   * @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-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_DBUS__GLOBAL_SHORTCUTS_SIGNALS[XDP_DBUS__GLOBAL_SHORTCUTS_SHORTCUTS_CHANGED] =
    g_signal_new ("shortcuts-changed",
      G_TYPE_FROM_INTERFACE (iface),
      G_SIGNAL_RUN_LAST,
      G_STRUCT_OFFSET (XdpDbusGlobalShortcutsIface, shortcuts_changed),
      NULL,
      NULL,
      xdp_dbus_global_shortcuts_signal_marshal_shortcuts_changed,
      G_TYPE_NONE,
      2, G_TYPE_STRING, G_TYPE_VARIANT);

  /* GObject properties for D-Bus properties: */
  /**
   * XdpDbusGlobalShortcuts:version:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-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_dbus_global_shortcuts_get_version: (skip)
 * @object: A #XdpDbusGlobalShortcuts.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-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_dbus_global_shortcuts_get_version (XdpDbusGlobalShortcuts *object)
{
  g_return_val_if_fail (XDP_DBUS_IS_GLOBAL_SHORTCUTS (object), 0);

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

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

/**
 * xdp_dbus_global_shortcuts_emit_activated:
 * @object: A #XdpDbusGlobalShortcuts.
 * @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-portal-GlobalShortcuts.Activated">"Activated"</link> D-Bus signal.
 */
void
xdp_dbus_global_shortcuts_emit_activated (
    XdpDbusGlobalShortcuts *object,
    const gchar *arg_session_handle,
    const gchar *arg_shortcut_id,
    guint64 arg_timestamp,
    GVariant *arg_options)
{
  g_signal_emit (object, XDP_DBUS__GLOBAL_SHORTCUTS_SIGNALS[XDP_DBUS__GLOBAL_SHORTCUTS_ACTIVATED], 0, arg_session_handle, arg_shortcut_id, arg_timestamp, arg_options);
}

/**
 * xdp_dbus_global_shortcuts_emit_deactivated:
 * @object: A #XdpDbusGlobalShortcuts.
 * @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-portal-GlobalShortcuts.Deactivated">"Deactivated"</link> D-Bus signal.
 */
void
xdp_dbus_global_shortcuts_emit_deactivated (
    XdpDbusGlobalShortcuts *object,
    const gchar *arg_session_handle,
    const gchar *arg_shortcut_id,
    guint64 arg_timestamp,
    GVariant *arg_options)
{
  g_signal_emit (object, XDP_DBUS__GLOBAL_SHORTCUTS_SIGNALS[XDP_DBUS__GLOBAL_SHORTCUTS_DEACTIVATED], 0, arg_session_handle, arg_shortcut_id, arg_timestamp, arg_options);
}

/**
 * xdp_dbus_global_shortcuts_emit_shortcuts_changed:
 * @object: A #XdpDbusGlobalShortcuts.
 * @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-portal-GlobalShortcuts.ShortcutsChanged">"ShortcutsChanged"</link> D-Bus signal.
 */
void
xdp_dbus_global_shortcuts_emit_shortcuts_changed (
    XdpDbusGlobalShortcuts *object,
    const gchar *arg_session_handle,
    GVariant *arg_shortcuts)
{
  g_signal_emit (object, XDP_DBUS__GLOBAL_SHORTCUTS_SIGNALS[XDP_DBUS__GLOBAL_SHORTCUTS_SHORTCUTS_CHANGED], 0, arg_session_handle, arg_shortcuts);
}

/**
 * xdp_dbus_global_shortcuts_call_create_session:
 * @proxy: A #XdpDbusGlobalShortcutsProxy.
 * @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-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_dbus_global_shortcuts_call_create_session_finish() to get the result of the operation.
 *
 * See xdp_dbus_global_shortcuts_call_create_session_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_global_shortcuts_call_create_session (
    XdpDbusGlobalShortcuts *proxy,
    GVariant *arg_options,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "CreateSession",
    g_variant_new ("(@a{sv})",
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_global_shortcuts_call_create_session_finish:
 * @proxy: A #XdpDbusGlobalShortcutsProxy.
 * @out_handle: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_global_shortcuts_call_create_session().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_global_shortcuts_call_create_session().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_global_shortcuts_call_create_session_finish (
    XdpDbusGlobalShortcuts *proxy,
    gchar ** out_handle,
    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,
                 "(o)",
                 out_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_global_shortcuts_call_create_session_sync:
 * @proxy: A #XdpDbusGlobalShortcutsProxy.
 * @arg_options: Argument to pass with the method invocation.
 * @out_handle: (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-portal-GlobalShortcuts.CreateSession">CreateSession()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_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_dbus_global_shortcuts_call_create_session_sync (
    XdpDbusGlobalShortcuts *proxy,
    GVariant *arg_options,
    gchar ** out_handle,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "CreateSession",
    g_variant_new ("(@a{sv})",
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(o)",
                 out_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_global_shortcuts_call_bind_shortcuts:
 * @proxy: A #XdpDbusGlobalShortcutsProxy.
 * @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-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_dbus_global_shortcuts_call_bind_shortcuts_finish() to get the result of the operation.
 *
 * See xdp_dbus_global_shortcuts_call_bind_shortcuts_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_global_shortcuts_call_bind_shortcuts (
    XdpDbusGlobalShortcuts *proxy,
    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 ("(o@a(sa{sv})s@a{sv})",
                   arg_session_handle,
                   arg_shortcuts,
                   arg_parent_window,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_global_shortcuts_call_bind_shortcuts_finish:
 * @proxy: A #XdpDbusGlobalShortcutsProxy.
 * @out_request_handle: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_global_shortcuts_call_bind_shortcuts().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_global_shortcuts_call_bind_shortcuts().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_global_shortcuts_call_bind_shortcuts_finish (
    XdpDbusGlobalShortcuts *proxy,
    gchar ** out_request_handle,
    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,
                 "(o)",
                 out_request_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_global_shortcuts_call_bind_shortcuts_sync:
 * @proxy: A #XdpDbusGlobalShortcutsProxy.
 * @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_request_handle: (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-portal-GlobalShortcuts.BindShortcuts">BindShortcuts()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_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_dbus_global_shortcuts_call_bind_shortcuts_sync (
    XdpDbusGlobalShortcuts *proxy,
    const gchar *arg_session_handle,
    GVariant *arg_shortcuts,
    const gchar *arg_parent_window,
    GVariant *arg_options,
    gchar ** out_request_handle,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "BindShortcuts",
    g_variant_new ("(o@a(sa{sv})s@a{sv})",
                   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,
                 "(o)",
                 out_request_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_global_shortcuts_call_list_shortcuts:
 * @proxy: A #XdpDbusGlobalShortcutsProxy.
 * @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-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_dbus_global_shortcuts_call_list_shortcuts_finish() to get the result of the operation.
 *
 * See xdp_dbus_global_shortcuts_call_list_shortcuts_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_global_shortcuts_call_list_shortcuts (
    XdpDbusGlobalShortcuts *proxy,
    const gchar *arg_session_handle,
    GVariant *arg_options,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "ListShortcuts",
    g_variant_new ("(o@a{sv})",
                   arg_session_handle,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_global_shortcuts_call_list_shortcuts_finish:
 * @proxy: A #XdpDbusGlobalShortcutsProxy.
 * @out_request_handle: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_global_shortcuts_call_list_shortcuts().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_global_shortcuts_call_list_shortcuts().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_global_shortcuts_call_list_shortcuts_finish (
    XdpDbusGlobalShortcuts *proxy,
    gchar ** out_request_handle,
    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,
                 "(o)",
                 out_request_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_global_shortcuts_call_list_shortcuts_sync:
 * @proxy: A #XdpDbusGlobalShortcutsProxy.
 * @arg_session_handle: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @out_request_handle: (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-portal-GlobalShortcuts.ListShortcuts">ListShortcuts()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_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_dbus_global_shortcuts_call_list_shortcuts_sync (
    XdpDbusGlobalShortcuts *proxy,
    const gchar *arg_session_handle,
    GVariant *arg_options,
    gchar ** out_request_handle,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "ListShortcuts",
    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,
                 "(o)",
                 out_request_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_global_shortcuts_call_configure_shortcuts:
 * @proxy: A #XdpDbusGlobalShortcutsProxy.
 * @arg_session_handle: 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-portal-GlobalShortcuts.ConfigureShortcuts">ConfigureShortcuts()</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_dbus_global_shortcuts_call_configure_shortcuts_finish() to get the result of the operation.
 *
 * See xdp_dbus_global_shortcuts_call_configure_shortcuts_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_global_shortcuts_call_configure_shortcuts (
    XdpDbusGlobalShortcuts *proxy,
    const gchar *arg_session_handle,
    const gchar *arg_parent_window,
    GVariant *arg_options,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "ConfigureShortcuts",
    g_variant_new ("(os@a{sv})",
                   arg_session_handle,
                   arg_parent_window,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_global_shortcuts_call_configure_shortcuts_finish:
 * @proxy: A #XdpDbusGlobalShortcutsProxy.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_global_shortcuts_call_configure_shortcuts().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_global_shortcuts_call_configure_shortcuts().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_global_shortcuts_call_configure_shortcuts_finish (
    XdpDbusGlobalShortcuts *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_dbus_global_shortcuts_call_configure_shortcuts_sync:
 * @proxy: A #XdpDbusGlobalShortcutsProxy.
 * @arg_session_handle: 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.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-portal-GlobalShortcuts.ConfigureShortcuts">ConfigureShortcuts()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_global_shortcuts_call_configure_shortcuts() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_global_shortcuts_call_configure_shortcuts_sync (
    XdpDbusGlobalShortcuts *proxy,
    const gchar *arg_session_handle,
    const gchar *arg_parent_window,
    GVariant *arg_options,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "ConfigureShortcuts",
    g_variant_new ("(os@a{sv})",
                   arg_session_handle,
                   arg_parent_window,
                   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_dbus_global_shortcuts_complete_create_session:
 * @object: A #XdpDbusGlobalShortcuts.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @handle: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-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_dbus_global_shortcuts_complete_create_session (
    XdpDbusGlobalShortcuts *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    const gchar *handle)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(o)",
                   handle));
}

/**
 * xdp_dbus_global_shortcuts_complete_bind_shortcuts:
 * @object: A #XdpDbusGlobalShortcuts.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @request_handle: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-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_dbus_global_shortcuts_complete_bind_shortcuts (
    XdpDbusGlobalShortcuts *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    const gchar *request_handle)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(o)",
                   request_handle));
}

/**
 * xdp_dbus_global_shortcuts_complete_list_shortcuts:
 * @object: A #XdpDbusGlobalShortcuts.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @request_handle: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-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_dbus_global_shortcuts_complete_list_shortcuts (
    XdpDbusGlobalShortcuts *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    const gchar *request_handle)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(o)",
                   request_handle));
}

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

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

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

/**
 * XdpDbusGlobalShortcutsProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpDbusGlobalShortcutsProxy.
 */

struct _XdpDbusGlobalShortcutsProxyPrivate
{
  GData *qdata;
};

static void xdp_dbus_global_shortcuts_proxy_iface_init (XdpDbusGlobalShortcutsIface *iface);

#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpDbusGlobalShortcutsProxy, xdp_dbus_global_shortcuts_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (XdpDbusGlobalShortcutsProxy)
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_GLOBAL_SHORTCUTS, xdp_dbus_global_shortcuts_proxy_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpDbusGlobalShortcutsProxy, xdp_dbus_global_shortcuts_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_GLOBAL_SHORTCUTS, xdp_dbus_global_shortcuts_proxy_iface_init))

#endif
static void
xdp_dbus_global_shortcuts_proxy_finalize (GObject *object)
{
  XdpDbusGlobalShortcutsProxy *proxy = XDP_DBUS_GLOBAL_SHORTCUTS_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (xdp_dbus_global_shortcuts_proxy_parent_class)->finalize (object);
}

static void
xdp_dbus_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_dbus_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_dbus_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.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_dbus_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_dbus_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.portal.GlobalShortcuts", info->parent_struct.name, variant),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    NULL, (GAsyncReadyCallback) xdp_dbus_global_shortcuts_proxy_set_property_cb, (GDBusPropertyInfo *) &info->parent_struct);
  g_variant_unref (variant);
}

static void
xdp_dbus_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_dbus_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_DBUS_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_DBUS_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_dbus_global_shortcuts_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  XdpDbusGlobalShortcutsProxy *proxy = XDP_DBUS_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_dbus_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_dbus_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_dbus_global_shortcuts_proxy_get_version (XdpDbusGlobalShortcuts *object)
{
  XdpDbusGlobalShortcutsProxy *proxy = XDP_DBUS_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_dbus_global_shortcuts_proxy_init (XdpDbusGlobalShortcutsProxy *proxy)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  proxy->priv = xdp_dbus_global_shortcuts_proxy_get_instance_private (proxy);
#else
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, XDP_DBUS_TYPE_GLOBAL_SHORTCUTS_PROXY, XdpDbusGlobalShortcutsProxyPrivate);
#endif

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

static void
xdp_dbus_global_shortcuts_proxy_class_init (XdpDbusGlobalShortcutsProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = xdp_dbus_global_shortcuts_proxy_finalize;
  gobject_class->get_property = xdp_dbus_global_shortcuts_proxy_get_property;
  gobject_class->set_property = xdp_dbus_global_shortcuts_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = xdp_dbus_global_shortcuts_proxy_g_signal;
  proxy_class->g_properties_changed = xdp_dbus_global_shortcuts_proxy_g_properties_changed;

  xdp_dbus_global_shortcuts_override_properties (gobject_class, 1);

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

static void
xdp_dbus_global_shortcuts_proxy_iface_init (XdpDbusGlobalShortcutsIface *iface)
{
  iface->get_version = xdp_dbus_global_shortcuts_proxy_get_version;
}

/**
 * xdp_dbus_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-portal-GlobalShortcuts.top_of_page">org.freedesktop.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_dbus_global_shortcuts_proxy_new_finish() to get the result of the operation.
 *
 * See xdp_dbus_global_shortcuts_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_dbus_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_DBUS_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.portal.GlobalShortcuts", NULL);
}

/**
 * xdp_dbus_global_shortcuts_proxy_new_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_global_shortcuts_proxy_new().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_dbus_global_shortcuts_proxy_new().
 *
 * Returns: (transfer full) (type XdpDbusGlobalShortcutsProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusGlobalShortcuts *
xdp_dbus_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_DBUS_GLOBAL_SHORTCUTS (ret);
  else
    return NULL;
}

/**
 * xdp_dbus_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-portal-GlobalShortcuts.top_of_page">org.freedesktop.portal.GlobalShortcuts</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_global_shortcuts_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpDbusGlobalShortcutsProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusGlobalShortcuts *
xdp_dbus_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_DBUS_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.portal.GlobalShortcuts", NULL);
  if (ret != NULL)
    return XDP_DBUS_GLOBAL_SHORTCUTS (ret);
  else
    return NULL;
}


/**
 * xdp_dbus_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_dbus_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_dbus_global_shortcuts_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See xdp_dbus_global_shortcuts_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_dbus_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_DBUS_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.portal.GlobalShortcuts", NULL);
}

/**
 * xdp_dbus_global_shortcuts_proxy_new_for_bus_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_global_shortcuts_proxy_new_for_bus().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_dbus_global_shortcuts_proxy_new_for_bus().
 *
 * Returns: (transfer full) (type XdpDbusGlobalShortcutsProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusGlobalShortcuts *
xdp_dbus_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_DBUS_GLOBAL_SHORTCUTS (ret);
  else
    return NULL;
}

/**
 * xdp_dbus_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_dbus_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_dbus_global_shortcuts_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpDbusGlobalShortcutsProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusGlobalShortcuts *
xdp_dbus_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_DBUS_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.portal.GlobalShortcuts", NULL);
  if (ret != NULL)
    return XDP_DBUS_GLOBAL_SHORTCUTS (ret);
  else
    return NULL;
}


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

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

/**
 * XdpDbusGlobalShortcutsSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpDbusGlobalShortcutsSkeleton.
 */

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

static void
_xdp_dbus_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)
{
  XdpDbusGlobalShortcutsSkeleton *skeleton = XDP_DBUS_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_DBUS_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_DBUS_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_dbus_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)
{
  XdpDbusGlobalShortcutsSkeleton *skeleton = XDP_DBUS_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_dbus_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_dbus_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)
{
  XdpDbusGlobalShortcutsSkeleton *skeleton = XDP_DBUS_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_dbus_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_dbus_global_shortcuts_skeleton_vtable =
{
  _xdp_dbus_global_shortcuts_skeleton_handle_method_call,
  _xdp_dbus_global_shortcuts_skeleton_handle_get_property,
  _xdp_dbus_global_shortcuts_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
xdp_dbus_global_shortcuts_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return xdp_dbus_global_shortcuts_interface_info ();
}

static GDBusInterfaceVTable *
xdp_dbus_global_shortcuts_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_xdp_dbus_global_shortcuts_skeleton_vtable;
}

static GVariant *
xdp_dbus_global_shortcuts_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  XdpDbusGlobalShortcutsSkeleton *skeleton = XDP_DBUS_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_dbus_global_shortcuts_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _xdp_dbus_global_shortcuts_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _xdp_dbus_global_shortcuts_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _xdp_dbus_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.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_dbus_global_shortcuts_emit_changed (gpointer user_data);

static void
xdp_dbus_global_shortcuts_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
{
  XdpDbusGlobalShortcutsSkeleton *skeleton = XDP_DBUS_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_dbus_global_shortcuts_emit_changed (skeleton);
}

static void
_xdp_dbus_global_shortcuts_on_signal_activated (
    XdpDbusGlobalShortcuts *object,
    const gchar *arg_session_handle,
    const gchar *arg_shortcut_id,
    guint64 arg_timestamp,
    GVariant *arg_options)
{
  XdpDbusGlobalShortcutsSkeleton *skeleton = XDP_DBUS_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.portal.GlobalShortcuts", "Activated",
        signal_variant, NULL);
    }
  g_variant_unref (signal_variant);
  g_list_free_full (connections, g_object_unref);
}

static void
_xdp_dbus_global_shortcuts_on_signal_deactivated (
    XdpDbusGlobalShortcuts *object,
    const gchar *arg_session_handle,
    const gchar *arg_shortcut_id,
    guint64 arg_timestamp,
    GVariant *arg_options)
{
  XdpDbusGlobalShortcutsSkeleton *skeleton = XDP_DBUS_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.portal.GlobalShortcuts", "Deactivated",
        signal_variant, NULL);
    }
  g_variant_unref (signal_variant);
  g_list_free_full (connections, g_object_unref);
}

static void
_xdp_dbus_global_shortcuts_on_signal_shortcuts_changed (
    XdpDbusGlobalShortcuts *object,
    const gchar *arg_session_handle,
    GVariant *arg_shortcuts)
{
  XdpDbusGlobalShortcutsSkeleton *skeleton = XDP_DBUS_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.portal.GlobalShortcuts", "ShortcutsChanged",
        signal_variant, NULL);
    }
  g_variant_unref (signal_variant);
  g_list_free_full (connections, g_object_unref);
}

static void xdp_dbus_global_shortcuts_skeleton_iface_init (XdpDbusGlobalShortcutsIface *iface);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpDbusGlobalShortcutsSkeleton, xdp_dbus_global_shortcuts_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (XdpDbusGlobalShortcutsSkeleton)
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_GLOBAL_SHORTCUTS, xdp_dbus_global_shortcuts_skeleton_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpDbusGlobalShortcutsSkeleton, xdp_dbus_global_shortcuts_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_GLOBAL_SHORTCUTS, xdp_dbus_global_shortcuts_skeleton_iface_init))

#endif
static void
xdp_dbus_global_shortcuts_skeleton_finalize (GObject *object)
{
  XdpDbusGlobalShortcutsSkeleton *skeleton = XDP_DBUS_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_dbus_global_shortcuts_skeleton_parent_class)->finalize (object);
}

static void
xdp_dbus_global_shortcuts_skeleton_get_property (GObject      *object,
  guint         prop_id,
  GValue       *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  XdpDbusGlobalShortcutsSkeleton *skeleton = XDP_DBUS_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_dbus_global_shortcuts_emit_changed (gpointer user_data)
{
  XdpDbusGlobalShortcutsSkeleton *skeleton = XDP_DBUS_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.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_dbus_global_shortcuts_schedule_emit_changed (XdpDbusGlobalShortcutsSkeleton *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_dbus_global_shortcuts_skeleton_notify (GObject      *object,
  GParamSpec *pspec G_GNUC_UNUSED)
{
  XdpDbusGlobalShortcutsSkeleton *skeleton = XDP_DBUS_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_dbus_global_shortcuts_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
      g_source_set_name (skeleton->priv->changed_properties_idle_source, "[generated] _xdp_dbus_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_dbus_global_shortcuts_skeleton_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec)
{
  const _ExtendedGDBusPropertyInfo *info;
  XdpDbusGlobalShortcutsSkeleton *skeleton = XDP_DBUS_GLOBAL_SHORTCUTS_SKELETON (object);
  g_assert (prop_id != 0 && prop_id - 1 < 1);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_dbus_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_dbus_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_dbus_global_shortcuts_skeleton_init (XdpDbusGlobalShortcutsSkeleton *skeleton)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  skeleton->priv = xdp_dbus_global_shortcuts_skeleton_get_instance_private (skeleton);
#else
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, XDP_DBUS_TYPE_GLOBAL_SHORTCUTS_SKELETON, XdpDbusGlobalShortcutsSkeletonPrivate);
#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_dbus_global_shortcuts_skeleton_get_version (XdpDbusGlobalShortcuts *object)
{
  XdpDbusGlobalShortcutsSkeleton *skeleton = XDP_DBUS_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_dbus_global_shortcuts_skeleton_class_init (XdpDbusGlobalShortcutsSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize = xdp_dbus_global_shortcuts_skeleton_finalize;
  gobject_class->get_property = xdp_dbus_global_shortcuts_skeleton_get_property;
  gobject_class->set_property = xdp_dbus_global_shortcuts_skeleton_set_property;
  gobject_class->notify       = xdp_dbus_global_shortcuts_skeleton_notify;


  xdp_dbus_global_shortcuts_override_properties (gobject_class, 1);

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = xdp_dbus_global_shortcuts_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = xdp_dbus_global_shortcuts_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = xdp_dbus_global_shortcuts_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = xdp_dbus_global_shortcuts_skeleton_dbus_interface_get_vtable;

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

static void
xdp_dbus_global_shortcuts_skeleton_iface_init (XdpDbusGlobalShortcutsIface *iface)
{
  iface->activated = _xdp_dbus_global_shortcuts_on_signal_activated;
  iface->deactivated = _xdp_dbus_global_shortcuts_on_signal_deactivated;
  iface->shortcuts_changed = _xdp_dbus_global_shortcuts_on_signal_shortcuts_changed;
  iface->get_version = xdp_dbus_global_shortcuts_skeleton_get_version;
}

/**
 * xdp_dbus_global_shortcuts_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-GlobalShortcuts.top_of_page">org.freedesktop.portal.GlobalShortcuts</link>.
 *
 * Returns: (transfer full) (type XdpDbusGlobalShortcutsSkeleton): The skeleton object.
 */
XdpDbusGlobalShortcuts *
xdp_dbus_global_shortcuts_skeleton_new (void)
{
  return XDP_DBUS_GLOBAL_SHORTCUTS (g_object_new (XDP_DBUS_TYPE_GLOBAL_SHORTCUTS_SKELETON, NULL));
}

/* ------------------------------------------------------------------------
 * Code for interface org.freedesktop.portal.Inhibit
 * ------------------------------------------------------------------------
 */

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

enum
{
  XDP_DBUS__INHIBIT_STATE_CHANGED,
};

static unsigned XDP_DBUS__INHIBIT_SIGNALS[1] = { 0 };

/* ---- Introspection data for org.freedesktop.portal.Inhibit ---- */

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

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

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

static const GDBusArgInfo * const _xdp_dbus_inhibit_method_info_inhibit_IN_ARG_pointers[] =
{
  &_xdp_dbus_inhibit_method_info_inhibit_IN_ARG_window.parent_struct,
  &_xdp_dbus_inhibit_method_info_inhibit_IN_ARG_flags.parent_struct,
  &_xdp_dbus_inhibit_method_info_inhibit_IN_ARG_options.parent_struct,
  NULL
};

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

static const GDBusArgInfo * const _xdp_dbus_inhibit_method_info_inhibit_OUT_ARG_pointers[] =
{
  &_xdp_dbus_inhibit_method_info_inhibit_OUT_ARG_handle.parent_struct,
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_inhibit_method_inhibit_annotation_info_pointers[] =
{
  &_xdp_dbus_inhibit_method_inhibit_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_inhibit_method_info_inhibit =
{
  {
    -1,
    (gchar *) "Inhibit",
    (GDBusArgInfo **) &_xdp_dbus_inhibit_method_info_inhibit_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_inhibit_method_info_inhibit_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_dbus_inhibit_method_inhibit_annotation_info_pointers
  },
  "handle-inhibit",
  FALSE
};

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

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

static const GDBusArgInfo * const _xdp_dbus_inhibit_method_info_create_monitor_IN_ARG_pointers[] =
{
  &_xdp_dbus_inhibit_method_info_create_monitor_IN_ARG_window.parent_struct,
  &_xdp_dbus_inhibit_method_info_create_monitor_IN_ARG_options.parent_struct,
  NULL
};

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

static const GDBusArgInfo * const _xdp_dbus_inhibit_method_info_create_monitor_OUT_ARG_pointers[] =
{
  &_xdp_dbus_inhibit_method_info_create_monitor_OUT_ARG_handle.parent_struct,
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_inhibit_method_create_monitor_annotation_info_pointers[] =
{
  &_xdp_dbus_inhibit_method_create_monitor_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_inhibit_method_info_create_monitor =
{
  {
    -1,
    (gchar *) "CreateMonitor",
    (GDBusArgInfo **) &_xdp_dbus_inhibit_method_info_create_monitor_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_inhibit_method_info_create_monitor_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_dbus_inhibit_method_create_monitor_annotation_info_pointers
  },
  "handle-create-monitor",
  FALSE
};

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

static const GDBusArgInfo * const _xdp_dbus_inhibit_method_info_query_end_response_IN_ARG_pointers[] =
{
  &_xdp_dbus_inhibit_method_info_query_end_response_IN_ARG_session_handle.parent_struct,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_inhibit_method_info_query_end_response =
{
  {
    -1,
    (gchar *) "QueryEndResponse",
    (GDBusArgInfo **) &_xdp_dbus_inhibit_method_info_query_end_response_IN_ARG_pointers,
    NULL,
    NULL
  },
  "handle-query-end-response",
  FALSE
};

static const GDBusMethodInfo * const _xdp_dbus_inhibit_method_info_pointers[] =
{
  &_xdp_dbus_inhibit_method_info_inhibit.parent_struct,
  &_xdp_dbus_inhibit_method_info_create_monitor.parent_struct,
  &_xdp_dbus_inhibit_method_info_query_end_response.parent_struct,
  NULL
};

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

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

static const GDBusArgInfo * const _xdp_dbus_inhibit_signal_info_state_changed_ARG_pointers[] =
{
  &_xdp_dbus_inhibit_signal_info_state_changed_ARG_session_handle.parent_struct,
  &_xdp_dbus_inhibit_signal_info_state_changed_ARG_state.parent_struct,
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_inhibit_signal_state_changed_annotation_info_pointers[] =
{
  &_xdp_dbus_inhibit_signal_state_changed_annotation_info_0,
  NULL
};

static const _ExtendedGDBusSignalInfo _xdp_dbus_inhibit_signal_info_state_changed =
{
  {
    -1,
    (gchar *) "StateChanged",
    (GDBusArgInfo **) &_xdp_dbus_inhibit_signal_info_state_changed_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_dbus_inhibit_signal_state_changed_annotation_info_pointers
  },
  "state-changed"
};

static const GDBusSignalInfo * const _xdp_dbus_inhibit_signal_info_pointers[] =
{
  &_xdp_dbus_inhibit_signal_info_state_changed.parent_struct,
  NULL
};

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

static const GDBusPropertyInfo * const _xdp_dbus_inhibit_property_info_pointers[] =
{
  &_xdp_dbus_inhibit_property_info_version.parent_struct,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _xdp_dbus_inhibit_interface_info =
{
  {
    -1,
    (gchar *) "org.freedesktop.portal.Inhibit",
    (GDBusMethodInfo **) &_xdp_dbus_inhibit_method_info_pointers,
    (GDBusSignalInfo **) &_xdp_dbus_inhibit_signal_info_pointers,
    (GDBusPropertyInfo **) &_xdp_dbus_inhibit_property_info_pointers,
    NULL
  },
  "inhibit",
};


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

/**
 * xdp_dbus_inhibit_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 #XdpDbusInhibit interface for a concrete class.
 * The properties are overridden in the order they are defined.
 *
 * Returns: The last property id.
 */
guint
xdp_dbus_inhibit_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_dbus_inhibit_signal_marshal_state_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_dbus_inhibit_method_marshal_inhibit (
    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_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_dbus_inhibit_method_marshal_create_monitor (
    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_dbus_inhibit_method_marshal_query_end_response (
    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 (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}


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

/**
 * XdpDbusInhibitIface:
 * @parent_iface: The parent interface.
 * @handle_create_monitor: Handler for the #XdpDbusInhibit::handle-create-monitor signal.
 * @handle_inhibit: Handler for the #XdpDbusInhibit::handle-inhibit signal.
 * @handle_query_end_response: Handler for the #XdpDbusInhibit::handle-query-end-response signal.
 * @get_version: Getter for the #XdpDbusInhibit:version property.
 * @state_changed: Handler for the #XdpDbusInhibit::state-changed signal.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-Inhibit.top_of_page">org.freedesktop.portal.Inhibit</link>.
 */

typedef XdpDbusInhibitIface XdpDbusInhibitInterface;
G_DEFINE_INTERFACE (XdpDbusInhibit, xdp_dbus_inhibit, G_TYPE_OBJECT)

static void
xdp_dbus_inhibit_default_init (XdpDbusInhibitIface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * XdpDbusInhibit::handle-inhibit:
   * @object: A #XdpDbusInhibit.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_window: Argument passed by remote caller.
   * @arg_flags: 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-portal-Inhibit.Inhibit">Inhibit()</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_dbus_inhibit_complete_inhibit() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
   *
   * 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-inhibit",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpDbusInhibitIface, handle_inhibit),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_inhibit_method_marshal_inhibit,
    G_TYPE_BOOLEAN,
    4,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_UINT, G_TYPE_VARIANT);

  /**
   * XdpDbusInhibit::handle-create-monitor:
   * @object: A #XdpDbusInhibit.
   * @invocation: A #GDBusMethodInvocation.
   * @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-portal-Inhibit.CreateMonitor">CreateMonitor()</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_dbus_inhibit_complete_create_monitor() 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-monitor",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpDbusInhibitIface, handle_create_monitor),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_inhibit_method_marshal_create_monitor,
    G_TYPE_BOOLEAN,
    3,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_VARIANT);

  /**
   * XdpDbusInhibit::handle-query-end-response:
   * @object: A #XdpDbusInhibit.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_session_handle: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-portal-Inhibit.QueryEndResponse">QueryEndResponse()</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_dbus_inhibit_complete_query_end_response() 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-query-end-response",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpDbusInhibitIface, handle_query_end_response),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_inhibit_method_marshal_query_end_response,
    G_TYPE_BOOLEAN,
    2,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING);

  /* GObject signals for received D-Bus signals: */
  /**
   * XdpDbusInhibit::state-changed:
   * @object: A #XdpDbusInhibit.
   * @arg_session_handle: Argument.
   * @arg_state: Argument.
   *
   * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-freedesktop-portal-Inhibit.StateChanged">"StateChanged"</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_DBUS__INHIBIT_SIGNALS[XDP_DBUS__INHIBIT_STATE_CHANGED] =
    g_signal_new ("state-changed",
      G_TYPE_FROM_INTERFACE (iface),
      G_SIGNAL_RUN_LAST,
      G_STRUCT_OFFSET (XdpDbusInhibitIface, state_changed),
      NULL,
      NULL,
      xdp_dbus_inhibit_signal_marshal_state_changed,
      G_TYPE_NONE,
      2, G_TYPE_STRING, G_TYPE_VARIANT);

  /* GObject properties for D-Bus properties: */
  /**
   * XdpDbusInhibit:version:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-portal-Inhibit.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_dbus_inhibit_get_version: (skip)
 * @object: A #XdpDbusInhibit.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-portal-Inhibit.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_dbus_inhibit_get_version (XdpDbusInhibit *object)
{
  g_return_val_if_fail (XDP_DBUS_IS_INHIBIT (object), 0);

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

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

/**
 * xdp_dbus_inhibit_emit_state_changed:
 * @object: A #XdpDbusInhibit.
 * @arg_session_handle: Argument to pass with the signal.
 * @arg_state: Argument to pass with the signal.
 *
 * Emits the <link linkend="gdbus-signal-org-freedesktop-portal-Inhibit.StateChanged">"StateChanged"</link> D-Bus signal.
 */
void
xdp_dbus_inhibit_emit_state_changed (
    XdpDbusInhibit *object,
    const gchar *arg_session_handle,
    GVariant *arg_state)
{
  g_signal_emit (object, XDP_DBUS__INHIBIT_SIGNALS[XDP_DBUS__INHIBIT_STATE_CHANGED], 0, arg_session_handle, arg_state);
}

/**
 * xdp_dbus_inhibit_call_inhibit:
 * @proxy: A #XdpDbusInhibitProxy.
 * @arg_window: Argument to pass with the method invocation.
 * @arg_flags: 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-portal-Inhibit.Inhibit">Inhibit()</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_dbus_inhibit_call_inhibit_finish() to get the result of the operation.
 *
 * See xdp_dbus_inhibit_call_inhibit_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_inhibit_call_inhibit (
    XdpDbusInhibit *proxy,
    const gchar *arg_window,
    guint arg_flags,
    GVariant *arg_options,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "Inhibit",
    g_variant_new ("(su@a{sv})",
                   arg_window,
                   arg_flags,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_inhibit_call_inhibit_finish:
 * @proxy: A #XdpDbusInhibitProxy.
 * @out_handle: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_inhibit_call_inhibit().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_inhibit_call_inhibit().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_inhibit_call_inhibit_finish (
    XdpDbusInhibit *proxy,
    gchar ** out_handle,
    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,
                 "(o)",
                 out_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_inhibit_call_inhibit_sync:
 * @proxy: A #XdpDbusInhibitProxy.
 * @arg_window: Argument to pass with the method invocation.
 * @arg_flags: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @out_handle: (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-portal-Inhibit.Inhibit">Inhibit()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_inhibit_call_inhibit() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_inhibit_call_inhibit_sync (
    XdpDbusInhibit *proxy,
    const gchar *arg_window,
    guint arg_flags,
    GVariant *arg_options,
    gchar ** out_handle,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "Inhibit",
    g_variant_new ("(su@a{sv})",
                   arg_window,
                   arg_flags,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(o)",
                 out_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_inhibit_call_create_monitor:
 * @proxy: A #XdpDbusInhibitProxy.
 * @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-portal-Inhibit.CreateMonitor">CreateMonitor()</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_dbus_inhibit_call_create_monitor_finish() to get the result of the operation.
 *
 * See xdp_dbus_inhibit_call_create_monitor_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_inhibit_call_create_monitor (
    XdpDbusInhibit *proxy,
    const gchar *arg_window,
    GVariant *arg_options,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "CreateMonitor",
    g_variant_new ("(s@a{sv})",
                   arg_window,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_inhibit_call_create_monitor_finish:
 * @proxy: A #XdpDbusInhibitProxy.
 * @out_handle: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_inhibit_call_create_monitor().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_inhibit_call_create_monitor().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_inhibit_call_create_monitor_finish (
    XdpDbusInhibit *proxy,
    gchar ** out_handle,
    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,
                 "(o)",
                 out_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_inhibit_call_create_monitor_sync:
 * @proxy: A #XdpDbusInhibitProxy.
 * @arg_window: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @out_handle: (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-portal-Inhibit.CreateMonitor">CreateMonitor()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_inhibit_call_create_monitor() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_inhibit_call_create_monitor_sync (
    XdpDbusInhibit *proxy,
    const gchar *arg_window,
    GVariant *arg_options,
    gchar ** out_handle,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "CreateMonitor",
    g_variant_new ("(s@a{sv})",
                   arg_window,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(o)",
                 out_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_inhibit_call_query_end_response:
 * @proxy: A #XdpDbusInhibitProxy.
 * @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-portal-Inhibit.QueryEndResponse">QueryEndResponse()</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_dbus_inhibit_call_query_end_response_finish() to get the result of the operation.
 *
 * See xdp_dbus_inhibit_call_query_end_response_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_inhibit_call_query_end_response (
    XdpDbusInhibit *proxy,
    const gchar *arg_session_handle,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "QueryEndResponse",
    g_variant_new ("(o)",
                   arg_session_handle),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_inhibit_call_query_end_response_finish:
 * @proxy: A #XdpDbusInhibitProxy.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_inhibit_call_query_end_response().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_inhibit_call_query_end_response().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_inhibit_call_query_end_response_finish (
    XdpDbusInhibit *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_dbus_inhibit_call_query_end_response_sync:
 * @proxy: A #XdpDbusInhibitProxy.
 * @arg_session_handle: 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-portal-Inhibit.QueryEndResponse">QueryEndResponse()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_inhibit_call_query_end_response() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_inhibit_call_query_end_response_sync (
    XdpDbusInhibit *proxy,
    const gchar *arg_session_handle,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "QueryEndResponse",
    g_variant_new ("(o)",
                   arg_session_handle),
    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_dbus_inhibit_complete_inhibit:
 * @object: A #XdpDbusInhibit.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @handle: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-portal-Inhibit.Inhibit">Inhibit()</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_dbus_inhibit_complete_inhibit (
    XdpDbusInhibit *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    const gchar *handle)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(o)",
                   handle));
}

/**
 * xdp_dbus_inhibit_complete_create_monitor:
 * @object: A #XdpDbusInhibit.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @handle: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-portal-Inhibit.CreateMonitor">CreateMonitor()</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_dbus_inhibit_complete_create_monitor (
    XdpDbusInhibit *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    const gchar *handle)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(o)",
                   handle));
}

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

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

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

/**
 * XdpDbusInhibitProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpDbusInhibitProxy.
 */

struct _XdpDbusInhibitProxyPrivate
{
  GData *qdata;
};

static void xdp_dbus_inhibit_proxy_iface_init (XdpDbusInhibitIface *iface);

#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpDbusInhibitProxy, xdp_dbus_inhibit_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (XdpDbusInhibitProxy)
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_INHIBIT, xdp_dbus_inhibit_proxy_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpDbusInhibitProxy, xdp_dbus_inhibit_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_INHIBIT, xdp_dbus_inhibit_proxy_iface_init))

#endif
static void
xdp_dbus_inhibit_proxy_finalize (GObject *object)
{
  XdpDbusInhibitProxy *proxy = XDP_DBUS_INHIBIT_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (xdp_dbus_inhibit_proxy_parent_class)->finalize (object);
}

static void
xdp_dbus_inhibit_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_dbus_inhibit_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_dbus_inhibit_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.portal.Inhibit: %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_dbus_inhibit_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_dbus_inhibit_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.portal.Inhibit", info->parent_struct.name, variant),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    NULL, (GAsyncReadyCallback) xdp_dbus_inhibit_proxy_set_property_cb, (GDBusPropertyInfo *) &info->parent_struct);
  g_variant_unref (variant);
}

static void
xdp_dbus_inhibit_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_dbus_inhibit_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_DBUS_TYPE_INHIBIT);
  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_DBUS_TYPE_INHIBIT);
  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_dbus_inhibit_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  XdpDbusInhibitProxy *proxy = XDP_DBUS_INHIBIT_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_dbus_inhibit_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_dbus_inhibit_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_dbus_inhibit_proxy_get_version (XdpDbusInhibit *object)
{
  XdpDbusInhibitProxy *proxy = XDP_DBUS_INHIBIT_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_dbus_inhibit_proxy_init (XdpDbusInhibitProxy *proxy)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  proxy->priv = xdp_dbus_inhibit_proxy_get_instance_private (proxy);
#else
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, XDP_DBUS_TYPE_INHIBIT_PROXY, XdpDbusInhibitProxyPrivate);
#endif

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

static void
xdp_dbus_inhibit_proxy_class_init (XdpDbusInhibitProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = xdp_dbus_inhibit_proxy_finalize;
  gobject_class->get_property = xdp_dbus_inhibit_proxy_get_property;
  gobject_class->set_property = xdp_dbus_inhibit_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = xdp_dbus_inhibit_proxy_g_signal;
  proxy_class->g_properties_changed = xdp_dbus_inhibit_proxy_g_properties_changed;

  xdp_dbus_inhibit_override_properties (gobject_class, 1);

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

static void
xdp_dbus_inhibit_proxy_iface_init (XdpDbusInhibitIface *iface)
{
  iface->get_version = xdp_dbus_inhibit_proxy_get_version;
}

/**
 * xdp_dbus_inhibit_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-portal-Inhibit.top_of_page">org.freedesktop.portal.Inhibit</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_dbus_inhibit_proxy_new_finish() to get the result of the operation.
 *
 * See xdp_dbus_inhibit_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_dbus_inhibit_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_DBUS_TYPE_INHIBIT_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.portal.Inhibit", NULL);
}

/**
 * xdp_dbus_inhibit_proxy_new_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_inhibit_proxy_new().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_dbus_inhibit_proxy_new().
 *
 * Returns: (transfer full) (type XdpDbusInhibitProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusInhibit *
xdp_dbus_inhibit_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_DBUS_INHIBIT (ret);
  else
    return NULL;
}

/**
 * xdp_dbus_inhibit_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-portal-Inhibit.top_of_page">org.freedesktop.portal.Inhibit</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_inhibit_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpDbusInhibitProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusInhibit *
xdp_dbus_inhibit_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_DBUS_TYPE_INHIBIT_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.portal.Inhibit", NULL);
  if (ret != NULL)
    return XDP_DBUS_INHIBIT (ret);
  else
    return NULL;
}


/**
 * xdp_dbus_inhibit_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_dbus_inhibit_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_dbus_inhibit_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See xdp_dbus_inhibit_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_dbus_inhibit_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_DBUS_TYPE_INHIBIT_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.portal.Inhibit", NULL);
}

/**
 * xdp_dbus_inhibit_proxy_new_for_bus_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_inhibit_proxy_new_for_bus().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_dbus_inhibit_proxy_new_for_bus().
 *
 * Returns: (transfer full) (type XdpDbusInhibitProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusInhibit *
xdp_dbus_inhibit_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_DBUS_INHIBIT (ret);
  else
    return NULL;
}

/**
 * xdp_dbus_inhibit_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_dbus_inhibit_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_inhibit_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpDbusInhibitProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusInhibit *
xdp_dbus_inhibit_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_DBUS_TYPE_INHIBIT_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.portal.Inhibit", NULL);
  if (ret != NULL)
    return XDP_DBUS_INHIBIT (ret);
  else
    return NULL;
}


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

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

/**
 * XdpDbusInhibitSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpDbusInhibitSkeleton.
 */

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

static void
_xdp_dbus_inhibit_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)
{
  XdpDbusInhibitSkeleton *skeleton = XDP_DBUS_INHIBIT_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_DBUS_TYPE_INHIBIT);
  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_DBUS_TYPE_INHIBIT);
  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_dbus_inhibit_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)
{
  XdpDbusInhibitSkeleton *skeleton = XDP_DBUS_INHIBIT_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_dbus_inhibit_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_dbus_inhibit_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)
{
  XdpDbusInhibitSkeleton *skeleton = XDP_DBUS_INHIBIT_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_dbus_inhibit_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_dbus_inhibit_skeleton_vtable =
{
  _xdp_dbus_inhibit_skeleton_handle_method_call,
  _xdp_dbus_inhibit_skeleton_handle_get_property,
  _xdp_dbus_inhibit_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
xdp_dbus_inhibit_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return xdp_dbus_inhibit_interface_info ();
}

static GDBusInterfaceVTable *
xdp_dbus_inhibit_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_xdp_dbus_inhibit_skeleton_vtable;
}

static GVariant *
xdp_dbus_inhibit_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  XdpDbusInhibitSkeleton *skeleton = XDP_DBUS_INHIBIT_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_dbus_inhibit_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _xdp_dbus_inhibit_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _xdp_dbus_inhibit_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _xdp_dbus_inhibit_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.portal.Inhibit", 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_dbus_inhibit_emit_changed (gpointer user_data);

static void
xdp_dbus_inhibit_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
{
  XdpDbusInhibitSkeleton *skeleton = XDP_DBUS_INHIBIT_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_dbus_inhibit_emit_changed (skeleton);
}

static void
_xdp_dbus_inhibit_on_signal_state_changed (
    XdpDbusInhibit *object,
    const gchar *arg_session_handle,
    GVariant *arg_state)
{
  XdpDbusInhibitSkeleton *skeleton = XDP_DBUS_INHIBIT_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_state));
  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.portal.Inhibit", "StateChanged",
        signal_variant, NULL);
    }
  g_variant_unref (signal_variant);
  g_list_free_full (connections, g_object_unref);
}

static void xdp_dbus_inhibit_skeleton_iface_init (XdpDbusInhibitIface *iface);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpDbusInhibitSkeleton, xdp_dbus_inhibit_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (XdpDbusInhibitSkeleton)
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_INHIBIT, xdp_dbus_inhibit_skeleton_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpDbusInhibitSkeleton, xdp_dbus_inhibit_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_INHIBIT, xdp_dbus_inhibit_skeleton_iface_init))

#endif
static void
xdp_dbus_inhibit_skeleton_finalize (GObject *object)
{
  XdpDbusInhibitSkeleton *skeleton = XDP_DBUS_INHIBIT_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_dbus_inhibit_skeleton_parent_class)->finalize (object);
}

static void
xdp_dbus_inhibit_skeleton_get_property (GObject      *object,
  guint         prop_id,
  GValue       *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  XdpDbusInhibitSkeleton *skeleton = XDP_DBUS_INHIBIT_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_dbus_inhibit_emit_changed (gpointer user_data)
{
  XdpDbusInhibitSkeleton *skeleton = XDP_DBUS_INHIBIT_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.portal.Inhibit",
                                           &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_dbus_inhibit_schedule_emit_changed (XdpDbusInhibitSkeleton *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_dbus_inhibit_skeleton_notify (GObject      *object,
  GParamSpec *pspec G_GNUC_UNUSED)
{
  XdpDbusInhibitSkeleton *skeleton = XDP_DBUS_INHIBIT_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_dbus_inhibit_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
      g_source_set_name (skeleton->priv->changed_properties_idle_source, "[generated] _xdp_dbus_inhibit_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_dbus_inhibit_skeleton_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec)
{
  const _ExtendedGDBusPropertyInfo *info;
  XdpDbusInhibitSkeleton *skeleton = XDP_DBUS_INHIBIT_SKELETON (object);
  g_assert (prop_id != 0 && prop_id - 1 < 1);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_dbus_inhibit_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_dbus_inhibit_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_dbus_inhibit_skeleton_init (XdpDbusInhibitSkeleton *skeleton)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  skeleton->priv = xdp_dbus_inhibit_skeleton_get_instance_private (skeleton);
#else
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, XDP_DBUS_TYPE_INHIBIT_SKELETON, XdpDbusInhibitSkeletonPrivate);
#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_dbus_inhibit_skeleton_get_version (XdpDbusInhibit *object)
{
  XdpDbusInhibitSkeleton *skeleton = XDP_DBUS_INHIBIT_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_dbus_inhibit_skeleton_class_init (XdpDbusInhibitSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize = xdp_dbus_inhibit_skeleton_finalize;
  gobject_class->get_property = xdp_dbus_inhibit_skeleton_get_property;
  gobject_class->set_property = xdp_dbus_inhibit_skeleton_set_property;
  gobject_class->notify       = xdp_dbus_inhibit_skeleton_notify;


  xdp_dbus_inhibit_override_properties (gobject_class, 1);

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = xdp_dbus_inhibit_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = xdp_dbus_inhibit_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = xdp_dbus_inhibit_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = xdp_dbus_inhibit_skeleton_dbus_interface_get_vtable;

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

static void
xdp_dbus_inhibit_skeleton_iface_init (XdpDbusInhibitIface *iface)
{
  iface->state_changed = _xdp_dbus_inhibit_on_signal_state_changed;
  iface->get_version = xdp_dbus_inhibit_skeleton_get_version;
}

/**
 * xdp_dbus_inhibit_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-Inhibit.top_of_page">org.freedesktop.portal.Inhibit</link>.
 *
 * Returns: (transfer full) (type XdpDbusInhibitSkeleton): The skeleton object.
 */
XdpDbusInhibit *
xdp_dbus_inhibit_skeleton_new (void)
{
  return XDP_DBUS_INHIBIT (g_object_new (XDP_DBUS_TYPE_INHIBIT_SKELETON, NULL));
}

/* ------------------------------------------------------------------------
 * Code for interface org.freedesktop.portal.InputCapture
 * ------------------------------------------------------------------------
 */

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

enum
{
  XDP_DBUS__INPUT_CAPTURE_DISABLED,
  XDP_DBUS__INPUT_CAPTURE_ACTIVATED,
  XDP_DBUS__INPUT_CAPTURE_DEACTIVATED,
  XDP_DBUS__INPUT_CAPTURE_ZONES_CHANGED,
};

static unsigned XDP_DBUS__INPUT_CAPTURE_SIGNALS[4] = { 0 };

/* ---- Introspection data for org.freedesktop.portal.InputCapture ---- */

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

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

static const GDBusArgInfo * const _xdp_dbus_input_capture_method_info_create_session_IN_ARG_pointers[] =
{
  &_xdp_dbus_input_capture_method_info_create_session_IN_ARG_parent_window.parent_struct,
  &_xdp_dbus_input_capture_method_info_create_session_IN_ARG_options.parent_struct,
  NULL
};

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

static const GDBusArgInfo * const _xdp_dbus_input_capture_method_info_create_session_OUT_ARG_pointers[] =
{
  &_xdp_dbus_input_capture_method_info_create_session_OUT_ARG_handle.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_dbus_input_capture_method_create_session_annotation_info_0 =
{
  -1,
  (gchar *) "org.freedesktop.DBus.Deprecated",
  (gchar *) "true",
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_input_capture_method_create_session_annotation_info_pointers[] =
{
  &_xdp_dbus_input_capture_method_create_session_annotation_info_0,
  &_xdp_dbus_input_capture_method_create_session_annotation_info_1,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_input_capture_method_info_create_session =
{
  {
    -1,
    (gchar *) "CreateSession",
    (GDBusArgInfo **) &_xdp_dbus_input_capture_method_info_create_session_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_input_capture_method_info_create_session_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_dbus_input_capture_method_create_session_annotation_info_pointers
  },
  "handle-create-session",
  FALSE
};

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

static const GDBusArgInfo * const _xdp_dbus_input_capture_method_info_create_session2_IN_ARG_pointers[] =
{
  &_xdp_dbus_input_capture_method_info_create_session2_IN_ARG_options.parent_struct,
  NULL
};

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

static const GDBusArgInfo * const _xdp_dbus_input_capture_method_info_create_session2_OUT_ARG_pointers[] =
{
  &_xdp_dbus_input_capture_method_info_create_session2_OUT_ARG_results.parent_struct,
  NULL
};

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

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

static const GDBusAnnotationInfo * const _xdp_dbus_input_capture_method_create_session2_annotation_info_pointers[] =
{
  &_xdp_dbus_input_capture_method_create_session2_annotation_info_0,
  &_xdp_dbus_input_capture_method_create_session2_annotation_info_1,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_input_capture_method_info_create_session2 =
{
  {
    -1,
    (gchar *) "CreateSession2",
    (GDBusArgInfo **) &_xdp_dbus_input_capture_method_info_create_session2_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_input_capture_method_info_create_session2_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_dbus_input_capture_method_create_session2_annotation_info_pointers
  },
  "handle-create-session2",
  FALSE
};

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

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

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

static const GDBusArgInfo * const _xdp_dbus_input_capture_method_info_start_IN_ARG_pointers[] =
{
  &_xdp_dbus_input_capture_method_info_start_IN_ARG_session_handle.parent_struct,
  &_xdp_dbus_input_capture_method_info_start_IN_ARG_parent_window.parent_struct,
  &_xdp_dbus_input_capture_method_info_start_IN_ARG_options.parent_struct,
  NULL
};

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

static const GDBusArgInfo * const _xdp_dbus_input_capture_method_info_start_OUT_ARG_pointers[] =
{
  &_xdp_dbus_input_capture_method_info_start_OUT_ARG_handle.parent_struct,
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_input_capture_method_start_annotation_info_pointers[] =
{
  &_xdp_dbus_input_capture_method_start_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_input_capture_method_info_start =
{
  {
    -1,
    (gchar *) "Start",
    (GDBusArgInfo **) &_xdp_dbus_input_capture_method_info_start_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_input_capture_method_info_start_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_dbus_input_capture_method_start_annotation_info_pointers
  },
  "handle-start",
  FALSE
};

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

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

static const GDBusArgInfo * const _xdp_dbus_input_capture_method_info_get_zones_IN_ARG_pointers[] =
{
  &_xdp_dbus_input_capture_method_info_get_zones_IN_ARG_session_handle.parent_struct,
  &_xdp_dbus_input_capture_method_info_get_zones_IN_ARG_options.parent_struct,
  NULL
};

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

static const GDBusArgInfo * const _xdp_dbus_input_capture_method_info_get_zones_OUT_ARG_pointers[] =
{
  &_xdp_dbus_input_capture_method_info_get_zones_OUT_ARG_handle.parent_struct,
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_input_capture_method_get_zones_annotation_info_pointers[] =
{
  &_xdp_dbus_input_capture_method_get_zones_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_input_capture_method_info_get_zones =
{
  {
    -1,
    (gchar *) "GetZones",
    (GDBusArgInfo **) &_xdp_dbus_input_capture_method_info_get_zones_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_input_capture_method_info_get_zones_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_dbus_input_capture_method_get_zones_annotation_info_pointers
  },
  "handle-get-zones",
  FALSE
};

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

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

static const _ExtendedGDBusArgInfo _xdp_dbus_input_capture_method_info_set_pointer_barriers_IN_ARG_barriers =
{
  {
    -1,
    (gchar *) "barriers",
    (gchar *) "aa{sv}",
    NULL
  },
  FALSE
};

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

static const GDBusArgInfo * const _xdp_dbus_input_capture_method_info_set_pointer_barriers_IN_ARG_pointers[] =
{
  &_xdp_dbus_input_capture_method_info_set_pointer_barriers_IN_ARG_session_handle.parent_struct,
  &_xdp_dbus_input_capture_method_info_set_pointer_barriers_IN_ARG_options.parent_struct,
  &_xdp_dbus_input_capture_method_info_set_pointer_barriers_IN_ARG_barriers.parent_struct,
  &_xdp_dbus_input_capture_method_info_set_pointer_barriers_IN_ARG_zone_set.parent_struct,
  NULL
};

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

static const GDBusArgInfo * const _xdp_dbus_input_capture_method_info_set_pointer_barriers_OUT_ARG_pointers[] =
{
  &_xdp_dbus_input_capture_method_info_set_pointer_barriers_OUT_ARG_handle.parent_struct,
  NULL
};

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

static const GDBusAnnotationInfo _xdp_dbus_input_capture_method_set_pointer_barriers_annotation_info_1 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.In2",
  (gchar *) "QList<QVariantMap>",
  NULL
};

static const GDBusAnnotationInfo * const _xdp_dbus_input_capture_method_set_pointer_barriers_annotation_info_pointers[] =
{
  &_xdp_dbus_input_capture_method_set_pointer_barriers_annotation_info_0,
  &_xdp_dbus_input_capture_method_set_pointer_barriers_annotation_info_1,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_input_capture_method_info_set_pointer_barriers =
{
  {
    -1,
    (gchar *) "SetPointerBarriers",
    (GDBusArgInfo **) &_xdp_dbus_input_capture_method_info_set_pointer_barriers_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_input_capture_method_info_set_pointer_barriers_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_dbus_input_capture_method_set_pointer_barriers_annotation_info_pointers
  },
  "handle-set-pointer-barriers",
  FALSE
};

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

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

static const GDBusArgInfo * const _xdp_dbus_input_capture_method_info_enable_IN_ARG_pointers[] =
{
  &_xdp_dbus_input_capture_method_info_enable_IN_ARG_session_handle.parent_struct,
  &_xdp_dbus_input_capture_method_info_enable_IN_ARG_options.parent_struct,
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_input_capture_method_enable_annotation_info_pointers[] =
{
  &_xdp_dbus_input_capture_method_enable_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_input_capture_method_info_enable =
{
  {
    -1,
    (gchar *) "Enable",
    (GDBusArgInfo **) &_xdp_dbus_input_capture_method_info_enable_IN_ARG_pointers,
    NULL,
    (GDBusAnnotationInfo **) &_xdp_dbus_input_capture_method_enable_annotation_info_pointers
  },
  "handle-enable",
  FALSE
};

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

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

static const GDBusArgInfo * const _xdp_dbus_input_capture_method_info_disable_IN_ARG_pointers[] =
{
  &_xdp_dbus_input_capture_method_info_disable_IN_ARG_session_handle.parent_struct,
  &_xdp_dbus_input_capture_method_info_disable_IN_ARG_options.parent_struct,
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_input_capture_method_disable_annotation_info_pointers[] =
{
  &_xdp_dbus_input_capture_method_disable_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_input_capture_method_info_disable =
{
  {
    -1,
    (gchar *) "Disable",
    (GDBusArgInfo **) &_xdp_dbus_input_capture_method_info_disable_IN_ARG_pointers,
    NULL,
    (GDBusAnnotationInfo **) &_xdp_dbus_input_capture_method_disable_annotation_info_pointers
  },
  "handle-disable",
  FALSE
};

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

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

static const GDBusArgInfo * const _xdp_dbus_input_capture_method_info_release_IN_ARG_pointers[] =
{
  &_xdp_dbus_input_capture_method_info_release_IN_ARG_session_handle.parent_struct,
  &_xdp_dbus_input_capture_method_info_release_IN_ARG_options.parent_struct,
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_input_capture_method_release_annotation_info_pointers[] =
{
  &_xdp_dbus_input_capture_method_release_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_input_capture_method_info_release =
{
  {
    -1,
    (gchar *) "Release",
    (GDBusArgInfo **) &_xdp_dbus_input_capture_method_info_release_IN_ARG_pointers,
    NULL,
    (GDBusAnnotationInfo **) &_xdp_dbus_input_capture_method_release_annotation_info_pointers
  },
  "handle-release",
  FALSE
};

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

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

static const GDBusArgInfo * const _xdp_dbus_input_capture_method_info_connect_to_eis_IN_ARG_pointers[] =
{
  &_xdp_dbus_input_capture_method_info_connect_to_eis_IN_ARG_session_handle.parent_struct,
  &_xdp_dbus_input_capture_method_info_connect_to_eis_IN_ARG_options.parent_struct,
  NULL
};

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

static const GDBusArgInfo * const _xdp_dbus_input_capture_method_info_connect_to_eis_OUT_ARG_pointers[] =
{
  &_xdp_dbus_input_capture_method_info_connect_to_eis_OUT_ARG_fd.parent_struct,
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_input_capture_method_connect_to_eis_annotation_info_pointers[] =
{
  &_xdp_dbus_input_capture_method_connect_to_eis_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_input_capture_method_info_connect_to_eis =
{
  {
    -1,
    (gchar *) "ConnectToEIS",
    (GDBusArgInfo **) &_xdp_dbus_input_capture_method_info_connect_to_eis_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_input_capture_method_info_connect_to_eis_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_dbus_input_capture_method_connect_to_eis_annotation_info_pointers
  },
  "handle-connect-to-eis",
  TRUE
};

static const GDBusMethodInfo * const _xdp_dbus_input_capture_method_info_pointers[] =
{
  &_xdp_dbus_input_capture_method_info_create_session.parent_struct,
  &_xdp_dbus_input_capture_method_info_create_session2.parent_struct,
  &_xdp_dbus_input_capture_method_info_start.parent_struct,
  &_xdp_dbus_input_capture_method_info_get_zones.parent_struct,
  &_xdp_dbus_input_capture_method_info_set_pointer_barriers.parent_struct,
  &_xdp_dbus_input_capture_method_info_enable.parent_struct,
  &_xdp_dbus_input_capture_method_info_disable.parent_struct,
  &_xdp_dbus_input_capture_method_info_release.parent_struct,
  &_xdp_dbus_input_capture_method_info_connect_to_eis.parent_struct,
  NULL
};

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

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

static const GDBusArgInfo * const _xdp_dbus_input_capture_signal_info_disabled_ARG_pointers[] =
{
  &_xdp_dbus_input_capture_signal_info_disabled_ARG_session_handle.parent_struct,
  &_xdp_dbus_input_capture_signal_info_disabled_ARG_options.parent_struct,
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_input_capture_signal_disabled_annotation_info_pointers[] =
{
  &_xdp_dbus_input_capture_signal_disabled_annotation_info_0,
  NULL
};

static const _ExtendedGDBusSignalInfo _xdp_dbus_input_capture_signal_info_disabled =
{
  {
    -1,
    (gchar *) "Disabled",
    (GDBusArgInfo **) &_xdp_dbus_input_capture_signal_info_disabled_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_dbus_input_capture_signal_disabled_annotation_info_pointers
  },
  "disabled"
};

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

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

static const GDBusArgInfo * const _xdp_dbus_input_capture_signal_info_activated_ARG_pointers[] =
{
  &_xdp_dbus_input_capture_signal_info_activated_ARG_session_handle.parent_struct,
  &_xdp_dbus_input_capture_signal_info_activated_ARG_options.parent_struct,
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_input_capture_signal_activated_annotation_info_pointers[] =
{
  &_xdp_dbus_input_capture_signal_activated_annotation_info_0,
  NULL
};

static const _ExtendedGDBusSignalInfo _xdp_dbus_input_capture_signal_info_activated =
{
  {
    -1,
    (gchar *) "Activated",
    (GDBusArgInfo **) &_xdp_dbus_input_capture_signal_info_activated_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_dbus_input_capture_signal_activated_annotation_info_pointers
  },
  "activated"
};

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

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

static const GDBusArgInfo * const _xdp_dbus_input_capture_signal_info_deactivated_ARG_pointers[] =
{
  &_xdp_dbus_input_capture_signal_info_deactivated_ARG_session_handle.parent_struct,
  &_xdp_dbus_input_capture_signal_info_deactivated_ARG_options.parent_struct,
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_input_capture_signal_deactivated_annotation_info_pointers[] =
{
  &_xdp_dbus_input_capture_signal_deactivated_annotation_info_0,
  NULL
};

static const _ExtendedGDBusSignalInfo _xdp_dbus_input_capture_signal_info_deactivated =
{
  {
    -1,
    (gchar *) "Deactivated",
    (GDBusArgInfo **) &_xdp_dbus_input_capture_signal_info_deactivated_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_dbus_input_capture_signal_deactivated_annotation_info_pointers
  },
  "deactivated"
};

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

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

static const GDBusArgInfo * const _xdp_dbus_input_capture_signal_info_zones_changed_ARG_pointers[] =
{
  &_xdp_dbus_input_capture_signal_info_zones_changed_ARG_session_handle.parent_struct,
  &_xdp_dbus_input_capture_signal_info_zones_changed_ARG_options.parent_struct,
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_input_capture_signal_zones_changed_annotation_info_pointers[] =
{
  &_xdp_dbus_input_capture_signal_zones_changed_annotation_info_0,
  NULL
};

static const _ExtendedGDBusSignalInfo _xdp_dbus_input_capture_signal_info_zones_changed =
{
  {
    -1,
    (gchar *) "ZonesChanged",
    (GDBusArgInfo **) &_xdp_dbus_input_capture_signal_info_zones_changed_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_dbus_input_capture_signal_zones_changed_annotation_info_pointers
  },
  "zones-changed"
};

static const GDBusSignalInfo * const _xdp_dbus_input_capture_signal_info_pointers[] =
{
  &_xdp_dbus_input_capture_signal_info_disabled.parent_struct,
  &_xdp_dbus_input_capture_signal_info_activated.parent_struct,
  &_xdp_dbus_input_capture_signal_info_deactivated.parent_struct,
  &_xdp_dbus_input_capture_signal_info_zones_changed.parent_struct,
  NULL
};

static const _ExtendedGDBusPropertyInfo _xdp_dbus_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_dbus_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_dbus_input_capture_property_info_pointers[] =
{
  &_xdp_dbus_input_capture_property_info_supported_capabilities.parent_struct,
  &_xdp_dbus_input_capture_property_info_version.parent_struct,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _xdp_dbus_input_capture_interface_info =
{
  {
    -1,
    (gchar *) "org.freedesktop.portal.InputCapture",
    (GDBusMethodInfo **) &_xdp_dbus_input_capture_method_info_pointers,
    (GDBusSignalInfo **) &_xdp_dbus_input_capture_signal_info_pointers,
    (GDBusPropertyInfo **) &_xdp_dbus_input_capture_property_info_pointers,
    NULL
  },
  "input-capture",
};


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

/**
 * xdp_dbus_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 #XdpDbusInputCapture interface for a concrete class.
 * The properties are overridden in the order they are defined.
 *
 * Returns: The last property id.
 */
guint
xdp_dbus_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_dbus_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_dbus_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_dbus_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_dbus_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_dbus_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_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_dbus_input_capture_method_marshal_create_session2 (
    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_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_dbus_input_capture_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_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_dbus_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_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_dbus_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_VARIANT_VARIANT_UINT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_dbus_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_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_dbus_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_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_dbus_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_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_dbus_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_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}


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

/**
 * XdpDbusInputCaptureIface:
 * @parent_iface: The parent interface.
 * @handle_connect_to_eis: Handler for the #XdpDbusInputCapture::handle-connect-to-eis signal.
 * @handle_create_session: Handler for the #XdpDbusInputCapture::handle-create-session signal.
 * @handle_create_session2: Handler for the #XdpDbusInputCapture::handle-create-session2 signal.
 * @handle_disable: Handler for the #XdpDbusInputCapture::handle-disable signal.
 * @handle_enable: Handler for the #XdpDbusInputCapture::handle-enable signal.
 * @handle_get_zones: Handler for the #XdpDbusInputCapture::handle-get-zones signal.
 * @handle_release: Handler for the #XdpDbusInputCapture::handle-release signal.
 * @handle_set_pointer_barriers: Handler for the #XdpDbusInputCapture::handle-set-pointer-barriers signal.
 * @handle_start: Handler for the #XdpDbusInputCapture::handle-start signal.
 * @get_supported_capabilities: Getter for the #XdpDbusInputCapture:supported-capabilities property.
 * @get_version: Getter for the #XdpDbusInputCapture:version property.
 * @activated: Handler for the #XdpDbusInputCapture::activated signal.
 * @deactivated: Handler for the #XdpDbusInputCapture::deactivated signal.
 * @disabled: Handler for the #XdpDbusInputCapture::disabled signal.
 * @zones_changed: Handler for the #XdpDbusInputCapture::zones-changed signal.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-InputCapture.top_of_page">org.freedesktop.portal.InputCapture</link>.
 */

typedef XdpDbusInputCaptureIface XdpDbusInputCaptureInterface;
G_DEFINE_INTERFACE (XdpDbusInputCapture, xdp_dbus_input_capture, G_TYPE_OBJECT)

static void
xdp_dbus_input_capture_default_init (XdpDbusInputCaptureIface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * XdpDbusInputCapture::handle-create-session:
   * @object: A #XdpDbusInputCapture.
   * @invocation: A #GDBusMethodInvocation.
   * @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-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_dbus_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.
   *
   * Deprecated: The D-Bus method has been deprecated.
   */
  g_signal_new ("handle-create-session",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpDbusInputCaptureIface, handle_create_session),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_input_capture_method_marshal_create_session,
    G_TYPE_BOOLEAN,
    3,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_VARIANT);

  /**
   * XdpDbusInputCapture::handle-create-session2:
   * @object: A #XdpDbusInputCapture.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_options: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-portal-InputCapture.CreateSession2">CreateSession2()</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_dbus_input_capture_complete_create_session2() 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-session2",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpDbusInputCaptureIface, handle_create_session2),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_input_capture_method_marshal_create_session2,
    G_TYPE_BOOLEAN,
    2,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_VARIANT);

  /**
   * XdpDbusInputCapture::handle-start:
   * @object: A #XdpDbusInputCapture.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_session_handle: 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-portal-InputCapture.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_dbus_input_capture_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 (XdpDbusInputCaptureIface, handle_start),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_input_capture_method_marshal_start,
    G_TYPE_BOOLEAN,
    4,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_VARIANT);

  /**
   * XdpDbusInputCapture::handle-get-zones:
   * @object: A #XdpDbusInputCapture.
   * @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-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_dbus_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 (XdpDbusInputCaptureIface, handle_get_zones),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_input_capture_method_marshal_get_zones,
    G_TYPE_BOOLEAN,
    3,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_VARIANT);

  /**
   * XdpDbusInputCapture::handle-set-pointer-barriers:
   * @object: A #XdpDbusInputCapture.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_session_handle: 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-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_dbus_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 (XdpDbusInputCaptureIface, handle_set_pointer_barriers),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_input_capture_method_marshal_set_pointer_barriers,
    G_TYPE_BOOLEAN,
    5,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_VARIANT, G_TYPE_VARIANT, G_TYPE_UINT);

  /**
   * XdpDbusInputCapture::handle-enable:
   * @object: A #XdpDbusInputCapture.
   * @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-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_dbus_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 (XdpDbusInputCaptureIface, handle_enable),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_input_capture_method_marshal_enable,
    G_TYPE_BOOLEAN,
    3,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_VARIANT);

  /**
   * XdpDbusInputCapture::handle-disable:
   * @object: A #XdpDbusInputCapture.
   * @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-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_dbus_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 (XdpDbusInputCaptureIface, handle_disable),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_input_capture_method_marshal_disable,
    G_TYPE_BOOLEAN,
    3,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_VARIANT);

  /**
   * XdpDbusInputCapture::handle-release:
   * @object: A #XdpDbusInputCapture.
   * @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-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_dbus_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 (XdpDbusInputCaptureIface, handle_release),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_input_capture_method_marshal_release,
    G_TYPE_BOOLEAN,
    3,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_VARIANT);

  /**
   * XdpDbusInputCapture::handle-connect-to-eis:
   * @object: A #XdpDbusInputCapture.
   * @invocation: A #GDBusMethodInvocation.
   * @fd_list: (nullable): A #GUnixFDList or %NULL.
   * @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-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_dbus_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 (XdpDbusInputCaptureIface, handle_connect_to_eis),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_input_capture_method_marshal_connect_to_eis,
    G_TYPE_BOOLEAN,
    4,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UNIX_FD_LIST, G_TYPE_STRING, G_TYPE_VARIANT);

  /* GObject signals for received D-Bus signals: */
  /**
   * XdpDbusInputCapture::disabled:
   * @object: A #XdpDbusInputCapture.
   * @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-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_DBUS__INPUT_CAPTURE_SIGNALS[XDP_DBUS__INPUT_CAPTURE_DISABLED] =
    g_signal_new ("disabled",
      G_TYPE_FROM_INTERFACE (iface),
      G_SIGNAL_RUN_LAST,
      G_STRUCT_OFFSET (XdpDbusInputCaptureIface, disabled),
      NULL,
      NULL,
      xdp_dbus_input_capture_signal_marshal_disabled,
      G_TYPE_NONE,
      2, G_TYPE_STRING, G_TYPE_VARIANT);

  /**
   * XdpDbusInputCapture::activated:
   * @object: A #XdpDbusInputCapture.
   * @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-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_DBUS__INPUT_CAPTURE_SIGNALS[XDP_DBUS__INPUT_CAPTURE_ACTIVATED] =
    g_signal_new ("activated",
      G_TYPE_FROM_INTERFACE (iface),
      G_SIGNAL_RUN_LAST,
      G_STRUCT_OFFSET (XdpDbusInputCaptureIface, activated),
      NULL,
      NULL,
      xdp_dbus_input_capture_signal_marshal_activated,
      G_TYPE_NONE,
      2, G_TYPE_STRING, G_TYPE_VARIANT);

  /**
   * XdpDbusInputCapture::deactivated:
   * @object: A #XdpDbusInputCapture.
   * @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-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_DBUS__INPUT_CAPTURE_SIGNALS[XDP_DBUS__INPUT_CAPTURE_DEACTIVATED] =
    g_signal_new ("deactivated",
      G_TYPE_FROM_INTERFACE (iface),
      G_SIGNAL_RUN_LAST,
      G_STRUCT_OFFSET (XdpDbusInputCaptureIface, deactivated),
      NULL,
      NULL,
      xdp_dbus_input_capture_signal_marshal_deactivated,
      G_TYPE_NONE,
      2, G_TYPE_STRING, G_TYPE_VARIANT);

  /**
   * XdpDbusInputCapture::zones-changed:
   * @object: A #XdpDbusInputCapture.
   * @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-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_DBUS__INPUT_CAPTURE_SIGNALS[XDP_DBUS__INPUT_CAPTURE_ZONES_CHANGED] =
    g_signal_new ("zones-changed",
      G_TYPE_FROM_INTERFACE (iface),
      G_SIGNAL_RUN_LAST,
      G_STRUCT_OFFSET (XdpDbusInputCaptureIface, zones_changed),
      NULL,
      NULL,
      xdp_dbus_input_capture_signal_marshal_zones_changed,
      G_TYPE_NONE,
      2, G_TYPE_STRING, G_TYPE_VARIANT);

  /* GObject properties for D-Bus properties: */
  /**
   * XdpDbusInputCapture:supported-capabilities:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-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));
  /**
   * XdpDbusInputCapture:version:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-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_dbus_input_capture_get_supported_capabilities: (skip)
 * @object: A #XdpDbusInputCapture.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-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_dbus_input_capture_get_supported_capabilities (XdpDbusInputCapture *object)
{
  g_return_val_if_fail (XDP_DBUS_IS_INPUT_CAPTURE (object), 0);

  return XDP_DBUS_INPUT_CAPTURE_GET_IFACE (object)->get_supported_capabilities (object);
}

/**
 * xdp_dbus_input_capture_set_supported_capabilities: (skip)
 * @object: A #XdpDbusInputCapture.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-freedesktop-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_dbus_input_capture_set_supported_capabilities (XdpDbusInputCapture *object, guint value)
{
  g_object_set (G_OBJECT (object), "supported-capabilities", value, NULL);
}

/**
 * xdp_dbus_input_capture_get_version: (skip)
 * @object: A #XdpDbusInputCapture.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-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_dbus_input_capture_get_version (XdpDbusInputCapture *object)
{
  g_return_val_if_fail (XDP_DBUS_IS_INPUT_CAPTURE (object), 0);

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

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

/**
 * xdp_dbus_input_capture_emit_disabled:
 * @object: A #XdpDbusInputCapture.
 * @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-portal-InputCapture.Disabled">"Disabled"</link> D-Bus signal.
 */
void
xdp_dbus_input_capture_emit_disabled (
    XdpDbusInputCapture *object,
    const gchar *arg_session_handle,
    GVariant *arg_options)
{
  g_signal_emit (object, XDP_DBUS__INPUT_CAPTURE_SIGNALS[XDP_DBUS__INPUT_CAPTURE_DISABLED], 0, arg_session_handle, arg_options);
}

/**
 * xdp_dbus_input_capture_emit_activated:
 * @object: A #XdpDbusInputCapture.
 * @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-portal-InputCapture.Activated">"Activated"</link> D-Bus signal.
 */
void
xdp_dbus_input_capture_emit_activated (
    XdpDbusInputCapture *object,
    const gchar *arg_session_handle,
    GVariant *arg_options)
{
  g_signal_emit (object, XDP_DBUS__INPUT_CAPTURE_SIGNALS[XDP_DBUS__INPUT_CAPTURE_ACTIVATED], 0, arg_session_handle, arg_options);
}

/**
 * xdp_dbus_input_capture_emit_deactivated:
 * @object: A #XdpDbusInputCapture.
 * @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-portal-InputCapture.Deactivated">"Deactivated"</link> D-Bus signal.
 */
void
xdp_dbus_input_capture_emit_deactivated (
    XdpDbusInputCapture *object,
    const gchar *arg_session_handle,
    GVariant *arg_options)
{
  g_signal_emit (object, XDP_DBUS__INPUT_CAPTURE_SIGNALS[XDP_DBUS__INPUT_CAPTURE_DEACTIVATED], 0, arg_session_handle, arg_options);
}

/**
 * xdp_dbus_input_capture_emit_zones_changed:
 * @object: A #XdpDbusInputCapture.
 * @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-portal-InputCapture.ZonesChanged">"ZonesChanged"</link> D-Bus signal.
 */
void
xdp_dbus_input_capture_emit_zones_changed (
    XdpDbusInputCapture *object,
    const gchar *arg_session_handle,
    GVariant *arg_options)
{
  g_signal_emit (object, XDP_DBUS__INPUT_CAPTURE_SIGNALS[XDP_DBUS__INPUT_CAPTURE_ZONES_CHANGED], 0, arg_session_handle, arg_options);
}

/**
 * xdp_dbus_input_capture_call_create_session:
 * @proxy: A #XdpDbusInputCaptureProxy.
 * @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-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_dbus_input_capture_call_create_session_finish() to get the result of the operation.
 *
 * See xdp_dbus_input_capture_call_create_session_sync() for the synchronous, blocking version of this method.
 *
 * Deprecated: The D-Bus method has been deprecated.
 */
void
xdp_dbus_input_capture_call_create_session (
    XdpDbusInputCapture *proxy,
    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 ("(s@a{sv})",
                   arg_parent_window,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_input_capture_call_create_session_finish:
 * @proxy: A #XdpDbusInputCaptureProxy.
 * @out_handle: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_input_capture_call_create_session().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_input_capture_call_create_session().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 *
 * Deprecated: The D-Bus method has been deprecated.
 */
gboolean
xdp_dbus_input_capture_call_create_session_finish (
    XdpDbusInputCapture *proxy,
    gchar ** out_handle,
    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,
                 "(o)",
                 out_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_input_capture_call_create_session_sync:
 * @proxy: A #XdpDbusInputCaptureProxy.
 * @arg_parent_window: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @out_handle: (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-portal-InputCapture.CreateSession">CreateSession()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_input_capture_call_create_session() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 *
 * Deprecated: The D-Bus method has been deprecated.
 */
gboolean
xdp_dbus_input_capture_call_create_session_sync (
    XdpDbusInputCapture *proxy,
    const gchar *arg_parent_window,
    GVariant *arg_options,
    gchar ** out_handle,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "CreateSession",
    g_variant_new ("(s@a{sv})",
                   arg_parent_window,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(o)",
                 out_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_input_capture_call_create_session2:
 * @proxy: A #XdpDbusInputCaptureProxy.
 * @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-portal-InputCapture.CreateSession2">CreateSession2()</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_dbus_input_capture_call_create_session2_finish() to get the result of the operation.
 *
 * See xdp_dbus_input_capture_call_create_session2_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_input_capture_call_create_session2 (
    XdpDbusInputCapture *proxy,
    GVariant *arg_options,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "CreateSession2",
    g_variant_new ("(@a{sv})",
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_input_capture_call_create_session2_finish:
 * @proxy: A #XdpDbusInputCaptureProxy.
 * @out_results: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_input_capture_call_create_session2().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_input_capture_call_create_session2().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_input_capture_call_create_session2_finish (
    XdpDbusInputCapture *proxy,
    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,
                 "(@a{sv})",
                 out_results);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_input_capture_call_create_session2_sync:
 * @proxy: A #XdpDbusInputCaptureProxy.
 * @arg_options: Argument to pass with the method invocation.
 * @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-portal-InputCapture.CreateSession2">CreateSession2()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_input_capture_call_create_session2() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_input_capture_call_create_session2_sync (
    XdpDbusInputCapture *proxy,
    GVariant *arg_options,
    GVariant ** out_results,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "CreateSession2",
    g_variant_new ("(@a{sv})",
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(@a{sv})",
                 out_results);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_input_capture_call_start:
 * @proxy: A #XdpDbusInputCaptureProxy.
 * @arg_session_handle: 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-portal-InputCapture.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_dbus_input_capture_call_start_finish() to get the result of the operation.
 *
 * See xdp_dbus_input_capture_call_start_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_input_capture_call_start (
    XdpDbusInputCapture *proxy,
    const gchar *arg_session_handle,
    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 ("(os@a{sv})",
                   arg_session_handle,
                   arg_parent_window,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_input_capture_call_start_finish:
 * @proxy: A #XdpDbusInputCaptureProxy.
 * @out_handle: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_input_capture_call_start().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_input_capture_call_start().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_input_capture_call_start_finish (
    XdpDbusInputCapture *proxy,
    gchar ** out_handle,
    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,
                 "(o)",
                 out_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_input_capture_call_start_sync:
 * @proxy: A #XdpDbusInputCaptureProxy.
 * @arg_session_handle: 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_handle: (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-portal-InputCapture.Start">Start()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_input_capture_call_start() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_input_capture_call_start_sync (
    XdpDbusInputCapture *proxy,
    const gchar *arg_session_handle,
    const gchar *arg_parent_window,
    GVariant *arg_options,
    gchar ** out_handle,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "Start",
    g_variant_new ("(os@a{sv})",
                   arg_session_handle,
                   arg_parent_window,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(o)",
                 out_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_input_capture_call_get_zones:
 * @proxy: A #XdpDbusInputCaptureProxy.
 * @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-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_dbus_input_capture_call_get_zones_finish() to get the result of the operation.
 *
 * See xdp_dbus_input_capture_call_get_zones_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_input_capture_call_get_zones (
    XdpDbusInputCapture *proxy,
    const gchar *arg_session_handle,
    GVariant *arg_options,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "GetZones",
    g_variant_new ("(o@a{sv})",
                   arg_session_handle,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_input_capture_call_get_zones_finish:
 * @proxy: A #XdpDbusInputCaptureProxy.
 * @out_handle: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_input_capture_call_get_zones().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_input_capture_call_get_zones().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_input_capture_call_get_zones_finish (
    XdpDbusInputCapture *proxy,
    gchar ** out_handle,
    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,
                 "(o)",
                 out_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_input_capture_call_get_zones_sync:
 * @proxy: A #XdpDbusInputCaptureProxy.
 * @arg_session_handle: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @out_handle: (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-portal-InputCapture.GetZones">GetZones()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_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_dbus_input_capture_call_get_zones_sync (
    XdpDbusInputCapture *proxy,
    const gchar *arg_session_handle,
    GVariant *arg_options,
    gchar ** out_handle,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "GetZones",
    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,
                 "(o)",
                 out_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_input_capture_call_set_pointer_barriers:
 * @proxy: A #XdpDbusInputCaptureProxy.
 * @arg_session_handle: 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-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_dbus_input_capture_call_set_pointer_barriers_finish() to get the result of the operation.
 *
 * See xdp_dbus_input_capture_call_set_pointer_barriers_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_input_capture_call_set_pointer_barriers (
    XdpDbusInputCapture *proxy,
    const gchar *arg_session_handle,
    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 ("(o@a{sv}@aa{sv}u)",
                   arg_session_handle,
                   arg_options,
                   arg_barriers,
                   arg_zone_set),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_input_capture_call_set_pointer_barriers_finish:
 * @proxy: A #XdpDbusInputCaptureProxy.
 * @out_handle: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_input_capture_call_set_pointer_barriers().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_input_capture_call_set_pointer_barriers().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_input_capture_call_set_pointer_barriers_finish (
    XdpDbusInputCapture *proxy,
    gchar ** out_handle,
    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,
                 "(o)",
                 out_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_input_capture_call_set_pointer_barriers_sync:
 * @proxy: A #XdpDbusInputCaptureProxy.
 * @arg_session_handle: 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_handle: (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-portal-InputCapture.SetPointerBarriers">SetPointerBarriers()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_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_dbus_input_capture_call_set_pointer_barriers_sync (
    XdpDbusInputCapture *proxy,
    const gchar *arg_session_handle,
    GVariant *arg_options,
    GVariant *arg_barriers,
    guint arg_zone_set,
    gchar ** out_handle,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "SetPointerBarriers",
    g_variant_new ("(o@a{sv}@aa{sv}u)",
                   arg_session_handle,
                   arg_options,
                   arg_barriers,
                   arg_zone_set),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(o)",
                 out_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_input_capture_call_enable:
 * @proxy: A #XdpDbusInputCaptureProxy.
 * @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-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_dbus_input_capture_call_enable_finish() to get the result of the operation.
 *
 * See xdp_dbus_input_capture_call_enable_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_input_capture_call_enable (
    XdpDbusInputCapture *proxy,
    const gchar *arg_session_handle,
    GVariant *arg_options,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "Enable",
    g_variant_new ("(o@a{sv})",
                   arg_session_handle,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_input_capture_call_enable_finish:
 * @proxy: A #XdpDbusInputCaptureProxy.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_input_capture_call_enable().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_input_capture_call_enable().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_input_capture_call_enable_finish (
    XdpDbusInputCapture *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_dbus_input_capture_call_enable_sync:
 * @proxy: A #XdpDbusInputCaptureProxy.
 * @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-portal-InputCapture.Enable">Enable()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_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_dbus_input_capture_call_enable_sync (
    XdpDbusInputCapture *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),
    "Enable",
    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_dbus_input_capture_call_disable:
 * @proxy: A #XdpDbusInputCaptureProxy.
 * @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-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_dbus_input_capture_call_disable_finish() to get the result of the operation.
 *
 * See xdp_dbus_input_capture_call_disable_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_input_capture_call_disable (
    XdpDbusInputCapture *proxy,
    const gchar *arg_session_handle,
    GVariant *arg_options,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "Disable",
    g_variant_new ("(o@a{sv})",
                   arg_session_handle,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_input_capture_call_disable_finish:
 * @proxy: A #XdpDbusInputCaptureProxy.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_input_capture_call_disable().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_input_capture_call_disable().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_input_capture_call_disable_finish (
    XdpDbusInputCapture *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_dbus_input_capture_call_disable_sync:
 * @proxy: A #XdpDbusInputCaptureProxy.
 * @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-portal-InputCapture.Disable">Disable()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_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_dbus_input_capture_call_disable_sync (
    XdpDbusInputCapture *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),
    "Disable",
    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_dbus_input_capture_call_release:
 * @proxy: A #XdpDbusInputCaptureProxy.
 * @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-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_dbus_input_capture_call_release_finish() to get the result of the operation.
 *
 * See xdp_dbus_input_capture_call_release_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_input_capture_call_release (
    XdpDbusInputCapture *proxy,
    const gchar *arg_session_handle,
    GVariant *arg_options,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "Release",
    g_variant_new ("(o@a{sv})",
                   arg_session_handle,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_input_capture_call_release_finish:
 * @proxy: A #XdpDbusInputCaptureProxy.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_input_capture_call_release().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_input_capture_call_release().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_input_capture_call_release_finish (
    XdpDbusInputCapture *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_dbus_input_capture_call_release_sync:
 * @proxy: A #XdpDbusInputCaptureProxy.
 * @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-portal-InputCapture.Release">Release()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_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_dbus_input_capture_call_release_sync (
    XdpDbusInputCapture *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),
    "Release",
    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_dbus_input_capture_call_connect_to_eis:
 * @proxy: A #XdpDbusInputCaptureProxy.
 * @arg_session_handle: 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-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_dbus_input_capture_call_connect_to_eis_finish() to get the result of the operation.
 *
 * See xdp_dbus_input_capture_call_connect_to_eis_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_input_capture_call_connect_to_eis (
    XdpDbusInputCapture *proxy,
    const gchar *arg_session_handle,
    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 ("(o@a{sv})",
                   arg_session_handle,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    fd_list,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_input_capture_call_connect_to_eis_finish:
 * @proxy: A #XdpDbusInputCaptureProxy.
 * @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_dbus_input_capture_call_connect_to_eis().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_input_capture_call_connect_to_eis().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_input_capture_call_connect_to_eis_finish (
    XdpDbusInputCapture *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_dbus_input_capture_call_connect_to_eis_sync:
 * @proxy: A #XdpDbusInputCaptureProxy.
 * @arg_session_handle: 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-portal-InputCapture.ConnectToEIS">ConnectToEIS()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_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_dbus_input_capture_call_connect_to_eis_sync (
    XdpDbusInputCapture *proxy,
    const gchar *arg_session_handle,
    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 ("(o@a{sv})",
                   arg_session_handle,
                   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_dbus_input_capture_complete_create_session:
 * @object: A #XdpDbusInputCapture.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @handle: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-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.
 *
 * Deprecated: The D-Bus method has been deprecated.
 */
void
xdp_dbus_input_capture_complete_create_session (
    XdpDbusInputCapture *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    const gchar *handle)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(o)",
                   handle));
}

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

/**
 * xdp_dbus_input_capture_complete_start:
 * @object: A #XdpDbusInputCapture.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @handle: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-portal-InputCapture.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_dbus_input_capture_complete_start (
    XdpDbusInputCapture *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    const gchar *handle)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(o)",
                   handle));
}

/**
 * xdp_dbus_input_capture_complete_get_zones:
 * @object: A #XdpDbusInputCapture.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @handle: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-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_dbus_input_capture_complete_get_zones (
    XdpDbusInputCapture *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    const gchar *handle)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(o)",
                   handle));
}

/**
 * xdp_dbus_input_capture_complete_set_pointer_barriers:
 * @object: A #XdpDbusInputCapture.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @handle: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-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_dbus_input_capture_complete_set_pointer_barriers (
    XdpDbusInputCapture *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    const gchar *handle)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(o)",
                   handle));
}

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

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

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

/**
 * xdp_dbus_input_capture_complete_connect_to_eis:
 * @object: A #XdpDbusInputCapture.
 * @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-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_dbus_input_capture_complete_connect_to_eis (
    XdpDbusInputCapture *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);
}

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

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

/**
 * XdpDbusInputCaptureProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpDbusInputCaptureProxy.
 */

struct _XdpDbusInputCaptureProxyPrivate
{
  GData *qdata;
};

static void xdp_dbus_input_capture_proxy_iface_init (XdpDbusInputCaptureIface *iface);

#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpDbusInputCaptureProxy, xdp_dbus_input_capture_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (XdpDbusInputCaptureProxy)
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_INPUT_CAPTURE, xdp_dbus_input_capture_proxy_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpDbusInputCaptureProxy, xdp_dbus_input_capture_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_INPUT_CAPTURE, xdp_dbus_input_capture_proxy_iface_init))

#endif
static void
xdp_dbus_input_capture_proxy_finalize (GObject *object)
{
  XdpDbusInputCaptureProxy *proxy = XDP_DBUS_INPUT_CAPTURE_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (xdp_dbus_input_capture_proxy_parent_class)->finalize (object);
}

static void
xdp_dbus_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_dbus_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_dbus_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.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_dbus_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_dbus_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.portal.InputCapture", info->parent_struct.name, variant),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    NULL, (GAsyncReadyCallback) xdp_dbus_input_capture_proxy_set_property_cb, (GDBusPropertyInfo *) &info->parent_struct);
  g_variant_unref (variant);
}

static void
xdp_dbus_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_dbus_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_DBUS_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_DBUS_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_dbus_input_capture_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  XdpDbusInputCaptureProxy *proxy = XDP_DBUS_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_dbus_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_dbus_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_dbus_input_capture_proxy_get_supported_capabilities (XdpDbusInputCapture *object)
{
  XdpDbusInputCaptureProxy *proxy = XDP_DBUS_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_dbus_input_capture_proxy_get_version (XdpDbusInputCapture *object)
{
  XdpDbusInputCaptureProxy *proxy = XDP_DBUS_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_dbus_input_capture_proxy_init (XdpDbusInputCaptureProxy *proxy)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  proxy->priv = xdp_dbus_input_capture_proxy_get_instance_private (proxy);
#else
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, XDP_DBUS_TYPE_INPUT_CAPTURE_PROXY, XdpDbusInputCaptureProxyPrivate);
#endif

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

static void
xdp_dbus_input_capture_proxy_class_init (XdpDbusInputCaptureProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = xdp_dbus_input_capture_proxy_finalize;
  gobject_class->get_property = xdp_dbus_input_capture_proxy_get_property;
  gobject_class->set_property = xdp_dbus_input_capture_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = xdp_dbus_input_capture_proxy_g_signal;
  proxy_class->g_properties_changed = xdp_dbus_input_capture_proxy_g_properties_changed;

  xdp_dbus_input_capture_override_properties (gobject_class, 1);

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

static void
xdp_dbus_input_capture_proxy_iface_init (XdpDbusInputCaptureIface *iface)
{
  iface->get_supported_capabilities = xdp_dbus_input_capture_proxy_get_supported_capabilities;
  iface->get_version = xdp_dbus_input_capture_proxy_get_version;
}

/**
 * xdp_dbus_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-portal-InputCapture.top_of_page">org.freedesktop.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_dbus_input_capture_proxy_new_finish() to get the result of the operation.
 *
 * See xdp_dbus_input_capture_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_dbus_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_DBUS_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.portal.InputCapture", NULL);
}

/**
 * xdp_dbus_input_capture_proxy_new_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_input_capture_proxy_new().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_dbus_input_capture_proxy_new().
 *
 * Returns: (transfer full) (type XdpDbusInputCaptureProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusInputCapture *
xdp_dbus_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_DBUS_INPUT_CAPTURE (ret);
  else
    return NULL;
}

/**
 * xdp_dbus_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-portal-InputCapture.top_of_page">org.freedesktop.portal.InputCapture</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_input_capture_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpDbusInputCaptureProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusInputCapture *
xdp_dbus_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_DBUS_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.portal.InputCapture", NULL);
  if (ret != NULL)
    return XDP_DBUS_INPUT_CAPTURE (ret);
  else
    return NULL;
}


/**
 * xdp_dbus_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_dbus_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_dbus_input_capture_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See xdp_dbus_input_capture_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_dbus_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_DBUS_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.portal.InputCapture", NULL);
}

/**
 * xdp_dbus_input_capture_proxy_new_for_bus_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_input_capture_proxy_new_for_bus().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_dbus_input_capture_proxy_new_for_bus().
 *
 * Returns: (transfer full) (type XdpDbusInputCaptureProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusInputCapture *
xdp_dbus_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_DBUS_INPUT_CAPTURE (ret);
  else
    return NULL;
}

/**
 * xdp_dbus_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_dbus_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_dbus_input_capture_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpDbusInputCaptureProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusInputCapture *
xdp_dbus_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_DBUS_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.portal.InputCapture", NULL);
  if (ret != NULL)
    return XDP_DBUS_INPUT_CAPTURE (ret);
  else
    return NULL;
}


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

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

/**
 * XdpDbusInputCaptureSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpDbusInputCaptureSkeleton.
 */

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

static void
_xdp_dbus_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)
{
  XdpDbusInputCaptureSkeleton *skeleton = XDP_DBUS_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_DBUS_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_DBUS_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_dbus_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)
{
  XdpDbusInputCaptureSkeleton *skeleton = XDP_DBUS_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_dbus_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_dbus_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)
{
  XdpDbusInputCaptureSkeleton *skeleton = XDP_DBUS_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_dbus_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_dbus_input_capture_skeleton_vtable =
{
  _xdp_dbus_input_capture_skeleton_handle_method_call,
  _xdp_dbus_input_capture_skeleton_handle_get_property,
  _xdp_dbus_input_capture_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
xdp_dbus_input_capture_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return xdp_dbus_input_capture_interface_info ();
}

static GDBusInterfaceVTable *
xdp_dbus_input_capture_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_xdp_dbus_input_capture_skeleton_vtable;
}

static GVariant *
xdp_dbus_input_capture_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  XdpDbusInputCaptureSkeleton *skeleton = XDP_DBUS_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_dbus_input_capture_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _xdp_dbus_input_capture_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _xdp_dbus_input_capture_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _xdp_dbus_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.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_dbus_input_capture_emit_changed (gpointer user_data);

static void
xdp_dbus_input_capture_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
{
  XdpDbusInputCaptureSkeleton *skeleton = XDP_DBUS_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_dbus_input_capture_emit_changed (skeleton);
}

static void
_xdp_dbus_input_capture_on_signal_disabled (
    XdpDbusInputCapture *object,
    const gchar *arg_session_handle,
    GVariant *arg_options)
{
  XdpDbusInputCaptureSkeleton *skeleton = XDP_DBUS_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.portal.InputCapture", "Disabled",
        signal_variant, NULL);
    }
  g_variant_unref (signal_variant);
  g_list_free_full (connections, g_object_unref);
}

static void
_xdp_dbus_input_capture_on_signal_activated (
    XdpDbusInputCapture *object,
    const gchar *arg_session_handle,
    GVariant *arg_options)
{
  XdpDbusInputCaptureSkeleton *skeleton = XDP_DBUS_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.portal.InputCapture", "Activated",
        signal_variant, NULL);
    }
  g_variant_unref (signal_variant);
  g_list_free_full (connections, g_object_unref);
}

static void
_xdp_dbus_input_capture_on_signal_deactivated (
    XdpDbusInputCapture *object,
    const gchar *arg_session_handle,
    GVariant *arg_options)
{
  XdpDbusInputCaptureSkeleton *skeleton = XDP_DBUS_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.portal.InputCapture", "Deactivated",
        signal_variant, NULL);
    }
  g_variant_unref (signal_variant);
  g_list_free_full (connections, g_object_unref);
}

static void
_xdp_dbus_input_capture_on_signal_zones_changed (
    XdpDbusInputCapture *object,
    const gchar *arg_session_handle,
    GVariant *arg_options)
{
  XdpDbusInputCaptureSkeleton *skeleton = XDP_DBUS_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.portal.InputCapture", "ZonesChanged",
        signal_variant, NULL);
    }
  g_variant_unref (signal_variant);
  g_list_free_full (connections, g_object_unref);
}

static void xdp_dbus_input_capture_skeleton_iface_init (XdpDbusInputCaptureIface *iface);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpDbusInputCaptureSkeleton, xdp_dbus_input_capture_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (XdpDbusInputCaptureSkeleton)
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_INPUT_CAPTURE, xdp_dbus_input_capture_skeleton_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpDbusInputCaptureSkeleton, xdp_dbus_input_capture_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_INPUT_CAPTURE, xdp_dbus_input_capture_skeleton_iface_init))

#endif
static void
xdp_dbus_input_capture_skeleton_finalize (GObject *object)
{
  XdpDbusInputCaptureSkeleton *skeleton = XDP_DBUS_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_dbus_input_capture_skeleton_parent_class)->finalize (object);
}

static void
xdp_dbus_input_capture_skeleton_get_property (GObject      *object,
  guint         prop_id,
  GValue       *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  XdpDbusInputCaptureSkeleton *skeleton = XDP_DBUS_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_dbus_input_capture_emit_changed (gpointer user_data)
{
  XdpDbusInputCaptureSkeleton *skeleton = XDP_DBUS_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.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_dbus_input_capture_schedule_emit_changed (XdpDbusInputCaptureSkeleton *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_dbus_input_capture_skeleton_notify (GObject      *object,
  GParamSpec *pspec G_GNUC_UNUSED)
{
  XdpDbusInputCaptureSkeleton *skeleton = XDP_DBUS_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_dbus_input_capture_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
      g_source_set_name (skeleton->priv->changed_properties_idle_source, "[generated] _xdp_dbus_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_dbus_input_capture_skeleton_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec)
{
  const _ExtendedGDBusPropertyInfo *info;
  XdpDbusInputCaptureSkeleton *skeleton = XDP_DBUS_INPUT_CAPTURE_SKELETON (object);
  g_assert (prop_id != 0 && prop_id - 1 < 2);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_dbus_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_dbus_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_dbus_input_capture_skeleton_init (XdpDbusInputCaptureSkeleton *skeleton)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  skeleton->priv = xdp_dbus_input_capture_skeleton_get_instance_private (skeleton);
#else
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, XDP_DBUS_TYPE_INPUT_CAPTURE_SKELETON, XdpDbusInputCaptureSkeletonPrivate);
#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_dbus_input_capture_skeleton_get_supported_capabilities (XdpDbusInputCapture *object)
{
  XdpDbusInputCaptureSkeleton *skeleton = XDP_DBUS_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_dbus_input_capture_skeleton_get_version (XdpDbusInputCapture *object)
{
  XdpDbusInputCaptureSkeleton *skeleton = XDP_DBUS_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_dbus_input_capture_skeleton_class_init (XdpDbusInputCaptureSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize = xdp_dbus_input_capture_skeleton_finalize;
  gobject_class->get_property = xdp_dbus_input_capture_skeleton_get_property;
  gobject_class->set_property = xdp_dbus_input_capture_skeleton_set_property;
  gobject_class->notify       = xdp_dbus_input_capture_skeleton_notify;


  xdp_dbus_input_capture_override_properties (gobject_class, 1);

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = xdp_dbus_input_capture_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = xdp_dbus_input_capture_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = xdp_dbus_input_capture_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = xdp_dbus_input_capture_skeleton_dbus_interface_get_vtable;

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

static void
xdp_dbus_input_capture_skeleton_iface_init (XdpDbusInputCaptureIface *iface)
{
  iface->disabled = _xdp_dbus_input_capture_on_signal_disabled;
  iface->activated = _xdp_dbus_input_capture_on_signal_activated;
  iface->deactivated = _xdp_dbus_input_capture_on_signal_deactivated;
  iface->zones_changed = _xdp_dbus_input_capture_on_signal_zones_changed;
  iface->get_supported_capabilities = xdp_dbus_input_capture_skeleton_get_supported_capabilities;
  iface->get_version = xdp_dbus_input_capture_skeleton_get_version;
}

/**
 * xdp_dbus_input_capture_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-InputCapture.top_of_page">org.freedesktop.portal.InputCapture</link>.
 *
 * Returns: (transfer full) (type XdpDbusInputCaptureSkeleton): The skeleton object.
 */
XdpDbusInputCapture *
xdp_dbus_input_capture_skeleton_new (void)
{
  return XDP_DBUS_INPUT_CAPTURE (g_object_new (XDP_DBUS_TYPE_INPUT_CAPTURE_SKELETON, NULL));
}

/* ------------------------------------------------------------------------
 * Code for interface org.freedesktop.portal.Location
 * ------------------------------------------------------------------------
 */

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

enum
{
  XDP_DBUS__LOCATION_LOCATION_UPDATED,
};

static unsigned XDP_DBUS__LOCATION_SIGNALS[1] = { 0 };

/* ---- Introspection data for org.freedesktop.portal.Location ---- */

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

static const GDBusArgInfo * const _xdp_dbus_location_method_info_create_session_IN_ARG_pointers[] =
{
  &_xdp_dbus_location_method_info_create_session_IN_ARG_options.parent_struct,
  NULL
};

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

static const GDBusArgInfo * const _xdp_dbus_location_method_info_create_session_OUT_ARG_pointers[] =
{
  &_xdp_dbus_location_method_info_create_session_OUT_ARG_handle.parent_struct,
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_location_method_create_session_annotation_info_pointers[] =
{
  &_xdp_dbus_location_method_create_session_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_location_method_info_create_session =
{
  {
    -1,
    (gchar *) "CreateSession",
    (GDBusArgInfo **) &_xdp_dbus_location_method_info_create_session_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_location_method_info_create_session_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_dbus_location_method_create_session_annotation_info_pointers
  },
  "handle-create-session",
  FALSE
};

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

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

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

static const GDBusArgInfo * const _xdp_dbus_location_method_info_start_IN_ARG_pointers[] =
{
  &_xdp_dbus_location_method_info_start_IN_ARG_session_handle.parent_struct,
  &_xdp_dbus_location_method_info_start_IN_ARG_parent_window.parent_struct,
  &_xdp_dbus_location_method_info_start_IN_ARG_options.parent_struct,
  NULL
};

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

static const GDBusArgInfo * const _xdp_dbus_location_method_info_start_OUT_ARG_pointers[] =
{
  &_xdp_dbus_location_method_info_start_OUT_ARG_handle.parent_struct,
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_location_method_start_annotation_info_pointers[] =
{
  &_xdp_dbus_location_method_start_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_location_method_info_start =
{
  {
    -1,
    (gchar *) "Start",
    (GDBusArgInfo **) &_xdp_dbus_location_method_info_start_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_location_method_info_start_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_dbus_location_method_start_annotation_info_pointers
  },
  "handle-start",
  FALSE
};

static const GDBusMethodInfo * const _xdp_dbus_location_method_info_pointers[] =
{
  &_xdp_dbus_location_method_info_create_session.parent_struct,
  &_xdp_dbus_location_method_info_start.parent_struct,
  NULL
};

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

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

static const GDBusArgInfo * const _xdp_dbus_location_signal_info_location_updated_ARG_pointers[] =
{
  &_xdp_dbus_location_signal_info_location_updated_ARG_session_handle.parent_struct,
  &_xdp_dbus_location_signal_info_location_updated_ARG_location.parent_struct,
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_location_signal_location_updated_annotation_info_pointers[] =
{
  &_xdp_dbus_location_signal_location_updated_annotation_info_0,
  NULL
};

static const _ExtendedGDBusSignalInfo _xdp_dbus_location_signal_info_location_updated =
{
  {
    -1,
    (gchar *) "LocationUpdated",
    (GDBusArgInfo **) &_xdp_dbus_location_signal_info_location_updated_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_dbus_location_signal_location_updated_annotation_info_pointers
  },
  "location-updated"
};

static const GDBusSignalInfo * const _xdp_dbus_location_signal_info_pointers[] =
{
  &_xdp_dbus_location_signal_info_location_updated.parent_struct,
  NULL
};

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

static const GDBusPropertyInfo * const _xdp_dbus_location_property_info_pointers[] =
{
  &_xdp_dbus_location_property_info_version.parent_struct,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _xdp_dbus_location_interface_info =
{
  {
    -1,
    (gchar *) "org.freedesktop.portal.Location",
    (GDBusMethodInfo **) &_xdp_dbus_location_method_info_pointers,
    (GDBusSignalInfo **) &_xdp_dbus_location_signal_info_pointers,
    (GDBusPropertyInfo **) &_xdp_dbus_location_property_info_pointers,
    NULL
  },
  "location",
};


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

/**
 * xdp_dbus_location_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 #XdpDbusLocation interface for a concrete class.
 * The properties are overridden in the order they are defined.
 *
 * Returns: The last property id.
 */
guint
xdp_dbus_location_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_dbus_location_signal_marshal_location_updated (
    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_dbus_location_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_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_dbus_location_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_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}


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

/**
 * XdpDbusLocationIface:
 * @parent_iface: The parent interface.
 * @handle_create_session: Handler for the #XdpDbusLocation::handle-create-session signal.
 * @handle_start: Handler for the #XdpDbusLocation::handle-start signal.
 * @get_version: Getter for the #XdpDbusLocation:version property.
 * @location_updated: Handler for the #XdpDbusLocation::location-updated signal.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-Location.top_of_page">org.freedesktop.portal.Location</link>.
 */

typedef XdpDbusLocationIface XdpDbusLocationInterface;
G_DEFINE_INTERFACE (XdpDbusLocation, xdp_dbus_location, G_TYPE_OBJECT)

static void
xdp_dbus_location_default_init (XdpDbusLocationIface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * XdpDbusLocation::handle-create-session:
   * @object: A #XdpDbusLocation.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_options: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-portal-Location.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_dbus_location_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 (XdpDbusLocationIface, handle_create_session),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_location_method_marshal_create_session,
    G_TYPE_BOOLEAN,
    2,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_VARIANT);

  /**
   * XdpDbusLocation::handle-start:
   * @object: A #XdpDbusLocation.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_session_handle: 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-portal-Location.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_dbus_location_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 (XdpDbusLocationIface, handle_start),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_location_method_marshal_start,
    G_TYPE_BOOLEAN,
    4,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_VARIANT);

  /* GObject signals for received D-Bus signals: */
  /**
   * XdpDbusLocation::location-updated:
   * @object: A #XdpDbusLocation.
   * @arg_session_handle: Argument.
   * @arg_location: Argument.
   *
   * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-freedesktop-portal-Location.LocationUpdated">"LocationUpdated"</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_DBUS__LOCATION_SIGNALS[XDP_DBUS__LOCATION_LOCATION_UPDATED] =
    g_signal_new ("location-updated",
      G_TYPE_FROM_INTERFACE (iface),
      G_SIGNAL_RUN_LAST,
      G_STRUCT_OFFSET (XdpDbusLocationIface, location_updated),
      NULL,
      NULL,
      xdp_dbus_location_signal_marshal_location_updated,
      G_TYPE_NONE,
      2, G_TYPE_STRING, G_TYPE_VARIANT);

  /* GObject properties for D-Bus properties: */
  /**
   * XdpDbusLocation:version:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-portal-Location.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_dbus_location_get_version: (skip)
 * @object: A #XdpDbusLocation.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-portal-Location.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_dbus_location_get_version (XdpDbusLocation *object)
{
  g_return_val_if_fail (XDP_DBUS_IS_LOCATION (object), 0);

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

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

/**
 * xdp_dbus_location_emit_location_updated:
 * @object: A #XdpDbusLocation.
 * @arg_session_handle: Argument to pass with the signal.
 * @arg_location: Argument to pass with the signal.
 *
 * Emits the <link linkend="gdbus-signal-org-freedesktop-portal-Location.LocationUpdated">"LocationUpdated"</link> D-Bus signal.
 */
void
xdp_dbus_location_emit_location_updated (
    XdpDbusLocation *object,
    const gchar *arg_session_handle,
    GVariant *arg_location)
{
  g_signal_emit (object, XDP_DBUS__LOCATION_SIGNALS[XDP_DBUS__LOCATION_LOCATION_UPDATED], 0, arg_session_handle, arg_location);
}

/**
 * xdp_dbus_location_call_create_session:
 * @proxy: A #XdpDbusLocationProxy.
 * @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-portal-Location.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_dbus_location_call_create_session_finish() to get the result of the operation.
 *
 * See xdp_dbus_location_call_create_session_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_location_call_create_session (
    XdpDbusLocation *proxy,
    GVariant *arg_options,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "CreateSession",
    g_variant_new ("(@a{sv})",
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_location_call_create_session_finish:
 * @proxy: A #XdpDbusLocationProxy.
 * @out_handle: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_location_call_create_session().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_location_call_create_session().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_location_call_create_session_finish (
    XdpDbusLocation *proxy,
    gchar ** out_handle,
    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,
                 "(o)",
                 out_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_location_call_create_session_sync:
 * @proxy: A #XdpDbusLocationProxy.
 * @arg_options: Argument to pass with the method invocation.
 * @out_handle: (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-portal-Location.CreateSession">CreateSession()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_location_call_create_session() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_location_call_create_session_sync (
    XdpDbusLocation *proxy,
    GVariant *arg_options,
    gchar ** out_handle,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "CreateSession",
    g_variant_new ("(@a{sv})",
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(o)",
                 out_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_location_call_start:
 * @proxy: A #XdpDbusLocationProxy.
 * @arg_session_handle: 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-portal-Location.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_dbus_location_call_start_finish() to get the result of the operation.
 *
 * See xdp_dbus_location_call_start_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_location_call_start (
    XdpDbusLocation *proxy,
    const gchar *arg_session_handle,
    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 ("(os@a{sv})",
                   arg_session_handle,
                   arg_parent_window,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_location_call_start_finish:
 * @proxy: A #XdpDbusLocationProxy.
 * @out_handle: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_location_call_start().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_location_call_start().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_location_call_start_finish (
    XdpDbusLocation *proxy,
    gchar ** out_handle,
    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,
                 "(o)",
                 out_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_location_call_start_sync:
 * @proxy: A #XdpDbusLocationProxy.
 * @arg_session_handle: 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_handle: (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-portal-Location.Start">Start()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_location_call_start() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_location_call_start_sync (
    XdpDbusLocation *proxy,
    const gchar *arg_session_handle,
    const gchar *arg_parent_window,
    GVariant *arg_options,
    gchar ** out_handle,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "Start",
    g_variant_new ("(os@a{sv})",
                   arg_session_handle,
                   arg_parent_window,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(o)",
                 out_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_location_complete_create_session:
 * @object: A #XdpDbusLocation.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @handle: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-portal-Location.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_dbus_location_complete_create_session (
    XdpDbusLocation *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    const gchar *handle)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(o)",
                   handle));
}

/**
 * xdp_dbus_location_complete_start:
 * @object: A #XdpDbusLocation.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @handle: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-portal-Location.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_dbus_location_complete_start (
    XdpDbusLocation *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    const gchar *handle)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(o)",
                   handle));
}

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

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

/**
 * XdpDbusLocationProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpDbusLocationProxy.
 */

struct _XdpDbusLocationProxyPrivate
{
  GData *qdata;
};

static void xdp_dbus_location_proxy_iface_init (XdpDbusLocationIface *iface);

#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpDbusLocationProxy, xdp_dbus_location_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (XdpDbusLocationProxy)
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_LOCATION, xdp_dbus_location_proxy_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpDbusLocationProxy, xdp_dbus_location_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_LOCATION, xdp_dbus_location_proxy_iface_init))

#endif
static void
xdp_dbus_location_proxy_finalize (GObject *object)
{
  XdpDbusLocationProxy *proxy = XDP_DBUS_LOCATION_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (xdp_dbus_location_proxy_parent_class)->finalize (object);
}

static void
xdp_dbus_location_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_dbus_location_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_dbus_location_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.portal.Location: %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_dbus_location_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_dbus_location_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.portal.Location", info->parent_struct.name, variant),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    NULL, (GAsyncReadyCallback) xdp_dbus_location_proxy_set_property_cb, (GDBusPropertyInfo *) &info->parent_struct);
  g_variant_unref (variant);
}

static void
xdp_dbus_location_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_dbus_location_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_DBUS_TYPE_LOCATION);
  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_DBUS_TYPE_LOCATION);
  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_dbus_location_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  XdpDbusLocationProxy *proxy = XDP_DBUS_LOCATION_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_dbus_location_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_dbus_location_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_dbus_location_proxy_get_version (XdpDbusLocation *object)
{
  XdpDbusLocationProxy *proxy = XDP_DBUS_LOCATION_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_dbus_location_proxy_init (XdpDbusLocationProxy *proxy)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  proxy->priv = xdp_dbus_location_proxy_get_instance_private (proxy);
#else
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, XDP_DBUS_TYPE_LOCATION_PROXY, XdpDbusLocationProxyPrivate);
#endif

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

static void
xdp_dbus_location_proxy_class_init (XdpDbusLocationProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = xdp_dbus_location_proxy_finalize;
  gobject_class->get_property = xdp_dbus_location_proxy_get_property;
  gobject_class->set_property = xdp_dbus_location_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = xdp_dbus_location_proxy_g_signal;
  proxy_class->g_properties_changed = xdp_dbus_location_proxy_g_properties_changed;

  xdp_dbus_location_override_properties (gobject_class, 1);

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

static void
xdp_dbus_location_proxy_iface_init (XdpDbusLocationIface *iface)
{
  iface->get_version = xdp_dbus_location_proxy_get_version;
}

/**
 * xdp_dbus_location_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-portal-Location.top_of_page">org.freedesktop.portal.Location</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_dbus_location_proxy_new_finish() to get the result of the operation.
 *
 * See xdp_dbus_location_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_dbus_location_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_DBUS_TYPE_LOCATION_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.portal.Location", NULL);
}

/**
 * xdp_dbus_location_proxy_new_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_location_proxy_new().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_dbus_location_proxy_new().
 *
 * Returns: (transfer full) (type XdpDbusLocationProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusLocation *
xdp_dbus_location_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_DBUS_LOCATION (ret);
  else
    return NULL;
}

/**
 * xdp_dbus_location_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-portal-Location.top_of_page">org.freedesktop.portal.Location</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_location_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpDbusLocationProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusLocation *
xdp_dbus_location_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_DBUS_TYPE_LOCATION_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.portal.Location", NULL);
  if (ret != NULL)
    return XDP_DBUS_LOCATION (ret);
  else
    return NULL;
}


/**
 * xdp_dbus_location_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_dbus_location_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_dbus_location_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See xdp_dbus_location_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_dbus_location_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_DBUS_TYPE_LOCATION_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.portal.Location", NULL);
}

/**
 * xdp_dbus_location_proxy_new_for_bus_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_location_proxy_new_for_bus().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_dbus_location_proxy_new_for_bus().
 *
 * Returns: (transfer full) (type XdpDbusLocationProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusLocation *
xdp_dbus_location_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_DBUS_LOCATION (ret);
  else
    return NULL;
}

/**
 * xdp_dbus_location_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_dbus_location_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_location_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpDbusLocationProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusLocation *
xdp_dbus_location_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_DBUS_TYPE_LOCATION_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.portal.Location", NULL);
  if (ret != NULL)
    return XDP_DBUS_LOCATION (ret);
  else
    return NULL;
}


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

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

/**
 * XdpDbusLocationSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpDbusLocationSkeleton.
 */

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

static void
_xdp_dbus_location_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)
{
  XdpDbusLocationSkeleton *skeleton = XDP_DBUS_LOCATION_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_DBUS_TYPE_LOCATION);
  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_DBUS_TYPE_LOCATION);
  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_dbus_location_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)
{
  XdpDbusLocationSkeleton *skeleton = XDP_DBUS_LOCATION_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_dbus_location_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_dbus_location_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)
{
  XdpDbusLocationSkeleton *skeleton = XDP_DBUS_LOCATION_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_dbus_location_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_dbus_location_skeleton_vtable =
{
  _xdp_dbus_location_skeleton_handle_method_call,
  _xdp_dbus_location_skeleton_handle_get_property,
  _xdp_dbus_location_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
xdp_dbus_location_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return xdp_dbus_location_interface_info ();
}

static GDBusInterfaceVTable *
xdp_dbus_location_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_xdp_dbus_location_skeleton_vtable;
}

static GVariant *
xdp_dbus_location_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  XdpDbusLocationSkeleton *skeleton = XDP_DBUS_LOCATION_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_dbus_location_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _xdp_dbus_location_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _xdp_dbus_location_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _xdp_dbus_location_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.portal.Location", 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_dbus_location_emit_changed (gpointer user_data);

static void
xdp_dbus_location_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
{
  XdpDbusLocationSkeleton *skeleton = XDP_DBUS_LOCATION_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_dbus_location_emit_changed (skeleton);
}

static void
_xdp_dbus_location_on_signal_location_updated (
    XdpDbusLocation *object,
    const gchar *arg_session_handle,
    GVariant *arg_location)
{
  XdpDbusLocationSkeleton *skeleton = XDP_DBUS_LOCATION_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_location));
  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.portal.Location", "LocationUpdated",
        signal_variant, NULL);
    }
  g_variant_unref (signal_variant);
  g_list_free_full (connections, g_object_unref);
}

static void xdp_dbus_location_skeleton_iface_init (XdpDbusLocationIface *iface);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpDbusLocationSkeleton, xdp_dbus_location_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (XdpDbusLocationSkeleton)
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_LOCATION, xdp_dbus_location_skeleton_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpDbusLocationSkeleton, xdp_dbus_location_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_LOCATION, xdp_dbus_location_skeleton_iface_init))

#endif
static void
xdp_dbus_location_skeleton_finalize (GObject *object)
{
  XdpDbusLocationSkeleton *skeleton = XDP_DBUS_LOCATION_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_dbus_location_skeleton_parent_class)->finalize (object);
}

static void
xdp_dbus_location_skeleton_get_property (GObject      *object,
  guint         prop_id,
  GValue       *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  XdpDbusLocationSkeleton *skeleton = XDP_DBUS_LOCATION_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_dbus_location_emit_changed (gpointer user_data)
{
  XdpDbusLocationSkeleton *skeleton = XDP_DBUS_LOCATION_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.portal.Location",
                                           &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_dbus_location_schedule_emit_changed (XdpDbusLocationSkeleton *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_dbus_location_skeleton_notify (GObject      *object,
  GParamSpec *pspec G_GNUC_UNUSED)
{
  XdpDbusLocationSkeleton *skeleton = XDP_DBUS_LOCATION_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_dbus_location_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
      g_source_set_name (skeleton->priv->changed_properties_idle_source, "[generated] _xdp_dbus_location_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_dbus_location_skeleton_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec)
{
  const _ExtendedGDBusPropertyInfo *info;
  XdpDbusLocationSkeleton *skeleton = XDP_DBUS_LOCATION_SKELETON (object);
  g_assert (prop_id != 0 && prop_id - 1 < 1);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_dbus_location_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_dbus_location_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_dbus_location_skeleton_init (XdpDbusLocationSkeleton *skeleton)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  skeleton->priv = xdp_dbus_location_skeleton_get_instance_private (skeleton);
#else
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, XDP_DBUS_TYPE_LOCATION_SKELETON, XdpDbusLocationSkeletonPrivate);
#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_dbus_location_skeleton_get_version (XdpDbusLocation *object)
{
  XdpDbusLocationSkeleton *skeleton = XDP_DBUS_LOCATION_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_dbus_location_skeleton_class_init (XdpDbusLocationSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize = xdp_dbus_location_skeleton_finalize;
  gobject_class->get_property = xdp_dbus_location_skeleton_get_property;
  gobject_class->set_property = xdp_dbus_location_skeleton_set_property;
  gobject_class->notify       = xdp_dbus_location_skeleton_notify;


  xdp_dbus_location_override_properties (gobject_class, 1);

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = xdp_dbus_location_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = xdp_dbus_location_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = xdp_dbus_location_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = xdp_dbus_location_skeleton_dbus_interface_get_vtable;

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

static void
xdp_dbus_location_skeleton_iface_init (XdpDbusLocationIface *iface)
{
  iface->location_updated = _xdp_dbus_location_on_signal_location_updated;
  iface->get_version = xdp_dbus_location_skeleton_get_version;
}

/**
 * xdp_dbus_location_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-Location.top_of_page">org.freedesktop.portal.Location</link>.
 *
 * Returns: (transfer full) (type XdpDbusLocationSkeleton): The skeleton object.
 */
XdpDbusLocation *
xdp_dbus_location_skeleton_new (void)
{
  return XDP_DBUS_LOCATION (g_object_new (XDP_DBUS_TYPE_LOCATION_SKELETON, NULL));
}

/* ------------------------------------------------------------------------
 * Code for interface org.freedesktop.portal.MemoryMonitor
 * ------------------------------------------------------------------------
 */

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

enum
{
  XDP_DBUS__MEMORY_MONITOR_LOW_MEMORY_WARNING,
};

static unsigned XDP_DBUS__MEMORY_MONITOR_SIGNALS[1] = { 0 };

/* ---- Introspection data for org.freedesktop.portal.MemoryMonitor ---- */

static const _ExtendedGDBusArgInfo _xdp_dbus_memory_monitor_signal_info_low_memory_warning_ARG_level =
{
  {
    -1,
    (gchar *) "level",
    (gchar *) "y",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_dbus_memory_monitor_signal_info_low_memory_warning_ARG_pointers[] =
{
  &_xdp_dbus_memory_monitor_signal_info_low_memory_warning_ARG_level.parent_struct,
  NULL
};

static const _ExtendedGDBusSignalInfo _xdp_dbus_memory_monitor_signal_info_low_memory_warning =
{
  {
    -1,
    (gchar *) "LowMemoryWarning",
    (GDBusArgInfo **) &_xdp_dbus_memory_monitor_signal_info_low_memory_warning_ARG_pointers,
    NULL
  },
  "low-memory-warning"
};

static const GDBusSignalInfo * const _xdp_dbus_memory_monitor_signal_info_pointers[] =
{
  &_xdp_dbus_memory_monitor_signal_info_low_memory_warning.parent_struct,
  NULL
};

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

static const GDBusPropertyInfo * const _xdp_dbus_memory_monitor_property_info_pointers[] =
{
  &_xdp_dbus_memory_monitor_property_info_version.parent_struct,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _xdp_dbus_memory_monitor_interface_info =
{
  {
    -1,
    (gchar *) "org.freedesktop.portal.MemoryMonitor",
    NULL,
    (GDBusSignalInfo **) &_xdp_dbus_memory_monitor_signal_info_pointers,
    (GDBusPropertyInfo **) &_xdp_dbus_memory_monitor_property_info_pointers,
    NULL
  },
  "memory-monitor",
};


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

/**
 * xdp_dbus_memory_monitor_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 #XdpDbusMemoryMonitor interface for a concrete class.
 * The properties are overridden in the order they are defined.
 *
 * Returns: The last property id.
 */
guint
xdp_dbus_memory_monitor_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_dbus_memory_monitor_signal_marshal_low_memory_warning (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  g_cclosure_marshal_VOID__UCHAR (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}


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

/**
 * XdpDbusMemoryMonitorIface:
 * @parent_iface: The parent interface.
 * @get_version: Getter for the #XdpDbusMemoryMonitor:version property.
 * @low_memory_warning: Handler for the #XdpDbusMemoryMonitor::low-memory-warning signal.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-MemoryMonitor.top_of_page">org.freedesktop.portal.MemoryMonitor</link>.
 */

typedef XdpDbusMemoryMonitorIface XdpDbusMemoryMonitorInterface;
G_DEFINE_INTERFACE (XdpDbusMemoryMonitor, xdp_dbus_memory_monitor, G_TYPE_OBJECT)

static void
xdp_dbus_memory_monitor_default_init (XdpDbusMemoryMonitorIface *iface)
{
  /* GObject signals for received D-Bus signals: */
  /**
   * XdpDbusMemoryMonitor::low-memory-warning:
   * @object: A #XdpDbusMemoryMonitor.
   * @arg_level: Argument.
   *
   * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-freedesktop-portal-MemoryMonitor.LowMemoryWarning">"LowMemoryWarning"</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_DBUS__MEMORY_MONITOR_SIGNALS[XDP_DBUS__MEMORY_MONITOR_LOW_MEMORY_WARNING] =
    g_signal_new ("low-memory-warning",
      G_TYPE_FROM_INTERFACE (iface),
      G_SIGNAL_RUN_LAST,
      G_STRUCT_OFFSET (XdpDbusMemoryMonitorIface, low_memory_warning),
      NULL,
      NULL,
      xdp_dbus_memory_monitor_signal_marshal_low_memory_warning,
      G_TYPE_NONE,
      1, G_TYPE_UCHAR);

  /* GObject properties for D-Bus properties: */
  /**
   * XdpDbusMemoryMonitor:version:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-portal-MemoryMonitor.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_dbus_memory_monitor_get_version: (skip)
 * @object: A #XdpDbusMemoryMonitor.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-portal-MemoryMonitor.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_dbus_memory_monitor_get_version (XdpDbusMemoryMonitor *object)
{
  g_return_val_if_fail (XDP_DBUS_IS_MEMORY_MONITOR (object), 0);

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

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

/**
 * xdp_dbus_memory_monitor_emit_low_memory_warning:
 * @object: A #XdpDbusMemoryMonitor.
 * @arg_level: Argument to pass with the signal.
 *
 * Emits the <link linkend="gdbus-signal-org-freedesktop-portal-MemoryMonitor.LowMemoryWarning">"LowMemoryWarning"</link> D-Bus signal.
 */
void
xdp_dbus_memory_monitor_emit_low_memory_warning (
    XdpDbusMemoryMonitor *object,
    guchar arg_level)
{
  g_signal_emit (object, XDP_DBUS__MEMORY_MONITOR_SIGNALS[XDP_DBUS__MEMORY_MONITOR_LOW_MEMORY_WARNING], 0, arg_level);
}

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

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

/**
 * XdpDbusMemoryMonitorProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpDbusMemoryMonitorProxy.
 */

struct _XdpDbusMemoryMonitorProxyPrivate
{
  GData *qdata;
};

static void xdp_dbus_memory_monitor_proxy_iface_init (XdpDbusMemoryMonitorIface *iface);

#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpDbusMemoryMonitorProxy, xdp_dbus_memory_monitor_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (XdpDbusMemoryMonitorProxy)
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_MEMORY_MONITOR, xdp_dbus_memory_monitor_proxy_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpDbusMemoryMonitorProxy, xdp_dbus_memory_monitor_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_MEMORY_MONITOR, xdp_dbus_memory_monitor_proxy_iface_init))

#endif
static void
xdp_dbus_memory_monitor_proxy_finalize (GObject *object)
{
  XdpDbusMemoryMonitorProxy *proxy = XDP_DBUS_MEMORY_MONITOR_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (xdp_dbus_memory_monitor_proxy_parent_class)->finalize (object);
}

static void
xdp_dbus_memory_monitor_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_dbus_memory_monitor_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_dbus_memory_monitor_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.portal.MemoryMonitor: %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_dbus_memory_monitor_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_dbus_memory_monitor_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.portal.MemoryMonitor", info->parent_struct.name, variant),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    NULL, (GAsyncReadyCallback) xdp_dbus_memory_monitor_proxy_set_property_cb, (GDBusPropertyInfo *) &info->parent_struct);
  g_variant_unref (variant);
}

static void
xdp_dbus_memory_monitor_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_dbus_memory_monitor_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_DBUS_TYPE_MEMORY_MONITOR);
  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_DBUS_TYPE_MEMORY_MONITOR);
  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_dbus_memory_monitor_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  XdpDbusMemoryMonitorProxy *proxy = XDP_DBUS_MEMORY_MONITOR_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_dbus_memory_monitor_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_dbus_memory_monitor_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_dbus_memory_monitor_proxy_get_version (XdpDbusMemoryMonitor *object)
{
  XdpDbusMemoryMonitorProxy *proxy = XDP_DBUS_MEMORY_MONITOR_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_dbus_memory_monitor_proxy_init (XdpDbusMemoryMonitorProxy *proxy)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  proxy->priv = xdp_dbus_memory_monitor_proxy_get_instance_private (proxy);
#else
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, XDP_DBUS_TYPE_MEMORY_MONITOR_PROXY, XdpDbusMemoryMonitorProxyPrivate);
#endif

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

static void
xdp_dbus_memory_monitor_proxy_class_init (XdpDbusMemoryMonitorProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = xdp_dbus_memory_monitor_proxy_finalize;
  gobject_class->get_property = xdp_dbus_memory_monitor_proxy_get_property;
  gobject_class->set_property = xdp_dbus_memory_monitor_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = xdp_dbus_memory_monitor_proxy_g_signal;
  proxy_class->g_properties_changed = xdp_dbus_memory_monitor_proxy_g_properties_changed;

  xdp_dbus_memory_monitor_override_properties (gobject_class, 1);

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

static void
xdp_dbus_memory_monitor_proxy_iface_init (XdpDbusMemoryMonitorIface *iface)
{
  iface->get_version = xdp_dbus_memory_monitor_proxy_get_version;
}

/**
 * xdp_dbus_memory_monitor_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-portal-MemoryMonitor.top_of_page">org.freedesktop.portal.MemoryMonitor</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_dbus_memory_monitor_proxy_new_finish() to get the result of the operation.
 *
 * See xdp_dbus_memory_monitor_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_dbus_memory_monitor_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_DBUS_TYPE_MEMORY_MONITOR_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.portal.MemoryMonitor", NULL);
}

/**
 * xdp_dbus_memory_monitor_proxy_new_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_memory_monitor_proxy_new().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_dbus_memory_monitor_proxy_new().
 *
 * Returns: (transfer full) (type XdpDbusMemoryMonitorProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusMemoryMonitor *
xdp_dbus_memory_monitor_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_DBUS_MEMORY_MONITOR (ret);
  else
    return NULL;
}

/**
 * xdp_dbus_memory_monitor_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-portal-MemoryMonitor.top_of_page">org.freedesktop.portal.MemoryMonitor</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_memory_monitor_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpDbusMemoryMonitorProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusMemoryMonitor *
xdp_dbus_memory_monitor_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_DBUS_TYPE_MEMORY_MONITOR_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.portal.MemoryMonitor", NULL);
  if (ret != NULL)
    return XDP_DBUS_MEMORY_MONITOR (ret);
  else
    return NULL;
}


/**
 * xdp_dbus_memory_monitor_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_dbus_memory_monitor_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_dbus_memory_monitor_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See xdp_dbus_memory_monitor_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_dbus_memory_monitor_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_DBUS_TYPE_MEMORY_MONITOR_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.portal.MemoryMonitor", NULL);
}

/**
 * xdp_dbus_memory_monitor_proxy_new_for_bus_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_memory_monitor_proxy_new_for_bus().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_dbus_memory_monitor_proxy_new_for_bus().
 *
 * Returns: (transfer full) (type XdpDbusMemoryMonitorProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusMemoryMonitor *
xdp_dbus_memory_monitor_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_DBUS_MEMORY_MONITOR (ret);
  else
    return NULL;
}

/**
 * xdp_dbus_memory_monitor_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_dbus_memory_monitor_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_memory_monitor_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpDbusMemoryMonitorProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusMemoryMonitor *
xdp_dbus_memory_monitor_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_DBUS_TYPE_MEMORY_MONITOR_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.portal.MemoryMonitor", NULL);
  if (ret != NULL)
    return XDP_DBUS_MEMORY_MONITOR (ret);
  else
    return NULL;
}


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

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

/**
 * XdpDbusMemoryMonitorSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpDbusMemoryMonitorSkeleton.
 */

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

static void
_xdp_dbus_memory_monitor_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)
{
  XdpDbusMemoryMonitorSkeleton *skeleton = XDP_DBUS_MEMORY_MONITOR_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_DBUS_TYPE_MEMORY_MONITOR);
  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_DBUS_TYPE_MEMORY_MONITOR);
  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_dbus_memory_monitor_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)
{
  XdpDbusMemoryMonitorSkeleton *skeleton = XDP_DBUS_MEMORY_MONITOR_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_dbus_memory_monitor_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_dbus_memory_monitor_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)
{
  XdpDbusMemoryMonitorSkeleton *skeleton = XDP_DBUS_MEMORY_MONITOR_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_dbus_memory_monitor_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_dbus_memory_monitor_skeleton_vtable =
{
  _xdp_dbus_memory_monitor_skeleton_handle_method_call,
  _xdp_dbus_memory_monitor_skeleton_handle_get_property,
  _xdp_dbus_memory_monitor_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
xdp_dbus_memory_monitor_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return xdp_dbus_memory_monitor_interface_info ();
}

static GDBusInterfaceVTable *
xdp_dbus_memory_monitor_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_xdp_dbus_memory_monitor_skeleton_vtable;
}

static GVariant *
xdp_dbus_memory_monitor_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  XdpDbusMemoryMonitorSkeleton *skeleton = XDP_DBUS_MEMORY_MONITOR_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_dbus_memory_monitor_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _xdp_dbus_memory_monitor_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _xdp_dbus_memory_monitor_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _xdp_dbus_memory_monitor_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.portal.MemoryMonitor", 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_dbus_memory_monitor_emit_changed (gpointer user_data);

static void
xdp_dbus_memory_monitor_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
{
  XdpDbusMemoryMonitorSkeleton *skeleton = XDP_DBUS_MEMORY_MONITOR_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_dbus_memory_monitor_emit_changed (skeleton);
}

static void
_xdp_dbus_memory_monitor_on_signal_low_memory_warning (
    XdpDbusMemoryMonitor *object,
    guchar arg_level)
{
  XdpDbusMemoryMonitorSkeleton *skeleton = XDP_DBUS_MEMORY_MONITOR_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 ("(y)",
                   arg_level));
  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.portal.MemoryMonitor", "LowMemoryWarning",
        signal_variant, NULL);
    }
  g_variant_unref (signal_variant);
  g_list_free_full (connections, g_object_unref);
}

static void xdp_dbus_memory_monitor_skeleton_iface_init (XdpDbusMemoryMonitorIface *iface);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpDbusMemoryMonitorSkeleton, xdp_dbus_memory_monitor_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (XdpDbusMemoryMonitorSkeleton)
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_MEMORY_MONITOR, xdp_dbus_memory_monitor_skeleton_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpDbusMemoryMonitorSkeleton, xdp_dbus_memory_monitor_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_MEMORY_MONITOR, xdp_dbus_memory_monitor_skeleton_iface_init))

#endif
static void
xdp_dbus_memory_monitor_skeleton_finalize (GObject *object)
{
  XdpDbusMemoryMonitorSkeleton *skeleton = XDP_DBUS_MEMORY_MONITOR_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_dbus_memory_monitor_skeleton_parent_class)->finalize (object);
}

static void
xdp_dbus_memory_monitor_skeleton_get_property (GObject      *object,
  guint         prop_id,
  GValue       *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  XdpDbusMemoryMonitorSkeleton *skeleton = XDP_DBUS_MEMORY_MONITOR_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_dbus_memory_monitor_emit_changed (gpointer user_data)
{
  XdpDbusMemoryMonitorSkeleton *skeleton = XDP_DBUS_MEMORY_MONITOR_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.portal.MemoryMonitor",
                                           &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_dbus_memory_monitor_schedule_emit_changed (XdpDbusMemoryMonitorSkeleton *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_dbus_memory_monitor_skeleton_notify (GObject      *object,
  GParamSpec *pspec G_GNUC_UNUSED)
{
  XdpDbusMemoryMonitorSkeleton *skeleton = XDP_DBUS_MEMORY_MONITOR_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_dbus_memory_monitor_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
      g_source_set_name (skeleton->priv->changed_properties_idle_source, "[generated] _xdp_dbus_memory_monitor_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_dbus_memory_monitor_skeleton_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec)
{
  const _ExtendedGDBusPropertyInfo *info;
  XdpDbusMemoryMonitorSkeleton *skeleton = XDP_DBUS_MEMORY_MONITOR_SKELETON (object);
  g_assert (prop_id != 0 && prop_id - 1 < 1);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_dbus_memory_monitor_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_dbus_memory_monitor_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_dbus_memory_monitor_skeleton_init (XdpDbusMemoryMonitorSkeleton *skeleton)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  skeleton->priv = xdp_dbus_memory_monitor_skeleton_get_instance_private (skeleton);
#else
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, XDP_DBUS_TYPE_MEMORY_MONITOR_SKELETON, XdpDbusMemoryMonitorSkeletonPrivate);
#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_dbus_memory_monitor_skeleton_get_version (XdpDbusMemoryMonitor *object)
{
  XdpDbusMemoryMonitorSkeleton *skeleton = XDP_DBUS_MEMORY_MONITOR_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_dbus_memory_monitor_skeleton_class_init (XdpDbusMemoryMonitorSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize = xdp_dbus_memory_monitor_skeleton_finalize;
  gobject_class->get_property = xdp_dbus_memory_monitor_skeleton_get_property;
  gobject_class->set_property = xdp_dbus_memory_monitor_skeleton_set_property;
  gobject_class->notify       = xdp_dbus_memory_monitor_skeleton_notify;


  xdp_dbus_memory_monitor_override_properties (gobject_class, 1);

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = xdp_dbus_memory_monitor_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = xdp_dbus_memory_monitor_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = xdp_dbus_memory_monitor_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = xdp_dbus_memory_monitor_skeleton_dbus_interface_get_vtable;

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

static void
xdp_dbus_memory_monitor_skeleton_iface_init (XdpDbusMemoryMonitorIface *iface)
{
  iface->low_memory_warning = _xdp_dbus_memory_monitor_on_signal_low_memory_warning;
  iface->get_version = xdp_dbus_memory_monitor_skeleton_get_version;
}

/**
 * xdp_dbus_memory_monitor_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-MemoryMonitor.top_of_page">org.freedesktop.portal.MemoryMonitor</link>.
 *
 * Returns: (transfer full) (type XdpDbusMemoryMonitorSkeleton): The skeleton object.
 */
XdpDbusMemoryMonitor *
xdp_dbus_memory_monitor_skeleton_new (void)
{
  return XDP_DBUS_MEMORY_MONITOR (g_object_new (XDP_DBUS_TYPE_MEMORY_MONITOR_SKELETON, NULL));
}

/* ------------------------------------------------------------------------
 * Code for interface org.freedesktop.portal.NetworkMonitor
 * ------------------------------------------------------------------------
 */

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

enum
{
  XDP_DBUS__NETWORK_MONITOR_CHANGED,
};

static unsigned XDP_DBUS__NETWORK_MONITOR_SIGNALS[1] = { 0 };

/* ---- Introspection data for org.freedesktop.portal.NetworkMonitor ---- */

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

static const GDBusArgInfo * const _xdp_dbus_network_monitor_method_info_get_available_OUT_ARG_pointers[] =
{
  &_xdp_dbus_network_monitor_method_info_get_available_OUT_ARG_available.parent_struct,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_network_monitor_method_info_get_available =
{
  {
    -1,
    (gchar *) "GetAvailable",
    NULL,
    (GDBusArgInfo **) &_xdp_dbus_network_monitor_method_info_get_available_OUT_ARG_pointers,
    NULL
  },
  "handle-get-available",
  FALSE
};

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

static const GDBusArgInfo * const _xdp_dbus_network_monitor_method_info_get_metered_OUT_ARG_pointers[] =
{
  &_xdp_dbus_network_monitor_method_info_get_metered_OUT_ARG_metered.parent_struct,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_network_monitor_method_info_get_metered =
{
  {
    -1,
    (gchar *) "GetMetered",
    NULL,
    (GDBusArgInfo **) &_xdp_dbus_network_monitor_method_info_get_metered_OUT_ARG_pointers,
    NULL
  },
  "handle-get-metered",
  FALSE
};

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

static const GDBusArgInfo * const _xdp_dbus_network_monitor_method_info_get_connectivity_OUT_ARG_pointers[] =
{
  &_xdp_dbus_network_monitor_method_info_get_connectivity_OUT_ARG_connectivity.parent_struct,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_network_monitor_method_info_get_connectivity =
{
  {
    -1,
    (gchar *) "GetConnectivity",
    NULL,
    (GDBusArgInfo **) &_xdp_dbus_network_monitor_method_info_get_connectivity_OUT_ARG_pointers,
    NULL
  },
  "handle-get-connectivity",
  FALSE
};

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

static const GDBusArgInfo * const _xdp_dbus_network_monitor_method_info_get_status_OUT_ARG_pointers[] =
{
  &_xdp_dbus_network_monitor_method_info_get_status_OUT_ARG_status.parent_struct,
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_network_monitor_method_get_status_annotation_info_pointers[] =
{
  &_xdp_dbus_network_monitor_method_get_status_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_network_monitor_method_info_get_status =
{
  {
    -1,
    (gchar *) "GetStatus",
    NULL,
    (GDBusArgInfo **) &_xdp_dbus_network_monitor_method_info_get_status_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_dbus_network_monitor_method_get_status_annotation_info_pointers
  },
  "handle-get-status",
  FALSE
};

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

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

static const GDBusArgInfo * const _xdp_dbus_network_monitor_method_info_can_reach_IN_ARG_pointers[] =
{
  &_xdp_dbus_network_monitor_method_info_can_reach_IN_ARG_hostname.parent_struct,
  &_xdp_dbus_network_monitor_method_info_can_reach_IN_ARG_port.parent_struct,
  NULL
};

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

static const GDBusArgInfo * const _xdp_dbus_network_monitor_method_info_can_reach_OUT_ARG_pointers[] =
{
  &_xdp_dbus_network_monitor_method_info_can_reach_OUT_ARG_reachable.parent_struct,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_network_monitor_method_info_can_reach =
{
  {
    -1,
    (gchar *) "CanReach",
    (GDBusArgInfo **) &_xdp_dbus_network_monitor_method_info_can_reach_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_network_monitor_method_info_can_reach_OUT_ARG_pointers,
    NULL
  },
  "handle-can-reach",
  FALSE
};

static const GDBusMethodInfo * const _xdp_dbus_network_monitor_method_info_pointers[] =
{
  &_xdp_dbus_network_monitor_method_info_get_available.parent_struct,
  &_xdp_dbus_network_monitor_method_info_get_metered.parent_struct,
  &_xdp_dbus_network_monitor_method_info_get_connectivity.parent_struct,
  &_xdp_dbus_network_monitor_method_info_get_status.parent_struct,
  &_xdp_dbus_network_monitor_method_info_can_reach.parent_struct,
  NULL
};

static const _ExtendedGDBusSignalInfo _xdp_dbus_network_monitor_signal_info_changed =
{
  {
    -1,
    (gchar *) "changed",
    NULL,
    NULL
  },
  "changed"
};

static const GDBusSignalInfo * const _xdp_dbus_network_monitor_signal_info_pointers[] =
{
  &_xdp_dbus_network_monitor_signal_info_changed.parent_struct,
  NULL
};

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

static const GDBusPropertyInfo * const _xdp_dbus_network_monitor_property_info_pointers[] =
{
  &_xdp_dbus_network_monitor_property_info_version.parent_struct,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _xdp_dbus_network_monitor_interface_info =
{
  {
    -1,
    (gchar *) "org.freedesktop.portal.NetworkMonitor",
    (GDBusMethodInfo **) &_xdp_dbus_network_monitor_method_info_pointers,
    (GDBusSignalInfo **) &_xdp_dbus_network_monitor_signal_info_pointers,
    (GDBusPropertyInfo **) &_xdp_dbus_network_monitor_property_info_pointers,
    NULL
  },
  "network-monitor",
};


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

/**
 * xdp_dbus_network_monitor_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 #XdpDbusNetworkMonitor interface for a concrete class.
 * The properties are overridden in the order they are defined.
 *
 * Returns: The last property id.
 */
guint
xdp_dbus_network_monitor_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_dbus_network_monitor_signal_marshal_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_dbus_network_monitor_method_marshal_get_available (
    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_dbus_network_monitor_method_marshal_get_metered (
    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_dbus_network_monitor_method_marshal_get_connectivity (
    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_dbus_network_monitor_method_marshal_get_status (
    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_dbus_network_monitor_method_marshal_can_reach (
    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 (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}


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

/**
 * XdpDbusNetworkMonitorIface:
 * @parent_iface: The parent interface.
 * @handle_can_reach: Handler for the #XdpDbusNetworkMonitor::handle-can-reach signal.
 * @handle_get_available: Handler for the #XdpDbusNetworkMonitor::handle-get-available signal.
 * @handle_get_connectivity: Handler for the #XdpDbusNetworkMonitor::handle-get-connectivity signal.
 * @handle_get_metered: Handler for the #XdpDbusNetworkMonitor::handle-get-metered signal.
 * @handle_get_status: Handler for the #XdpDbusNetworkMonitor::handle-get-status signal.
 * @get_version: Getter for the #XdpDbusNetworkMonitor:version property.
 * @changed: Handler for the #XdpDbusNetworkMonitor::changed signal.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-NetworkMonitor.top_of_page">org.freedesktop.portal.NetworkMonitor</link>.
 */

typedef XdpDbusNetworkMonitorIface XdpDbusNetworkMonitorInterface;
G_DEFINE_INTERFACE (XdpDbusNetworkMonitor, xdp_dbus_network_monitor, G_TYPE_OBJECT)

static void
xdp_dbus_network_monitor_default_init (XdpDbusNetworkMonitorIface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * XdpDbusNetworkMonitor::handle-get-available:
   * @object: A #XdpDbusNetworkMonitor.
   * @invocation: A #GDBusMethodInvocation.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-portal-NetworkMonitor.GetAvailable">GetAvailable()</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_dbus_network_monitor_complete_get_available() 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-available",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpDbusNetworkMonitorIface, handle_get_available),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_network_monitor_method_marshal_get_available,
    G_TYPE_BOOLEAN,
    1,
    G_TYPE_DBUS_METHOD_INVOCATION);

  /**
   * XdpDbusNetworkMonitor::handle-get-metered:
   * @object: A #XdpDbusNetworkMonitor.
   * @invocation: A #GDBusMethodInvocation.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-portal-NetworkMonitor.GetMetered">GetMetered()</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_dbus_network_monitor_complete_get_metered() 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-metered",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpDbusNetworkMonitorIface, handle_get_metered),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_network_monitor_method_marshal_get_metered,
    G_TYPE_BOOLEAN,
    1,
    G_TYPE_DBUS_METHOD_INVOCATION);

  /**
   * XdpDbusNetworkMonitor::handle-get-connectivity:
   * @object: A #XdpDbusNetworkMonitor.
   * @invocation: A #GDBusMethodInvocation.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-portal-NetworkMonitor.GetConnectivity">GetConnectivity()</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_dbus_network_monitor_complete_get_connectivity() 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-connectivity",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpDbusNetworkMonitorIface, handle_get_connectivity),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_network_monitor_method_marshal_get_connectivity,
    G_TYPE_BOOLEAN,
    1,
    G_TYPE_DBUS_METHOD_INVOCATION);

  /**
   * XdpDbusNetworkMonitor::handle-get-status:
   * @object: A #XdpDbusNetworkMonitor.
   * @invocation: A #GDBusMethodInvocation.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-portal-NetworkMonitor.GetStatus">GetStatus()</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_dbus_network_monitor_complete_get_status() 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-status",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpDbusNetworkMonitorIface, handle_get_status),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_network_monitor_method_marshal_get_status,
    G_TYPE_BOOLEAN,
    1,
    G_TYPE_DBUS_METHOD_INVOCATION);

  /**
   * XdpDbusNetworkMonitor::handle-can-reach:
   * @object: A #XdpDbusNetworkMonitor.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_hostname: Argument passed by remote caller.
   * @arg_port: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-portal-NetworkMonitor.CanReach">CanReach()</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_dbus_network_monitor_complete_can_reach() 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-can-reach",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpDbusNetworkMonitorIface, handle_can_reach),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_network_monitor_method_marshal_can_reach,
    G_TYPE_BOOLEAN,
    3,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_UINT);

  /* GObject signals for received D-Bus signals: */
  /**
   * XdpDbusNetworkMonitor::changed:
   * @object: A #XdpDbusNetworkMonitor.
   *
   * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-freedesktop-portal-NetworkMonitor.changed">"changed"</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_DBUS__NETWORK_MONITOR_SIGNALS[XDP_DBUS__NETWORK_MONITOR_CHANGED] =
    g_signal_new ("changed",
      G_TYPE_FROM_INTERFACE (iface),
      G_SIGNAL_RUN_LAST,
      G_STRUCT_OFFSET (XdpDbusNetworkMonitorIface, changed),
      NULL,
      NULL,
      xdp_dbus_network_monitor_signal_marshal_changed,
      G_TYPE_NONE,
      0);

  /* GObject properties for D-Bus properties: */
  /**
   * XdpDbusNetworkMonitor:version:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-portal-NetworkMonitor.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_dbus_network_monitor_get_version: (skip)
 * @object: A #XdpDbusNetworkMonitor.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-portal-NetworkMonitor.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_dbus_network_monitor_get_version (XdpDbusNetworkMonitor *object)
{
  g_return_val_if_fail (XDP_DBUS_IS_NETWORK_MONITOR (object), 0);

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

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

/**
 * xdp_dbus_network_monitor_emit_changed:
 * @object: A #XdpDbusNetworkMonitor.
 *
 * Emits the <link linkend="gdbus-signal-org-freedesktop-portal-NetworkMonitor.changed">"changed"</link> D-Bus signal.
 */
void
xdp_dbus_network_monitor_emit_changed (
    XdpDbusNetworkMonitor *object)
{
  g_signal_emit (object, XDP_DBUS__NETWORK_MONITOR_SIGNALS[XDP_DBUS__NETWORK_MONITOR_CHANGED], 0);
}

/**
 * xdp_dbus_network_monitor_call_get_available:
 * @proxy: A #XdpDbusNetworkMonitorProxy.
 * @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-portal-NetworkMonitor.GetAvailable">GetAvailable()</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_dbus_network_monitor_call_get_available_finish() to get the result of the operation.
 *
 * See xdp_dbus_network_monitor_call_get_available_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_network_monitor_call_get_available (
    XdpDbusNetworkMonitor *proxy,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "GetAvailable",
    g_variant_new ("()"),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_network_monitor_call_get_available_finish:
 * @proxy: A #XdpDbusNetworkMonitorProxy.
 * @out_available: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_network_monitor_call_get_available().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_network_monitor_call_get_available().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_network_monitor_call_get_available_finish (
    XdpDbusNetworkMonitor *proxy,
    gboolean* out_available,
    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_available);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_network_monitor_call_get_available_sync:
 * @proxy: A #XdpDbusNetworkMonitorProxy.
 * @out_available: (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-portal-NetworkMonitor.GetAvailable">GetAvailable()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_network_monitor_call_get_available() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_network_monitor_call_get_available_sync (
    XdpDbusNetworkMonitor *proxy,
    gboolean* out_available,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "GetAvailable",
    g_variant_new ("()"),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(b)",
                 out_available);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_network_monitor_call_get_metered:
 * @proxy: A #XdpDbusNetworkMonitorProxy.
 * @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-portal-NetworkMonitor.GetMetered">GetMetered()</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_dbus_network_monitor_call_get_metered_finish() to get the result of the operation.
 *
 * See xdp_dbus_network_monitor_call_get_metered_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_network_monitor_call_get_metered (
    XdpDbusNetworkMonitor *proxy,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "GetMetered",
    g_variant_new ("()"),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_network_monitor_call_get_metered_finish:
 * @proxy: A #XdpDbusNetworkMonitorProxy.
 * @out_metered: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_network_monitor_call_get_metered().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_network_monitor_call_get_metered().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_network_monitor_call_get_metered_finish (
    XdpDbusNetworkMonitor *proxy,
    gboolean* out_metered,
    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_metered);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_network_monitor_call_get_metered_sync:
 * @proxy: A #XdpDbusNetworkMonitorProxy.
 * @out_metered: (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-portal-NetworkMonitor.GetMetered">GetMetered()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_network_monitor_call_get_metered() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_network_monitor_call_get_metered_sync (
    XdpDbusNetworkMonitor *proxy,
    gboolean* out_metered,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "GetMetered",
    g_variant_new ("()"),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(b)",
                 out_metered);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_network_monitor_call_get_connectivity:
 * @proxy: A #XdpDbusNetworkMonitorProxy.
 * @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-portal-NetworkMonitor.GetConnectivity">GetConnectivity()</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_dbus_network_monitor_call_get_connectivity_finish() to get the result of the operation.
 *
 * See xdp_dbus_network_monitor_call_get_connectivity_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_network_monitor_call_get_connectivity (
    XdpDbusNetworkMonitor *proxy,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "GetConnectivity",
    g_variant_new ("()"),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_network_monitor_call_get_connectivity_finish:
 * @proxy: A #XdpDbusNetworkMonitorProxy.
 * @out_connectivity: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_network_monitor_call_get_connectivity().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_network_monitor_call_get_connectivity().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_network_monitor_call_get_connectivity_finish (
    XdpDbusNetworkMonitor *proxy,
    guint* out_connectivity,
    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_connectivity);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_network_monitor_call_get_connectivity_sync:
 * @proxy: A #XdpDbusNetworkMonitorProxy.
 * @out_connectivity: (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-portal-NetworkMonitor.GetConnectivity">GetConnectivity()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_network_monitor_call_get_connectivity() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_network_monitor_call_get_connectivity_sync (
    XdpDbusNetworkMonitor *proxy,
    guint* out_connectivity,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "GetConnectivity",
    g_variant_new ("()"),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(u)",
                 out_connectivity);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_network_monitor_call_get_status:
 * @proxy: A #XdpDbusNetworkMonitorProxy.
 * @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-portal-NetworkMonitor.GetStatus">GetStatus()</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_dbus_network_monitor_call_get_status_finish() to get the result of the operation.
 *
 * See xdp_dbus_network_monitor_call_get_status_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_network_monitor_call_get_status (
    XdpDbusNetworkMonitor *proxy,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "GetStatus",
    g_variant_new ("()"),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_network_monitor_call_get_status_finish:
 * @proxy: A #XdpDbusNetworkMonitorProxy.
 * @out_status: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_network_monitor_call_get_status().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_network_monitor_call_get_status().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_network_monitor_call_get_status_finish (
    XdpDbusNetworkMonitor *proxy,
    GVariant ** out_status,
    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_status);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_network_monitor_call_get_status_sync:
 * @proxy: A #XdpDbusNetworkMonitorProxy.
 * @out_status: (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-portal-NetworkMonitor.GetStatus">GetStatus()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_network_monitor_call_get_status() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_network_monitor_call_get_status_sync (
    XdpDbusNetworkMonitor *proxy,
    GVariant ** out_status,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "GetStatus",
    g_variant_new ("()"),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(@a{sv})",
                 out_status);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_network_monitor_call_can_reach:
 * @proxy: A #XdpDbusNetworkMonitorProxy.
 * @arg_hostname: Argument to pass with the method invocation.
 * @arg_port: 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-portal-NetworkMonitor.CanReach">CanReach()</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_dbus_network_monitor_call_can_reach_finish() to get the result of the operation.
 *
 * See xdp_dbus_network_monitor_call_can_reach_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_network_monitor_call_can_reach (
    XdpDbusNetworkMonitor *proxy,
    const gchar *arg_hostname,
    guint arg_port,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "CanReach",
    g_variant_new ("(su)",
                   arg_hostname,
                   arg_port),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_network_monitor_call_can_reach_finish:
 * @proxy: A #XdpDbusNetworkMonitorProxy.
 * @out_reachable: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_network_monitor_call_can_reach().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_network_monitor_call_can_reach().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_network_monitor_call_can_reach_finish (
    XdpDbusNetworkMonitor *proxy,
    gboolean* out_reachable,
    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_reachable);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_network_monitor_call_can_reach_sync:
 * @proxy: A #XdpDbusNetworkMonitorProxy.
 * @arg_hostname: Argument to pass with the method invocation.
 * @arg_port: Argument to pass with the method invocation.
 * @out_reachable: (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-portal-NetworkMonitor.CanReach">CanReach()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_network_monitor_call_can_reach() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_network_monitor_call_can_reach_sync (
    XdpDbusNetworkMonitor *proxy,
    const gchar *arg_hostname,
    guint arg_port,
    gboolean* out_reachable,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "CanReach",
    g_variant_new ("(su)",
                   arg_hostname,
                   arg_port),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(b)",
                 out_reachable);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

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

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

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

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

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

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

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

/**
 * XdpDbusNetworkMonitorProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpDbusNetworkMonitorProxy.
 */

struct _XdpDbusNetworkMonitorProxyPrivate
{
  GData *qdata;
};

static void xdp_dbus_network_monitor_proxy_iface_init (XdpDbusNetworkMonitorIface *iface);

#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpDbusNetworkMonitorProxy, xdp_dbus_network_monitor_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (XdpDbusNetworkMonitorProxy)
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_NETWORK_MONITOR, xdp_dbus_network_monitor_proxy_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpDbusNetworkMonitorProxy, xdp_dbus_network_monitor_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_NETWORK_MONITOR, xdp_dbus_network_monitor_proxy_iface_init))

#endif
static void
xdp_dbus_network_monitor_proxy_finalize (GObject *object)
{
  XdpDbusNetworkMonitorProxy *proxy = XDP_DBUS_NETWORK_MONITOR_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (xdp_dbus_network_monitor_proxy_parent_class)->finalize (object);
}

static void
xdp_dbus_network_monitor_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_dbus_network_monitor_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_dbus_network_monitor_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.portal.NetworkMonitor: %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_dbus_network_monitor_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_dbus_network_monitor_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.portal.NetworkMonitor", info->parent_struct.name, variant),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    NULL, (GAsyncReadyCallback) xdp_dbus_network_monitor_proxy_set_property_cb, (GDBusPropertyInfo *) &info->parent_struct);
  g_variant_unref (variant);
}

static void
xdp_dbus_network_monitor_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_dbus_network_monitor_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_DBUS_TYPE_NETWORK_MONITOR);
  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_DBUS_TYPE_NETWORK_MONITOR);
  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_dbus_network_monitor_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  XdpDbusNetworkMonitorProxy *proxy = XDP_DBUS_NETWORK_MONITOR_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_dbus_network_monitor_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_dbus_network_monitor_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_dbus_network_monitor_proxy_get_version (XdpDbusNetworkMonitor *object)
{
  XdpDbusNetworkMonitorProxy *proxy = XDP_DBUS_NETWORK_MONITOR_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_dbus_network_monitor_proxy_init (XdpDbusNetworkMonitorProxy *proxy)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  proxy->priv = xdp_dbus_network_monitor_proxy_get_instance_private (proxy);
#else
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, XDP_DBUS_TYPE_NETWORK_MONITOR_PROXY, XdpDbusNetworkMonitorProxyPrivate);
#endif

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

static void
xdp_dbus_network_monitor_proxy_class_init (XdpDbusNetworkMonitorProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = xdp_dbus_network_monitor_proxy_finalize;
  gobject_class->get_property = xdp_dbus_network_monitor_proxy_get_property;
  gobject_class->set_property = xdp_dbus_network_monitor_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = xdp_dbus_network_monitor_proxy_g_signal;
  proxy_class->g_properties_changed = xdp_dbus_network_monitor_proxy_g_properties_changed;

  xdp_dbus_network_monitor_override_properties (gobject_class, 1);

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

static void
xdp_dbus_network_monitor_proxy_iface_init (XdpDbusNetworkMonitorIface *iface)
{
  iface->get_version = xdp_dbus_network_monitor_proxy_get_version;
}

/**
 * xdp_dbus_network_monitor_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-portal-NetworkMonitor.top_of_page">org.freedesktop.portal.NetworkMonitor</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_dbus_network_monitor_proxy_new_finish() to get the result of the operation.
 *
 * See xdp_dbus_network_monitor_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_dbus_network_monitor_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_DBUS_TYPE_NETWORK_MONITOR_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.portal.NetworkMonitor", NULL);
}

/**
 * xdp_dbus_network_monitor_proxy_new_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_network_monitor_proxy_new().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_dbus_network_monitor_proxy_new().
 *
 * Returns: (transfer full) (type XdpDbusNetworkMonitorProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusNetworkMonitor *
xdp_dbus_network_monitor_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_DBUS_NETWORK_MONITOR (ret);
  else
    return NULL;
}

/**
 * xdp_dbus_network_monitor_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-portal-NetworkMonitor.top_of_page">org.freedesktop.portal.NetworkMonitor</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_network_monitor_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpDbusNetworkMonitorProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusNetworkMonitor *
xdp_dbus_network_monitor_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_DBUS_TYPE_NETWORK_MONITOR_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.portal.NetworkMonitor", NULL);
  if (ret != NULL)
    return XDP_DBUS_NETWORK_MONITOR (ret);
  else
    return NULL;
}


/**
 * xdp_dbus_network_monitor_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_dbus_network_monitor_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_dbus_network_monitor_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See xdp_dbus_network_monitor_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_dbus_network_monitor_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_DBUS_TYPE_NETWORK_MONITOR_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.portal.NetworkMonitor", NULL);
}

/**
 * xdp_dbus_network_monitor_proxy_new_for_bus_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_network_monitor_proxy_new_for_bus().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_dbus_network_monitor_proxy_new_for_bus().
 *
 * Returns: (transfer full) (type XdpDbusNetworkMonitorProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusNetworkMonitor *
xdp_dbus_network_monitor_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_DBUS_NETWORK_MONITOR (ret);
  else
    return NULL;
}

/**
 * xdp_dbus_network_monitor_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_dbus_network_monitor_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_network_monitor_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpDbusNetworkMonitorProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusNetworkMonitor *
xdp_dbus_network_monitor_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_DBUS_TYPE_NETWORK_MONITOR_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.portal.NetworkMonitor", NULL);
  if (ret != NULL)
    return XDP_DBUS_NETWORK_MONITOR (ret);
  else
    return NULL;
}


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

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

/**
 * XdpDbusNetworkMonitorSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpDbusNetworkMonitorSkeleton.
 */

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

static void
_xdp_dbus_network_monitor_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)
{
  XdpDbusNetworkMonitorSkeleton *skeleton = XDP_DBUS_NETWORK_MONITOR_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_DBUS_TYPE_NETWORK_MONITOR);
  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_DBUS_TYPE_NETWORK_MONITOR);
  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_dbus_network_monitor_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)
{
  XdpDbusNetworkMonitorSkeleton *skeleton = XDP_DBUS_NETWORK_MONITOR_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_dbus_network_monitor_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_dbus_network_monitor_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)
{
  XdpDbusNetworkMonitorSkeleton *skeleton = XDP_DBUS_NETWORK_MONITOR_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_dbus_network_monitor_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_dbus_network_monitor_skeleton_vtable =
{
  _xdp_dbus_network_monitor_skeleton_handle_method_call,
  _xdp_dbus_network_monitor_skeleton_handle_get_property,
  _xdp_dbus_network_monitor_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
xdp_dbus_network_monitor_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return xdp_dbus_network_monitor_interface_info ();
}

static GDBusInterfaceVTable *
xdp_dbus_network_monitor_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_xdp_dbus_network_monitor_skeleton_vtable;
}

static GVariant *
xdp_dbus_network_monitor_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  XdpDbusNetworkMonitorSkeleton *skeleton = XDP_DBUS_NETWORK_MONITOR_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_dbus_network_monitor_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _xdp_dbus_network_monitor_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _xdp_dbus_network_monitor_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _xdp_dbus_network_monitor_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.portal.NetworkMonitor", 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_dbus_network_monitor_emit_changed (gpointer user_data);

static void
xdp_dbus_network_monitor_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
{
  XdpDbusNetworkMonitorSkeleton *skeleton = XDP_DBUS_NETWORK_MONITOR_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_dbus_network_monitor_emit_changed (skeleton);
}

static void
_xdp_dbus_network_monitor_on_signal_changed (
    XdpDbusNetworkMonitor *object)
{
  XdpDbusNetworkMonitorSkeleton *skeleton = XDP_DBUS_NETWORK_MONITOR_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.portal.NetworkMonitor", "changed",
        signal_variant, NULL);
    }
  g_variant_unref (signal_variant);
  g_list_free_full (connections, g_object_unref);
}

static void xdp_dbus_network_monitor_skeleton_iface_init (XdpDbusNetworkMonitorIface *iface);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpDbusNetworkMonitorSkeleton, xdp_dbus_network_monitor_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (XdpDbusNetworkMonitorSkeleton)
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_NETWORK_MONITOR, xdp_dbus_network_monitor_skeleton_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpDbusNetworkMonitorSkeleton, xdp_dbus_network_monitor_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_NETWORK_MONITOR, xdp_dbus_network_monitor_skeleton_iface_init))

#endif
static void
xdp_dbus_network_monitor_skeleton_finalize (GObject *object)
{
  XdpDbusNetworkMonitorSkeleton *skeleton = XDP_DBUS_NETWORK_MONITOR_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_dbus_network_monitor_skeleton_parent_class)->finalize (object);
}

static void
xdp_dbus_network_monitor_skeleton_get_property (GObject      *object,
  guint         prop_id,
  GValue       *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  XdpDbusNetworkMonitorSkeleton *skeleton = XDP_DBUS_NETWORK_MONITOR_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_dbus_network_monitor_emit_changed (gpointer user_data)
{
  XdpDbusNetworkMonitorSkeleton *skeleton = XDP_DBUS_NETWORK_MONITOR_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.portal.NetworkMonitor",
                                           &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_dbus_network_monitor_schedule_emit_changed (XdpDbusNetworkMonitorSkeleton *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_dbus_network_monitor_skeleton_notify (GObject      *object,
  GParamSpec *pspec G_GNUC_UNUSED)
{
  XdpDbusNetworkMonitorSkeleton *skeleton = XDP_DBUS_NETWORK_MONITOR_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_dbus_network_monitor_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
      g_source_set_name (skeleton->priv->changed_properties_idle_source, "[generated] _xdp_dbus_network_monitor_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_dbus_network_monitor_skeleton_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec)
{
  const _ExtendedGDBusPropertyInfo *info;
  XdpDbusNetworkMonitorSkeleton *skeleton = XDP_DBUS_NETWORK_MONITOR_SKELETON (object);
  g_assert (prop_id != 0 && prop_id - 1 < 1);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_dbus_network_monitor_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_dbus_network_monitor_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_dbus_network_monitor_skeleton_init (XdpDbusNetworkMonitorSkeleton *skeleton)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  skeleton->priv = xdp_dbus_network_monitor_skeleton_get_instance_private (skeleton);
#else
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, XDP_DBUS_TYPE_NETWORK_MONITOR_SKELETON, XdpDbusNetworkMonitorSkeletonPrivate);
#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_dbus_network_monitor_skeleton_get_version (XdpDbusNetworkMonitor *object)
{
  XdpDbusNetworkMonitorSkeleton *skeleton = XDP_DBUS_NETWORK_MONITOR_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_dbus_network_monitor_skeleton_class_init (XdpDbusNetworkMonitorSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize = xdp_dbus_network_monitor_skeleton_finalize;
  gobject_class->get_property = xdp_dbus_network_monitor_skeleton_get_property;
  gobject_class->set_property = xdp_dbus_network_monitor_skeleton_set_property;
  gobject_class->notify       = xdp_dbus_network_monitor_skeleton_notify;


  xdp_dbus_network_monitor_override_properties (gobject_class, 1);

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = xdp_dbus_network_monitor_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = xdp_dbus_network_monitor_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = xdp_dbus_network_monitor_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = xdp_dbus_network_monitor_skeleton_dbus_interface_get_vtable;

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

static void
xdp_dbus_network_monitor_skeleton_iface_init (XdpDbusNetworkMonitorIface *iface)
{
  iface->changed = _xdp_dbus_network_monitor_on_signal_changed;
  iface->get_version = xdp_dbus_network_monitor_skeleton_get_version;
}

/**
 * xdp_dbus_network_monitor_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-NetworkMonitor.top_of_page">org.freedesktop.portal.NetworkMonitor</link>.
 *
 * Returns: (transfer full) (type XdpDbusNetworkMonitorSkeleton): The skeleton object.
 */
XdpDbusNetworkMonitor *
xdp_dbus_network_monitor_skeleton_new (void)
{
  return XDP_DBUS_NETWORK_MONITOR (g_object_new (XDP_DBUS_TYPE_NETWORK_MONITOR_SKELETON, NULL));
}

/* ------------------------------------------------------------------------
 * Code for interface org.freedesktop.portal.Notification
 * ------------------------------------------------------------------------
 */

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

enum
{
  XDP_DBUS__NOTIFICATION_ACTION_INVOKED,
};

static unsigned XDP_DBUS__NOTIFICATION_SIGNALS[1] = { 0 };

/* ---- Introspection data for org.freedesktop.portal.Notification ---- */

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

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

static const GDBusArgInfo * const _xdp_dbus_notification_method_info_add_notification_IN_ARG_pointers[] =
{
  &_xdp_dbus_notification_method_info_add_notification_IN_ARG_id.parent_struct,
  &_xdp_dbus_notification_method_info_add_notification_IN_ARG_notification.parent_struct,
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_notification_method_add_notification_annotation_info_pointers[] =
{
  &_xdp_dbus_notification_method_add_notification_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_notification_method_info_add_notification =
{
  {
    -1,
    (gchar *) "AddNotification",
    (GDBusArgInfo **) &_xdp_dbus_notification_method_info_add_notification_IN_ARG_pointers,
    NULL,
    (GDBusAnnotationInfo **) &_xdp_dbus_notification_method_add_notification_annotation_info_pointers
  },
  "handle-add-notification",
  TRUE
};

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

static const GDBusArgInfo * const _xdp_dbus_notification_method_info_remove_notification_IN_ARG_pointers[] =
{
  &_xdp_dbus_notification_method_info_remove_notification_IN_ARG_id.parent_struct,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_notification_method_info_remove_notification =
{
  {
    -1,
    (gchar *) "RemoveNotification",
    (GDBusArgInfo **) &_xdp_dbus_notification_method_info_remove_notification_IN_ARG_pointers,
    NULL,
    NULL
  },
  "handle-remove-notification",
  FALSE
};

static const GDBusMethodInfo * const _xdp_dbus_notification_method_info_pointers[] =
{
  &_xdp_dbus_notification_method_info_add_notification.parent_struct,
  &_xdp_dbus_notification_method_info_remove_notification.parent_struct,
  NULL
};

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

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

static const _ExtendedGDBusArgInfo _xdp_dbus_notification_signal_info_action_invoked_ARG_parameter =
{
  {
    -1,
    (gchar *) "parameter",
    (gchar *) "av",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_dbus_notification_signal_info_action_invoked_ARG_pointers[] =
{
  &_xdp_dbus_notification_signal_info_action_invoked_ARG_id.parent_struct,
  &_xdp_dbus_notification_signal_info_action_invoked_ARG_action.parent_struct,
  &_xdp_dbus_notification_signal_info_action_invoked_ARG_parameter.parent_struct,
  NULL
};

static const _ExtendedGDBusSignalInfo _xdp_dbus_notification_signal_info_action_invoked =
{
  {
    -1,
    (gchar *) "ActionInvoked",
    (GDBusArgInfo **) &_xdp_dbus_notification_signal_info_action_invoked_ARG_pointers,
    NULL
  },
  "action-invoked"
};

static const GDBusSignalInfo * const _xdp_dbus_notification_signal_info_pointers[] =
{
  &_xdp_dbus_notification_signal_info_action_invoked.parent_struct,
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_notification_property_supported_options_annotation_info_pointers[] =
{
  &_xdp_dbus_notification_property_supported_options_annotation_info_0,
  NULL
};

static const _ExtendedGDBusPropertyInfo _xdp_dbus_notification_property_info_supported_options =
{
  {
    -1,
    (gchar *) "SupportedOptions",
    (gchar *) "a{sv}",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    (GDBusAnnotationInfo **) &_xdp_dbus_notification_property_supported_options_annotation_info_pointers
  },
  "supported-options",
  FALSE,
  TRUE
};

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

static const GDBusPropertyInfo * const _xdp_dbus_notification_property_info_pointers[] =
{
  &_xdp_dbus_notification_property_info_supported_options.parent_struct,
  &_xdp_dbus_notification_property_info_version.parent_struct,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _xdp_dbus_notification_interface_info =
{
  {
    -1,
    (gchar *) "org.freedesktop.portal.Notification",
    (GDBusMethodInfo **) &_xdp_dbus_notification_method_info_pointers,
    (GDBusSignalInfo **) &_xdp_dbus_notification_signal_info_pointers,
    (GDBusPropertyInfo **) &_xdp_dbus_notification_property_info_pointers,
    NULL
  },
  "notification",
};


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

/**
 * xdp_dbus_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 #XdpDbusNotification interface for a concrete class.
 * The properties are overridden in the order they are defined.
 *
 * Returns: The last property id.
 */
guint
xdp_dbus_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_dbus_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_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_dbus_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_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_dbus_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 (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}


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

/**
 * XdpDbusNotificationIface:
 * @parent_iface: The parent interface.
 * @handle_add_notification: Handler for the #XdpDbusNotification::handle-add-notification signal.
 * @handle_remove_notification: Handler for the #XdpDbusNotification::handle-remove-notification signal.
 * @get_supported_options: Getter for the #XdpDbusNotification:supported-options property.
 * @get_version: Getter for the #XdpDbusNotification:version property.
 * @action_invoked: Handler for the #XdpDbusNotification::action-invoked signal.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-Notification.top_of_page">org.freedesktop.portal.Notification</link>.
 */

typedef XdpDbusNotificationIface XdpDbusNotificationInterface;
G_DEFINE_INTERFACE (XdpDbusNotification, xdp_dbus_notification, G_TYPE_OBJECT)

static void
xdp_dbus_notification_default_init (XdpDbusNotificationIface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * XdpDbusNotification::handle-add-notification:
   * @object: A #XdpDbusNotification.
   * @invocation: A #GDBusMethodInvocation.
   * @fd_list: (nullable): A #GUnixFDList or %NULL.
   * @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-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_dbus_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 (XdpDbusNotificationIface, handle_add_notification),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_notification_method_marshal_add_notification,
    G_TYPE_BOOLEAN,
    4,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UNIX_FD_LIST, G_TYPE_STRING, G_TYPE_VARIANT);

  /**
   * XdpDbusNotification::handle-remove-notification:
   * @object: A #XdpDbusNotification.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_id: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-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_dbus_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 (XdpDbusNotificationIface, handle_remove_notification),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_notification_method_marshal_remove_notification,
    G_TYPE_BOOLEAN,
    2,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING);

  /* GObject signals for received D-Bus signals: */
  /**
   * XdpDbusNotification::action-invoked:
   * @object: A #XdpDbusNotification.
   * @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-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_DBUS__NOTIFICATION_SIGNALS[XDP_DBUS__NOTIFICATION_ACTION_INVOKED] =
    g_signal_new ("action-invoked",
      G_TYPE_FROM_INTERFACE (iface),
      G_SIGNAL_RUN_LAST,
      G_STRUCT_OFFSET (XdpDbusNotificationIface, action_invoked),
      NULL,
      NULL,
      xdp_dbus_notification_signal_marshal_action_invoked,
      G_TYPE_NONE,
      3, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_VARIANT);

  /* GObject properties for D-Bus properties: */
  /**
   * XdpDbusNotification:supported-options:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-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));
  /**
   * XdpDbusNotification:version:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-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_dbus_notification_get_supported_options: (skip)
 * @object: A #XdpDbusNotification.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-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_dbus_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_dbus_notification_get_supported_options (XdpDbusNotification *object)
{
  g_return_val_if_fail (XDP_DBUS_IS_NOTIFICATION (object), NULL);

  return XDP_DBUS_NOTIFICATION_GET_IFACE (object)->get_supported_options (object);
}

/**
 * xdp_dbus_notification_dup_supported_options: (skip)
 * @object: A #XdpDbusNotification.
 *
 * Gets a copy of the <link linkend="gdbus-property-org-freedesktop-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_dbus_notification_dup_supported_options (XdpDbusNotification *object)
{
  GVariant *value;
  g_object_get (G_OBJECT (object), "supported-options", &value, NULL);
  return value;
}

/**
 * xdp_dbus_notification_set_supported_options: (skip)
 * @object: A #XdpDbusNotification.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-freedesktop-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_dbus_notification_set_supported_options (XdpDbusNotification *object, GVariant *value)
{
  g_object_set (G_OBJECT (object), "supported-options", value, NULL);
}

/**
 * xdp_dbus_notification_get_version: (skip)
 * @object: A #XdpDbusNotification.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-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_dbus_notification_get_version (XdpDbusNotification *object)
{
  g_return_val_if_fail (XDP_DBUS_IS_NOTIFICATION (object), 0);

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

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

/**
 * xdp_dbus_notification_emit_action_invoked:
 * @object: A #XdpDbusNotification.
 * @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-portal-Notification.ActionInvoked">"ActionInvoked"</link> D-Bus signal.
 */
void
xdp_dbus_notification_emit_action_invoked (
    XdpDbusNotification *object,
    const gchar *arg_id,
    const gchar *arg_action,
    GVariant *arg_parameter)
{
  g_signal_emit (object, XDP_DBUS__NOTIFICATION_SIGNALS[XDP_DBUS__NOTIFICATION_ACTION_INVOKED], 0, arg_id, arg_action, arg_parameter);
}

/**
 * xdp_dbus_notification_call_add_notification:
 * @proxy: A #XdpDbusNotificationProxy.
 * @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-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_dbus_notification_call_add_notification_finish() to get the result of the operation.
 *
 * See xdp_dbus_notification_call_add_notification_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_notification_call_add_notification (
    XdpDbusNotification *proxy,
    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 ("(s@a{sv})",
                   arg_id,
                   arg_notification),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    fd_list,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_notification_call_add_notification_finish:
 * @proxy: A #XdpDbusNotificationProxy.
 * @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_dbus_notification_call_add_notification().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_notification_call_add_notification().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_notification_call_add_notification_finish (
    XdpDbusNotification *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_dbus_notification_call_add_notification_sync:
 * @proxy: A #XdpDbusNotificationProxy.
 * @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-portal-Notification.AddNotification">AddNotification()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_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_dbus_notification_call_add_notification_sync (
    XdpDbusNotification *proxy,
    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 ("(s@a{sv})",
                   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_dbus_notification_call_remove_notification:
 * @proxy: A #XdpDbusNotificationProxy.
 * @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-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_dbus_notification_call_remove_notification_finish() to get the result of the operation.
 *
 * See xdp_dbus_notification_call_remove_notification_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_notification_call_remove_notification (
    XdpDbusNotification *proxy,
    const gchar *arg_id,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "RemoveNotification",
    g_variant_new ("(s)",
                   arg_id),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_notification_call_remove_notification_finish:
 * @proxy: A #XdpDbusNotificationProxy.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_notification_call_remove_notification().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_notification_call_remove_notification().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_notification_call_remove_notification_finish (
    XdpDbusNotification *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_dbus_notification_call_remove_notification_sync:
 * @proxy: A #XdpDbusNotificationProxy.
 * @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-portal-Notification.RemoveNotification">RemoveNotification()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_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_dbus_notification_call_remove_notification_sync (
    XdpDbusNotification *proxy,
    const gchar *arg_id,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "RemoveNotification",
    g_variant_new ("(s)",
                   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_dbus_notification_complete_add_notification:
 * @object: A #XdpDbusNotification.
 * @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-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_dbus_notification_complete_add_notification (
    XdpDbusNotification *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_dbus_notification_complete_remove_notification:
 * @object: A #XdpDbusNotification.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-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_dbus_notification_complete_remove_notification (
    XdpDbusNotification *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("()"));
}

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

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

/**
 * XdpDbusNotificationProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpDbusNotificationProxy.
 */

struct _XdpDbusNotificationProxyPrivate
{
  GData *qdata;
};

static void xdp_dbus_notification_proxy_iface_init (XdpDbusNotificationIface *iface);

#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpDbusNotificationProxy, xdp_dbus_notification_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (XdpDbusNotificationProxy)
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_NOTIFICATION, xdp_dbus_notification_proxy_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpDbusNotificationProxy, xdp_dbus_notification_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_NOTIFICATION, xdp_dbus_notification_proxy_iface_init))

#endif
static void
xdp_dbus_notification_proxy_finalize (GObject *object)
{
  XdpDbusNotificationProxy *proxy = XDP_DBUS_NOTIFICATION_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (xdp_dbus_notification_proxy_parent_class)->finalize (object);
}

static void
xdp_dbus_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_dbus_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_dbus_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.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_dbus_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_dbus_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.portal.Notification", info->parent_struct.name, variant),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    NULL, (GAsyncReadyCallback) xdp_dbus_notification_proxy_set_property_cb, (GDBusPropertyInfo *) &info->parent_struct);
  g_variant_unref (variant);
}

static void
xdp_dbus_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_dbus_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_DBUS_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_DBUS_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_dbus_notification_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  XdpDbusNotificationProxy *proxy = XDP_DBUS_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_dbus_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_dbus_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_dbus_notification_proxy_get_supported_options (XdpDbusNotification *object)
{
  XdpDbusNotificationProxy *proxy = XDP_DBUS_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_dbus_notification_proxy_get_version (XdpDbusNotification *object)
{
  XdpDbusNotificationProxy *proxy = XDP_DBUS_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_dbus_notification_proxy_init (XdpDbusNotificationProxy *proxy)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  proxy->priv = xdp_dbus_notification_proxy_get_instance_private (proxy);
#else
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, XDP_DBUS_TYPE_NOTIFICATION_PROXY, XdpDbusNotificationProxyPrivate);
#endif

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

static void
xdp_dbus_notification_proxy_class_init (XdpDbusNotificationProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = xdp_dbus_notification_proxy_finalize;
  gobject_class->get_property = xdp_dbus_notification_proxy_get_property;
  gobject_class->set_property = xdp_dbus_notification_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = xdp_dbus_notification_proxy_g_signal;
  proxy_class->g_properties_changed = xdp_dbus_notification_proxy_g_properties_changed;

  xdp_dbus_notification_override_properties (gobject_class, 1);

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

static void
xdp_dbus_notification_proxy_iface_init (XdpDbusNotificationIface *iface)
{
  iface->get_supported_options = xdp_dbus_notification_proxy_get_supported_options;
  iface->get_version = xdp_dbus_notification_proxy_get_version;
}

/**
 * xdp_dbus_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-portal-Notification.top_of_page">org.freedesktop.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_dbus_notification_proxy_new_finish() to get the result of the operation.
 *
 * See xdp_dbus_notification_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_dbus_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_DBUS_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.portal.Notification", NULL);
}

/**
 * xdp_dbus_notification_proxy_new_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_notification_proxy_new().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_dbus_notification_proxy_new().
 *
 * Returns: (transfer full) (type XdpDbusNotificationProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusNotification *
xdp_dbus_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_DBUS_NOTIFICATION (ret);
  else
    return NULL;
}

/**
 * xdp_dbus_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-portal-Notification.top_of_page">org.freedesktop.portal.Notification</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_notification_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpDbusNotificationProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusNotification *
xdp_dbus_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_DBUS_TYPE_NOTIFICATION_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.portal.Notification", NULL);
  if (ret != NULL)
    return XDP_DBUS_NOTIFICATION (ret);
  else
    return NULL;
}


/**
 * xdp_dbus_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_dbus_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_dbus_notification_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See xdp_dbus_notification_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_dbus_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_DBUS_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.portal.Notification", NULL);
}

/**
 * xdp_dbus_notification_proxy_new_for_bus_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_notification_proxy_new_for_bus().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_dbus_notification_proxy_new_for_bus().
 *
 * Returns: (transfer full) (type XdpDbusNotificationProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusNotification *
xdp_dbus_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_DBUS_NOTIFICATION (ret);
  else
    return NULL;
}

/**
 * xdp_dbus_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_dbus_notification_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_notification_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpDbusNotificationProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusNotification *
xdp_dbus_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_DBUS_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.portal.Notification", NULL);
  if (ret != NULL)
    return XDP_DBUS_NOTIFICATION (ret);
  else
    return NULL;
}


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

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

/**
 * XdpDbusNotificationSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpDbusNotificationSkeleton.
 */

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

static void
_xdp_dbus_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)
{
  XdpDbusNotificationSkeleton *skeleton = XDP_DBUS_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_DBUS_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_DBUS_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_dbus_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)
{
  XdpDbusNotificationSkeleton *skeleton = XDP_DBUS_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_dbus_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_dbus_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)
{
  XdpDbusNotificationSkeleton *skeleton = XDP_DBUS_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_dbus_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_dbus_notification_skeleton_vtable =
{
  _xdp_dbus_notification_skeleton_handle_method_call,
  _xdp_dbus_notification_skeleton_handle_get_property,
  _xdp_dbus_notification_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
xdp_dbus_notification_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return xdp_dbus_notification_interface_info ();
}

static GDBusInterfaceVTable *
xdp_dbus_notification_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_xdp_dbus_notification_skeleton_vtable;
}

static GVariant *
xdp_dbus_notification_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  XdpDbusNotificationSkeleton *skeleton = XDP_DBUS_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_dbus_notification_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _xdp_dbus_notification_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _xdp_dbus_notification_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _xdp_dbus_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.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_dbus_notification_emit_changed (gpointer user_data);

static void
xdp_dbus_notification_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
{
  XdpDbusNotificationSkeleton *skeleton = XDP_DBUS_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_dbus_notification_emit_changed (skeleton);
}

static void
_xdp_dbus_notification_on_signal_action_invoked (
    XdpDbusNotification *object,
    const gchar *arg_id,
    const gchar *arg_action,
    GVariant *arg_parameter)
{
  XdpDbusNotificationSkeleton *skeleton = XDP_DBUS_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 ("(ss@av)",
                   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.portal.Notification", "ActionInvoked",
        signal_variant, NULL);
    }
  g_variant_unref (signal_variant);
  g_list_free_full (connections, g_object_unref);
}

static void xdp_dbus_notification_skeleton_iface_init (XdpDbusNotificationIface *iface);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpDbusNotificationSkeleton, xdp_dbus_notification_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (XdpDbusNotificationSkeleton)
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_NOTIFICATION, xdp_dbus_notification_skeleton_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpDbusNotificationSkeleton, xdp_dbus_notification_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_NOTIFICATION, xdp_dbus_notification_skeleton_iface_init))

#endif
static void
xdp_dbus_notification_skeleton_finalize (GObject *object)
{
  XdpDbusNotificationSkeleton *skeleton = XDP_DBUS_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_dbus_notification_skeleton_parent_class)->finalize (object);
}

static void
xdp_dbus_notification_skeleton_get_property (GObject      *object,
  guint         prop_id,
  GValue       *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  XdpDbusNotificationSkeleton *skeleton = XDP_DBUS_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_dbus_notification_emit_changed (gpointer user_data)
{
  XdpDbusNotificationSkeleton *skeleton = XDP_DBUS_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.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_dbus_notification_schedule_emit_changed (XdpDbusNotificationSkeleton *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_dbus_notification_skeleton_notify (GObject      *object,
  GParamSpec *pspec G_GNUC_UNUSED)
{
  XdpDbusNotificationSkeleton *skeleton = XDP_DBUS_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_dbus_notification_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
      g_source_set_name (skeleton->priv->changed_properties_idle_source, "[generated] _xdp_dbus_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_dbus_notification_skeleton_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec)
{
  const _ExtendedGDBusPropertyInfo *info;
  XdpDbusNotificationSkeleton *skeleton = XDP_DBUS_NOTIFICATION_SKELETON (object);
  g_assert (prop_id != 0 && prop_id - 1 < 2);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_dbus_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_dbus_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_dbus_notification_skeleton_init (XdpDbusNotificationSkeleton *skeleton)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  skeleton->priv = xdp_dbus_notification_skeleton_get_instance_private (skeleton);
#else
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, XDP_DBUS_TYPE_NOTIFICATION_SKELETON, XdpDbusNotificationSkeletonPrivate);
#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_dbus_notification_skeleton_get_supported_options (XdpDbusNotification *object)
{
  XdpDbusNotificationSkeleton *skeleton = XDP_DBUS_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_dbus_notification_skeleton_get_version (XdpDbusNotification *object)
{
  XdpDbusNotificationSkeleton *skeleton = XDP_DBUS_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_dbus_notification_skeleton_class_init (XdpDbusNotificationSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize = xdp_dbus_notification_skeleton_finalize;
  gobject_class->get_property = xdp_dbus_notification_skeleton_get_property;
  gobject_class->set_property = xdp_dbus_notification_skeleton_set_property;
  gobject_class->notify       = xdp_dbus_notification_skeleton_notify;


  xdp_dbus_notification_override_properties (gobject_class, 1);

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = xdp_dbus_notification_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = xdp_dbus_notification_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = xdp_dbus_notification_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = xdp_dbus_notification_skeleton_dbus_interface_get_vtable;

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

static void
xdp_dbus_notification_skeleton_iface_init (XdpDbusNotificationIface *iface)
{
  iface->action_invoked = _xdp_dbus_notification_on_signal_action_invoked;
  iface->get_supported_options = xdp_dbus_notification_skeleton_get_supported_options;
  iface->get_version = xdp_dbus_notification_skeleton_get_version;
}

/**
 * xdp_dbus_notification_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-Notification.top_of_page">org.freedesktop.portal.Notification</link>.
 *
 * Returns: (transfer full) (type XdpDbusNotificationSkeleton): The skeleton object.
 */
XdpDbusNotification *
xdp_dbus_notification_skeleton_new (void)
{
  return XDP_DBUS_NOTIFICATION (g_object_new (XDP_DBUS_TYPE_NOTIFICATION_SKELETON, NULL));
}

/* ------------------------------------------------------------------------
 * Code for interface org.freedesktop.portal.OpenURI
 * ------------------------------------------------------------------------
 */

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

/* ---- Introspection data for org.freedesktop.portal.OpenURI ---- */

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

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

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

static const GDBusArgInfo * const _xdp_dbus_open_uri_method_info_open_uri_IN_ARG_pointers[] =
{
  &_xdp_dbus_open_uri_method_info_open_uri_IN_ARG_parent_window.parent_struct,
  &_xdp_dbus_open_uri_method_info_open_uri_IN_ARG_uri.parent_struct,
  &_xdp_dbus_open_uri_method_info_open_uri_IN_ARG_options.parent_struct,
  NULL
};

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

static const GDBusArgInfo * const _xdp_dbus_open_uri_method_info_open_uri_OUT_ARG_pointers[] =
{
  &_xdp_dbus_open_uri_method_info_open_uri_OUT_ARG_handle.parent_struct,
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_open_uri_method_open_uri_annotation_info_pointers[] =
{
  &_xdp_dbus_open_uri_method_open_uri_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_open_uri_method_info_open_uri =
{
  {
    -1,
    (gchar *) "OpenURI",
    (GDBusArgInfo **) &_xdp_dbus_open_uri_method_info_open_uri_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_open_uri_method_info_open_uri_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_dbus_open_uri_method_open_uri_annotation_info_pointers
  },
  "handle-open-uri",
  FALSE
};

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

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

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

static const GDBusArgInfo * const _xdp_dbus_open_uri_method_info_open_file_IN_ARG_pointers[] =
{
  &_xdp_dbus_open_uri_method_info_open_file_IN_ARG_parent_window.parent_struct,
  &_xdp_dbus_open_uri_method_info_open_file_IN_ARG_fd.parent_struct,
  &_xdp_dbus_open_uri_method_info_open_file_IN_ARG_options.parent_struct,
  NULL
};

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

static const GDBusArgInfo * const _xdp_dbus_open_uri_method_info_open_file_OUT_ARG_pointers[] =
{
  &_xdp_dbus_open_uri_method_info_open_file_OUT_ARG_handle.parent_struct,
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_open_uri_method_open_file_annotation_info_pointers[] =
{
  &_xdp_dbus_open_uri_method_open_file_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_open_uri_method_info_open_file =
{
  {
    -1,
    (gchar *) "OpenFile",
    (GDBusArgInfo **) &_xdp_dbus_open_uri_method_info_open_file_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_open_uri_method_info_open_file_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_dbus_open_uri_method_open_file_annotation_info_pointers
  },
  "handle-open-file",
  TRUE
};

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

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

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

static const GDBusArgInfo * const _xdp_dbus_open_uri_method_info_open_directory_IN_ARG_pointers[] =
{
  &_xdp_dbus_open_uri_method_info_open_directory_IN_ARG_parent_window.parent_struct,
  &_xdp_dbus_open_uri_method_info_open_directory_IN_ARG_fd.parent_struct,
  &_xdp_dbus_open_uri_method_info_open_directory_IN_ARG_options.parent_struct,
  NULL
};

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

static const GDBusArgInfo * const _xdp_dbus_open_uri_method_info_open_directory_OUT_ARG_pointers[] =
{
  &_xdp_dbus_open_uri_method_info_open_directory_OUT_ARG_handle.parent_struct,
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_open_uri_method_open_directory_annotation_info_pointers[] =
{
  &_xdp_dbus_open_uri_method_open_directory_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_open_uri_method_info_open_directory =
{
  {
    -1,
    (gchar *) "OpenDirectory",
    (GDBusArgInfo **) &_xdp_dbus_open_uri_method_info_open_directory_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_open_uri_method_info_open_directory_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_dbus_open_uri_method_open_directory_annotation_info_pointers
  },
  "handle-open-directory",
  TRUE
};

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

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

static const GDBusArgInfo * const _xdp_dbus_open_uri_method_info_scheme_supported_IN_ARG_pointers[] =
{
  &_xdp_dbus_open_uri_method_info_scheme_supported_IN_ARG_scheme.parent_struct,
  &_xdp_dbus_open_uri_method_info_scheme_supported_IN_ARG_options.parent_struct,
  NULL
};

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

static const GDBusArgInfo * const _xdp_dbus_open_uri_method_info_scheme_supported_OUT_ARG_pointers[] =
{
  &_xdp_dbus_open_uri_method_info_scheme_supported_OUT_ARG_supported.parent_struct,
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_open_uri_method_scheme_supported_annotation_info_pointers[] =
{
  &_xdp_dbus_open_uri_method_scheme_supported_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_open_uri_method_info_scheme_supported =
{
  {
    -1,
    (gchar *) "SchemeSupported",
    (GDBusArgInfo **) &_xdp_dbus_open_uri_method_info_scheme_supported_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_open_uri_method_info_scheme_supported_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_dbus_open_uri_method_scheme_supported_annotation_info_pointers
  },
  "handle-scheme-supported",
  FALSE
};

static const GDBusMethodInfo * const _xdp_dbus_open_uri_method_info_pointers[] =
{
  &_xdp_dbus_open_uri_method_info_open_uri.parent_struct,
  &_xdp_dbus_open_uri_method_info_open_file.parent_struct,
  &_xdp_dbus_open_uri_method_info_open_directory.parent_struct,
  &_xdp_dbus_open_uri_method_info_scheme_supported.parent_struct,
  NULL
};

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

static const GDBusPropertyInfo * const _xdp_dbus_open_uri_property_info_pointers[] =
{
  &_xdp_dbus_open_uri_property_info_version.parent_struct,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _xdp_dbus_open_uri_interface_info =
{
  {
    -1,
    (gchar *) "org.freedesktop.portal.OpenURI",
    (GDBusMethodInfo **) &_xdp_dbus_open_uri_method_info_pointers,
    NULL,
    (GDBusPropertyInfo **) &_xdp_dbus_open_uri_property_info_pointers,
    NULL
  },
  "open-uri",
};


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

/**
 * xdp_dbus_open_uri_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 #XdpDbusOpenURI interface for a concrete class.
 * The properties are overridden in the order they are defined.
 *
 * Returns: The last property id.
 */
guint
xdp_dbus_open_uri_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_dbus_open_uri_method_marshal_open_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_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_dbus_open_uri_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_OBJECT_STRING_VARIANT_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_dbus_open_uri_method_marshal_open_directory (
    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_VARIANT_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_dbus_open_uri_method_marshal_scheme_supported (
    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);
}


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

/**
 * XdpDbusOpenURIIface:
 * @parent_iface: The parent interface.
 * @handle_open_directory: Handler for the #XdpDbusOpenURI::handle-open-directory signal.
 * @handle_open_file: Handler for the #XdpDbusOpenURI::handle-open-file signal.
 * @handle_open_uri: Handler for the #XdpDbusOpenURI::handle-open-uri signal.
 * @handle_scheme_supported: Handler for the #XdpDbusOpenURI::handle-scheme-supported signal.
 * @get_version: Getter for the #XdpDbusOpenURI:version property.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-OpenURI.top_of_page">org.freedesktop.portal.OpenURI</link>.
 */

typedef XdpDbusOpenURIIface XdpDbusOpenURIInterface;
G_DEFINE_INTERFACE (XdpDbusOpenURI, xdp_dbus_open_uri, G_TYPE_OBJECT)

static void
xdp_dbus_open_uri_default_init (XdpDbusOpenURIIface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * XdpDbusOpenURI::handle-open-uri:
   * @object: A #XdpDbusOpenURI.
   * @invocation: A #GDBusMethodInvocation.
   * @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-portal-OpenURI.OpenURI">OpenURI()</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_dbus_open_uri_complete_open_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-open-uri",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpDbusOpenURIIface, handle_open_uri),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_open_uri_method_marshal_open_uri,
    G_TYPE_BOOLEAN,
    4,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_VARIANT);

  /**
   * XdpDbusOpenURI::handle-open-file:
   * @object: A #XdpDbusOpenURI.
   * @invocation: A #GDBusMethodInvocation.
   * @fd_list: (nullable): A #GUnixFDList or %NULL.
   * @arg_parent_window: 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-portal-OpenURI.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_dbus_open_uri_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 (XdpDbusOpenURIIface, handle_open_file),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_open_uri_method_marshal_open_file,
    G_TYPE_BOOLEAN,
    5,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UNIX_FD_LIST, G_TYPE_STRING, G_TYPE_VARIANT, G_TYPE_VARIANT);

  /**
   * XdpDbusOpenURI::handle-open-directory:
   * @object: A #XdpDbusOpenURI.
   * @invocation: A #GDBusMethodInvocation.
   * @fd_list: (nullable): A #GUnixFDList or %NULL.
   * @arg_parent_window: 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-portal-OpenURI.OpenDirectory">OpenDirectory()</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_dbus_open_uri_complete_open_directory() 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-directory",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpDbusOpenURIIface, handle_open_directory),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_open_uri_method_marshal_open_directory,
    G_TYPE_BOOLEAN,
    5,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UNIX_FD_LIST, G_TYPE_STRING, G_TYPE_VARIANT, G_TYPE_VARIANT);

  /**
   * XdpDbusOpenURI::handle-scheme-supported:
   * @object: A #XdpDbusOpenURI.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_scheme: 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-portal-OpenURI.SchemeSupported">SchemeSupported()</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_dbus_open_uri_complete_scheme_supported() 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-scheme-supported",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpDbusOpenURIIface, handle_scheme_supported),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_open_uri_method_marshal_scheme_supported,
    G_TYPE_BOOLEAN,
    3,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_VARIANT);

  /* GObject properties for D-Bus properties: */
  /**
   * XdpDbusOpenURI:version:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-portal-OpenURI.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_dbus_open_uri_get_version: (skip)
 * @object: A #XdpDbusOpenURI.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-portal-OpenURI.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_dbus_open_uri_get_version (XdpDbusOpenURI *object)
{
  g_return_val_if_fail (XDP_DBUS_IS_OPEN_URI (object), 0);

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

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

/**
 * xdp_dbus_open_uri_call_open_uri:
 * @proxy: A #XdpDbusOpenURIProxy.
 * @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-portal-OpenURI.OpenURI">OpenURI()</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_dbus_open_uri_call_open_uri_finish() to get the result of the operation.
 *
 * See xdp_dbus_open_uri_call_open_uri_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_open_uri_call_open_uri (
    XdpDbusOpenURI *proxy,
    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),
    "OpenURI",
    g_variant_new ("(ss@a{sv})",
                   arg_parent_window,
                   arg_uri,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_open_uri_call_open_uri_finish:
 * @proxy: A #XdpDbusOpenURIProxy.
 * @out_handle: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_open_uri_call_open_uri().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_open_uri_call_open_uri().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_open_uri_call_open_uri_finish (
    XdpDbusOpenURI *proxy,
    gchar ** out_handle,
    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,
                 "(o)",
                 out_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_open_uri_call_open_uri_sync:
 * @proxy: A #XdpDbusOpenURIProxy.
 * @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_handle: (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-portal-OpenURI.OpenURI">OpenURI()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_open_uri_call_open_uri() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_open_uri_call_open_uri_sync (
    XdpDbusOpenURI *proxy,
    const gchar *arg_parent_window,
    const gchar *arg_uri,
    GVariant *arg_options,
    gchar ** out_handle,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "OpenURI",
    g_variant_new ("(ss@a{sv})",
                   arg_parent_window,
                   arg_uri,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(o)",
                 out_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_open_uri_call_open_file:
 * @proxy: A #XdpDbusOpenURIProxy.
 * @arg_parent_window: 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-portal-OpenURI.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_dbus_open_uri_call_open_file_finish() to get the result of the operation.
 *
 * See xdp_dbus_open_uri_call_open_file_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_open_uri_call_open_file (
    XdpDbusOpenURI *proxy,
    const gchar *arg_parent_window,
    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),
    "OpenFile",
    g_variant_new ("(s@h@a{sv})",
                   arg_parent_window,
                   arg_fd,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    fd_list,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_open_uri_call_open_file_finish:
 * @proxy: A #XdpDbusOpenURIProxy.
 * @out_handle: (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_dbus_open_uri_call_open_file().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_open_uri_call_open_file().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_open_uri_call_open_file_finish (
    XdpDbusOpenURI *proxy,
    gchar ** out_handle,
    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,
                 "(o)",
                 out_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_open_uri_call_open_file_sync:
 * @proxy: A #XdpDbusOpenURIProxy.
 * @arg_parent_window: 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_handle: (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-portal-OpenURI.OpenFile">OpenFile()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_open_uri_call_open_file() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_open_uri_call_open_file_sync (
    XdpDbusOpenURI *proxy,
    const gchar *arg_parent_window,
    GVariant *arg_fd,
    GVariant *arg_options,
    GUnixFDList  *fd_list,
    gchar ** out_handle,
    GUnixFDList **out_fd_list,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_with_unix_fd_list_sync (G_DBUS_PROXY (proxy),
    "OpenFile",
    g_variant_new ("(s@h@a{sv})",
                   arg_parent_window,
                   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,
                 "(o)",
                 out_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_open_uri_call_open_directory:
 * @proxy: A #XdpDbusOpenURIProxy.
 * @arg_parent_window: 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-portal-OpenURI.OpenDirectory">OpenDirectory()</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_dbus_open_uri_call_open_directory_finish() to get the result of the operation.
 *
 * See xdp_dbus_open_uri_call_open_directory_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_open_uri_call_open_directory (
    XdpDbusOpenURI *proxy,
    const gchar *arg_parent_window,
    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),
    "OpenDirectory",
    g_variant_new ("(s@h@a{sv})",
                   arg_parent_window,
                   arg_fd,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    fd_list,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_open_uri_call_open_directory_finish:
 * @proxy: A #XdpDbusOpenURIProxy.
 * @out_handle: (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_dbus_open_uri_call_open_directory().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_open_uri_call_open_directory().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_open_uri_call_open_directory_finish (
    XdpDbusOpenURI *proxy,
    gchar ** out_handle,
    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,
                 "(o)",
                 out_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_open_uri_call_open_directory_sync:
 * @proxy: A #XdpDbusOpenURIProxy.
 * @arg_parent_window: 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_handle: (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-portal-OpenURI.OpenDirectory">OpenDirectory()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_open_uri_call_open_directory() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_open_uri_call_open_directory_sync (
    XdpDbusOpenURI *proxy,
    const gchar *arg_parent_window,
    GVariant *arg_fd,
    GVariant *arg_options,
    GUnixFDList  *fd_list,
    gchar ** out_handle,
    GUnixFDList **out_fd_list,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_with_unix_fd_list_sync (G_DBUS_PROXY (proxy),
    "OpenDirectory",
    g_variant_new ("(s@h@a{sv})",
                   arg_parent_window,
                   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,
                 "(o)",
                 out_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_open_uri_call_scheme_supported:
 * @proxy: A #XdpDbusOpenURIProxy.
 * @arg_scheme: 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-portal-OpenURI.SchemeSupported">SchemeSupported()</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_dbus_open_uri_call_scheme_supported_finish() to get the result of the operation.
 *
 * See xdp_dbus_open_uri_call_scheme_supported_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_open_uri_call_scheme_supported (
    XdpDbusOpenURI *proxy,
    const gchar *arg_scheme,
    GVariant *arg_options,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "SchemeSupported",
    g_variant_new ("(s@a{sv})",
                   arg_scheme,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_open_uri_call_scheme_supported_finish:
 * @proxy: A #XdpDbusOpenURIProxy.
 * @out_supported: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_open_uri_call_scheme_supported().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_open_uri_call_scheme_supported().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_open_uri_call_scheme_supported_finish (
    XdpDbusOpenURI *proxy,
    gboolean* out_supported,
    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_supported);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_open_uri_call_scheme_supported_sync:
 * @proxy: A #XdpDbusOpenURIProxy.
 * @arg_scheme: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @out_supported: (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-portal-OpenURI.SchemeSupported">SchemeSupported()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_open_uri_call_scheme_supported() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_open_uri_call_scheme_supported_sync (
    XdpDbusOpenURI *proxy,
    const gchar *arg_scheme,
    GVariant *arg_options,
    gboolean* out_supported,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "SchemeSupported",
    g_variant_new ("(s@a{sv})",
                   arg_scheme,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(b)",
                 out_supported);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_open_uri_complete_open_uri:
 * @object: A #XdpDbusOpenURI.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @handle: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-portal-OpenURI.OpenURI">OpenURI()</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_dbus_open_uri_complete_open_uri (
    XdpDbusOpenURI *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    const gchar *handle)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(o)",
                   handle));
}

/**
 * xdp_dbus_open_uri_complete_open_file:
 * @object: A #XdpDbusOpenURI.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @fd_list: (nullable): A #GUnixFDList or %NULL.
 * @handle: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-portal-OpenURI.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_dbus_open_uri_complete_open_file (
    XdpDbusOpenURI *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    GUnixFDList *fd_list,
    const gchar *handle)
{
  g_dbus_method_invocation_return_value_with_unix_fd_list (invocation,
    g_variant_new ("(o)",
                   handle),
    fd_list);
}

/**
 * xdp_dbus_open_uri_complete_open_directory:
 * @object: A #XdpDbusOpenURI.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @fd_list: (nullable): A #GUnixFDList or %NULL.
 * @handle: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-portal-OpenURI.OpenDirectory">OpenDirectory()</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_dbus_open_uri_complete_open_directory (
    XdpDbusOpenURI *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    GUnixFDList *fd_list,
    const gchar *handle)
{
  g_dbus_method_invocation_return_value_with_unix_fd_list (invocation,
    g_variant_new ("(o)",
                   handle),
    fd_list);
}

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

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

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

/**
 * XdpDbusOpenURIProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpDbusOpenURIProxy.
 */

struct _XdpDbusOpenURIProxyPrivate
{
  GData *qdata;
};

static void xdp_dbus_open_uri_proxy_iface_init (XdpDbusOpenURIIface *iface);

#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpDbusOpenURIProxy, xdp_dbus_open_uri_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (XdpDbusOpenURIProxy)
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_OPEN_URI, xdp_dbus_open_uri_proxy_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpDbusOpenURIProxy, xdp_dbus_open_uri_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_OPEN_URI, xdp_dbus_open_uri_proxy_iface_init))

#endif
static void
xdp_dbus_open_uri_proxy_finalize (GObject *object)
{
  XdpDbusOpenURIProxy *proxy = XDP_DBUS_OPEN_URI_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (xdp_dbus_open_uri_proxy_parent_class)->finalize (object);
}

static void
xdp_dbus_open_uri_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_dbus_open_uri_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_dbus_open_uri_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.portal.OpenURI: %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_dbus_open_uri_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_dbus_open_uri_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.portal.OpenURI", info->parent_struct.name, variant),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    NULL, (GAsyncReadyCallback) xdp_dbus_open_uri_proxy_set_property_cb, (GDBusPropertyInfo *) &info->parent_struct);
  g_variant_unref (variant);
}

static void
xdp_dbus_open_uri_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_dbus_open_uri_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_DBUS_TYPE_OPEN_URI);
  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_DBUS_TYPE_OPEN_URI);
  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_dbus_open_uri_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  XdpDbusOpenURIProxy *proxy = XDP_DBUS_OPEN_URI_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_dbus_open_uri_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_dbus_open_uri_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_dbus_open_uri_proxy_get_version (XdpDbusOpenURI *object)
{
  XdpDbusOpenURIProxy *proxy = XDP_DBUS_OPEN_URI_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_dbus_open_uri_proxy_init (XdpDbusOpenURIProxy *proxy)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  proxy->priv = xdp_dbus_open_uri_proxy_get_instance_private (proxy);
#else
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, XDP_DBUS_TYPE_OPEN_URI_PROXY, XdpDbusOpenURIProxyPrivate);
#endif

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

static void
xdp_dbus_open_uri_proxy_class_init (XdpDbusOpenURIProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = xdp_dbus_open_uri_proxy_finalize;
  gobject_class->get_property = xdp_dbus_open_uri_proxy_get_property;
  gobject_class->set_property = xdp_dbus_open_uri_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = xdp_dbus_open_uri_proxy_g_signal;
  proxy_class->g_properties_changed = xdp_dbus_open_uri_proxy_g_properties_changed;

  xdp_dbus_open_uri_override_properties (gobject_class, 1);

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

static void
xdp_dbus_open_uri_proxy_iface_init (XdpDbusOpenURIIface *iface)
{
  iface->get_version = xdp_dbus_open_uri_proxy_get_version;
}

/**
 * xdp_dbus_open_uri_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-portal-OpenURI.top_of_page">org.freedesktop.portal.OpenURI</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_dbus_open_uri_proxy_new_finish() to get the result of the operation.
 *
 * See xdp_dbus_open_uri_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_dbus_open_uri_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_DBUS_TYPE_OPEN_URI_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.portal.OpenURI", NULL);
}

/**
 * xdp_dbus_open_uri_proxy_new_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_open_uri_proxy_new().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_dbus_open_uri_proxy_new().
 *
 * Returns: (transfer full) (type XdpDbusOpenURIProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusOpenURI *
xdp_dbus_open_uri_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_DBUS_OPEN_URI (ret);
  else
    return NULL;
}

/**
 * xdp_dbus_open_uri_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-portal-OpenURI.top_of_page">org.freedesktop.portal.OpenURI</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_open_uri_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpDbusOpenURIProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusOpenURI *
xdp_dbus_open_uri_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_DBUS_TYPE_OPEN_URI_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.portal.OpenURI", NULL);
  if (ret != NULL)
    return XDP_DBUS_OPEN_URI (ret);
  else
    return NULL;
}


/**
 * xdp_dbus_open_uri_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_dbus_open_uri_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_dbus_open_uri_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See xdp_dbus_open_uri_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_dbus_open_uri_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_DBUS_TYPE_OPEN_URI_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.portal.OpenURI", NULL);
}

/**
 * xdp_dbus_open_uri_proxy_new_for_bus_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_open_uri_proxy_new_for_bus().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_dbus_open_uri_proxy_new_for_bus().
 *
 * Returns: (transfer full) (type XdpDbusOpenURIProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusOpenURI *
xdp_dbus_open_uri_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_DBUS_OPEN_URI (ret);
  else
    return NULL;
}

/**
 * xdp_dbus_open_uri_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_dbus_open_uri_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_open_uri_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpDbusOpenURIProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusOpenURI *
xdp_dbus_open_uri_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_DBUS_TYPE_OPEN_URI_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.portal.OpenURI", NULL);
  if (ret != NULL)
    return XDP_DBUS_OPEN_URI (ret);
  else
    return NULL;
}


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

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

/**
 * XdpDbusOpenURISkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpDbusOpenURISkeleton.
 */

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

static void
_xdp_dbus_open_uri_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)
{
  XdpDbusOpenURISkeleton *skeleton = XDP_DBUS_OPEN_URI_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_DBUS_TYPE_OPEN_URI);
  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_DBUS_TYPE_OPEN_URI);
  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_dbus_open_uri_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)
{
  XdpDbusOpenURISkeleton *skeleton = XDP_DBUS_OPEN_URI_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_dbus_open_uri_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_dbus_open_uri_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)
{
  XdpDbusOpenURISkeleton *skeleton = XDP_DBUS_OPEN_URI_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_dbus_open_uri_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_dbus_open_uri_skeleton_vtable =
{
  _xdp_dbus_open_uri_skeleton_handle_method_call,
  _xdp_dbus_open_uri_skeleton_handle_get_property,
  _xdp_dbus_open_uri_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
xdp_dbus_open_uri_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return xdp_dbus_open_uri_interface_info ();
}

static GDBusInterfaceVTable *
xdp_dbus_open_uri_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_xdp_dbus_open_uri_skeleton_vtable;
}

static GVariant *
xdp_dbus_open_uri_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  XdpDbusOpenURISkeleton *skeleton = XDP_DBUS_OPEN_URI_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_dbus_open_uri_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _xdp_dbus_open_uri_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _xdp_dbus_open_uri_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _xdp_dbus_open_uri_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.portal.OpenURI", 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_dbus_open_uri_emit_changed (gpointer user_data);

static void
xdp_dbus_open_uri_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
{
  XdpDbusOpenURISkeleton *skeleton = XDP_DBUS_OPEN_URI_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_dbus_open_uri_emit_changed (skeleton);
}

static void xdp_dbus_open_uri_skeleton_iface_init (XdpDbusOpenURIIface *iface);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpDbusOpenURISkeleton, xdp_dbus_open_uri_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (XdpDbusOpenURISkeleton)
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_OPEN_URI, xdp_dbus_open_uri_skeleton_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpDbusOpenURISkeleton, xdp_dbus_open_uri_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_OPEN_URI, xdp_dbus_open_uri_skeleton_iface_init))

#endif
static void
xdp_dbus_open_uri_skeleton_finalize (GObject *object)
{
  XdpDbusOpenURISkeleton *skeleton = XDP_DBUS_OPEN_URI_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_dbus_open_uri_skeleton_parent_class)->finalize (object);
}

static void
xdp_dbus_open_uri_skeleton_get_property (GObject      *object,
  guint         prop_id,
  GValue       *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  XdpDbusOpenURISkeleton *skeleton = XDP_DBUS_OPEN_URI_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_dbus_open_uri_emit_changed (gpointer user_data)
{
  XdpDbusOpenURISkeleton *skeleton = XDP_DBUS_OPEN_URI_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.portal.OpenURI",
                                           &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_dbus_open_uri_schedule_emit_changed (XdpDbusOpenURISkeleton *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_dbus_open_uri_skeleton_notify (GObject      *object,
  GParamSpec *pspec G_GNUC_UNUSED)
{
  XdpDbusOpenURISkeleton *skeleton = XDP_DBUS_OPEN_URI_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_dbus_open_uri_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
      g_source_set_name (skeleton->priv->changed_properties_idle_source, "[generated] _xdp_dbus_open_uri_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_dbus_open_uri_skeleton_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec)
{
  const _ExtendedGDBusPropertyInfo *info;
  XdpDbusOpenURISkeleton *skeleton = XDP_DBUS_OPEN_URI_SKELETON (object);
  g_assert (prop_id != 0 && prop_id - 1 < 1);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_dbus_open_uri_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_dbus_open_uri_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_dbus_open_uri_skeleton_init (XdpDbusOpenURISkeleton *skeleton)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  skeleton->priv = xdp_dbus_open_uri_skeleton_get_instance_private (skeleton);
#else
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, XDP_DBUS_TYPE_OPEN_URI_SKELETON, XdpDbusOpenURISkeletonPrivate);
#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_dbus_open_uri_skeleton_get_version (XdpDbusOpenURI *object)
{
  XdpDbusOpenURISkeleton *skeleton = XDP_DBUS_OPEN_URI_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_dbus_open_uri_skeleton_class_init (XdpDbusOpenURISkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize = xdp_dbus_open_uri_skeleton_finalize;
  gobject_class->get_property = xdp_dbus_open_uri_skeleton_get_property;
  gobject_class->set_property = xdp_dbus_open_uri_skeleton_set_property;
  gobject_class->notify       = xdp_dbus_open_uri_skeleton_notify;


  xdp_dbus_open_uri_override_properties (gobject_class, 1);

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = xdp_dbus_open_uri_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = xdp_dbus_open_uri_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = xdp_dbus_open_uri_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = xdp_dbus_open_uri_skeleton_dbus_interface_get_vtable;

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

static void
xdp_dbus_open_uri_skeleton_iface_init (XdpDbusOpenURIIface *iface)
{
  iface->get_version = xdp_dbus_open_uri_skeleton_get_version;
}

/**
 * xdp_dbus_open_uri_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-OpenURI.top_of_page">org.freedesktop.portal.OpenURI</link>.
 *
 * Returns: (transfer full) (type XdpDbusOpenURISkeleton): The skeleton object.
 */
XdpDbusOpenURI *
xdp_dbus_open_uri_skeleton_new (void)
{
  return XDP_DBUS_OPEN_URI (g_object_new (XDP_DBUS_TYPE_OPEN_URI_SKELETON, NULL));
}

/* ------------------------------------------------------------------------
 * Code for interface org.freedesktop.portal.PowerProfileMonitor
 * ------------------------------------------------------------------------
 */

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

/* ---- Introspection data for org.freedesktop.portal.PowerProfileMonitor ---- */

static const _ExtendedGDBusPropertyInfo _xdp_dbus_power_profile_monitor_property_info_power_saver_enabled =
{
  {
    -1,
    (gchar *) "power-saver-enabled",
    (gchar *) "b",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "power-saver-enabled",
  FALSE,
  TRUE
};

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

static const GDBusPropertyInfo * const _xdp_dbus_power_profile_monitor_property_info_pointers[] =
{
  &_xdp_dbus_power_profile_monitor_property_info_power_saver_enabled.parent_struct,
  &_xdp_dbus_power_profile_monitor_property_info_version.parent_struct,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _xdp_dbus_power_profile_monitor_interface_info =
{
  {
    -1,
    (gchar *) "org.freedesktop.portal.PowerProfileMonitor",
    NULL,
    NULL,
    (GDBusPropertyInfo **) &_xdp_dbus_power_profile_monitor_property_info_pointers,
    NULL
  },
  "power-profile-monitor",
};


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

/**
 * xdp_dbus_power_profile_monitor_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 #XdpDbusPowerProfileMonitor interface for a concrete class.
 * The properties are overridden in the order they are defined.
 *
 * Returns: The last property id.
 */
guint
xdp_dbus_power_profile_monitor_override_properties (GObjectClass *klass, guint property_id_begin)
{
  g_object_class_override_property (klass, property_id_begin++, "power-saver-enabled");
  g_object_class_override_property (klass, property_id_begin++, "version");
  return property_id_begin - 1;
}



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

/**
 * XdpDbusPowerProfileMonitorIface:
 * @parent_iface: The parent interface.
 * @get_power_saver_enabled: Getter for the #XdpDbusPowerProfileMonitor:power-saver-enabled property.
 * @get_version: Getter for the #XdpDbusPowerProfileMonitor:version property.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-PowerProfileMonitor.top_of_page">org.freedesktop.portal.PowerProfileMonitor</link>.
 */

typedef XdpDbusPowerProfileMonitorIface XdpDbusPowerProfileMonitorInterface;
G_DEFINE_INTERFACE (XdpDbusPowerProfileMonitor, xdp_dbus_power_profile_monitor, G_TYPE_OBJECT)

static void
xdp_dbus_power_profile_monitor_default_init (XdpDbusPowerProfileMonitorIface *iface)
{
  /* GObject properties for D-Bus properties: */
  /**
   * XdpDbusPowerProfileMonitor:power-saver-enabled:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-portal-PowerProfileMonitor.power-saver-enabled">"power-saver-enabled"</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_boolean ("power-saver-enabled", "power-saver-enabled", "power-saver-enabled", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * XdpDbusPowerProfileMonitor:version:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-portal-PowerProfileMonitor.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_dbus_power_profile_monitor_get_power_saver_enabled: (skip)
 * @object: A #XdpDbusPowerProfileMonitor.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-portal-PowerProfileMonitor.power-saver-enabled">"power-saver-enabled"</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.
 */
gboolean 
xdp_dbus_power_profile_monitor_get_power_saver_enabled (XdpDbusPowerProfileMonitor *object)
{
  g_return_val_if_fail (XDP_DBUS_IS_POWER_PROFILE_MONITOR (object), FALSE);

  return XDP_DBUS_POWER_PROFILE_MONITOR_GET_IFACE (object)->get_power_saver_enabled (object);
}

/**
 * xdp_dbus_power_profile_monitor_set_power_saver_enabled: (skip)
 * @object: A #XdpDbusPowerProfileMonitor.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-freedesktop-portal-PowerProfileMonitor.power-saver-enabled">"power-saver-enabled"</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_dbus_power_profile_monitor_set_power_saver_enabled (XdpDbusPowerProfileMonitor *object, gboolean value)
{
  g_object_set (G_OBJECT (object), "power-saver-enabled", value, NULL);
}

/**
 * xdp_dbus_power_profile_monitor_get_version: (skip)
 * @object: A #XdpDbusPowerProfileMonitor.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-portal-PowerProfileMonitor.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_dbus_power_profile_monitor_get_version (XdpDbusPowerProfileMonitor *object)
{
  g_return_val_if_fail (XDP_DBUS_IS_POWER_PROFILE_MONITOR (object), 0);

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

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

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

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

/**
 * XdpDbusPowerProfileMonitorProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpDbusPowerProfileMonitorProxy.
 */

struct _XdpDbusPowerProfileMonitorProxyPrivate
{
  GData *qdata;
};

static void xdp_dbus_power_profile_monitor_proxy_iface_init (XdpDbusPowerProfileMonitorIface *iface);

#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpDbusPowerProfileMonitorProxy, xdp_dbus_power_profile_monitor_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (XdpDbusPowerProfileMonitorProxy)
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_POWER_PROFILE_MONITOR, xdp_dbus_power_profile_monitor_proxy_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpDbusPowerProfileMonitorProxy, xdp_dbus_power_profile_monitor_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_POWER_PROFILE_MONITOR, xdp_dbus_power_profile_monitor_proxy_iface_init))

#endif
static void
xdp_dbus_power_profile_monitor_proxy_finalize (GObject *object)
{
  XdpDbusPowerProfileMonitorProxy *proxy = XDP_DBUS_POWER_PROFILE_MONITOR_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (xdp_dbus_power_profile_monitor_proxy_parent_class)->finalize (object);
}

static void
xdp_dbus_power_profile_monitor_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_dbus_power_profile_monitor_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_dbus_power_profile_monitor_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.portal.PowerProfileMonitor: %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_dbus_power_profile_monitor_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_dbus_power_profile_monitor_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.portal.PowerProfileMonitor", info->parent_struct.name, variant),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    NULL, (GAsyncReadyCallback) xdp_dbus_power_profile_monitor_proxy_set_property_cb, (GDBusPropertyInfo *) &info->parent_struct);
  g_variant_unref (variant);
}

static void
xdp_dbus_power_profile_monitor_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_dbus_power_profile_monitor_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_DBUS_TYPE_POWER_PROFILE_MONITOR);
  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_DBUS_TYPE_POWER_PROFILE_MONITOR);
  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_dbus_power_profile_monitor_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  XdpDbusPowerProfileMonitorProxy *proxy = XDP_DBUS_POWER_PROFILE_MONITOR_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_dbus_power_profile_monitor_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_dbus_power_profile_monitor_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_dbus_power_profile_monitor_proxy_get_power_saver_enabled (XdpDbusPowerProfileMonitor *object)
{
  XdpDbusPowerProfileMonitorProxy *proxy = XDP_DBUS_POWER_PROFILE_MONITOR_PROXY (object);
  GVariant *variant;
  gboolean value = FALSE;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "power-saver-enabled");
  if (variant != NULL)
    {
      value = g_variant_get_boolean (variant);
      g_variant_unref (variant);
    }
  return value;
}

static guint 
xdp_dbus_power_profile_monitor_proxy_get_version (XdpDbusPowerProfileMonitor *object)
{
  XdpDbusPowerProfileMonitorProxy *proxy = XDP_DBUS_POWER_PROFILE_MONITOR_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_dbus_power_profile_monitor_proxy_init (XdpDbusPowerProfileMonitorProxy *proxy)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  proxy->priv = xdp_dbus_power_profile_monitor_proxy_get_instance_private (proxy);
#else
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, XDP_DBUS_TYPE_POWER_PROFILE_MONITOR_PROXY, XdpDbusPowerProfileMonitorProxyPrivate);
#endif

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

static void
xdp_dbus_power_profile_monitor_proxy_class_init (XdpDbusPowerProfileMonitorProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = xdp_dbus_power_profile_monitor_proxy_finalize;
  gobject_class->get_property = xdp_dbus_power_profile_monitor_proxy_get_property;
  gobject_class->set_property = xdp_dbus_power_profile_monitor_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = xdp_dbus_power_profile_monitor_proxy_g_signal;
  proxy_class->g_properties_changed = xdp_dbus_power_profile_monitor_proxy_g_properties_changed;

  xdp_dbus_power_profile_monitor_override_properties (gobject_class, 1);

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

static void
xdp_dbus_power_profile_monitor_proxy_iface_init (XdpDbusPowerProfileMonitorIface *iface)
{
  iface->get_power_saver_enabled = xdp_dbus_power_profile_monitor_proxy_get_power_saver_enabled;
  iface->get_version = xdp_dbus_power_profile_monitor_proxy_get_version;
}

/**
 * xdp_dbus_power_profile_monitor_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-portal-PowerProfileMonitor.top_of_page">org.freedesktop.portal.PowerProfileMonitor</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_dbus_power_profile_monitor_proxy_new_finish() to get the result of the operation.
 *
 * See xdp_dbus_power_profile_monitor_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_dbus_power_profile_monitor_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_DBUS_TYPE_POWER_PROFILE_MONITOR_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.portal.PowerProfileMonitor", NULL);
}

/**
 * xdp_dbus_power_profile_monitor_proxy_new_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_power_profile_monitor_proxy_new().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_dbus_power_profile_monitor_proxy_new().
 *
 * Returns: (transfer full) (type XdpDbusPowerProfileMonitorProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusPowerProfileMonitor *
xdp_dbus_power_profile_monitor_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_DBUS_POWER_PROFILE_MONITOR (ret);
  else
    return NULL;
}

/**
 * xdp_dbus_power_profile_monitor_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-portal-PowerProfileMonitor.top_of_page">org.freedesktop.portal.PowerProfileMonitor</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_power_profile_monitor_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpDbusPowerProfileMonitorProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusPowerProfileMonitor *
xdp_dbus_power_profile_monitor_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_DBUS_TYPE_POWER_PROFILE_MONITOR_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.portal.PowerProfileMonitor", NULL);
  if (ret != NULL)
    return XDP_DBUS_POWER_PROFILE_MONITOR (ret);
  else
    return NULL;
}


/**
 * xdp_dbus_power_profile_monitor_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_dbus_power_profile_monitor_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_dbus_power_profile_monitor_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See xdp_dbus_power_profile_monitor_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_dbus_power_profile_monitor_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_DBUS_TYPE_POWER_PROFILE_MONITOR_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.portal.PowerProfileMonitor", NULL);
}

/**
 * xdp_dbus_power_profile_monitor_proxy_new_for_bus_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_power_profile_monitor_proxy_new_for_bus().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_dbus_power_profile_monitor_proxy_new_for_bus().
 *
 * Returns: (transfer full) (type XdpDbusPowerProfileMonitorProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusPowerProfileMonitor *
xdp_dbus_power_profile_monitor_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_DBUS_POWER_PROFILE_MONITOR (ret);
  else
    return NULL;
}

/**
 * xdp_dbus_power_profile_monitor_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_dbus_power_profile_monitor_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_power_profile_monitor_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpDbusPowerProfileMonitorProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusPowerProfileMonitor *
xdp_dbus_power_profile_monitor_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_DBUS_TYPE_POWER_PROFILE_MONITOR_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.portal.PowerProfileMonitor", NULL);
  if (ret != NULL)
    return XDP_DBUS_POWER_PROFILE_MONITOR (ret);
  else
    return NULL;
}


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

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

/**
 * XdpDbusPowerProfileMonitorSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpDbusPowerProfileMonitorSkeleton.
 */

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

static void
_xdp_dbus_power_profile_monitor_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)
{
  XdpDbusPowerProfileMonitorSkeleton *skeleton = XDP_DBUS_POWER_PROFILE_MONITOR_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_DBUS_TYPE_POWER_PROFILE_MONITOR);
  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_DBUS_TYPE_POWER_PROFILE_MONITOR);
  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_dbus_power_profile_monitor_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)
{
  XdpDbusPowerProfileMonitorSkeleton *skeleton = XDP_DBUS_POWER_PROFILE_MONITOR_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_dbus_power_profile_monitor_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_dbus_power_profile_monitor_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)
{
  XdpDbusPowerProfileMonitorSkeleton *skeleton = XDP_DBUS_POWER_PROFILE_MONITOR_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_dbus_power_profile_monitor_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_dbus_power_profile_monitor_skeleton_vtable =
{
  _xdp_dbus_power_profile_monitor_skeleton_handle_method_call,
  _xdp_dbus_power_profile_monitor_skeleton_handle_get_property,
  _xdp_dbus_power_profile_monitor_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
xdp_dbus_power_profile_monitor_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return xdp_dbus_power_profile_monitor_interface_info ();
}

static GDBusInterfaceVTable *
xdp_dbus_power_profile_monitor_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_xdp_dbus_power_profile_monitor_skeleton_vtable;
}

static GVariant *
xdp_dbus_power_profile_monitor_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  XdpDbusPowerProfileMonitorSkeleton *skeleton = XDP_DBUS_POWER_PROFILE_MONITOR_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_dbus_power_profile_monitor_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _xdp_dbus_power_profile_monitor_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _xdp_dbus_power_profile_monitor_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _xdp_dbus_power_profile_monitor_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.portal.PowerProfileMonitor", 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_dbus_power_profile_monitor_emit_changed (gpointer user_data);

static void
xdp_dbus_power_profile_monitor_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
{
  XdpDbusPowerProfileMonitorSkeleton *skeleton = XDP_DBUS_POWER_PROFILE_MONITOR_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_dbus_power_profile_monitor_emit_changed (skeleton);
}

static void xdp_dbus_power_profile_monitor_skeleton_iface_init (XdpDbusPowerProfileMonitorIface *iface);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpDbusPowerProfileMonitorSkeleton, xdp_dbus_power_profile_monitor_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (XdpDbusPowerProfileMonitorSkeleton)
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_POWER_PROFILE_MONITOR, xdp_dbus_power_profile_monitor_skeleton_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpDbusPowerProfileMonitorSkeleton, xdp_dbus_power_profile_monitor_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_POWER_PROFILE_MONITOR, xdp_dbus_power_profile_monitor_skeleton_iface_init))

#endif
static void
xdp_dbus_power_profile_monitor_skeleton_finalize (GObject *object)
{
  XdpDbusPowerProfileMonitorSkeleton *skeleton = XDP_DBUS_POWER_PROFILE_MONITOR_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_dbus_power_profile_monitor_skeleton_parent_class)->finalize (object);
}

static void
xdp_dbus_power_profile_monitor_skeleton_get_property (GObject      *object,
  guint         prop_id,
  GValue       *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  XdpDbusPowerProfileMonitorSkeleton *skeleton = XDP_DBUS_POWER_PROFILE_MONITOR_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_dbus_power_profile_monitor_emit_changed (gpointer user_data)
{
  XdpDbusPowerProfileMonitorSkeleton *skeleton = XDP_DBUS_POWER_PROFILE_MONITOR_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.portal.PowerProfileMonitor",
                                           &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_dbus_power_profile_monitor_schedule_emit_changed (XdpDbusPowerProfileMonitorSkeleton *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_dbus_power_profile_monitor_skeleton_notify (GObject      *object,
  GParamSpec *pspec G_GNUC_UNUSED)
{
  XdpDbusPowerProfileMonitorSkeleton *skeleton = XDP_DBUS_POWER_PROFILE_MONITOR_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_dbus_power_profile_monitor_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
      g_source_set_name (skeleton->priv->changed_properties_idle_source, "[generated] _xdp_dbus_power_profile_monitor_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_dbus_power_profile_monitor_skeleton_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec)
{
  const _ExtendedGDBusPropertyInfo *info;
  XdpDbusPowerProfileMonitorSkeleton *skeleton = XDP_DBUS_POWER_PROFILE_MONITOR_SKELETON (object);
  g_assert (prop_id != 0 && prop_id - 1 < 2);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_dbus_power_profile_monitor_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_dbus_power_profile_monitor_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_dbus_power_profile_monitor_skeleton_init (XdpDbusPowerProfileMonitorSkeleton *skeleton)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  skeleton->priv = xdp_dbus_power_profile_monitor_skeleton_get_instance_private (skeleton);
#else
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, XDP_DBUS_TYPE_POWER_PROFILE_MONITOR_SKELETON, XdpDbusPowerProfileMonitorSkeletonPrivate);
#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_BOOLEAN);
  g_value_init (&skeleton->priv->properties[1], G_TYPE_UINT);
}

static gboolean 
xdp_dbus_power_profile_monitor_skeleton_get_power_saver_enabled (XdpDbusPowerProfileMonitor *object)
{
  XdpDbusPowerProfileMonitorSkeleton *skeleton = XDP_DBUS_POWER_PROFILE_MONITOR_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 guint 
xdp_dbus_power_profile_monitor_skeleton_get_version (XdpDbusPowerProfileMonitor *object)
{
  XdpDbusPowerProfileMonitorSkeleton *skeleton = XDP_DBUS_POWER_PROFILE_MONITOR_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_dbus_power_profile_monitor_skeleton_class_init (XdpDbusPowerProfileMonitorSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize = xdp_dbus_power_profile_monitor_skeleton_finalize;
  gobject_class->get_property = xdp_dbus_power_profile_monitor_skeleton_get_property;
  gobject_class->set_property = xdp_dbus_power_profile_monitor_skeleton_set_property;
  gobject_class->notify       = xdp_dbus_power_profile_monitor_skeleton_notify;


  xdp_dbus_power_profile_monitor_override_properties (gobject_class, 1);

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = xdp_dbus_power_profile_monitor_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = xdp_dbus_power_profile_monitor_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = xdp_dbus_power_profile_monitor_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = xdp_dbus_power_profile_monitor_skeleton_dbus_interface_get_vtable;

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

static void
xdp_dbus_power_profile_monitor_skeleton_iface_init (XdpDbusPowerProfileMonitorIface *iface)
{
  iface->get_power_saver_enabled = xdp_dbus_power_profile_monitor_skeleton_get_power_saver_enabled;
  iface->get_version = xdp_dbus_power_profile_monitor_skeleton_get_version;
}

/**
 * xdp_dbus_power_profile_monitor_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-PowerProfileMonitor.top_of_page">org.freedesktop.portal.PowerProfileMonitor</link>.
 *
 * Returns: (transfer full) (type XdpDbusPowerProfileMonitorSkeleton): The skeleton object.
 */
XdpDbusPowerProfileMonitor *
xdp_dbus_power_profile_monitor_skeleton_new (void)
{
  return XDP_DBUS_POWER_PROFILE_MONITOR (g_object_new (XDP_DBUS_TYPE_POWER_PROFILE_MONITOR_SKELETON, NULL));
}

/* ------------------------------------------------------------------------
 * Code for interface org.freedesktop.portal.Print
 * ------------------------------------------------------------------------
 */

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

/* ---- Introspection data for org.freedesktop.portal.Print ---- */

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

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

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

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

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

static const GDBusArgInfo * const _xdp_dbus_print_method_info_prepare_print_IN_ARG_pointers[] =
{
  &_xdp_dbus_print_method_info_prepare_print_IN_ARG_parent_window.parent_struct,
  &_xdp_dbus_print_method_info_prepare_print_IN_ARG_title.parent_struct,
  &_xdp_dbus_print_method_info_prepare_print_IN_ARG_settings.parent_struct,
  &_xdp_dbus_print_method_info_prepare_print_IN_ARG_page_setup.parent_struct,
  &_xdp_dbus_print_method_info_prepare_print_IN_ARG_options.parent_struct,
  NULL
};

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

static const GDBusArgInfo * const _xdp_dbus_print_method_info_prepare_print_OUT_ARG_pointers[] =
{
  &_xdp_dbus_print_method_info_prepare_print_OUT_ARG_handle.parent_struct,
  NULL
};

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

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

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

static const GDBusAnnotationInfo * const _xdp_dbus_print_method_prepare_print_annotation_info_pointers[] =
{
  &_xdp_dbus_print_method_prepare_print_annotation_info_0,
  &_xdp_dbus_print_method_prepare_print_annotation_info_1,
  &_xdp_dbus_print_method_prepare_print_annotation_info_2,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_print_method_info_prepare_print =
{
  {
    -1,
    (gchar *) "PreparePrint",
    (GDBusArgInfo **) &_xdp_dbus_print_method_info_prepare_print_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_print_method_info_prepare_print_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_dbus_print_method_prepare_print_annotation_info_pointers
  },
  "handle-prepare-print",
  FALSE
};

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

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

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

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

static const GDBusArgInfo * const _xdp_dbus_print_method_info_print_IN_ARG_pointers[] =
{
  &_xdp_dbus_print_method_info_print_IN_ARG_parent_window.parent_struct,
  &_xdp_dbus_print_method_info_print_IN_ARG_title.parent_struct,
  &_xdp_dbus_print_method_info_print_IN_ARG_fd.parent_struct,
  &_xdp_dbus_print_method_info_print_IN_ARG_options.parent_struct,
  NULL
};

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

static const GDBusArgInfo * const _xdp_dbus_print_method_info_print_OUT_ARG_pointers[] =
{
  &_xdp_dbus_print_method_info_print_OUT_ARG_handle.parent_struct,
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_print_method_print_annotation_info_pointers[] =
{
  &_xdp_dbus_print_method_print_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_print_method_info_print =
{
  {
    -1,
    (gchar *) "Print",
    (GDBusArgInfo **) &_xdp_dbus_print_method_info_print_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_print_method_info_print_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_dbus_print_method_print_annotation_info_pointers
  },
  "handle-print",
  TRUE
};

static const GDBusMethodInfo * const _xdp_dbus_print_method_info_pointers[] =
{
  &_xdp_dbus_print_method_info_prepare_print.parent_struct,
  &_xdp_dbus_print_method_info_print.parent_struct,
  NULL
};

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

static const GDBusPropertyInfo * const _xdp_dbus_print_property_info_pointers[] =
{
  &_xdp_dbus_print_property_info_version.parent_struct,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _xdp_dbus_print_interface_info =
{
  {
    -1,
    (gchar *) "org.freedesktop.portal.Print",
    (GDBusMethodInfo **) &_xdp_dbus_print_method_info_pointers,
    NULL,
    (GDBusPropertyInfo **) &_xdp_dbus_print_property_info_pointers,
    NULL
  },
  "print",
};


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

/**
 * xdp_dbus_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 #XdpDbusPrint interface for a concrete class.
 * The properties are overridden in the order they are defined.
 *
 * Returns: The last property id.
 */
guint
xdp_dbus_print_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_dbus_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_VARIANT_VARIANT_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_dbus_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_VARIANT_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}


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

/**
 * XdpDbusPrintIface:
 * @parent_iface: The parent interface.
 * @handle_prepare_print: Handler for the #XdpDbusPrint::handle-prepare-print signal.
 * @handle_print: Handler for the #XdpDbusPrint::handle-print signal.
 * @get_version: Getter for the #XdpDbusPrint:version property.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-Print.top_of_page">org.freedesktop.portal.Print</link>.
 */

typedef XdpDbusPrintIface XdpDbusPrintInterface;
G_DEFINE_INTERFACE (XdpDbusPrint, xdp_dbus_print, G_TYPE_OBJECT)

static void
xdp_dbus_print_default_init (XdpDbusPrintIface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * XdpDbusPrint::handle-prepare-print:
   * @object: A #XdpDbusPrint.
   * @invocation: A #GDBusMethodInvocation.
   * @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-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_dbus_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 (XdpDbusPrintIface, handle_prepare_print),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_print_method_marshal_prepare_print,
    G_TYPE_BOOLEAN,
    6,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_VARIANT, G_TYPE_VARIANT, G_TYPE_VARIANT);

  /**
   * XdpDbusPrint::handle-print:
   * @object: A #XdpDbusPrint.
   * @invocation: A #GDBusMethodInvocation.
   * @fd_list: (nullable): A #GUnixFDList or %NULL.
   * @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-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_dbus_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 (XdpDbusPrintIface, handle_print),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_print_method_marshal_print,
    G_TYPE_BOOLEAN,
    6,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UNIX_FD_LIST, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_VARIANT, G_TYPE_VARIANT);

  /* GObject properties for D-Bus properties: */
  /**
   * XdpDbusPrint:version:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-portal-Print.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_dbus_print_get_version: (skip)
 * @object: A #XdpDbusPrint.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-portal-Print.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_dbus_print_get_version (XdpDbusPrint *object)
{
  g_return_val_if_fail (XDP_DBUS_IS_PRINT (object), 0);

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

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

/**
 * xdp_dbus_print_call_prepare_print:
 * @proxy: A #XdpDbusPrintProxy.
 * @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-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_dbus_print_call_prepare_print_finish() to get the result of the operation.
 *
 * See xdp_dbus_print_call_prepare_print_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_print_call_prepare_print (
    XdpDbusPrint *proxy,
    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 ("(ss@a{sv}@a{sv}@a{sv})",
                   arg_parent_window,
                   arg_title,
                   arg_settings,
                   arg_page_setup,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_print_call_prepare_print_finish:
 * @proxy: A #XdpDbusPrintProxy.
 * @out_handle: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_print_call_prepare_print().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_print_call_prepare_print().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_print_call_prepare_print_finish (
    XdpDbusPrint *proxy,
    gchar ** out_handle,
    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,
                 "(o)",
                 out_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_print_call_prepare_print_sync:
 * @proxy: A #XdpDbusPrintProxy.
 * @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_handle: (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-portal-Print.PreparePrint">PreparePrint()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_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_dbus_print_call_prepare_print_sync (
    XdpDbusPrint *proxy,
    const gchar *arg_parent_window,
    const gchar *arg_title,
    GVariant *arg_settings,
    GVariant *arg_page_setup,
    GVariant *arg_options,
    gchar ** out_handle,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "PreparePrint",
    g_variant_new ("(ss@a{sv}@a{sv}@a{sv})",
                   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,
                 "(o)",
                 out_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_print_call_print:
 * @proxy: A #XdpDbusPrintProxy.
 * @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-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_dbus_print_call_print_finish() to get the result of the operation.
 *
 * See xdp_dbus_print_call_print_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_print_call_print (
    XdpDbusPrint *proxy,
    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 ("(ss@h@a{sv})",
                   arg_parent_window,
                   arg_title,
                   arg_fd,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    fd_list,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_print_call_print_finish:
 * @proxy: A #XdpDbusPrintProxy.
 * @out_handle: (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_dbus_print_call_print().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_print_call_print().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_print_call_print_finish (
    XdpDbusPrint *proxy,
    gchar ** out_handle,
    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,
                 "(o)",
                 out_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_print_call_print_sync:
 * @proxy: A #XdpDbusPrintProxy.
 * @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_handle: (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-portal-Print.Print">Print()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_print_call_print() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_print_call_print_sync (
    XdpDbusPrint *proxy,
    const gchar *arg_parent_window,
    const gchar *arg_title,
    GVariant *arg_fd,
    GVariant *arg_options,
    GUnixFDList  *fd_list,
    gchar ** out_handle,
    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 ("(ss@h@a{sv})",
                   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,
                 "(o)",
                 out_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_print_complete_prepare_print:
 * @object: A #XdpDbusPrint.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @handle: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-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_dbus_print_complete_prepare_print (
    XdpDbusPrint *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    const gchar *handle)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(o)",
                   handle));
}

/**
 * xdp_dbus_print_complete_print:
 * @object: A #XdpDbusPrint.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @fd_list: (nullable): A #GUnixFDList or %NULL.
 * @handle: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-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_dbus_print_complete_print (
    XdpDbusPrint *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    GUnixFDList *fd_list,
    const gchar *handle)
{
  g_dbus_method_invocation_return_value_with_unix_fd_list (invocation,
    g_variant_new ("(o)",
                   handle),
    fd_list);
}

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

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

/**
 * XdpDbusPrintProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpDbusPrintProxy.
 */

struct _XdpDbusPrintProxyPrivate
{
  GData *qdata;
};

static void xdp_dbus_print_proxy_iface_init (XdpDbusPrintIface *iface);

#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpDbusPrintProxy, xdp_dbus_print_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (XdpDbusPrintProxy)
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_PRINT, xdp_dbus_print_proxy_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpDbusPrintProxy, xdp_dbus_print_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_PRINT, xdp_dbus_print_proxy_iface_init))

#endif
static void
xdp_dbus_print_proxy_finalize (GObject *object)
{
  XdpDbusPrintProxy *proxy = XDP_DBUS_PRINT_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (xdp_dbus_print_proxy_parent_class)->finalize (object);
}

static void
xdp_dbus_print_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_dbus_print_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_dbus_print_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.portal.Print: %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_dbus_print_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_dbus_print_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.portal.Print", info->parent_struct.name, variant),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    NULL, (GAsyncReadyCallback) xdp_dbus_print_proxy_set_property_cb, (GDBusPropertyInfo *) &info->parent_struct);
  g_variant_unref (variant);
}

static void
xdp_dbus_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_dbus_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_DBUS_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_DBUS_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_dbus_print_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  XdpDbusPrintProxy *proxy = XDP_DBUS_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_dbus_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_dbus_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 guint 
xdp_dbus_print_proxy_get_version (XdpDbusPrint *object)
{
  XdpDbusPrintProxy *proxy = XDP_DBUS_PRINT_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_dbus_print_proxy_init (XdpDbusPrintProxy *proxy)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  proxy->priv = xdp_dbus_print_proxy_get_instance_private (proxy);
#else
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, XDP_DBUS_TYPE_PRINT_PROXY, XdpDbusPrintProxyPrivate);
#endif

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

static void
xdp_dbus_print_proxy_class_init (XdpDbusPrintProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = xdp_dbus_print_proxy_finalize;
  gobject_class->get_property = xdp_dbus_print_proxy_get_property;
  gobject_class->set_property = xdp_dbus_print_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = xdp_dbus_print_proxy_g_signal;
  proxy_class->g_properties_changed = xdp_dbus_print_proxy_g_properties_changed;

  xdp_dbus_print_override_properties (gobject_class, 1);

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

static void
xdp_dbus_print_proxy_iface_init (XdpDbusPrintIface *iface)
{
  iface->get_version = xdp_dbus_print_proxy_get_version;
}

/**
 * xdp_dbus_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-portal-Print.top_of_page">org.freedesktop.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_dbus_print_proxy_new_finish() to get the result of the operation.
 *
 * See xdp_dbus_print_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_dbus_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_DBUS_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.portal.Print", NULL);
}

/**
 * xdp_dbus_print_proxy_new_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_print_proxy_new().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_dbus_print_proxy_new().
 *
 * Returns: (transfer full) (type XdpDbusPrintProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusPrint *
xdp_dbus_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_DBUS_PRINT (ret);
  else
    return NULL;
}

/**
 * xdp_dbus_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-portal-Print.top_of_page">org.freedesktop.portal.Print</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_print_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpDbusPrintProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusPrint *
xdp_dbus_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_DBUS_TYPE_PRINT_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.portal.Print", NULL);
  if (ret != NULL)
    return XDP_DBUS_PRINT (ret);
  else
    return NULL;
}


/**
 * xdp_dbus_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_dbus_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_dbus_print_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See xdp_dbus_print_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_dbus_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_DBUS_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.portal.Print", NULL);
}

/**
 * xdp_dbus_print_proxy_new_for_bus_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_print_proxy_new_for_bus().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_dbus_print_proxy_new_for_bus().
 *
 * Returns: (transfer full) (type XdpDbusPrintProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusPrint *
xdp_dbus_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_DBUS_PRINT (ret);
  else
    return NULL;
}

/**
 * xdp_dbus_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_dbus_print_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_print_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpDbusPrintProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusPrint *
xdp_dbus_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_DBUS_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.portal.Print", NULL);
  if (ret != NULL)
    return XDP_DBUS_PRINT (ret);
  else
    return NULL;
}


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

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

/**
 * XdpDbusPrintSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpDbusPrintSkeleton.
 */

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

static void
_xdp_dbus_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)
{
  XdpDbusPrintSkeleton *skeleton = XDP_DBUS_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_DBUS_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_DBUS_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_dbus_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)
{
  XdpDbusPrintSkeleton *skeleton = XDP_DBUS_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_dbus_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_dbus_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)
{
  XdpDbusPrintSkeleton *skeleton = XDP_DBUS_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_dbus_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_dbus_print_skeleton_vtable =
{
  _xdp_dbus_print_skeleton_handle_method_call,
  _xdp_dbus_print_skeleton_handle_get_property,
  _xdp_dbus_print_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
xdp_dbus_print_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return xdp_dbus_print_interface_info ();
}

static GDBusInterfaceVTable *
xdp_dbus_print_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_xdp_dbus_print_skeleton_vtable;
}

static GVariant *
xdp_dbus_print_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  XdpDbusPrintSkeleton *skeleton = XDP_DBUS_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_dbus_print_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _xdp_dbus_print_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _xdp_dbus_print_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _xdp_dbus_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.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 gboolean _xdp_dbus_print_emit_changed (gpointer user_data);

static void
xdp_dbus_print_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
{
  XdpDbusPrintSkeleton *skeleton = XDP_DBUS_PRINT_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_dbus_print_emit_changed (skeleton);
}

static void xdp_dbus_print_skeleton_iface_init (XdpDbusPrintIface *iface);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpDbusPrintSkeleton, xdp_dbus_print_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (XdpDbusPrintSkeleton)
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_PRINT, xdp_dbus_print_skeleton_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpDbusPrintSkeleton, xdp_dbus_print_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_PRINT, xdp_dbus_print_skeleton_iface_init))

#endif
static void
xdp_dbus_print_skeleton_finalize (GObject *object)
{
  XdpDbusPrintSkeleton *skeleton = XDP_DBUS_PRINT_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_dbus_print_skeleton_parent_class)->finalize (object);
}

static void
xdp_dbus_print_skeleton_get_property (GObject      *object,
  guint         prop_id,
  GValue       *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  XdpDbusPrintSkeleton *skeleton = XDP_DBUS_PRINT_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_dbus_print_emit_changed (gpointer user_data)
{
  XdpDbusPrintSkeleton *skeleton = XDP_DBUS_PRINT_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.portal.Print",
                                           &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_dbus_print_schedule_emit_changed (XdpDbusPrintSkeleton *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_dbus_print_skeleton_notify (GObject      *object,
  GParamSpec *pspec G_GNUC_UNUSED)
{
  XdpDbusPrintSkeleton *skeleton = XDP_DBUS_PRINT_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_dbus_print_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
      g_source_set_name (skeleton->priv->changed_properties_idle_source, "[generated] _xdp_dbus_print_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_dbus_print_skeleton_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec)
{
  const _ExtendedGDBusPropertyInfo *info;
  XdpDbusPrintSkeleton *skeleton = XDP_DBUS_PRINT_SKELETON (object);
  g_assert (prop_id != 0 && prop_id - 1 < 1);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_dbus_print_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_dbus_print_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_dbus_print_skeleton_init (XdpDbusPrintSkeleton *skeleton)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  skeleton->priv = xdp_dbus_print_skeleton_get_instance_private (skeleton);
#else
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, XDP_DBUS_TYPE_PRINT_SKELETON, XdpDbusPrintSkeletonPrivate);
#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_dbus_print_skeleton_get_version (XdpDbusPrint *object)
{
  XdpDbusPrintSkeleton *skeleton = XDP_DBUS_PRINT_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_dbus_print_skeleton_class_init (XdpDbusPrintSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize = xdp_dbus_print_skeleton_finalize;
  gobject_class->get_property = xdp_dbus_print_skeleton_get_property;
  gobject_class->set_property = xdp_dbus_print_skeleton_set_property;
  gobject_class->notify       = xdp_dbus_print_skeleton_notify;


  xdp_dbus_print_override_properties (gobject_class, 1);

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = xdp_dbus_print_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = xdp_dbus_print_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = xdp_dbus_print_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = xdp_dbus_print_skeleton_dbus_interface_get_vtable;

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

static void
xdp_dbus_print_skeleton_iface_init (XdpDbusPrintIface *iface)
{
  iface->get_version = xdp_dbus_print_skeleton_get_version;
}

/**
 * xdp_dbus_print_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-Print.top_of_page">org.freedesktop.portal.Print</link>.
 *
 * Returns: (transfer full) (type XdpDbusPrintSkeleton): The skeleton object.
 */
XdpDbusPrint *
xdp_dbus_print_skeleton_new (void)
{
  return XDP_DBUS_PRINT (g_object_new (XDP_DBUS_TYPE_PRINT_SKELETON, NULL));
}

/* ------------------------------------------------------------------------
 * Code for interface org.freedesktop.portal.ProxyResolver
 * ------------------------------------------------------------------------
 */

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

/* ---- Introspection data for org.freedesktop.portal.ProxyResolver ---- */

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

static const GDBusArgInfo * const _xdp_dbus_proxy_resolver_method_info_lookup_IN_ARG_pointers[] =
{
  &_xdp_dbus_proxy_resolver_method_info_lookup_IN_ARG_uri.parent_struct,
  NULL
};

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

static const GDBusArgInfo * const _xdp_dbus_proxy_resolver_method_info_lookup_OUT_ARG_pointers[] =
{
  &_xdp_dbus_proxy_resolver_method_info_lookup_OUT_ARG_proxies.parent_struct,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_proxy_resolver_method_info_lookup =
{
  {
    -1,
    (gchar *) "Lookup",
    (GDBusArgInfo **) &_xdp_dbus_proxy_resolver_method_info_lookup_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_proxy_resolver_method_info_lookup_OUT_ARG_pointers,
    NULL
  },
  "handle-lookup",
  FALSE
};

static const GDBusMethodInfo * const _xdp_dbus_proxy_resolver_method_info_pointers[] =
{
  &_xdp_dbus_proxy_resolver_method_info_lookup.parent_struct,
  NULL
};

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

static const GDBusPropertyInfo * const _xdp_dbus_proxy_resolver_property_info_pointers[] =
{
  &_xdp_dbus_proxy_resolver_property_info_version.parent_struct,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _xdp_dbus_proxy_resolver_interface_info =
{
  {
    -1,
    (gchar *) "org.freedesktop.portal.ProxyResolver",
    (GDBusMethodInfo **) &_xdp_dbus_proxy_resolver_method_info_pointers,
    NULL,
    (GDBusPropertyInfo **) &_xdp_dbus_proxy_resolver_property_info_pointers,
    NULL
  },
  "proxy-resolver",
};


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

/**
 * xdp_dbus_proxy_resolver_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 #XdpDbusProxyResolver interface for a concrete class.
 * The properties are overridden in the order they are defined.
 *
 * Returns: The last property id.
 */
guint
xdp_dbus_proxy_resolver_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_dbus_proxy_resolver_method_marshal_lookup (
    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 (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}


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

/**
 * XdpDbusProxyResolverIface:
 * @parent_iface: The parent interface.
 * @handle_lookup: Handler for the #XdpDbusProxyResolver::handle-lookup signal.
 * @get_version: Getter for the #XdpDbusProxyResolver:version property.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-ProxyResolver.top_of_page">org.freedesktop.portal.ProxyResolver</link>.
 */

typedef XdpDbusProxyResolverIface XdpDbusProxyResolverInterface;
G_DEFINE_INTERFACE (XdpDbusProxyResolver, xdp_dbus_proxy_resolver, G_TYPE_OBJECT)

static void
xdp_dbus_proxy_resolver_default_init (XdpDbusProxyResolverIface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * XdpDbusProxyResolver::handle-lookup:
   * @object: A #XdpDbusProxyResolver.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_uri: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-portal-ProxyResolver.Lookup">Lookup()</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_dbus_proxy_resolver_complete_lookup() 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-lookup",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpDbusProxyResolverIface, handle_lookup),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_proxy_resolver_method_marshal_lookup,
    G_TYPE_BOOLEAN,
    2,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING);

  /* GObject properties for D-Bus properties: */
  /**
   * XdpDbusProxyResolver:version:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-portal-ProxyResolver.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_dbus_proxy_resolver_get_version: (skip)
 * @object: A #XdpDbusProxyResolver.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-portal-ProxyResolver.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_dbus_proxy_resolver_get_version (XdpDbusProxyResolver *object)
{
  g_return_val_if_fail (XDP_DBUS_IS_PROXY_RESOLVER (object), 0);

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

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

/**
 * xdp_dbus_proxy_resolver_call_lookup:
 * @proxy: A #XdpDbusProxyResolverProxy.
 * @arg_uri: 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-portal-ProxyResolver.Lookup">Lookup()</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_dbus_proxy_resolver_call_lookup_finish() to get the result of the operation.
 *
 * See xdp_dbus_proxy_resolver_call_lookup_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_proxy_resolver_call_lookup (
    XdpDbusProxyResolver *proxy,
    const gchar *arg_uri,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "Lookup",
    g_variant_new ("(s)",
                   arg_uri),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_proxy_resolver_call_lookup_finish:
 * @proxy: A #XdpDbusProxyResolverProxy.
 * @out_proxies: (out) (optional) (array zero-terminated=1): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_proxy_resolver_call_lookup().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_proxy_resolver_call_lookup().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_proxy_resolver_call_lookup_finish (
    XdpDbusProxyResolver *proxy,
    gchar *** out_proxies,
    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,
                 "(^as)",
                 out_proxies);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_proxy_resolver_call_lookup_sync:
 * @proxy: A #XdpDbusProxyResolverProxy.
 * @arg_uri: Argument to pass with the method invocation.
 * @out_proxies: (out) (optional) (array zero-terminated=1): 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-portal-ProxyResolver.Lookup">Lookup()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_proxy_resolver_call_lookup() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_proxy_resolver_call_lookup_sync (
    XdpDbusProxyResolver *proxy,
    const gchar *arg_uri,
    gchar *** out_proxies,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "Lookup",
    g_variant_new ("(s)",
                   arg_uri),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(^as)",
                 out_proxies);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_proxy_resolver_complete_lookup:
 * @object: A #XdpDbusProxyResolver.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @proxies: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-portal-ProxyResolver.Lookup">Lookup()</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_dbus_proxy_resolver_complete_lookup (
    XdpDbusProxyResolver *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    const gchar *const *proxies)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(^as)",
                   proxies));
}

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

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

/**
 * XdpDbusProxyResolverProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpDbusProxyResolverProxy.
 */

struct _XdpDbusProxyResolverProxyPrivate
{
  GData *qdata;
};

static void xdp_dbus_proxy_resolver_proxy_iface_init (XdpDbusProxyResolverIface *iface);

#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpDbusProxyResolverProxy, xdp_dbus_proxy_resolver_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (XdpDbusProxyResolverProxy)
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_PROXY_RESOLVER, xdp_dbus_proxy_resolver_proxy_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpDbusProxyResolverProxy, xdp_dbus_proxy_resolver_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_PROXY_RESOLVER, xdp_dbus_proxy_resolver_proxy_iface_init))

#endif
static void
xdp_dbus_proxy_resolver_proxy_finalize (GObject *object)
{
  XdpDbusProxyResolverProxy *proxy = XDP_DBUS_PROXY_RESOLVER_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (xdp_dbus_proxy_resolver_proxy_parent_class)->finalize (object);
}

static void
xdp_dbus_proxy_resolver_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_dbus_proxy_resolver_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_dbus_proxy_resolver_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.portal.ProxyResolver: %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_dbus_proxy_resolver_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_dbus_proxy_resolver_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.portal.ProxyResolver", info->parent_struct.name, variant),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    NULL, (GAsyncReadyCallback) xdp_dbus_proxy_resolver_proxy_set_property_cb, (GDBusPropertyInfo *) &info->parent_struct);
  g_variant_unref (variant);
}

static void
xdp_dbus_proxy_resolver_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_dbus_proxy_resolver_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_DBUS_TYPE_PROXY_RESOLVER);
  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_DBUS_TYPE_PROXY_RESOLVER);
  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_dbus_proxy_resolver_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  XdpDbusProxyResolverProxy *proxy = XDP_DBUS_PROXY_RESOLVER_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_dbus_proxy_resolver_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_dbus_proxy_resolver_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_dbus_proxy_resolver_proxy_get_version (XdpDbusProxyResolver *object)
{
  XdpDbusProxyResolverProxy *proxy = XDP_DBUS_PROXY_RESOLVER_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_dbus_proxy_resolver_proxy_init (XdpDbusProxyResolverProxy *proxy)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  proxy->priv = xdp_dbus_proxy_resolver_proxy_get_instance_private (proxy);
#else
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, XDP_DBUS_TYPE_PROXY_RESOLVER_PROXY, XdpDbusProxyResolverProxyPrivate);
#endif

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

static void
xdp_dbus_proxy_resolver_proxy_class_init (XdpDbusProxyResolverProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = xdp_dbus_proxy_resolver_proxy_finalize;
  gobject_class->get_property = xdp_dbus_proxy_resolver_proxy_get_property;
  gobject_class->set_property = xdp_dbus_proxy_resolver_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = xdp_dbus_proxy_resolver_proxy_g_signal;
  proxy_class->g_properties_changed = xdp_dbus_proxy_resolver_proxy_g_properties_changed;

  xdp_dbus_proxy_resolver_override_properties (gobject_class, 1);

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

static void
xdp_dbus_proxy_resolver_proxy_iface_init (XdpDbusProxyResolverIface *iface)
{
  iface->get_version = xdp_dbus_proxy_resolver_proxy_get_version;
}

/**
 * xdp_dbus_proxy_resolver_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-portal-ProxyResolver.top_of_page">org.freedesktop.portal.ProxyResolver</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_dbus_proxy_resolver_proxy_new_finish() to get the result of the operation.
 *
 * See xdp_dbus_proxy_resolver_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_dbus_proxy_resolver_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_DBUS_TYPE_PROXY_RESOLVER_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.portal.ProxyResolver", NULL);
}

/**
 * xdp_dbus_proxy_resolver_proxy_new_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_proxy_resolver_proxy_new().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_dbus_proxy_resolver_proxy_new().
 *
 * Returns: (transfer full) (type XdpDbusProxyResolverProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusProxyResolver *
xdp_dbus_proxy_resolver_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_DBUS_PROXY_RESOLVER (ret);
  else
    return NULL;
}

/**
 * xdp_dbus_proxy_resolver_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-portal-ProxyResolver.top_of_page">org.freedesktop.portal.ProxyResolver</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_proxy_resolver_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpDbusProxyResolverProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusProxyResolver *
xdp_dbus_proxy_resolver_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_DBUS_TYPE_PROXY_RESOLVER_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.portal.ProxyResolver", NULL);
  if (ret != NULL)
    return XDP_DBUS_PROXY_RESOLVER (ret);
  else
    return NULL;
}


/**
 * xdp_dbus_proxy_resolver_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_dbus_proxy_resolver_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_dbus_proxy_resolver_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See xdp_dbus_proxy_resolver_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_dbus_proxy_resolver_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_DBUS_TYPE_PROXY_RESOLVER_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.portal.ProxyResolver", NULL);
}

/**
 * xdp_dbus_proxy_resolver_proxy_new_for_bus_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_proxy_resolver_proxy_new_for_bus().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_dbus_proxy_resolver_proxy_new_for_bus().
 *
 * Returns: (transfer full) (type XdpDbusProxyResolverProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusProxyResolver *
xdp_dbus_proxy_resolver_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_DBUS_PROXY_RESOLVER (ret);
  else
    return NULL;
}

/**
 * xdp_dbus_proxy_resolver_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_dbus_proxy_resolver_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_proxy_resolver_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpDbusProxyResolverProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusProxyResolver *
xdp_dbus_proxy_resolver_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_DBUS_TYPE_PROXY_RESOLVER_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.portal.ProxyResolver", NULL);
  if (ret != NULL)
    return XDP_DBUS_PROXY_RESOLVER (ret);
  else
    return NULL;
}


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

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

/**
 * XdpDbusProxyResolverSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpDbusProxyResolverSkeleton.
 */

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

static void
_xdp_dbus_proxy_resolver_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)
{
  XdpDbusProxyResolverSkeleton *skeleton = XDP_DBUS_PROXY_RESOLVER_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_DBUS_TYPE_PROXY_RESOLVER);
  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_DBUS_TYPE_PROXY_RESOLVER);
  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_dbus_proxy_resolver_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)
{
  XdpDbusProxyResolverSkeleton *skeleton = XDP_DBUS_PROXY_RESOLVER_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_dbus_proxy_resolver_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_dbus_proxy_resolver_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)
{
  XdpDbusProxyResolverSkeleton *skeleton = XDP_DBUS_PROXY_RESOLVER_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_dbus_proxy_resolver_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_dbus_proxy_resolver_skeleton_vtable =
{
  _xdp_dbus_proxy_resolver_skeleton_handle_method_call,
  _xdp_dbus_proxy_resolver_skeleton_handle_get_property,
  _xdp_dbus_proxy_resolver_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
xdp_dbus_proxy_resolver_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return xdp_dbus_proxy_resolver_interface_info ();
}

static GDBusInterfaceVTable *
xdp_dbus_proxy_resolver_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_xdp_dbus_proxy_resolver_skeleton_vtable;
}

static GVariant *
xdp_dbus_proxy_resolver_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  XdpDbusProxyResolverSkeleton *skeleton = XDP_DBUS_PROXY_RESOLVER_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_dbus_proxy_resolver_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _xdp_dbus_proxy_resolver_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _xdp_dbus_proxy_resolver_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _xdp_dbus_proxy_resolver_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.portal.ProxyResolver", 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_dbus_proxy_resolver_emit_changed (gpointer user_data);

static void
xdp_dbus_proxy_resolver_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
{
  XdpDbusProxyResolverSkeleton *skeleton = XDP_DBUS_PROXY_RESOLVER_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_dbus_proxy_resolver_emit_changed (skeleton);
}

static void xdp_dbus_proxy_resolver_skeleton_iface_init (XdpDbusProxyResolverIface *iface);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpDbusProxyResolverSkeleton, xdp_dbus_proxy_resolver_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (XdpDbusProxyResolverSkeleton)
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_PROXY_RESOLVER, xdp_dbus_proxy_resolver_skeleton_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpDbusProxyResolverSkeleton, xdp_dbus_proxy_resolver_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_PROXY_RESOLVER, xdp_dbus_proxy_resolver_skeleton_iface_init))

#endif
static void
xdp_dbus_proxy_resolver_skeleton_finalize (GObject *object)
{
  XdpDbusProxyResolverSkeleton *skeleton = XDP_DBUS_PROXY_RESOLVER_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_dbus_proxy_resolver_skeleton_parent_class)->finalize (object);
}

static void
xdp_dbus_proxy_resolver_skeleton_get_property (GObject      *object,
  guint         prop_id,
  GValue       *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  XdpDbusProxyResolverSkeleton *skeleton = XDP_DBUS_PROXY_RESOLVER_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_dbus_proxy_resolver_emit_changed (gpointer user_data)
{
  XdpDbusProxyResolverSkeleton *skeleton = XDP_DBUS_PROXY_RESOLVER_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.portal.ProxyResolver",
                                           &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_dbus_proxy_resolver_schedule_emit_changed (XdpDbusProxyResolverSkeleton *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_dbus_proxy_resolver_skeleton_notify (GObject      *object,
  GParamSpec *pspec G_GNUC_UNUSED)
{
  XdpDbusProxyResolverSkeleton *skeleton = XDP_DBUS_PROXY_RESOLVER_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_dbus_proxy_resolver_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
      g_source_set_name (skeleton->priv->changed_properties_idle_source, "[generated] _xdp_dbus_proxy_resolver_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_dbus_proxy_resolver_skeleton_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec)
{
  const _ExtendedGDBusPropertyInfo *info;
  XdpDbusProxyResolverSkeleton *skeleton = XDP_DBUS_PROXY_RESOLVER_SKELETON (object);
  g_assert (prop_id != 0 && prop_id - 1 < 1);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_dbus_proxy_resolver_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_dbus_proxy_resolver_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_dbus_proxy_resolver_skeleton_init (XdpDbusProxyResolverSkeleton *skeleton)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  skeleton->priv = xdp_dbus_proxy_resolver_skeleton_get_instance_private (skeleton);
#else
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, XDP_DBUS_TYPE_PROXY_RESOLVER_SKELETON, XdpDbusProxyResolverSkeletonPrivate);
#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_dbus_proxy_resolver_skeleton_get_version (XdpDbusProxyResolver *object)
{
  XdpDbusProxyResolverSkeleton *skeleton = XDP_DBUS_PROXY_RESOLVER_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_dbus_proxy_resolver_skeleton_class_init (XdpDbusProxyResolverSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize = xdp_dbus_proxy_resolver_skeleton_finalize;
  gobject_class->get_property = xdp_dbus_proxy_resolver_skeleton_get_property;
  gobject_class->set_property = xdp_dbus_proxy_resolver_skeleton_set_property;
  gobject_class->notify       = xdp_dbus_proxy_resolver_skeleton_notify;


  xdp_dbus_proxy_resolver_override_properties (gobject_class, 1);

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = xdp_dbus_proxy_resolver_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = xdp_dbus_proxy_resolver_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = xdp_dbus_proxy_resolver_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = xdp_dbus_proxy_resolver_skeleton_dbus_interface_get_vtable;

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

static void
xdp_dbus_proxy_resolver_skeleton_iface_init (XdpDbusProxyResolverIface *iface)
{
  iface->get_version = xdp_dbus_proxy_resolver_skeleton_get_version;
}

/**
 * xdp_dbus_proxy_resolver_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-ProxyResolver.top_of_page">org.freedesktop.portal.ProxyResolver</link>.
 *
 * Returns: (transfer full) (type XdpDbusProxyResolverSkeleton): The skeleton object.
 */
XdpDbusProxyResolver *
xdp_dbus_proxy_resolver_skeleton_new (void)
{
  return XDP_DBUS_PROXY_RESOLVER (g_object_new (XDP_DBUS_TYPE_PROXY_RESOLVER_SKELETON, NULL));
}

/* ------------------------------------------------------------------------
 * Code for interface org.freedesktop.portal.Realtime
 * ------------------------------------------------------------------------
 */

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

/* ---- Introspection data for org.freedesktop.portal.Realtime ---- */

static const _ExtendedGDBusArgInfo _xdp_dbus_realtime_method_info_make_thread_realtime_with_pid_IN_ARG_process =
{
  {
    -1,
    (gchar *) "process",
    (gchar *) "t",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_dbus_realtime_method_info_make_thread_realtime_with_pid_IN_ARG_thread =
{
  {
    -1,
    (gchar *) "thread",
    (gchar *) "t",
    NULL
  },
  FALSE
};

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

static const GDBusArgInfo * const _xdp_dbus_realtime_method_info_make_thread_realtime_with_pid_IN_ARG_pointers[] =
{
  &_xdp_dbus_realtime_method_info_make_thread_realtime_with_pid_IN_ARG_process.parent_struct,
  &_xdp_dbus_realtime_method_info_make_thread_realtime_with_pid_IN_ARG_thread.parent_struct,
  &_xdp_dbus_realtime_method_info_make_thread_realtime_with_pid_IN_ARG_priority.parent_struct,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_realtime_method_info_make_thread_realtime_with_pid =
{
  {
    -1,
    (gchar *) "MakeThreadRealtimeWithPID",
    (GDBusArgInfo **) &_xdp_dbus_realtime_method_info_make_thread_realtime_with_pid_IN_ARG_pointers,
    NULL,
    NULL
  },
  "handle-make-thread-realtime-with-pid",
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_dbus_realtime_method_info_make_thread_high_priority_with_pid_IN_ARG_process =
{
  {
    -1,
    (gchar *) "process",
    (gchar *) "t",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_dbus_realtime_method_info_make_thread_high_priority_with_pid_IN_ARG_thread =
{
  {
    -1,
    (gchar *) "thread",
    (gchar *) "t",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_dbus_realtime_method_info_make_thread_high_priority_with_pid_IN_ARG_priority =
{
  {
    -1,
    (gchar *) "priority",
    (gchar *) "i",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_dbus_realtime_method_info_make_thread_high_priority_with_pid_IN_ARG_pointers[] =
{
  &_xdp_dbus_realtime_method_info_make_thread_high_priority_with_pid_IN_ARG_process.parent_struct,
  &_xdp_dbus_realtime_method_info_make_thread_high_priority_with_pid_IN_ARG_thread.parent_struct,
  &_xdp_dbus_realtime_method_info_make_thread_high_priority_with_pid_IN_ARG_priority.parent_struct,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_realtime_method_info_make_thread_high_priority_with_pid =
{
  {
    -1,
    (gchar *) "MakeThreadHighPriorityWithPID",
    (GDBusArgInfo **) &_xdp_dbus_realtime_method_info_make_thread_high_priority_with_pid_IN_ARG_pointers,
    NULL,
    NULL
  },
  "handle-make-thread-high-priority-with-pid",
  FALSE
};

static const GDBusMethodInfo * const _xdp_dbus_realtime_method_info_pointers[] =
{
  &_xdp_dbus_realtime_method_info_make_thread_realtime_with_pid.parent_struct,
  &_xdp_dbus_realtime_method_info_make_thread_high_priority_with_pid.parent_struct,
  NULL
};

static const _ExtendedGDBusPropertyInfo _xdp_dbus_realtime_property_info_max_realtime_priority =
{
  {
    -1,
    (gchar *) "MaxRealtimePriority",
    (gchar *) "i",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "max-realtime-priority",
  FALSE,
  TRUE
};

static const _ExtendedGDBusPropertyInfo _xdp_dbus_realtime_property_info_min_nice_level =
{
  {
    -1,
    (gchar *) "MinNiceLevel",
    (gchar *) "i",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "min-nice-level",
  FALSE,
  TRUE
};

static const _ExtendedGDBusPropertyInfo _xdp_dbus_realtime_property_info_rttime_usec_max =
{
  {
    -1,
    (gchar *) "RTTimeUSecMax",
    (gchar *) "x",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "rttime-usec-max",
  FALSE,
  TRUE
};

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

static const GDBusPropertyInfo * const _xdp_dbus_realtime_property_info_pointers[] =
{
  &_xdp_dbus_realtime_property_info_max_realtime_priority.parent_struct,
  &_xdp_dbus_realtime_property_info_min_nice_level.parent_struct,
  &_xdp_dbus_realtime_property_info_rttime_usec_max.parent_struct,
  &_xdp_dbus_realtime_property_info_version.parent_struct,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _xdp_dbus_realtime_interface_info =
{
  {
    -1,
    (gchar *) "org.freedesktop.portal.Realtime",
    (GDBusMethodInfo **) &_xdp_dbus_realtime_method_info_pointers,
    NULL,
    (GDBusPropertyInfo **) &_xdp_dbus_realtime_property_info_pointers,
    NULL
  },
  "realtime",
};


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

/**
 * xdp_dbus_realtime_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 #XdpDbusRealtime interface for a concrete class.
 * The properties are overridden in the order they are defined.
 *
 * Returns: The last property id.
 */
guint
xdp_dbus_realtime_override_properties (GObjectClass *klass, guint property_id_begin)
{
  g_object_class_override_property (klass, property_id_begin++, "max-realtime-priority");
  g_object_class_override_property (klass, property_id_begin++, "min-nice-level");
  g_object_class_override_property (klass, property_id_begin++, "rttime-usec-max");
  g_object_class_override_property (klass, property_id_begin++, "version");
  return property_id_begin - 1;
}


inline static void
xdp_dbus_realtime_method_marshal_make_thread_realtime_with_pid (
    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_UINT64_UINT64_UINT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_dbus_realtime_method_marshal_make_thread_high_priority_with_pid (
    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_UINT64_UINT64_INT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}


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

/**
 * XdpDbusRealtimeIface:
 * @parent_iface: The parent interface.
 * @handle_make_thread_high_priority_with_pid: Handler for the #XdpDbusRealtime::handle-make-thread-high-priority-with-pid signal.
 * @handle_make_thread_realtime_with_pid: Handler for the #XdpDbusRealtime::handle-make-thread-realtime-with-pid signal.
 * @get_max_realtime_priority: Getter for the #XdpDbusRealtime:max-realtime-priority property.
 * @get_min_nice_level: Getter for the #XdpDbusRealtime:min-nice-level property.
 * @get_rttime_usec_max: Getter for the #XdpDbusRealtime:rttime-usec-max property.
 * @get_version: Getter for the #XdpDbusRealtime:version property.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-Realtime.top_of_page">org.freedesktop.portal.Realtime</link>.
 */

typedef XdpDbusRealtimeIface XdpDbusRealtimeInterface;
G_DEFINE_INTERFACE (XdpDbusRealtime, xdp_dbus_realtime, G_TYPE_OBJECT)

static void
xdp_dbus_realtime_default_init (XdpDbusRealtimeIface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * XdpDbusRealtime::handle-make-thread-realtime-with-pid:
   * @object: A #XdpDbusRealtime.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_process: Argument passed by remote caller.
   * @arg_thread: Argument passed by remote caller.
   * @arg_priority: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-portal-Realtime.MakeThreadRealtimeWithPID">MakeThreadRealtimeWithPID()</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_dbus_realtime_complete_make_thread_realtime_with_pid() 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-make-thread-realtime-with-pid",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpDbusRealtimeIface, handle_make_thread_realtime_with_pid),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_realtime_method_marshal_make_thread_realtime_with_pid,
    G_TYPE_BOOLEAN,
    4,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UINT64, G_TYPE_UINT64, G_TYPE_UINT);

  /**
   * XdpDbusRealtime::handle-make-thread-high-priority-with-pid:
   * @object: A #XdpDbusRealtime.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_process: Argument passed by remote caller.
   * @arg_thread: Argument passed by remote caller.
   * @arg_priority: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-portal-Realtime.MakeThreadHighPriorityWithPID">MakeThreadHighPriorityWithPID()</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_dbus_realtime_complete_make_thread_high_priority_with_pid() 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-make-thread-high-priority-with-pid",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpDbusRealtimeIface, handle_make_thread_high_priority_with_pid),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_realtime_method_marshal_make_thread_high_priority_with_pid,
    G_TYPE_BOOLEAN,
    4,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UINT64, G_TYPE_UINT64, G_TYPE_INT);

  /* GObject properties for D-Bus properties: */
  /**
   * XdpDbusRealtime:max-realtime-priority:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-portal-Realtime.MaxRealtimePriority">"MaxRealtimePriority"</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_int ("max-realtime-priority", "MaxRealtimePriority", "MaxRealtimePriority", G_MININT32, G_MAXINT32, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * XdpDbusRealtime:min-nice-level:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-portal-Realtime.MinNiceLevel">"MinNiceLevel"</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_int ("min-nice-level", "MinNiceLevel", "MinNiceLevel", G_MININT32, G_MAXINT32, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * XdpDbusRealtime:rttime-usec-max:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-portal-Realtime.RTTimeUSecMax">"RTTimeUSecMax"</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_int64 ("rttime-usec-max", "RTTimeUSecMax", "RTTimeUSecMax", G_MININT64, G_MAXINT64, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * XdpDbusRealtime:version:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-portal-Realtime.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_dbus_realtime_get_max_realtime_priority: (skip)
 * @object: A #XdpDbusRealtime.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-portal-Realtime.MaxRealtimePriority">"MaxRealtimePriority"</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.
 */
gint 
xdp_dbus_realtime_get_max_realtime_priority (XdpDbusRealtime *object)
{
  g_return_val_if_fail (XDP_DBUS_IS_REALTIME (object), 0);

  return XDP_DBUS_REALTIME_GET_IFACE (object)->get_max_realtime_priority (object);
}

/**
 * xdp_dbus_realtime_set_max_realtime_priority: (skip)
 * @object: A #XdpDbusRealtime.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-freedesktop-portal-Realtime.MaxRealtimePriority">"MaxRealtimePriority"</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_dbus_realtime_set_max_realtime_priority (XdpDbusRealtime *object, gint value)
{
  g_object_set (G_OBJECT (object), "max-realtime-priority", value, NULL);
}

/**
 * xdp_dbus_realtime_get_min_nice_level: (skip)
 * @object: A #XdpDbusRealtime.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-portal-Realtime.MinNiceLevel">"MinNiceLevel"</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.
 */
gint 
xdp_dbus_realtime_get_min_nice_level (XdpDbusRealtime *object)
{
  g_return_val_if_fail (XDP_DBUS_IS_REALTIME (object), 0);

  return XDP_DBUS_REALTIME_GET_IFACE (object)->get_min_nice_level (object);
}

/**
 * xdp_dbus_realtime_set_min_nice_level: (skip)
 * @object: A #XdpDbusRealtime.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-freedesktop-portal-Realtime.MinNiceLevel">"MinNiceLevel"</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_dbus_realtime_set_min_nice_level (XdpDbusRealtime *object, gint value)
{
  g_object_set (G_OBJECT (object), "min-nice-level", value, NULL);
}

/**
 * xdp_dbus_realtime_get_rttime_usec_max: (skip)
 * @object: A #XdpDbusRealtime.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-portal-Realtime.RTTimeUSecMax">"RTTimeUSecMax"</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.
 */
gint64 
xdp_dbus_realtime_get_rttime_usec_max (XdpDbusRealtime *object)
{
  g_return_val_if_fail (XDP_DBUS_IS_REALTIME (object), 0);

  return XDP_DBUS_REALTIME_GET_IFACE (object)->get_rttime_usec_max (object);
}

/**
 * xdp_dbus_realtime_set_rttime_usec_max: (skip)
 * @object: A #XdpDbusRealtime.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-freedesktop-portal-Realtime.RTTimeUSecMax">"RTTimeUSecMax"</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_dbus_realtime_set_rttime_usec_max (XdpDbusRealtime *object, gint64 value)
{
  g_object_set (G_OBJECT (object), "rttime-usec-max", value, NULL);
}

/**
 * xdp_dbus_realtime_get_version: (skip)
 * @object: A #XdpDbusRealtime.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-portal-Realtime.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_dbus_realtime_get_version (XdpDbusRealtime *object)
{
  g_return_val_if_fail (XDP_DBUS_IS_REALTIME (object), 0);

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

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

/**
 * xdp_dbus_realtime_call_make_thread_realtime_with_pid:
 * @proxy: A #XdpDbusRealtimeProxy.
 * @arg_process: Argument to pass with the method invocation.
 * @arg_thread: Argument to pass with the method invocation.
 * @arg_priority: 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-portal-Realtime.MakeThreadRealtimeWithPID">MakeThreadRealtimeWithPID()</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_dbus_realtime_call_make_thread_realtime_with_pid_finish() to get the result of the operation.
 *
 * See xdp_dbus_realtime_call_make_thread_realtime_with_pid_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_realtime_call_make_thread_realtime_with_pid (
    XdpDbusRealtime *proxy,
    guint64 arg_process,
    guint64 arg_thread,
    guint arg_priority,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "MakeThreadRealtimeWithPID",
    g_variant_new ("(ttu)",
                   arg_process,
                   arg_thread,
                   arg_priority),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_realtime_call_make_thread_realtime_with_pid_finish:
 * @proxy: A #XdpDbusRealtimeProxy.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_realtime_call_make_thread_realtime_with_pid().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_realtime_call_make_thread_realtime_with_pid().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_realtime_call_make_thread_realtime_with_pid_finish (
    XdpDbusRealtime *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_dbus_realtime_call_make_thread_realtime_with_pid_sync:
 * @proxy: A #XdpDbusRealtimeProxy.
 * @arg_process: Argument to pass with the method invocation.
 * @arg_thread: Argument to pass with the method invocation.
 * @arg_priority: 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-portal-Realtime.MakeThreadRealtimeWithPID">MakeThreadRealtimeWithPID()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_realtime_call_make_thread_realtime_with_pid() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_realtime_call_make_thread_realtime_with_pid_sync (
    XdpDbusRealtime *proxy,
    guint64 arg_process,
    guint64 arg_thread,
    guint arg_priority,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "MakeThreadRealtimeWithPID",
    g_variant_new ("(ttu)",
                   arg_process,
                   arg_thread,
                   arg_priority),
    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_dbus_realtime_call_make_thread_high_priority_with_pid:
 * @proxy: A #XdpDbusRealtimeProxy.
 * @arg_process: Argument to pass with the method invocation.
 * @arg_thread: Argument to pass with the method invocation.
 * @arg_priority: 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-portal-Realtime.MakeThreadHighPriorityWithPID">MakeThreadHighPriorityWithPID()</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_dbus_realtime_call_make_thread_high_priority_with_pid_finish() to get the result of the operation.
 *
 * See xdp_dbus_realtime_call_make_thread_high_priority_with_pid_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_realtime_call_make_thread_high_priority_with_pid (
    XdpDbusRealtime *proxy,
    guint64 arg_process,
    guint64 arg_thread,
    gint arg_priority,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "MakeThreadHighPriorityWithPID",
    g_variant_new ("(tti)",
                   arg_process,
                   arg_thread,
                   arg_priority),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_realtime_call_make_thread_high_priority_with_pid_finish:
 * @proxy: A #XdpDbusRealtimeProxy.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_realtime_call_make_thread_high_priority_with_pid().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_realtime_call_make_thread_high_priority_with_pid().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_realtime_call_make_thread_high_priority_with_pid_finish (
    XdpDbusRealtime *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_dbus_realtime_call_make_thread_high_priority_with_pid_sync:
 * @proxy: A #XdpDbusRealtimeProxy.
 * @arg_process: Argument to pass with the method invocation.
 * @arg_thread: Argument to pass with the method invocation.
 * @arg_priority: 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-portal-Realtime.MakeThreadHighPriorityWithPID">MakeThreadHighPriorityWithPID()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_realtime_call_make_thread_high_priority_with_pid() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_realtime_call_make_thread_high_priority_with_pid_sync (
    XdpDbusRealtime *proxy,
    guint64 arg_process,
    guint64 arg_thread,
    gint arg_priority,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "MakeThreadHighPriorityWithPID",
    g_variant_new ("(tti)",
                   arg_process,
                   arg_thread,
                   arg_priority),
    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_dbus_realtime_complete_make_thread_realtime_with_pid:
 * @object: A #XdpDbusRealtime.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-portal-Realtime.MakeThreadRealtimeWithPID">MakeThreadRealtimeWithPID()</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_dbus_realtime_complete_make_thread_realtime_with_pid (
    XdpDbusRealtime *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("()"));
}

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

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

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

/**
 * XdpDbusRealtimeProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpDbusRealtimeProxy.
 */

struct _XdpDbusRealtimeProxyPrivate
{
  GData *qdata;
};

static void xdp_dbus_realtime_proxy_iface_init (XdpDbusRealtimeIface *iface);

#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpDbusRealtimeProxy, xdp_dbus_realtime_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (XdpDbusRealtimeProxy)
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_REALTIME, xdp_dbus_realtime_proxy_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpDbusRealtimeProxy, xdp_dbus_realtime_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_REALTIME, xdp_dbus_realtime_proxy_iface_init))

#endif
static void
xdp_dbus_realtime_proxy_finalize (GObject *object)
{
  XdpDbusRealtimeProxy *proxy = XDP_DBUS_REALTIME_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (xdp_dbus_realtime_proxy_parent_class)->finalize (object);
}

static void
xdp_dbus_realtime_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 < 4);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_dbus_realtime_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_dbus_realtime_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.portal.Realtime: %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_dbus_realtime_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 < 4);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_dbus_realtime_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.portal.Realtime", info->parent_struct.name, variant),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    NULL, (GAsyncReadyCallback) xdp_dbus_realtime_proxy_set_property_cb, (GDBusPropertyInfo *) &info->parent_struct);
  g_variant_unref (variant);
}

static void
xdp_dbus_realtime_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_dbus_realtime_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_DBUS_TYPE_REALTIME);
  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_DBUS_TYPE_REALTIME);
  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_dbus_realtime_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  XdpDbusRealtimeProxy *proxy = XDP_DBUS_REALTIME_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_dbus_realtime_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_dbus_realtime_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 gint 
xdp_dbus_realtime_proxy_get_max_realtime_priority (XdpDbusRealtime *object)
{
  XdpDbusRealtimeProxy *proxy = XDP_DBUS_REALTIME_PROXY (object);
  GVariant *variant;
  gint value = 0;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "MaxRealtimePriority");
  if (variant != NULL)
    {
      value = g_variant_get_int32 (variant);
      g_variant_unref (variant);
    }
  return value;
}

static gint 
xdp_dbus_realtime_proxy_get_min_nice_level (XdpDbusRealtime *object)
{
  XdpDbusRealtimeProxy *proxy = XDP_DBUS_REALTIME_PROXY (object);
  GVariant *variant;
  gint value = 0;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "MinNiceLevel");
  if (variant != NULL)
    {
      value = g_variant_get_int32 (variant);
      g_variant_unref (variant);
    }
  return value;
}

static gint64 
xdp_dbus_realtime_proxy_get_rttime_usec_max (XdpDbusRealtime *object)
{
  XdpDbusRealtimeProxy *proxy = XDP_DBUS_REALTIME_PROXY (object);
  GVariant *variant;
  gint64 value = 0;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "RTTimeUSecMax");
  if (variant != NULL)
    {
      value = g_variant_get_int64 (variant);
      g_variant_unref (variant);
    }
  return value;
}

static guint 
xdp_dbus_realtime_proxy_get_version (XdpDbusRealtime *object)
{
  XdpDbusRealtimeProxy *proxy = XDP_DBUS_REALTIME_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_dbus_realtime_proxy_init (XdpDbusRealtimeProxy *proxy)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  proxy->priv = xdp_dbus_realtime_proxy_get_instance_private (proxy);
#else
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, XDP_DBUS_TYPE_REALTIME_PROXY, XdpDbusRealtimeProxyPrivate);
#endif

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

static void
xdp_dbus_realtime_proxy_class_init (XdpDbusRealtimeProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = xdp_dbus_realtime_proxy_finalize;
  gobject_class->get_property = xdp_dbus_realtime_proxy_get_property;
  gobject_class->set_property = xdp_dbus_realtime_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = xdp_dbus_realtime_proxy_g_signal;
  proxy_class->g_properties_changed = xdp_dbus_realtime_proxy_g_properties_changed;

  xdp_dbus_realtime_override_properties (gobject_class, 1);

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

static void
xdp_dbus_realtime_proxy_iface_init (XdpDbusRealtimeIface *iface)
{
  iface->get_max_realtime_priority = xdp_dbus_realtime_proxy_get_max_realtime_priority;
  iface->get_min_nice_level = xdp_dbus_realtime_proxy_get_min_nice_level;
  iface->get_rttime_usec_max = xdp_dbus_realtime_proxy_get_rttime_usec_max;
  iface->get_version = xdp_dbus_realtime_proxy_get_version;
}

/**
 * xdp_dbus_realtime_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-portal-Realtime.top_of_page">org.freedesktop.portal.Realtime</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_dbus_realtime_proxy_new_finish() to get the result of the operation.
 *
 * See xdp_dbus_realtime_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_dbus_realtime_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_DBUS_TYPE_REALTIME_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.portal.Realtime", NULL);
}

/**
 * xdp_dbus_realtime_proxy_new_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_realtime_proxy_new().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_dbus_realtime_proxy_new().
 *
 * Returns: (transfer full) (type XdpDbusRealtimeProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusRealtime *
xdp_dbus_realtime_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_DBUS_REALTIME (ret);
  else
    return NULL;
}

/**
 * xdp_dbus_realtime_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-portal-Realtime.top_of_page">org.freedesktop.portal.Realtime</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_realtime_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpDbusRealtimeProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusRealtime *
xdp_dbus_realtime_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_DBUS_TYPE_REALTIME_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.portal.Realtime", NULL);
  if (ret != NULL)
    return XDP_DBUS_REALTIME (ret);
  else
    return NULL;
}


/**
 * xdp_dbus_realtime_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_dbus_realtime_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_dbus_realtime_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See xdp_dbus_realtime_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_dbus_realtime_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_DBUS_TYPE_REALTIME_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.portal.Realtime", NULL);
}

/**
 * xdp_dbus_realtime_proxy_new_for_bus_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_realtime_proxy_new_for_bus().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_dbus_realtime_proxy_new_for_bus().
 *
 * Returns: (transfer full) (type XdpDbusRealtimeProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusRealtime *
xdp_dbus_realtime_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_DBUS_REALTIME (ret);
  else
    return NULL;
}

/**
 * xdp_dbus_realtime_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_dbus_realtime_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_realtime_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpDbusRealtimeProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusRealtime *
xdp_dbus_realtime_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_DBUS_TYPE_REALTIME_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.portal.Realtime", NULL);
  if (ret != NULL)
    return XDP_DBUS_REALTIME (ret);
  else
    return NULL;
}


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

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

/**
 * XdpDbusRealtimeSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpDbusRealtimeSkeleton.
 */

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

static void
_xdp_dbus_realtime_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)
{
  XdpDbusRealtimeSkeleton *skeleton = XDP_DBUS_REALTIME_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_DBUS_TYPE_REALTIME);
  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_DBUS_TYPE_REALTIME);
  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_dbus_realtime_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)
{
  XdpDbusRealtimeSkeleton *skeleton = XDP_DBUS_REALTIME_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_dbus_realtime_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_dbus_realtime_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)
{
  XdpDbusRealtimeSkeleton *skeleton = XDP_DBUS_REALTIME_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_dbus_realtime_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_dbus_realtime_skeleton_vtable =
{
  _xdp_dbus_realtime_skeleton_handle_method_call,
  _xdp_dbus_realtime_skeleton_handle_get_property,
  _xdp_dbus_realtime_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
xdp_dbus_realtime_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return xdp_dbus_realtime_interface_info ();
}

static GDBusInterfaceVTable *
xdp_dbus_realtime_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_xdp_dbus_realtime_skeleton_vtable;
}

static GVariant *
xdp_dbus_realtime_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  XdpDbusRealtimeSkeleton *skeleton = XDP_DBUS_REALTIME_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_dbus_realtime_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _xdp_dbus_realtime_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _xdp_dbus_realtime_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _xdp_dbus_realtime_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.portal.Realtime", 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_dbus_realtime_emit_changed (gpointer user_data);

static void
xdp_dbus_realtime_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
{
  XdpDbusRealtimeSkeleton *skeleton = XDP_DBUS_REALTIME_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_dbus_realtime_emit_changed (skeleton);
}

static void xdp_dbus_realtime_skeleton_iface_init (XdpDbusRealtimeIface *iface);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpDbusRealtimeSkeleton, xdp_dbus_realtime_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (XdpDbusRealtimeSkeleton)
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_REALTIME, xdp_dbus_realtime_skeleton_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpDbusRealtimeSkeleton, xdp_dbus_realtime_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_REALTIME, xdp_dbus_realtime_skeleton_iface_init))

#endif
static void
xdp_dbus_realtime_skeleton_finalize (GObject *object)
{
  XdpDbusRealtimeSkeleton *skeleton = XDP_DBUS_REALTIME_SKELETON (object);
  guint n;
  for (n = 0; n < 4; 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_dbus_realtime_skeleton_parent_class)->finalize (object);
}

static void
xdp_dbus_realtime_skeleton_get_property (GObject      *object,
  guint         prop_id,
  GValue       *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  XdpDbusRealtimeSkeleton *skeleton = XDP_DBUS_REALTIME_SKELETON (object);
  g_assert (prop_id != 0 && prop_id - 1 < 4);
  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_dbus_realtime_emit_changed (gpointer user_data)
{
  XdpDbusRealtimeSkeleton *skeleton = XDP_DBUS_REALTIME_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.portal.Realtime",
                                           &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_dbus_realtime_schedule_emit_changed (XdpDbusRealtimeSkeleton *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_dbus_realtime_skeleton_notify (GObject      *object,
  GParamSpec *pspec G_GNUC_UNUSED)
{
  XdpDbusRealtimeSkeleton *skeleton = XDP_DBUS_REALTIME_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_dbus_realtime_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
      g_source_set_name (skeleton->priv->changed_properties_idle_source, "[generated] _xdp_dbus_realtime_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_dbus_realtime_skeleton_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec)
{
  const _ExtendedGDBusPropertyInfo *info;
  XdpDbusRealtimeSkeleton *skeleton = XDP_DBUS_REALTIME_SKELETON (object);
  g_assert (prop_id != 0 && prop_id - 1 < 4);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_dbus_realtime_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_dbus_realtime_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_dbus_realtime_skeleton_init (XdpDbusRealtimeSkeleton *skeleton)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  skeleton->priv = xdp_dbus_realtime_skeleton_get_instance_private (skeleton);
#else
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, XDP_DBUS_TYPE_REALTIME_SKELETON, XdpDbusRealtimeSkeletonPrivate);
#endif

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

static gint 
xdp_dbus_realtime_skeleton_get_max_realtime_priority (XdpDbusRealtime *object)
{
  XdpDbusRealtimeSkeleton *skeleton = XDP_DBUS_REALTIME_SKELETON (object);
  gint value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_marshal_value_peek_int (&(skeleton->priv->properties[0]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static gint 
xdp_dbus_realtime_skeleton_get_min_nice_level (XdpDbusRealtime *object)
{
  XdpDbusRealtimeSkeleton *skeleton = XDP_DBUS_REALTIME_SKELETON (object);
  gint value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_marshal_value_peek_int (&(skeleton->priv->properties[1]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static gint64 
xdp_dbus_realtime_skeleton_get_rttime_usec_max (XdpDbusRealtime *object)
{
  XdpDbusRealtimeSkeleton *skeleton = XDP_DBUS_REALTIME_SKELETON (object);
  gint64 value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_marshal_value_peek_int64 (&(skeleton->priv->properties[2]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static guint 
xdp_dbus_realtime_skeleton_get_version (XdpDbusRealtime *object)
{
  XdpDbusRealtimeSkeleton *skeleton = XDP_DBUS_REALTIME_SKELETON (object);
  guint value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_marshal_value_peek_uint (&(skeleton->priv->properties[3]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static void
xdp_dbus_realtime_skeleton_class_init (XdpDbusRealtimeSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize = xdp_dbus_realtime_skeleton_finalize;
  gobject_class->get_property = xdp_dbus_realtime_skeleton_get_property;
  gobject_class->set_property = xdp_dbus_realtime_skeleton_set_property;
  gobject_class->notify       = xdp_dbus_realtime_skeleton_notify;


  xdp_dbus_realtime_override_properties (gobject_class, 1);

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = xdp_dbus_realtime_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = xdp_dbus_realtime_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = xdp_dbus_realtime_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = xdp_dbus_realtime_skeleton_dbus_interface_get_vtable;

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

static void
xdp_dbus_realtime_skeleton_iface_init (XdpDbusRealtimeIface *iface)
{
  iface->get_max_realtime_priority = xdp_dbus_realtime_skeleton_get_max_realtime_priority;
  iface->get_min_nice_level = xdp_dbus_realtime_skeleton_get_min_nice_level;
  iface->get_rttime_usec_max = xdp_dbus_realtime_skeleton_get_rttime_usec_max;
  iface->get_version = xdp_dbus_realtime_skeleton_get_version;
}

/**
 * xdp_dbus_realtime_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-Realtime.top_of_page">org.freedesktop.portal.Realtime</link>.
 *
 * Returns: (transfer full) (type XdpDbusRealtimeSkeleton): The skeleton object.
 */
XdpDbusRealtime *
xdp_dbus_realtime_skeleton_new (void)
{
  return XDP_DBUS_REALTIME (g_object_new (XDP_DBUS_TYPE_REALTIME_SKELETON, NULL));
}

/* ------------------------------------------------------------------------
 * Code for interface org.freedesktop.portal.RemoteDesktop
 * ------------------------------------------------------------------------
 */

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

/* ---- Introspection data for org.freedesktop.portal.RemoteDesktop ---- */

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

static const GDBusArgInfo * const _xdp_dbus_remote_desktop_method_info_create_session_IN_ARG_pointers[] =
{
  &_xdp_dbus_remote_desktop_method_info_create_session_IN_ARG_options.parent_struct,
  NULL
};

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

static const GDBusArgInfo * const _xdp_dbus_remote_desktop_method_info_create_session_OUT_ARG_pointers[] =
{
  &_xdp_dbus_remote_desktop_method_info_create_session_OUT_ARG_handle.parent_struct,
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_remote_desktop_method_create_session_annotation_info_pointers[] =
{
  &_xdp_dbus_remote_desktop_method_create_session_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_remote_desktop_method_info_create_session =
{
  {
    -1,
    (gchar *) "CreateSession",
    (GDBusArgInfo **) &_xdp_dbus_remote_desktop_method_info_create_session_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_remote_desktop_method_info_create_session_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_dbus_remote_desktop_method_create_session_annotation_info_pointers
  },
  "handle-create-session",
  FALSE
};

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

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

static const GDBusArgInfo * const _xdp_dbus_remote_desktop_method_info_select_devices_IN_ARG_pointers[] =
{
  &_xdp_dbus_remote_desktop_method_info_select_devices_IN_ARG_session_handle.parent_struct,
  &_xdp_dbus_remote_desktop_method_info_select_devices_IN_ARG_options.parent_struct,
  NULL
};

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

static const GDBusArgInfo * const _xdp_dbus_remote_desktop_method_info_select_devices_OUT_ARG_pointers[] =
{
  &_xdp_dbus_remote_desktop_method_info_select_devices_OUT_ARG_handle.parent_struct,
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_remote_desktop_method_select_devices_annotation_info_pointers[] =
{
  &_xdp_dbus_remote_desktop_method_select_devices_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_remote_desktop_method_info_select_devices =
{
  {
    -1,
    (gchar *) "SelectDevices",
    (GDBusArgInfo **) &_xdp_dbus_remote_desktop_method_info_select_devices_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_remote_desktop_method_info_select_devices_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_dbus_remote_desktop_method_select_devices_annotation_info_pointers
  },
  "handle-select-devices",
  FALSE
};

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

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

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

static const GDBusArgInfo * const _xdp_dbus_remote_desktop_method_info_start_IN_ARG_pointers[] =
{
  &_xdp_dbus_remote_desktop_method_info_start_IN_ARG_session_handle.parent_struct,
  &_xdp_dbus_remote_desktop_method_info_start_IN_ARG_parent_window.parent_struct,
  &_xdp_dbus_remote_desktop_method_info_start_IN_ARG_options.parent_struct,
  NULL
};

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

static const GDBusArgInfo * const _xdp_dbus_remote_desktop_method_info_start_OUT_ARG_pointers[] =
{
  &_xdp_dbus_remote_desktop_method_info_start_OUT_ARG_handle.parent_struct,
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_remote_desktop_method_start_annotation_info_pointers[] =
{
  &_xdp_dbus_remote_desktop_method_start_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_remote_desktop_method_info_start =
{
  {
    -1,
    (gchar *) "Start",
    (GDBusArgInfo **) &_xdp_dbus_remote_desktop_method_info_start_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_remote_desktop_method_info_start_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_dbus_remote_desktop_method_start_annotation_info_pointers
  },
  "handle-start",
  FALSE
};

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

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

static const _ExtendedGDBusArgInfo _xdp_dbus_remote_desktop_method_info_notify_pointer_motion_IN_ARG_dx =
{
  {
    -1,
    (gchar *) "dx",
    (gchar *) "d",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_dbus_remote_desktop_method_info_notify_pointer_motion_IN_ARG_dy =
{
  {
    -1,
    (gchar *) "dy",
    (gchar *) "d",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_dbus_remote_desktop_method_info_notify_pointer_motion_IN_ARG_pointers[] =
{
  &_xdp_dbus_remote_desktop_method_info_notify_pointer_motion_IN_ARG_session_handle.parent_struct,
  &_xdp_dbus_remote_desktop_method_info_notify_pointer_motion_IN_ARG_options.parent_struct,
  &_xdp_dbus_remote_desktop_method_info_notify_pointer_motion_IN_ARG_dx.parent_struct,
  &_xdp_dbus_remote_desktop_method_info_notify_pointer_motion_IN_ARG_dy.parent_struct,
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_remote_desktop_method_notify_pointer_motion_annotation_info_pointers[] =
{
  &_xdp_dbus_remote_desktop_method_notify_pointer_motion_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_remote_desktop_method_info_notify_pointer_motion =
{
  {
    -1,
    (gchar *) "NotifyPointerMotion",
    (GDBusArgInfo **) &_xdp_dbus_remote_desktop_method_info_notify_pointer_motion_IN_ARG_pointers,
    NULL,
    (GDBusAnnotationInfo **) &_xdp_dbus_remote_desktop_method_notify_pointer_motion_annotation_info_pointers
  },
  "handle-notify-pointer-motion",
  FALSE
};

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

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

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

static const _ExtendedGDBusArgInfo _xdp_dbus_remote_desktop_method_info_notify_pointer_motion_absolute_IN_ARG_x =
{
  {
    -1,
    (gchar *) "x",
    (gchar *) "d",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_dbus_remote_desktop_method_info_notify_pointer_motion_absolute_IN_ARG_y =
{
  {
    -1,
    (gchar *) "y",
    (gchar *) "d",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_dbus_remote_desktop_method_info_notify_pointer_motion_absolute_IN_ARG_pointers[] =
{
  &_xdp_dbus_remote_desktop_method_info_notify_pointer_motion_absolute_IN_ARG_session_handle.parent_struct,
  &_xdp_dbus_remote_desktop_method_info_notify_pointer_motion_absolute_IN_ARG_options.parent_struct,
  &_xdp_dbus_remote_desktop_method_info_notify_pointer_motion_absolute_IN_ARG_stream.parent_struct,
  &_xdp_dbus_remote_desktop_method_info_notify_pointer_motion_absolute_IN_ARG_x.parent_struct,
  &_xdp_dbus_remote_desktop_method_info_notify_pointer_motion_absolute_IN_ARG_y.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_dbus_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_dbus_remote_desktop_method_notify_pointer_motion_absolute_annotation_info_pointers[] =
{
  &_xdp_dbus_remote_desktop_method_notify_pointer_motion_absolute_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_remote_desktop_method_info_notify_pointer_motion_absolute =
{
  {
    -1,
    (gchar *) "NotifyPointerMotionAbsolute",
    (GDBusArgInfo **) &_xdp_dbus_remote_desktop_method_info_notify_pointer_motion_absolute_IN_ARG_pointers,
    NULL,
    (GDBusAnnotationInfo **) &_xdp_dbus_remote_desktop_method_notify_pointer_motion_absolute_annotation_info_pointers
  },
  "handle-notify-pointer-motion-absolute",
  FALSE
};

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

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

static const _ExtendedGDBusArgInfo _xdp_dbus_remote_desktop_method_info_notify_pointer_button_IN_ARG_button =
{
  {
    -1,
    (gchar *) "button",
    (gchar *) "i",
    NULL
  },
  FALSE
};

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

static const GDBusArgInfo * const _xdp_dbus_remote_desktop_method_info_notify_pointer_button_IN_ARG_pointers[] =
{
  &_xdp_dbus_remote_desktop_method_info_notify_pointer_button_IN_ARG_session_handle.parent_struct,
  &_xdp_dbus_remote_desktop_method_info_notify_pointer_button_IN_ARG_options.parent_struct,
  &_xdp_dbus_remote_desktop_method_info_notify_pointer_button_IN_ARG_button.parent_struct,
  &_xdp_dbus_remote_desktop_method_info_notify_pointer_button_IN_ARG_state.parent_struct,
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_remote_desktop_method_notify_pointer_button_annotation_info_pointers[] =
{
  &_xdp_dbus_remote_desktop_method_notify_pointer_button_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_remote_desktop_method_info_notify_pointer_button =
{
  {
    -1,
    (gchar *) "NotifyPointerButton",
    (GDBusArgInfo **) &_xdp_dbus_remote_desktop_method_info_notify_pointer_button_IN_ARG_pointers,
    NULL,
    (GDBusAnnotationInfo **) &_xdp_dbus_remote_desktop_method_notify_pointer_button_annotation_info_pointers
  },
  "handle-notify-pointer-button",
  FALSE
};

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

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

static const _ExtendedGDBusArgInfo _xdp_dbus_remote_desktop_method_info_notify_pointer_axis_IN_ARG_dx =
{
  {
    -1,
    (gchar *) "dx",
    (gchar *) "d",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_dbus_remote_desktop_method_info_notify_pointer_axis_IN_ARG_dy =
{
  {
    -1,
    (gchar *) "dy",
    (gchar *) "d",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_dbus_remote_desktop_method_info_notify_pointer_axis_IN_ARG_pointers[] =
{
  &_xdp_dbus_remote_desktop_method_info_notify_pointer_axis_IN_ARG_session_handle.parent_struct,
  &_xdp_dbus_remote_desktop_method_info_notify_pointer_axis_IN_ARG_options.parent_struct,
  &_xdp_dbus_remote_desktop_method_info_notify_pointer_axis_IN_ARG_dx.parent_struct,
  &_xdp_dbus_remote_desktop_method_info_notify_pointer_axis_IN_ARG_dy.parent_struct,
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_remote_desktop_method_notify_pointer_axis_annotation_info_pointers[] =
{
  &_xdp_dbus_remote_desktop_method_notify_pointer_axis_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_remote_desktop_method_info_notify_pointer_axis =
{
  {
    -1,
    (gchar *) "NotifyPointerAxis",
    (GDBusArgInfo **) &_xdp_dbus_remote_desktop_method_info_notify_pointer_axis_IN_ARG_pointers,
    NULL,
    (GDBusAnnotationInfo **) &_xdp_dbus_remote_desktop_method_notify_pointer_axis_annotation_info_pointers
  },
  "handle-notify-pointer-axis",
  FALSE
};

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

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

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

static const _ExtendedGDBusArgInfo _xdp_dbus_remote_desktop_method_info_notify_pointer_axis_discrete_IN_ARG_steps =
{
  {
    -1,
    (gchar *) "steps",
    (gchar *) "i",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_dbus_remote_desktop_method_info_notify_pointer_axis_discrete_IN_ARG_pointers[] =
{
  &_xdp_dbus_remote_desktop_method_info_notify_pointer_axis_discrete_IN_ARG_session_handle.parent_struct,
  &_xdp_dbus_remote_desktop_method_info_notify_pointer_axis_discrete_IN_ARG_options.parent_struct,
  &_xdp_dbus_remote_desktop_method_info_notify_pointer_axis_discrete_IN_ARG_axis.parent_struct,
  &_xdp_dbus_remote_desktop_method_info_notify_pointer_axis_discrete_IN_ARG_steps.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_dbus_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_dbus_remote_desktop_method_notify_pointer_axis_discrete_annotation_info_pointers[] =
{
  &_xdp_dbus_remote_desktop_method_notify_pointer_axis_discrete_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_remote_desktop_method_info_notify_pointer_axis_discrete =
{
  {
    -1,
    (gchar *) "NotifyPointerAxisDiscrete",
    (GDBusArgInfo **) &_xdp_dbus_remote_desktop_method_info_notify_pointer_axis_discrete_IN_ARG_pointers,
    NULL,
    (GDBusAnnotationInfo **) &_xdp_dbus_remote_desktop_method_notify_pointer_axis_discrete_annotation_info_pointers
  },
  "handle-notify-pointer-axis-discrete",
  FALSE
};

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

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

static const _ExtendedGDBusArgInfo _xdp_dbus_remote_desktop_method_info_notify_keyboard_keycode_IN_ARG_keycode =
{
  {
    -1,
    (gchar *) "keycode",
    (gchar *) "i",
    NULL
  },
  FALSE
};

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

static const GDBusArgInfo * const _xdp_dbus_remote_desktop_method_info_notify_keyboard_keycode_IN_ARG_pointers[] =
{
  &_xdp_dbus_remote_desktop_method_info_notify_keyboard_keycode_IN_ARG_session_handle.parent_struct,
  &_xdp_dbus_remote_desktop_method_info_notify_keyboard_keycode_IN_ARG_options.parent_struct,
  &_xdp_dbus_remote_desktop_method_info_notify_keyboard_keycode_IN_ARG_keycode.parent_struct,
  &_xdp_dbus_remote_desktop_method_info_notify_keyboard_keycode_IN_ARG_state.parent_struct,
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_remote_desktop_method_notify_keyboard_keycode_annotation_info_pointers[] =
{
  &_xdp_dbus_remote_desktop_method_notify_keyboard_keycode_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_remote_desktop_method_info_notify_keyboard_keycode =
{
  {
    -1,
    (gchar *) "NotifyKeyboardKeycode",
    (GDBusArgInfo **) &_xdp_dbus_remote_desktop_method_info_notify_keyboard_keycode_IN_ARG_pointers,
    NULL,
    (GDBusAnnotationInfo **) &_xdp_dbus_remote_desktop_method_notify_keyboard_keycode_annotation_info_pointers
  },
  "handle-notify-keyboard-keycode",
  FALSE
};

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

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

static const _ExtendedGDBusArgInfo _xdp_dbus_remote_desktop_method_info_notify_keyboard_keysym_IN_ARG_keysym =
{
  {
    -1,
    (gchar *) "keysym",
    (gchar *) "i",
    NULL
  },
  FALSE
};

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

static const GDBusArgInfo * const _xdp_dbus_remote_desktop_method_info_notify_keyboard_keysym_IN_ARG_pointers[] =
{
  &_xdp_dbus_remote_desktop_method_info_notify_keyboard_keysym_IN_ARG_session_handle.parent_struct,
  &_xdp_dbus_remote_desktop_method_info_notify_keyboard_keysym_IN_ARG_options.parent_struct,
  &_xdp_dbus_remote_desktop_method_info_notify_keyboard_keysym_IN_ARG_keysym.parent_struct,
  &_xdp_dbus_remote_desktop_method_info_notify_keyboard_keysym_IN_ARG_state.parent_struct,
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_remote_desktop_method_notify_keyboard_keysym_annotation_info_pointers[] =
{
  &_xdp_dbus_remote_desktop_method_notify_keyboard_keysym_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_remote_desktop_method_info_notify_keyboard_keysym =
{
  {
    -1,
    (gchar *) "NotifyKeyboardKeysym",
    (GDBusArgInfo **) &_xdp_dbus_remote_desktop_method_info_notify_keyboard_keysym_IN_ARG_pointers,
    NULL,
    (GDBusAnnotationInfo **) &_xdp_dbus_remote_desktop_method_notify_keyboard_keysym_annotation_info_pointers
  },
  "handle-notify-keyboard-keysym",
  FALSE
};

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

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

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

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

static const _ExtendedGDBusArgInfo _xdp_dbus_remote_desktop_method_info_notify_touch_down_IN_ARG_x =
{
  {
    -1,
    (gchar *) "x",
    (gchar *) "d",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_dbus_remote_desktop_method_info_notify_touch_down_IN_ARG_y =
{
  {
    -1,
    (gchar *) "y",
    (gchar *) "d",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_dbus_remote_desktop_method_info_notify_touch_down_IN_ARG_pointers[] =
{
  &_xdp_dbus_remote_desktop_method_info_notify_touch_down_IN_ARG_session_handle.parent_struct,
  &_xdp_dbus_remote_desktop_method_info_notify_touch_down_IN_ARG_options.parent_struct,
  &_xdp_dbus_remote_desktop_method_info_notify_touch_down_IN_ARG_stream.parent_struct,
  &_xdp_dbus_remote_desktop_method_info_notify_touch_down_IN_ARG_slot.parent_struct,
  &_xdp_dbus_remote_desktop_method_info_notify_touch_down_IN_ARG_x.parent_struct,
  &_xdp_dbus_remote_desktop_method_info_notify_touch_down_IN_ARG_y.parent_struct,
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_remote_desktop_method_notify_touch_down_annotation_info_pointers[] =
{
  &_xdp_dbus_remote_desktop_method_notify_touch_down_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_remote_desktop_method_info_notify_touch_down =
{
  {
    -1,
    (gchar *) "NotifyTouchDown",
    (GDBusArgInfo **) &_xdp_dbus_remote_desktop_method_info_notify_touch_down_IN_ARG_pointers,
    NULL,
    (GDBusAnnotationInfo **) &_xdp_dbus_remote_desktop_method_notify_touch_down_annotation_info_pointers
  },
  "handle-notify-touch-down",
  FALSE
};

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

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

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

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

static const _ExtendedGDBusArgInfo _xdp_dbus_remote_desktop_method_info_notify_touch_motion_IN_ARG_x =
{
  {
    -1,
    (gchar *) "x",
    (gchar *) "d",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_dbus_remote_desktop_method_info_notify_touch_motion_IN_ARG_y =
{
  {
    -1,
    (gchar *) "y",
    (gchar *) "d",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_dbus_remote_desktop_method_info_notify_touch_motion_IN_ARG_pointers[] =
{
  &_xdp_dbus_remote_desktop_method_info_notify_touch_motion_IN_ARG_session_handle.parent_struct,
  &_xdp_dbus_remote_desktop_method_info_notify_touch_motion_IN_ARG_options.parent_struct,
  &_xdp_dbus_remote_desktop_method_info_notify_touch_motion_IN_ARG_stream.parent_struct,
  &_xdp_dbus_remote_desktop_method_info_notify_touch_motion_IN_ARG_slot.parent_struct,
  &_xdp_dbus_remote_desktop_method_info_notify_touch_motion_IN_ARG_x.parent_struct,
  &_xdp_dbus_remote_desktop_method_info_notify_touch_motion_IN_ARG_y.parent_struct,
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_remote_desktop_method_notify_touch_motion_annotation_info_pointers[] =
{
  &_xdp_dbus_remote_desktop_method_notify_touch_motion_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_remote_desktop_method_info_notify_touch_motion =
{
  {
    -1,
    (gchar *) "NotifyTouchMotion",
    (GDBusArgInfo **) &_xdp_dbus_remote_desktop_method_info_notify_touch_motion_IN_ARG_pointers,
    NULL,
    (GDBusAnnotationInfo **) &_xdp_dbus_remote_desktop_method_notify_touch_motion_annotation_info_pointers
  },
  "handle-notify-touch-motion",
  FALSE
};

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

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

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

static const GDBusArgInfo * const _xdp_dbus_remote_desktop_method_info_notify_touch_up_IN_ARG_pointers[] =
{
  &_xdp_dbus_remote_desktop_method_info_notify_touch_up_IN_ARG_session_handle.parent_struct,
  &_xdp_dbus_remote_desktop_method_info_notify_touch_up_IN_ARG_options.parent_struct,
  &_xdp_dbus_remote_desktop_method_info_notify_touch_up_IN_ARG_slot.parent_struct,
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_remote_desktop_method_notify_touch_up_annotation_info_pointers[] =
{
  &_xdp_dbus_remote_desktop_method_notify_touch_up_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_remote_desktop_method_info_notify_touch_up =
{
  {
    -1,
    (gchar *) "NotifyTouchUp",
    (GDBusArgInfo **) &_xdp_dbus_remote_desktop_method_info_notify_touch_up_IN_ARG_pointers,
    NULL,
    (GDBusAnnotationInfo **) &_xdp_dbus_remote_desktop_method_notify_touch_up_annotation_info_pointers
  },
  "handle-notify-touch-up",
  FALSE
};

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

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

static const GDBusArgInfo * const _xdp_dbus_remote_desktop_method_info_connect_to_eis_IN_ARG_pointers[] =
{
  &_xdp_dbus_remote_desktop_method_info_connect_to_eis_IN_ARG_session_handle.parent_struct,
  &_xdp_dbus_remote_desktop_method_info_connect_to_eis_IN_ARG_options.parent_struct,
  NULL
};

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

static const GDBusArgInfo * const _xdp_dbus_remote_desktop_method_info_connect_to_eis_OUT_ARG_pointers[] =
{
  &_xdp_dbus_remote_desktop_method_info_connect_to_eis_OUT_ARG_fd.parent_struct,
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_remote_desktop_method_connect_to_eis_annotation_info_pointers[] =
{
  &_xdp_dbus_remote_desktop_method_connect_to_eis_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_remote_desktop_method_info_connect_to_eis =
{
  {
    -1,
    (gchar *) "ConnectToEIS",
    (GDBusArgInfo **) &_xdp_dbus_remote_desktop_method_info_connect_to_eis_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_remote_desktop_method_info_connect_to_eis_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_dbus_remote_desktop_method_connect_to_eis_annotation_info_pointers
  },
  "handle-connect-to-eis",
  TRUE
};

static const GDBusMethodInfo * const _xdp_dbus_remote_desktop_method_info_pointers[] =
{
  &_xdp_dbus_remote_desktop_method_info_create_session.parent_struct,
  &_xdp_dbus_remote_desktop_method_info_select_devices.parent_struct,
  &_xdp_dbus_remote_desktop_method_info_start.parent_struct,
  &_xdp_dbus_remote_desktop_method_info_notify_pointer_motion.parent_struct,
  &_xdp_dbus_remote_desktop_method_info_notify_pointer_motion_absolute.parent_struct,
  &_xdp_dbus_remote_desktop_method_info_notify_pointer_button.parent_struct,
  &_xdp_dbus_remote_desktop_method_info_notify_pointer_axis.parent_struct,
  &_xdp_dbus_remote_desktop_method_info_notify_pointer_axis_discrete.parent_struct,
  &_xdp_dbus_remote_desktop_method_info_notify_keyboard_keycode.parent_struct,
  &_xdp_dbus_remote_desktop_method_info_notify_keyboard_keysym.parent_struct,
  &_xdp_dbus_remote_desktop_method_info_notify_touch_down.parent_struct,
  &_xdp_dbus_remote_desktop_method_info_notify_touch_motion.parent_struct,
  &_xdp_dbus_remote_desktop_method_info_notify_touch_up.parent_struct,
  &_xdp_dbus_remote_desktop_method_info_connect_to_eis.parent_struct,
  NULL
};

static const _ExtendedGDBusPropertyInfo _xdp_dbus_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_dbus_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_dbus_remote_desktop_property_info_pointers[] =
{
  &_xdp_dbus_remote_desktop_property_info_available_device_types.parent_struct,
  &_xdp_dbus_remote_desktop_property_info_version.parent_struct,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _xdp_dbus_remote_desktop_interface_info =
{
  {
    -1,
    (gchar *) "org.freedesktop.portal.RemoteDesktop",
    (GDBusMethodInfo **) &_xdp_dbus_remote_desktop_method_info_pointers,
    NULL,
    (GDBusPropertyInfo **) &_xdp_dbus_remote_desktop_property_info_pointers,
    NULL
  },
  "remote-desktop",
};


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

/**
 * xdp_dbus_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 #XdpDbusRemoteDesktop interface for a concrete class.
 * The properties are overridden in the order they are defined.
 *
 * Returns: The last property id.
 */
guint
xdp_dbus_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_dbus_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_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_dbus_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_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_dbus_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_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_dbus_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_dbus_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_dbus_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_dbus_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_dbus_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_dbus_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_dbus_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_dbus_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_dbus_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_dbus_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_dbus_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_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}


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

/**
 * XdpDbusRemoteDesktopIface:
 * @parent_iface: The parent interface.
 * @handle_connect_to_eis: Handler for the #XdpDbusRemoteDesktop::handle-connect-to-eis signal.
 * @handle_create_session: Handler for the #XdpDbusRemoteDesktop::handle-create-session signal.
 * @handle_notify_keyboard_keycode: Handler for the #XdpDbusRemoteDesktop::handle-notify-keyboard-keycode signal.
 * @handle_notify_keyboard_keysym: Handler for the #XdpDbusRemoteDesktop::handle-notify-keyboard-keysym signal.
 * @handle_notify_pointer_axis: Handler for the #XdpDbusRemoteDesktop::handle-notify-pointer-axis signal.
 * @handle_notify_pointer_axis_discrete: Handler for the #XdpDbusRemoteDesktop::handle-notify-pointer-axis-discrete signal.
 * @handle_notify_pointer_button: Handler for the #XdpDbusRemoteDesktop::handle-notify-pointer-button signal.
 * @handle_notify_pointer_motion: Handler for the #XdpDbusRemoteDesktop::handle-notify-pointer-motion signal.
 * @handle_notify_pointer_motion_absolute: Handler for the #XdpDbusRemoteDesktop::handle-notify-pointer-motion-absolute signal.
 * @handle_notify_touch_down: Handler for the #XdpDbusRemoteDesktop::handle-notify-touch-down signal.
 * @handle_notify_touch_motion: Handler for the #XdpDbusRemoteDesktop::handle-notify-touch-motion signal.
 * @handle_notify_touch_up: Handler for the #XdpDbusRemoteDesktop::handle-notify-touch-up signal.
 * @handle_select_devices: Handler for the #XdpDbusRemoteDesktop::handle-select-devices signal.
 * @handle_start: Handler for the #XdpDbusRemoteDesktop::handle-start signal.
 * @get_available_device_types: Getter for the #XdpDbusRemoteDesktop:available-device-types property.
 * @get_version: Getter for the #XdpDbusRemoteDesktop:version property.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-RemoteDesktop.top_of_page">org.freedesktop.portal.RemoteDesktop</link>.
 */

typedef XdpDbusRemoteDesktopIface XdpDbusRemoteDesktopInterface;
G_DEFINE_INTERFACE (XdpDbusRemoteDesktop, xdp_dbus_remote_desktop, G_TYPE_OBJECT)

static void
xdp_dbus_remote_desktop_default_init (XdpDbusRemoteDesktopIface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * XdpDbusRemoteDesktop::handle-create-session:
   * @object: A #XdpDbusRemoteDesktop.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_options: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-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_dbus_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 (XdpDbusRemoteDesktopIface, handle_create_session),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_remote_desktop_method_marshal_create_session,
    G_TYPE_BOOLEAN,
    2,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_VARIANT);

  /**
   * XdpDbusRemoteDesktop::handle-select-devices:
   * @object: A #XdpDbusRemoteDesktop.
   * @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-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_dbus_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 (XdpDbusRemoteDesktopIface, handle_select_devices),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_remote_desktop_method_marshal_select_devices,
    G_TYPE_BOOLEAN,
    3,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_VARIANT);

  /**
   * XdpDbusRemoteDesktop::handle-start:
   * @object: A #XdpDbusRemoteDesktop.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_session_handle: 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-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_dbus_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 (XdpDbusRemoteDesktopIface, handle_start),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_remote_desktop_method_marshal_start,
    G_TYPE_BOOLEAN,
    4,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_VARIANT);

  /**
   * XdpDbusRemoteDesktop::handle-notify-pointer-motion:
   * @object: A #XdpDbusRemoteDesktop.
   * @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-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_dbus_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 (XdpDbusRemoteDesktopIface, handle_notify_pointer_motion),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_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);

  /**
   * XdpDbusRemoteDesktop::handle-notify-pointer-motion-absolute:
   * @object: A #XdpDbusRemoteDesktop.
   * @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-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_dbus_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 (XdpDbusRemoteDesktopIface, handle_notify_pointer_motion_absolute),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_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);

  /**
   * XdpDbusRemoteDesktop::handle-notify-pointer-button:
   * @object: A #XdpDbusRemoteDesktop.
   * @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-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_dbus_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 (XdpDbusRemoteDesktopIface, handle_notify_pointer_button),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_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);

  /**
   * XdpDbusRemoteDesktop::handle-notify-pointer-axis:
   * @object: A #XdpDbusRemoteDesktop.
   * @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-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_dbus_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 (XdpDbusRemoteDesktopIface, handle_notify_pointer_axis),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_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);

  /**
   * XdpDbusRemoteDesktop::handle-notify-pointer-axis-discrete:
   * @object: A #XdpDbusRemoteDesktop.
   * @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-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_dbus_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 (XdpDbusRemoteDesktopIface, handle_notify_pointer_axis_discrete),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_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);

  /**
   * XdpDbusRemoteDesktop::handle-notify-keyboard-keycode:
   * @object: A #XdpDbusRemoteDesktop.
   * @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-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_dbus_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 (XdpDbusRemoteDesktopIface, handle_notify_keyboard_keycode),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_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);

  /**
   * XdpDbusRemoteDesktop::handle-notify-keyboard-keysym:
   * @object: A #XdpDbusRemoteDesktop.
   * @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-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_dbus_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 (XdpDbusRemoteDesktopIface, handle_notify_keyboard_keysym),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_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);

  /**
   * XdpDbusRemoteDesktop::handle-notify-touch-down:
   * @object: A #XdpDbusRemoteDesktop.
   * @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-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_dbus_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 (XdpDbusRemoteDesktopIface, handle_notify_touch_down),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_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);

  /**
   * XdpDbusRemoteDesktop::handle-notify-touch-motion:
   * @object: A #XdpDbusRemoteDesktop.
   * @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-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_dbus_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 (XdpDbusRemoteDesktopIface, handle_notify_touch_motion),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_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);

  /**
   * XdpDbusRemoteDesktop::handle-notify-touch-up:
   * @object: A #XdpDbusRemoteDesktop.
   * @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-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_dbus_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 (XdpDbusRemoteDesktopIface, handle_notify_touch_up),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_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);

  /**
   * XdpDbusRemoteDesktop::handle-connect-to-eis:
   * @object: A #XdpDbusRemoteDesktop.
   * @invocation: A #GDBusMethodInvocation.
   * @fd_list: (nullable): A #GUnixFDList or %NULL.
   * @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-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_dbus_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 (XdpDbusRemoteDesktopIface, handle_connect_to_eis),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_remote_desktop_method_marshal_connect_to_eis,
    G_TYPE_BOOLEAN,
    4,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UNIX_FD_LIST, G_TYPE_STRING, G_TYPE_VARIANT);

  /* GObject properties for D-Bus properties: */
  /**
   * XdpDbusRemoteDesktop:available-device-types:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-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));
  /**
   * XdpDbusRemoteDesktop:version:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-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_dbus_remote_desktop_get_available_device_types: (skip)
 * @object: A #XdpDbusRemoteDesktop.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-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_dbus_remote_desktop_get_available_device_types (XdpDbusRemoteDesktop *object)
{
  g_return_val_if_fail (XDP_DBUS_IS_REMOTE_DESKTOP (object), 0);

  return XDP_DBUS_REMOTE_DESKTOP_GET_IFACE (object)->get_available_device_types (object);
}

/**
 * xdp_dbus_remote_desktop_set_available_device_types: (skip)
 * @object: A #XdpDbusRemoteDesktop.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-freedesktop-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_dbus_remote_desktop_set_available_device_types (XdpDbusRemoteDesktop *object, guint value)
{
  g_object_set (G_OBJECT (object), "available-device-types", value, NULL);
}

/**
 * xdp_dbus_remote_desktop_get_version: (skip)
 * @object: A #XdpDbusRemoteDesktop.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-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_dbus_remote_desktop_get_version (XdpDbusRemoteDesktop *object)
{
  g_return_val_if_fail (XDP_DBUS_IS_REMOTE_DESKTOP (object), 0);

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

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

/**
 * xdp_dbus_remote_desktop_call_create_session:
 * @proxy: A #XdpDbusRemoteDesktopProxy.
 * @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-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_dbus_remote_desktop_call_create_session_finish() to get the result of the operation.
 *
 * See xdp_dbus_remote_desktop_call_create_session_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_remote_desktop_call_create_session (
    XdpDbusRemoteDesktop *proxy,
    GVariant *arg_options,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "CreateSession",
    g_variant_new ("(@a{sv})",
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_remote_desktop_call_create_session_finish:
 * @proxy: A #XdpDbusRemoteDesktopProxy.
 * @out_handle: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_remote_desktop_call_create_session().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_remote_desktop_call_create_session().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_remote_desktop_call_create_session_finish (
    XdpDbusRemoteDesktop *proxy,
    gchar ** out_handle,
    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,
                 "(o)",
                 out_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_remote_desktop_call_create_session_sync:
 * @proxy: A #XdpDbusRemoteDesktopProxy.
 * @arg_options: Argument to pass with the method invocation.
 * @out_handle: (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-portal-RemoteDesktop.CreateSession">CreateSession()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_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_dbus_remote_desktop_call_create_session_sync (
    XdpDbusRemoteDesktop *proxy,
    GVariant *arg_options,
    gchar ** out_handle,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "CreateSession",
    g_variant_new ("(@a{sv})",
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(o)",
                 out_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_remote_desktop_call_select_devices:
 * @proxy: A #XdpDbusRemoteDesktopProxy.
 * @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-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_dbus_remote_desktop_call_select_devices_finish() to get the result of the operation.
 *
 * See xdp_dbus_remote_desktop_call_select_devices_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_remote_desktop_call_select_devices (
    XdpDbusRemoteDesktop *proxy,
    const gchar *arg_session_handle,
    GVariant *arg_options,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "SelectDevices",
    g_variant_new ("(o@a{sv})",
                   arg_session_handle,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_remote_desktop_call_select_devices_finish:
 * @proxy: A #XdpDbusRemoteDesktopProxy.
 * @out_handle: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_remote_desktop_call_select_devices().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_remote_desktop_call_select_devices().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_remote_desktop_call_select_devices_finish (
    XdpDbusRemoteDesktop *proxy,
    gchar ** out_handle,
    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,
                 "(o)",
                 out_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_remote_desktop_call_select_devices_sync:
 * @proxy: A #XdpDbusRemoteDesktopProxy.
 * @arg_session_handle: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @out_handle: (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-portal-RemoteDesktop.SelectDevices">SelectDevices()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_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_dbus_remote_desktop_call_select_devices_sync (
    XdpDbusRemoteDesktop *proxy,
    const gchar *arg_session_handle,
    GVariant *arg_options,
    gchar ** out_handle,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "SelectDevices",
    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,
                 "(o)",
                 out_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_remote_desktop_call_start:
 * @proxy: A #XdpDbusRemoteDesktopProxy.
 * @arg_session_handle: 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-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_dbus_remote_desktop_call_start_finish() to get the result of the operation.
 *
 * See xdp_dbus_remote_desktop_call_start_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_remote_desktop_call_start (
    XdpDbusRemoteDesktop *proxy,
    const gchar *arg_session_handle,
    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 ("(os@a{sv})",
                   arg_session_handle,
                   arg_parent_window,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_remote_desktop_call_start_finish:
 * @proxy: A #XdpDbusRemoteDesktopProxy.
 * @out_handle: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_remote_desktop_call_start().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_remote_desktop_call_start().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_remote_desktop_call_start_finish (
    XdpDbusRemoteDesktop *proxy,
    gchar ** out_handle,
    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,
                 "(o)",
                 out_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_remote_desktop_call_start_sync:
 * @proxy: A #XdpDbusRemoteDesktopProxy.
 * @arg_session_handle: 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_handle: (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-portal-RemoteDesktop.Start">Start()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_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_dbus_remote_desktop_call_start_sync (
    XdpDbusRemoteDesktop *proxy,
    const gchar *arg_session_handle,
    const gchar *arg_parent_window,
    GVariant *arg_options,
    gchar ** out_handle,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "Start",
    g_variant_new ("(os@a{sv})",
                   arg_session_handle,
                   arg_parent_window,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(o)",
                 out_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_remote_desktop_call_notify_pointer_motion:
 * @proxy: A #XdpDbusRemoteDesktopProxy.
 * @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-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_dbus_remote_desktop_call_notify_pointer_motion_finish() to get the result of the operation.
 *
 * See xdp_dbus_remote_desktop_call_notify_pointer_motion_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_remote_desktop_call_notify_pointer_motion (
    XdpDbusRemoteDesktop *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_dbus_remote_desktop_call_notify_pointer_motion_finish:
 * @proxy: A #XdpDbusRemoteDesktopProxy.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_remote_desktop_call_notify_pointer_motion().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_remote_desktop_call_notify_pointer_motion().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_remote_desktop_call_notify_pointer_motion_finish (
    XdpDbusRemoteDesktop *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_dbus_remote_desktop_call_notify_pointer_motion_sync:
 * @proxy: A #XdpDbusRemoteDesktopProxy.
 * @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-portal-RemoteDesktop.NotifyPointerMotion">NotifyPointerMotion()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_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_dbus_remote_desktop_call_notify_pointer_motion_sync (
    XdpDbusRemoteDesktop *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_dbus_remote_desktop_call_notify_pointer_motion_absolute:
 * @proxy: A #XdpDbusRemoteDesktopProxy.
 * @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-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_dbus_remote_desktop_call_notify_pointer_motion_absolute_finish() to get the result of the operation.
 *
 * See xdp_dbus_remote_desktop_call_notify_pointer_motion_absolute_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_remote_desktop_call_notify_pointer_motion_absolute (
    XdpDbusRemoteDesktop *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_dbus_remote_desktop_call_notify_pointer_motion_absolute_finish:
 * @proxy: A #XdpDbusRemoteDesktopProxy.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_remote_desktop_call_notify_pointer_motion_absolute().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_remote_desktop_call_notify_pointer_motion_absolute().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_remote_desktop_call_notify_pointer_motion_absolute_finish (
    XdpDbusRemoteDesktop *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_dbus_remote_desktop_call_notify_pointer_motion_absolute_sync:
 * @proxy: A #XdpDbusRemoteDesktopProxy.
 * @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-portal-RemoteDesktop.NotifyPointerMotionAbsolute">NotifyPointerMotionAbsolute()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_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_dbus_remote_desktop_call_notify_pointer_motion_absolute_sync (
    XdpDbusRemoteDesktop *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_dbus_remote_desktop_call_notify_pointer_button:
 * @proxy: A #XdpDbusRemoteDesktopProxy.
 * @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-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_dbus_remote_desktop_call_notify_pointer_button_finish() to get the result of the operation.
 *
 * See xdp_dbus_remote_desktop_call_notify_pointer_button_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_remote_desktop_call_notify_pointer_button (
    XdpDbusRemoteDesktop *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_dbus_remote_desktop_call_notify_pointer_button_finish:
 * @proxy: A #XdpDbusRemoteDesktopProxy.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_remote_desktop_call_notify_pointer_button().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_remote_desktop_call_notify_pointer_button().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_remote_desktop_call_notify_pointer_button_finish (
    XdpDbusRemoteDesktop *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_dbus_remote_desktop_call_notify_pointer_button_sync:
 * @proxy: A #XdpDbusRemoteDesktopProxy.
 * @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-portal-RemoteDesktop.NotifyPointerButton">NotifyPointerButton()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_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_dbus_remote_desktop_call_notify_pointer_button_sync (
    XdpDbusRemoteDesktop *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_dbus_remote_desktop_call_notify_pointer_axis:
 * @proxy: A #XdpDbusRemoteDesktopProxy.
 * @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-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_dbus_remote_desktop_call_notify_pointer_axis_finish() to get the result of the operation.
 *
 * See xdp_dbus_remote_desktop_call_notify_pointer_axis_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_remote_desktop_call_notify_pointer_axis (
    XdpDbusRemoteDesktop *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_dbus_remote_desktop_call_notify_pointer_axis_finish:
 * @proxy: A #XdpDbusRemoteDesktopProxy.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_remote_desktop_call_notify_pointer_axis().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_remote_desktop_call_notify_pointer_axis().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_remote_desktop_call_notify_pointer_axis_finish (
    XdpDbusRemoteDesktop *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_dbus_remote_desktop_call_notify_pointer_axis_sync:
 * @proxy: A #XdpDbusRemoteDesktopProxy.
 * @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-portal-RemoteDesktop.NotifyPointerAxis">NotifyPointerAxis()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_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_dbus_remote_desktop_call_notify_pointer_axis_sync (
    XdpDbusRemoteDesktop *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_dbus_remote_desktop_call_notify_pointer_axis_discrete:
 * @proxy: A #XdpDbusRemoteDesktopProxy.
 * @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-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_dbus_remote_desktop_call_notify_pointer_axis_discrete_finish() to get the result of the operation.
 *
 * See xdp_dbus_remote_desktop_call_notify_pointer_axis_discrete_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_remote_desktop_call_notify_pointer_axis_discrete (
    XdpDbusRemoteDesktop *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_dbus_remote_desktop_call_notify_pointer_axis_discrete_finish:
 * @proxy: A #XdpDbusRemoteDesktopProxy.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_remote_desktop_call_notify_pointer_axis_discrete().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_remote_desktop_call_notify_pointer_axis_discrete().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_remote_desktop_call_notify_pointer_axis_discrete_finish (
    XdpDbusRemoteDesktop *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_dbus_remote_desktop_call_notify_pointer_axis_discrete_sync:
 * @proxy: A #XdpDbusRemoteDesktopProxy.
 * @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-portal-RemoteDesktop.NotifyPointerAxisDiscrete">NotifyPointerAxisDiscrete()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_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_dbus_remote_desktop_call_notify_pointer_axis_discrete_sync (
    XdpDbusRemoteDesktop *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_dbus_remote_desktop_call_notify_keyboard_keycode:
 * @proxy: A #XdpDbusRemoteDesktopProxy.
 * @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-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_dbus_remote_desktop_call_notify_keyboard_keycode_finish() to get the result of the operation.
 *
 * See xdp_dbus_remote_desktop_call_notify_keyboard_keycode_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_remote_desktop_call_notify_keyboard_keycode (
    XdpDbusRemoteDesktop *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_dbus_remote_desktop_call_notify_keyboard_keycode_finish:
 * @proxy: A #XdpDbusRemoteDesktopProxy.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_remote_desktop_call_notify_keyboard_keycode().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_remote_desktop_call_notify_keyboard_keycode().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_remote_desktop_call_notify_keyboard_keycode_finish (
    XdpDbusRemoteDesktop *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_dbus_remote_desktop_call_notify_keyboard_keycode_sync:
 * @proxy: A #XdpDbusRemoteDesktopProxy.
 * @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-portal-RemoteDesktop.NotifyKeyboardKeycode">NotifyKeyboardKeycode()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_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_dbus_remote_desktop_call_notify_keyboard_keycode_sync (
    XdpDbusRemoteDesktop *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_dbus_remote_desktop_call_notify_keyboard_keysym:
 * @proxy: A #XdpDbusRemoteDesktopProxy.
 * @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-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_dbus_remote_desktop_call_notify_keyboard_keysym_finish() to get the result of the operation.
 *
 * See xdp_dbus_remote_desktop_call_notify_keyboard_keysym_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_remote_desktop_call_notify_keyboard_keysym (
    XdpDbusRemoteDesktop *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_dbus_remote_desktop_call_notify_keyboard_keysym_finish:
 * @proxy: A #XdpDbusRemoteDesktopProxy.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_remote_desktop_call_notify_keyboard_keysym().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_remote_desktop_call_notify_keyboard_keysym().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_remote_desktop_call_notify_keyboard_keysym_finish (
    XdpDbusRemoteDesktop *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_dbus_remote_desktop_call_notify_keyboard_keysym_sync:
 * @proxy: A #XdpDbusRemoteDesktopProxy.
 * @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-portal-RemoteDesktop.NotifyKeyboardKeysym">NotifyKeyboardKeysym()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_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_dbus_remote_desktop_call_notify_keyboard_keysym_sync (
    XdpDbusRemoteDesktop *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_dbus_remote_desktop_call_notify_touch_down:
 * @proxy: A #XdpDbusRemoteDesktopProxy.
 * @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-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_dbus_remote_desktop_call_notify_touch_down_finish() to get the result of the operation.
 *
 * See xdp_dbus_remote_desktop_call_notify_touch_down_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_remote_desktop_call_notify_touch_down (
    XdpDbusRemoteDesktop *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_dbus_remote_desktop_call_notify_touch_down_finish:
 * @proxy: A #XdpDbusRemoteDesktopProxy.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_remote_desktop_call_notify_touch_down().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_remote_desktop_call_notify_touch_down().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_remote_desktop_call_notify_touch_down_finish (
    XdpDbusRemoteDesktop *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_dbus_remote_desktop_call_notify_touch_down_sync:
 * @proxy: A #XdpDbusRemoteDesktopProxy.
 * @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-portal-RemoteDesktop.NotifyTouchDown">NotifyTouchDown()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_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_dbus_remote_desktop_call_notify_touch_down_sync (
    XdpDbusRemoteDesktop *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_dbus_remote_desktop_call_notify_touch_motion:
 * @proxy: A #XdpDbusRemoteDesktopProxy.
 * @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-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_dbus_remote_desktop_call_notify_touch_motion_finish() to get the result of the operation.
 *
 * See xdp_dbus_remote_desktop_call_notify_touch_motion_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_remote_desktop_call_notify_touch_motion (
    XdpDbusRemoteDesktop *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_dbus_remote_desktop_call_notify_touch_motion_finish:
 * @proxy: A #XdpDbusRemoteDesktopProxy.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_remote_desktop_call_notify_touch_motion().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_remote_desktop_call_notify_touch_motion().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_remote_desktop_call_notify_touch_motion_finish (
    XdpDbusRemoteDesktop *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_dbus_remote_desktop_call_notify_touch_motion_sync:
 * @proxy: A #XdpDbusRemoteDesktopProxy.
 * @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-portal-RemoteDesktop.NotifyTouchMotion">NotifyTouchMotion()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_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_dbus_remote_desktop_call_notify_touch_motion_sync (
    XdpDbusRemoteDesktop *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_dbus_remote_desktop_call_notify_touch_up:
 * @proxy: A #XdpDbusRemoteDesktopProxy.
 * @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-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_dbus_remote_desktop_call_notify_touch_up_finish() to get the result of the operation.
 *
 * See xdp_dbus_remote_desktop_call_notify_touch_up_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_remote_desktop_call_notify_touch_up (
    XdpDbusRemoteDesktop *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_dbus_remote_desktop_call_notify_touch_up_finish:
 * @proxy: A #XdpDbusRemoteDesktopProxy.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_remote_desktop_call_notify_touch_up().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_remote_desktop_call_notify_touch_up().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_remote_desktop_call_notify_touch_up_finish (
    XdpDbusRemoteDesktop *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_dbus_remote_desktop_call_notify_touch_up_sync:
 * @proxy: A #XdpDbusRemoteDesktopProxy.
 * @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-portal-RemoteDesktop.NotifyTouchUp">NotifyTouchUp()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_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_dbus_remote_desktop_call_notify_touch_up_sync (
    XdpDbusRemoteDesktop *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_dbus_remote_desktop_call_connect_to_eis:
 * @proxy: A #XdpDbusRemoteDesktopProxy.
 * @arg_session_handle: 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-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_dbus_remote_desktop_call_connect_to_eis_finish() to get the result of the operation.
 *
 * See xdp_dbus_remote_desktop_call_connect_to_eis_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_remote_desktop_call_connect_to_eis (
    XdpDbusRemoteDesktop *proxy,
    const gchar *arg_session_handle,
    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 ("(o@a{sv})",
                   arg_session_handle,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    fd_list,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_remote_desktop_call_connect_to_eis_finish:
 * @proxy: A #XdpDbusRemoteDesktopProxy.
 * @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_dbus_remote_desktop_call_connect_to_eis().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_remote_desktop_call_connect_to_eis().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_remote_desktop_call_connect_to_eis_finish (
    XdpDbusRemoteDesktop *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_dbus_remote_desktop_call_connect_to_eis_sync:
 * @proxy: A #XdpDbusRemoteDesktopProxy.
 * @arg_session_handle: 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-portal-RemoteDesktop.ConnectToEIS">ConnectToEIS()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_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_dbus_remote_desktop_call_connect_to_eis_sync (
    XdpDbusRemoteDesktop *proxy,
    const gchar *arg_session_handle,
    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 ("(o@a{sv})",
                   arg_session_handle,
                   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_dbus_remote_desktop_complete_create_session:
 * @object: A #XdpDbusRemoteDesktop.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @handle: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-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_dbus_remote_desktop_complete_create_session (
    XdpDbusRemoteDesktop *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    const gchar *handle)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(o)",
                   handle));
}

/**
 * xdp_dbus_remote_desktop_complete_select_devices:
 * @object: A #XdpDbusRemoteDesktop.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @handle: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-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_dbus_remote_desktop_complete_select_devices (
    XdpDbusRemoteDesktop *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    const gchar *handle)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(o)",
                   handle));
}

/**
 * xdp_dbus_remote_desktop_complete_start:
 * @object: A #XdpDbusRemoteDesktop.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @handle: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-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_dbus_remote_desktop_complete_start (
    XdpDbusRemoteDesktop *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    const gchar *handle)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(o)",
                   handle));
}

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

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

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

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

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

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

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

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

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

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

/**
 * xdp_dbus_remote_desktop_complete_connect_to_eis:
 * @object: A #XdpDbusRemoteDesktop.
 * @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-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_dbus_remote_desktop_complete_connect_to_eis (
    XdpDbusRemoteDesktop *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);
}

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

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

/**
 * XdpDbusRemoteDesktopProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpDbusRemoteDesktopProxy.
 */

struct _XdpDbusRemoteDesktopProxyPrivate
{
  GData *qdata;
};

static void xdp_dbus_remote_desktop_proxy_iface_init (XdpDbusRemoteDesktopIface *iface);

#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpDbusRemoteDesktopProxy, xdp_dbus_remote_desktop_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (XdpDbusRemoteDesktopProxy)
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_REMOTE_DESKTOP, xdp_dbus_remote_desktop_proxy_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpDbusRemoteDesktopProxy, xdp_dbus_remote_desktop_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_REMOTE_DESKTOP, xdp_dbus_remote_desktop_proxy_iface_init))

#endif
static void
xdp_dbus_remote_desktop_proxy_finalize (GObject *object)
{
  XdpDbusRemoteDesktopProxy *proxy = XDP_DBUS_REMOTE_DESKTOP_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (xdp_dbus_remote_desktop_proxy_parent_class)->finalize (object);
}

static void
xdp_dbus_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_dbus_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_dbus_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.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_dbus_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_dbus_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.portal.RemoteDesktop", info->parent_struct.name, variant),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    NULL, (GAsyncReadyCallback) xdp_dbus_remote_desktop_proxy_set_property_cb, (GDBusPropertyInfo *) &info->parent_struct);
  g_variant_unref (variant);
}

static void
xdp_dbus_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_dbus_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_DBUS_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_DBUS_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_dbus_remote_desktop_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  XdpDbusRemoteDesktopProxy *proxy = XDP_DBUS_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_dbus_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_dbus_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_dbus_remote_desktop_proxy_get_available_device_types (XdpDbusRemoteDesktop *object)
{
  XdpDbusRemoteDesktopProxy *proxy = XDP_DBUS_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_dbus_remote_desktop_proxy_get_version (XdpDbusRemoteDesktop *object)
{
  XdpDbusRemoteDesktopProxy *proxy = XDP_DBUS_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_dbus_remote_desktop_proxy_init (XdpDbusRemoteDesktopProxy *proxy)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  proxy->priv = xdp_dbus_remote_desktop_proxy_get_instance_private (proxy);
#else
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, XDP_DBUS_TYPE_REMOTE_DESKTOP_PROXY, XdpDbusRemoteDesktopProxyPrivate);
#endif

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

static void
xdp_dbus_remote_desktop_proxy_class_init (XdpDbusRemoteDesktopProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = xdp_dbus_remote_desktop_proxy_finalize;
  gobject_class->get_property = xdp_dbus_remote_desktop_proxy_get_property;
  gobject_class->set_property = xdp_dbus_remote_desktop_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = xdp_dbus_remote_desktop_proxy_g_signal;
  proxy_class->g_properties_changed = xdp_dbus_remote_desktop_proxy_g_properties_changed;

  xdp_dbus_remote_desktop_override_properties (gobject_class, 1);

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

static void
xdp_dbus_remote_desktop_proxy_iface_init (XdpDbusRemoteDesktopIface *iface)
{
  iface->get_available_device_types = xdp_dbus_remote_desktop_proxy_get_available_device_types;
  iface->get_version = xdp_dbus_remote_desktop_proxy_get_version;
}

/**
 * xdp_dbus_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-portal-RemoteDesktop.top_of_page">org.freedesktop.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_dbus_remote_desktop_proxy_new_finish() to get the result of the operation.
 *
 * See xdp_dbus_remote_desktop_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_dbus_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_DBUS_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.portal.RemoteDesktop", NULL);
}

/**
 * xdp_dbus_remote_desktop_proxy_new_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_remote_desktop_proxy_new().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_dbus_remote_desktop_proxy_new().
 *
 * Returns: (transfer full) (type XdpDbusRemoteDesktopProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusRemoteDesktop *
xdp_dbus_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_DBUS_REMOTE_DESKTOP (ret);
  else
    return NULL;
}

/**
 * xdp_dbus_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-portal-RemoteDesktop.top_of_page">org.freedesktop.portal.RemoteDesktop</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_remote_desktop_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpDbusRemoteDesktopProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusRemoteDesktop *
xdp_dbus_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_DBUS_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.portal.RemoteDesktop", NULL);
  if (ret != NULL)
    return XDP_DBUS_REMOTE_DESKTOP (ret);
  else
    return NULL;
}


/**
 * xdp_dbus_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_dbus_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_dbus_remote_desktop_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See xdp_dbus_remote_desktop_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_dbus_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_DBUS_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.portal.RemoteDesktop", NULL);
}

/**
 * xdp_dbus_remote_desktop_proxy_new_for_bus_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_remote_desktop_proxy_new_for_bus().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_dbus_remote_desktop_proxy_new_for_bus().
 *
 * Returns: (transfer full) (type XdpDbusRemoteDesktopProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusRemoteDesktop *
xdp_dbus_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_DBUS_REMOTE_DESKTOP (ret);
  else
    return NULL;
}

/**
 * xdp_dbus_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_dbus_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_dbus_remote_desktop_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpDbusRemoteDesktopProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusRemoteDesktop *
xdp_dbus_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_DBUS_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.portal.RemoteDesktop", NULL);
  if (ret != NULL)
    return XDP_DBUS_REMOTE_DESKTOP (ret);
  else
    return NULL;
}


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

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

/**
 * XdpDbusRemoteDesktopSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpDbusRemoteDesktopSkeleton.
 */

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

static void
_xdp_dbus_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)
{
  XdpDbusRemoteDesktopSkeleton *skeleton = XDP_DBUS_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_DBUS_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_DBUS_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_dbus_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)
{
  XdpDbusRemoteDesktopSkeleton *skeleton = XDP_DBUS_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_dbus_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_dbus_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)
{
  XdpDbusRemoteDesktopSkeleton *skeleton = XDP_DBUS_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_dbus_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_dbus_remote_desktop_skeleton_vtable =
{
  _xdp_dbus_remote_desktop_skeleton_handle_method_call,
  _xdp_dbus_remote_desktop_skeleton_handle_get_property,
  _xdp_dbus_remote_desktop_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
xdp_dbus_remote_desktop_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return xdp_dbus_remote_desktop_interface_info ();
}

static GDBusInterfaceVTable *
xdp_dbus_remote_desktop_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_xdp_dbus_remote_desktop_skeleton_vtable;
}

static GVariant *
xdp_dbus_remote_desktop_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  XdpDbusRemoteDesktopSkeleton *skeleton = XDP_DBUS_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_dbus_remote_desktop_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _xdp_dbus_remote_desktop_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _xdp_dbus_remote_desktop_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _xdp_dbus_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.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_dbus_remote_desktop_emit_changed (gpointer user_data);

static void
xdp_dbus_remote_desktop_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
{
  XdpDbusRemoteDesktopSkeleton *skeleton = XDP_DBUS_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_dbus_remote_desktop_emit_changed (skeleton);
}

static void xdp_dbus_remote_desktop_skeleton_iface_init (XdpDbusRemoteDesktopIface *iface);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpDbusRemoteDesktopSkeleton, xdp_dbus_remote_desktop_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (XdpDbusRemoteDesktopSkeleton)
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_REMOTE_DESKTOP, xdp_dbus_remote_desktop_skeleton_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpDbusRemoteDesktopSkeleton, xdp_dbus_remote_desktop_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_REMOTE_DESKTOP, xdp_dbus_remote_desktop_skeleton_iface_init))

#endif
static void
xdp_dbus_remote_desktop_skeleton_finalize (GObject *object)
{
  XdpDbusRemoteDesktopSkeleton *skeleton = XDP_DBUS_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_dbus_remote_desktop_skeleton_parent_class)->finalize (object);
}

static void
xdp_dbus_remote_desktop_skeleton_get_property (GObject      *object,
  guint         prop_id,
  GValue       *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  XdpDbusRemoteDesktopSkeleton *skeleton = XDP_DBUS_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_dbus_remote_desktop_emit_changed (gpointer user_data)
{
  XdpDbusRemoteDesktopSkeleton *skeleton = XDP_DBUS_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.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_dbus_remote_desktop_schedule_emit_changed (XdpDbusRemoteDesktopSkeleton *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_dbus_remote_desktop_skeleton_notify (GObject      *object,
  GParamSpec *pspec G_GNUC_UNUSED)
{
  XdpDbusRemoteDesktopSkeleton *skeleton = XDP_DBUS_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_dbus_remote_desktop_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
      g_source_set_name (skeleton->priv->changed_properties_idle_source, "[generated] _xdp_dbus_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_dbus_remote_desktop_skeleton_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec)
{
  const _ExtendedGDBusPropertyInfo *info;
  XdpDbusRemoteDesktopSkeleton *skeleton = XDP_DBUS_REMOTE_DESKTOP_SKELETON (object);
  g_assert (prop_id != 0 && prop_id - 1 < 2);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_dbus_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_dbus_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_dbus_remote_desktop_skeleton_init (XdpDbusRemoteDesktopSkeleton *skeleton)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  skeleton->priv = xdp_dbus_remote_desktop_skeleton_get_instance_private (skeleton);
#else
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, XDP_DBUS_TYPE_REMOTE_DESKTOP_SKELETON, XdpDbusRemoteDesktopSkeletonPrivate);
#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_dbus_remote_desktop_skeleton_get_available_device_types (XdpDbusRemoteDesktop *object)
{
  XdpDbusRemoteDesktopSkeleton *skeleton = XDP_DBUS_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_dbus_remote_desktop_skeleton_get_version (XdpDbusRemoteDesktop *object)
{
  XdpDbusRemoteDesktopSkeleton *skeleton = XDP_DBUS_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_dbus_remote_desktop_skeleton_class_init (XdpDbusRemoteDesktopSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize = xdp_dbus_remote_desktop_skeleton_finalize;
  gobject_class->get_property = xdp_dbus_remote_desktop_skeleton_get_property;
  gobject_class->set_property = xdp_dbus_remote_desktop_skeleton_set_property;
  gobject_class->notify       = xdp_dbus_remote_desktop_skeleton_notify;


  xdp_dbus_remote_desktop_override_properties (gobject_class, 1);

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = xdp_dbus_remote_desktop_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = xdp_dbus_remote_desktop_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = xdp_dbus_remote_desktop_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = xdp_dbus_remote_desktop_skeleton_dbus_interface_get_vtable;

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

static void
xdp_dbus_remote_desktop_skeleton_iface_init (XdpDbusRemoteDesktopIface *iface)
{
  iface->get_available_device_types = xdp_dbus_remote_desktop_skeleton_get_available_device_types;
  iface->get_version = xdp_dbus_remote_desktop_skeleton_get_version;
}

/**
 * xdp_dbus_remote_desktop_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-RemoteDesktop.top_of_page">org.freedesktop.portal.RemoteDesktop</link>.
 *
 * Returns: (transfer full) (type XdpDbusRemoteDesktopSkeleton): The skeleton object.
 */
XdpDbusRemoteDesktop *
xdp_dbus_remote_desktop_skeleton_new (void)
{
  return XDP_DBUS_REMOTE_DESKTOP (g_object_new (XDP_DBUS_TYPE_REMOTE_DESKTOP_SKELETON, NULL));
}

/* ------------------------------------------------------------------------
 * Code for interface org.freedesktop.portal.Request
 * ------------------------------------------------------------------------
 */

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

enum
{
  XDP_DBUS__REQUEST_RESPONSE,
};

static unsigned XDP_DBUS__REQUEST_SIGNALS[1] = { 0 };

/* ---- Introspection data for org.freedesktop.portal.Request ---- */

static const _ExtendedGDBusMethodInfo _xdp_dbus_request_method_info_close =
{
  {
    -1,
    (gchar *) "Close",
    NULL,
    NULL,
    NULL
  },
  "handle-close",
  FALSE
};

static const GDBusMethodInfo * const _xdp_dbus_request_method_info_pointers[] =
{
  &_xdp_dbus_request_method_info_close.parent_struct,
  NULL
};

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

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

static const GDBusArgInfo * const _xdp_dbus_request_signal_info_response_ARG_pointers[] =
{
  &_xdp_dbus_request_signal_info_response_ARG_response.parent_struct,
  &_xdp_dbus_request_signal_info_response_ARG_results.parent_struct,
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_request_signal_response_annotation_info_pointers[] =
{
  &_xdp_dbus_request_signal_response_annotation_info_0,
  NULL
};

static const _ExtendedGDBusSignalInfo _xdp_dbus_request_signal_info_response =
{
  {
    -1,
    (gchar *) "Response",
    (GDBusArgInfo **) &_xdp_dbus_request_signal_info_response_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_dbus_request_signal_response_annotation_info_pointers
  },
  "response"
};

static const GDBusSignalInfo * const _xdp_dbus_request_signal_info_pointers[] =
{
  &_xdp_dbus_request_signal_info_response.parent_struct,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _xdp_dbus_request_interface_info =
{
  {
    -1,
    (gchar *) "org.freedesktop.portal.Request",
    (GDBusMethodInfo **) &_xdp_dbus_request_method_info_pointers,
    (GDBusSignalInfo **) &_xdp_dbus_request_signal_info_pointers,
    NULL,
    NULL
  },
  "request",
};


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

/**
 * xdp_dbus_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 #XdpDbusRequest interface for a concrete class.
 * The properties are overridden in the order they are defined.
 *
 * Returns: The last property id.
 */
guint
xdp_dbus_request_override_properties (GObjectClass *klass G_GNUC_UNUSED, guint property_id_begin)
{
  return property_id_begin - 1;
}


inline static void
xdp_dbus_request_signal_marshal_response (
    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__UINT_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_dbus_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);
}


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

/**
 * XdpDbusRequestIface:
 * @parent_iface: The parent interface.
 * @handle_close: Handler for the #XdpDbusRequest::handle-close signal.
 * @response: Handler for the #XdpDbusRequest::response signal.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-Request.top_of_page">org.freedesktop.portal.Request</link>.
 */

typedef XdpDbusRequestIface XdpDbusRequestInterface;
G_DEFINE_INTERFACE (XdpDbusRequest, xdp_dbus_request, G_TYPE_OBJECT)

static void
xdp_dbus_request_default_init (XdpDbusRequestIface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * XdpDbusRequest::handle-close:
   * @object: A #XdpDbusRequest.
   * @invocation: A #GDBusMethodInvocation.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-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_dbus_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 (XdpDbusRequestIface, handle_close),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_request_method_marshal_close,
    G_TYPE_BOOLEAN,
    1,
    G_TYPE_DBUS_METHOD_INVOCATION);

  /* GObject signals for received D-Bus signals: */
  /**
   * XdpDbusRequest::response:
   * @object: A #XdpDbusRequest.
   * @arg_response: Argument.
   * @arg_results: Argument.
   *
   * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-freedesktop-portal-Request.Response">"Response"</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_DBUS__REQUEST_SIGNALS[XDP_DBUS__REQUEST_RESPONSE] =
    g_signal_new ("response",
      G_TYPE_FROM_INTERFACE (iface),
      G_SIGNAL_RUN_LAST,
      G_STRUCT_OFFSET (XdpDbusRequestIface, response),
      NULL,
      NULL,
      xdp_dbus_request_signal_marshal_response,
      G_TYPE_NONE,
      2, G_TYPE_UINT, G_TYPE_VARIANT);

}

/**
 * xdp_dbus_request_emit_response:
 * @object: A #XdpDbusRequest.
 * @arg_response: Argument to pass with the signal.
 * @arg_results: Argument to pass with the signal.
 *
 * Emits the <link linkend="gdbus-signal-org-freedesktop-portal-Request.Response">"Response"</link> D-Bus signal.
 */
void
xdp_dbus_request_emit_response (
    XdpDbusRequest *object,
    guint arg_response,
    GVariant *arg_results)
{
  g_signal_emit (object, XDP_DBUS__REQUEST_SIGNALS[XDP_DBUS__REQUEST_RESPONSE], 0, arg_response, arg_results);
}

/**
 * xdp_dbus_request_call_close:
 * @proxy: A #XdpDbusRequestProxy.
 * @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-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_dbus_request_call_close_finish() to get the result of the operation.
 *
 * See xdp_dbus_request_call_close_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_request_call_close (
    XdpDbusRequest *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_dbus_request_call_close_finish:
 * @proxy: A #XdpDbusRequestProxy.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_request_call_close().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_request_call_close().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_request_call_close_finish (
    XdpDbusRequest *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_dbus_request_call_close_sync:
 * @proxy: A #XdpDbusRequestProxy.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-portal-Request.Close">Close()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_request_call_close() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_request_call_close_sync (
    XdpDbusRequest *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_dbus_request_complete_close:
 * @object: A #XdpDbusRequest.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-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_dbus_request_complete_close (
    XdpDbusRequest *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("()"));
}

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

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

/**
 * XdpDbusRequestProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpDbusRequestProxy.
 */

struct _XdpDbusRequestProxyPrivate
{
  GData *qdata;
};

static void xdp_dbus_request_proxy_iface_init (XdpDbusRequestIface *iface);

#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpDbusRequestProxy, xdp_dbus_request_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (XdpDbusRequestProxy)
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_REQUEST, xdp_dbus_request_proxy_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpDbusRequestProxy, xdp_dbus_request_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_REQUEST, xdp_dbus_request_proxy_iface_init))

#endif
static void
xdp_dbus_request_proxy_finalize (GObject *object)
{
  XdpDbusRequestProxy *proxy = XDP_DBUS_REQUEST_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (xdp_dbus_request_proxy_parent_class)->finalize (object);
}

static void
xdp_dbus_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_dbus_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_dbus_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_dbus_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_DBUS_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_DBUS_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_dbus_request_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  XdpDbusRequestProxy *proxy = XDP_DBUS_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_dbus_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_dbus_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_dbus_request_proxy_init (XdpDbusRequestProxy *proxy)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  proxy->priv = xdp_dbus_request_proxy_get_instance_private (proxy);
#else
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, XDP_DBUS_TYPE_REQUEST_PROXY, XdpDbusRequestProxyPrivate);
#endif

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

static void
xdp_dbus_request_proxy_class_init (XdpDbusRequestProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = xdp_dbus_request_proxy_finalize;
  gobject_class->get_property = xdp_dbus_request_proxy_get_property;
  gobject_class->set_property = xdp_dbus_request_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = xdp_dbus_request_proxy_g_signal;
  proxy_class->g_properties_changed = xdp_dbus_request_proxy_g_properties_changed;

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

static void
xdp_dbus_request_proxy_iface_init (XdpDbusRequestIface *iface G_GNUC_UNUSED)
{
}

/**
 * xdp_dbus_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-portal-Request.top_of_page">org.freedesktop.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_dbus_request_proxy_new_finish() to get the result of the operation.
 *
 * See xdp_dbus_request_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_dbus_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_DBUS_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.portal.Request", NULL);
}

/**
 * xdp_dbus_request_proxy_new_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_request_proxy_new().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_dbus_request_proxy_new().
 *
 * Returns: (transfer full) (type XdpDbusRequestProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusRequest *
xdp_dbus_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_DBUS_REQUEST (ret);
  else
    return NULL;
}

/**
 * xdp_dbus_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-portal-Request.top_of_page">org.freedesktop.portal.Request</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_request_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpDbusRequestProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusRequest *
xdp_dbus_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_DBUS_TYPE_REQUEST_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.portal.Request", NULL);
  if (ret != NULL)
    return XDP_DBUS_REQUEST (ret);
  else
    return NULL;
}


/**
 * xdp_dbus_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_dbus_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_dbus_request_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See xdp_dbus_request_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_dbus_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_DBUS_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.portal.Request", NULL);
}

/**
 * xdp_dbus_request_proxy_new_for_bus_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_request_proxy_new_for_bus().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_dbus_request_proxy_new_for_bus().
 *
 * Returns: (transfer full) (type XdpDbusRequestProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusRequest *
xdp_dbus_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_DBUS_REQUEST (ret);
  else
    return NULL;
}

/**
 * xdp_dbus_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_dbus_request_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_request_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpDbusRequestProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusRequest *
xdp_dbus_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_DBUS_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.portal.Request", NULL);
  if (ret != NULL)
    return XDP_DBUS_REQUEST (ret);
  else
    return NULL;
}


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

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

/**
 * XdpDbusRequestSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpDbusRequestSkeleton.
 */

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

static void
_xdp_dbus_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)
{
  XdpDbusRequestSkeleton *skeleton = XDP_DBUS_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_DBUS_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_DBUS_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_dbus_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)
{
  XdpDbusRequestSkeleton *skeleton = XDP_DBUS_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_dbus_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_dbus_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)
{
  XdpDbusRequestSkeleton *skeleton = XDP_DBUS_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_dbus_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_dbus_request_skeleton_vtable =
{
  _xdp_dbus_request_skeleton_handle_method_call,
  _xdp_dbus_request_skeleton_handle_get_property,
  _xdp_dbus_request_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
xdp_dbus_request_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return xdp_dbus_request_interface_info ();
}

static GDBusInterfaceVTable *
xdp_dbus_request_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_xdp_dbus_request_skeleton_vtable;
}

static GVariant *
xdp_dbus_request_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  XdpDbusRequestSkeleton *skeleton = XDP_DBUS_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_dbus_request_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _xdp_dbus_request_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _xdp_dbus_request_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _xdp_dbus_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.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_dbus_request_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton G_GNUC_UNUSED)
{
}

static void
_xdp_dbus_request_on_signal_response (
    XdpDbusRequest *object,
    guint arg_response,
    GVariant *arg_results)
{
  XdpDbusRequestSkeleton *skeleton = XDP_DBUS_REQUEST_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 ("(u@a{sv})",
                   arg_response,
                   arg_results));
  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.portal.Request", "Response",
        signal_variant, NULL);
    }
  g_variant_unref (signal_variant);
  g_list_free_full (connections, g_object_unref);
}

static void xdp_dbus_request_skeleton_iface_init (XdpDbusRequestIface *iface);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpDbusRequestSkeleton, xdp_dbus_request_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (XdpDbusRequestSkeleton)
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_REQUEST, xdp_dbus_request_skeleton_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpDbusRequestSkeleton, xdp_dbus_request_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_REQUEST, xdp_dbus_request_skeleton_iface_init))

#endif
static void
xdp_dbus_request_skeleton_finalize (GObject *object)
{
  XdpDbusRequestSkeleton *skeleton = XDP_DBUS_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_dbus_request_skeleton_parent_class)->finalize (object);
}

static void
xdp_dbus_request_skeleton_init (XdpDbusRequestSkeleton *skeleton)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  skeleton->priv = xdp_dbus_request_skeleton_get_instance_private (skeleton);
#else
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, XDP_DBUS_TYPE_REQUEST_SKELETON, XdpDbusRequestSkeletonPrivate);
#endif

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

static void
xdp_dbus_request_skeleton_class_init (XdpDbusRequestSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

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

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = xdp_dbus_request_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = xdp_dbus_request_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = xdp_dbus_request_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = xdp_dbus_request_skeleton_dbus_interface_get_vtable;

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

static void
xdp_dbus_request_skeleton_iface_init (XdpDbusRequestIface *iface)
{
  iface->response = _xdp_dbus_request_on_signal_response;
}

/**
 * xdp_dbus_request_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-Request.top_of_page">org.freedesktop.portal.Request</link>.
 *
 * Returns: (transfer full) (type XdpDbusRequestSkeleton): The skeleton object.
 */
XdpDbusRequest *
xdp_dbus_request_skeleton_new (void)
{
  return XDP_DBUS_REQUEST (g_object_new (XDP_DBUS_TYPE_REQUEST_SKELETON, NULL));
}

/* ------------------------------------------------------------------------
 * Code for interface org.freedesktop.portal.ScreenCast
 * ------------------------------------------------------------------------
 */

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

/* ---- Introspection data for org.freedesktop.portal.ScreenCast ---- */

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

static const GDBusArgInfo * const _xdp_dbus_screen_cast_method_info_create_session_IN_ARG_pointers[] =
{
  &_xdp_dbus_screen_cast_method_info_create_session_IN_ARG_options.parent_struct,
  NULL
};

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

static const GDBusArgInfo * const _xdp_dbus_screen_cast_method_info_create_session_OUT_ARG_pointers[] =
{
  &_xdp_dbus_screen_cast_method_info_create_session_OUT_ARG_handle.parent_struct,
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_screen_cast_method_create_session_annotation_info_pointers[] =
{
  &_xdp_dbus_screen_cast_method_create_session_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_screen_cast_method_info_create_session =
{
  {
    -1,
    (gchar *) "CreateSession",
    (GDBusArgInfo **) &_xdp_dbus_screen_cast_method_info_create_session_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_screen_cast_method_info_create_session_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_dbus_screen_cast_method_create_session_annotation_info_pointers
  },
  "handle-create-session",
  FALSE
};

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

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

static const GDBusArgInfo * const _xdp_dbus_screen_cast_method_info_select_sources_IN_ARG_pointers[] =
{
  &_xdp_dbus_screen_cast_method_info_select_sources_IN_ARG_session_handle.parent_struct,
  &_xdp_dbus_screen_cast_method_info_select_sources_IN_ARG_options.parent_struct,
  NULL
};

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

static const GDBusArgInfo * const _xdp_dbus_screen_cast_method_info_select_sources_OUT_ARG_pointers[] =
{
  &_xdp_dbus_screen_cast_method_info_select_sources_OUT_ARG_handle.parent_struct,
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_screen_cast_method_select_sources_annotation_info_pointers[] =
{
  &_xdp_dbus_screen_cast_method_select_sources_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_screen_cast_method_info_select_sources =
{
  {
    -1,
    (gchar *) "SelectSources",
    (GDBusArgInfo **) &_xdp_dbus_screen_cast_method_info_select_sources_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_screen_cast_method_info_select_sources_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_dbus_screen_cast_method_select_sources_annotation_info_pointers
  },
  "handle-select-sources",
  FALSE
};

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

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

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

static const GDBusArgInfo * const _xdp_dbus_screen_cast_method_info_start_IN_ARG_pointers[] =
{
  &_xdp_dbus_screen_cast_method_info_start_IN_ARG_session_handle.parent_struct,
  &_xdp_dbus_screen_cast_method_info_start_IN_ARG_parent_window.parent_struct,
  &_xdp_dbus_screen_cast_method_info_start_IN_ARG_options.parent_struct,
  NULL
};

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

static const GDBusArgInfo * const _xdp_dbus_screen_cast_method_info_start_OUT_ARG_pointers[] =
{
  &_xdp_dbus_screen_cast_method_info_start_OUT_ARG_handle.parent_struct,
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_screen_cast_method_start_annotation_info_pointers[] =
{
  &_xdp_dbus_screen_cast_method_start_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_screen_cast_method_info_start =
{
  {
    -1,
    (gchar *) "Start",
    (GDBusArgInfo **) &_xdp_dbus_screen_cast_method_info_start_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_screen_cast_method_info_start_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_dbus_screen_cast_method_start_annotation_info_pointers
  },
  "handle-start",
  FALSE
};

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

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

static const GDBusArgInfo * const _xdp_dbus_screen_cast_method_info_open_pipewire_remote_IN_ARG_pointers[] =
{
  &_xdp_dbus_screen_cast_method_info_open_pipewire_remote_IN_ARG_session_handle.parent_struct,
  &_xdp_dbus_screen_cast_method_info_open_pipewire_remote_IN_ARG_options.parent_struct,
  NULL
};

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

static const GDBusArgInfo * const _xdp_dbus_screen_cast_method_info_open_pipewire_remote_OUT_ARG_pointers[] =
{
  &_xdp_dbus_screen_cast_method_info_open_pipewire_remote_OUT_ARG_fd.parent_struct,
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_screen_cast_method_open_pipewire_remote_annotation_info_pointers[] =
{
  &_xdp_dbus_screen_cast_method_open_pipewire_remote_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_screen_cast_method_info_open_pipewire_remote =
{
  {
    -1,
    (gchar *) "OpenPipeWireRemote",
    (GDBusArgInfo **) &_xdp_dbus_screen_cast_method_info_open_pipewire_remote_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_screen_cast_method_info_open_pipewire_remote_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_dbus_screen_cast_method_open_pipewire_remote_annotation_info_pointers
  },
  "handle-open-pipewire-remote",
  TRUE
};

static const GDBusMethodInfo * const _xdp_dbus_screen_cast_method_info_pointers[] =
{
  &_xdp_dbus_screen_cast_method_info_create_session.parent_struct,
  &_xdp_dbus_screen_cast_method_info_select_sources.parent_struct,
  &_xdp_dbus_screen_cast_method_info_start.parent_struct,
  &_xdp_dbus_screen_cast_method_info_open_pipewire_remote.parent_struct,
  NULL
};

static const _ExtendedGDBusPropertyInfo _xdp_dbus_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_dbus_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_dbus_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_dbus_screen_cast_property_info_pointers[] =
{
  &_xdp_dbus_screen_cast_property_info_available_source_types.parent_struct,
  &_xdp_dbus_screen_cast_property_info_available_cursor_modes.parent_struct,
  &_xdp_dbus_screen_cast_property_info_version.parent_struct,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _xdp_dbus_screen_cast_interface_info =
{
  {
    -1,
    (gchar *) "org.freedesktop.portal.ScreenCast",
    (GDBusMethodInfo **) &_xdp_dbus_screen_cast_method_info_pointers,
    NULL,
    (GDBusPropertyInfo **) &_xdp_dbus_screen_cast_property_info_pointers,
    NULL
  },
  "screen-cast",
};


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

/**
 * xdp_dbus_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 #XdpDbusScreenCast interface for a concrete class.
 * The properties are overridden in the order they are defined.
 *
 * Returns: The last property id.
 */
guint
xdp_dbus_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_dbus_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_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_dbus_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_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_dbus_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_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_dbus_screen_cast_method_marshal_open_pipewire_remote (
    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_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}


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

/**
 * XdpDbusScreenCastIface:
 * @parent_iface: The parent interface.
 * @handle_create_session: Handler for the #XdpDbusScreenCast::handle-create-session signal.
 * @handle_open_pipewire_remote: Handler for the #XdpDbusScreenCast::handle-open-pipewire-remote signal.
 * @handle_select_sources: Handler for the #XdpDbusScreenCast::handle-select-sources signal.
 * @handle_start: Handler for the #XdpDbusScreenCast::handle-start signal.
 * @get_available_cursor_modes: Getter for the #XdpDbusScreenCast:available-cursor-modes property.
 * @get_available_source_types: Getter for the #XdpDbusScreenCast:available-source-types property.
 * @get_version: Getter for the #XdpDbusScreenCast:version property.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-ScreenCast.top_of_page">org.freedesktop.portal.ScreenCast</link>.
 */

typedef XdpDbusScreenCastIface XdpDbusScreenCastInterface;
G_DEFINE_INTERFACE (XdpDbusScreenCast, xdp_dbus_screen_cast, G_TYPE_OBJECT)

static void
xdp_dbus_screen_cast_default_init (XdpDbusScreenCastIface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * XdpDbusScreenCast::handle-create-session:
   * @object: A #XdpDbusScreenCast.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_options: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-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_dbus_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 (XdpDbusScreenCastIface, handle_create_session),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_screen_cast_method_marshal_create_session,
    G_TYPE_BOOLEAN,
    2,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_VARIANT);

  /**
   * XdpDbusScreenCast::handle-select-sources:
   * @object: A #XdpDbusScreenCast.
   * @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-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_dbus_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 (XdpDbusScreenCastIface, handle_select_sources),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_screen_cast_method_marshal_select_sources,
    G_TYPE_BOOLEAN,
    3,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_VARIANT);

  /**
   * XdpDbusScreenCast::handle-start:
   * @object: A #XdpDbusScreenCast.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_session_handle: 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-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_dbus_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 (XdpDbusScreenCastIface, handle_start),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_screen_cast_method_marshal_start,
    G_TYPE_BOOLEAN,
    4,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_VARIANT);

  /**
   * XdpDbusScreenCast::handle-open-pipewire-remote:
   * @object: A #XdpDbusScreenCast.
   * @invocation: A #GDBusMethodInvocation.
   * @fd_list: (nullable): A #GUnixFDList or %NULL.
   * @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-portal-ScreenCast.OpenPipeWireRemote">OpenPipeWireRemote()</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_dbus_screen_cast_complete_open_pipewire_remote() 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-pipewire-remote",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpDbusScreenCastIface, handle_open_pipewire_remote),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_screen_cast_method_marshal_open_pipewire_remote,
    G_TYPE_BOOLEAN,
    4,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UNIX_FD_LIST, G_TYPE_STRING, G_TYPE_VARIANT);

  /* GObject properties for D-Bus properties: */
  /**
   * XdpDbusScreenCast:available-source-types:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-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));
  /**
   * XdpDbusScreenCast:available-cursor-modes:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-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));
  /**
   * XdpDbusScreenCast:version:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-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_dbus_screen_cast_get_available_source_types: (skip)
 * @object: A #XdpDbusScreenCast.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-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_dbus_screen_cast_get_available_source_types (XdpDbusScreenCast *object)
{
  g_return_val_if_fail (XDP_DBUS_IS_SCREEN_CAST (object), 0);

  return XDP_DBUS_SCREEN_CAST_GET_IFACE (object)->get_available_source_types (object);
}

/**
 * xdp_dbus_screen_cast_set_available_source_types: (skip)
 * @object: A #XdpDbusScreenCast.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-freedesktop-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_dbus_screen_cast_set_available_source_types (XdpDbusScreenCast *object, guint value)
{
  g_object_set (G_OBJECT (object), "available-source-types", value, NULL);
}

/**
 * xdp_dbus_screen_cast_get_available_cursor_modes: (skip)
 * @object: A #XdpDbusScreenCast.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-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_dbus_screen_cast_get_available_cursor_modes (XdpDbusScreenCast *object)
{
  g_return_val_if_fail (XDP_DBUS_IS_SCREEN_CAST (object), 0);

  return XDP_DBUS_SCREEN_CAST_GET_IFACE (object)->get_available_cursor_modes (object);
}

/**
 * xdp_dbus_screen_cast_set_available_cursor_modes: (skip)
 * @object: A #XdpDbusScreenCast.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-freedesktop-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_dbus_screen_cast_set_available_cursor_modes (XdpDbusScreenCast *object, guint value)
{
  g_object_set (G_OBJECT (object), "available-cursor-modes", value, NULL);
}

/**
 * xdp_dbus_screen_cast_get_version: (skip)
 * @object: A #XdpDbusScreenCast.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-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_dbus_screen_cast_get_version (XdpDbusScreenCast *object)
{
  g_return_val_if_fail (XDP_DBUS_IS_SCREEN_CAST (object), 0);

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

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

/**
 * xdp_dbus_screen_cast_call_create_session:
 * @proxy: A #XdpDbusScreenCastProxy.
 * @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-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_dbus_screen_cast_call_create_session_finish() to get the result of the operation.
 *
 * See xdp_dbus_screen_cast_call_create_session_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_screen_cast_call_create_session (
    XdpDbusScreenCast *proxy,
    GVariant *arg_options,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "CreateSession",
    g_variant_new ("(@a{sv})",
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_screen_cast_call_create_session_finish:
 * @proxy: A #XdpDbusScreenCastProxy.
 * @out_handle: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_screen_cast_call_create_session().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_screen_cast_call_create_session().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_screen_cast_call_create_session_finish (
    XdpDbusScreenCast *proxy,
    gchar ** out_handle,
    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,
                 "(o)",
                 out_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_screen_cast_call_create_session_sync:
 * @proxy: A #XdpDbusScreenCastProxy.
 * @arg_options: Argument to pass with the method invocation.
 * @out_handle: (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-portal-ScreenCast.CreateSession">CreateSession()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_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_dbus_screen_cast_call_create_session_sync (
    XdpDbusScreenCast *proxy,
    GVariant *arg_options,
    gchar ** out_handle,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "CreateSession",
    g_variant_new ("(@a{sv})",
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(o)",
                 out_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_screen_cast_call_select_sources:
 * @proxy: A #XdpDbusScreenCastProxy.
 * @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-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_dbus_screen_cast_call_select_sources_finish() to get the result of the operation.
 *
 * See xdp_dbus_screen_cast_call_select_sources_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_screen_cast_call_select_sources (
    XdpDbusScreenCast *proxy,
    const gchar *arg_session_handle,
    GVariant *arg_options,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "SelectSources",
    g_variant_new ("(o@a{sv})",
                   arg_session_handle,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_screen_cast_call_select_sources_finish:
 * @proxy: A #XdpDbusScreenCastProxy.
 * @out_handle: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_screen_cast_call_select_sources().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_screen_cast_call_select_sources().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_screen_cast_call_select_sources_finish (
    XdpDbusScreenCast *proxy,
    gchar ** out_handle,
    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,
                 "(o)",
                 out_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_screen_cast_call_select_sources_sync:
 * @proxy: A #XdpDbusScreenCastProxy.
 * @arg_session_handle: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @out_handle: (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-portal-ScreenCast.SelectSources">SelectSources()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_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_dbus_screen_cast_call_select_sources_sync (
    XdpDbusScreenCast *proxy,
    const gchar *arg_session_handle,
    GVariant *arg_options,
    gchar ** out_handle,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "SelectSources",
    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,
                 "(o)",
                 out_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_screen_cast_call_start:
 * @proxy: A #XdpDbusScreenCastProxy.
 * @arg_session_handle: 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-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_dbus_screen_cast_call_start_finish() to get the result of the operation.
 *
 * See xdp_dbus_screen_cast_call_start_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_screen_cast_call_start (
    XdpDbusScreenCast *proxy,
    const gchar *arg_session_handle,
    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 ("(os@a{sv})",
                   arg_session_handle,
                   arg_parent_window,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_screen_cast_call_start_finish:
 * @proxy: A #XdpDbusScreenCastProxy.
 * @out_handle: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_screen_cast_call_start().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_screen_cast_call_start().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_screen_cast_call_start_finish (
    XdpDbusScreenCast *proxy,
    gchar ** out_handle,
    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,
                 "(o)",
                 out_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_screen_cast_call_start_sync:
 * @proxy: A #XdpDbusScreenCastProxy.
 * @arg_session_handle: 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_handle: (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-portal-ScreenCast.Start">Start()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_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_dbus_screen_cast_call_start_sync (
    XdpDbusScreenCast *proxy,
    const gchar *arg_session_handle,
    const gchar *arg_parent_window,
    GVariant *arg_options,
    gchar ** out_handle,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "Start",
    g_variant_new ("(os@a{sv})",
                   arg_session_handle,
                   arg_parent_window,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(o)",
                 out_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_screen_cast_call_open_pipewire_remote:
 * @proxy: A #XdpDbusScreenCastProxy.
 * @arg_session_handle: 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-portal-ScreenCast.OpenPipeWireRemote">OpenPipeWireRemote()</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_dbus_screen_cast_call_open_pipewire_remote_finish() to get the result of the operation.
 *
 * See xdp_dbus_screen_cast_call_open_pipewire_remote_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_screen_cast_call_open_pipewire_remote (
    XdpDbusScreenCast *proxy,
    const gchar *arg_session_handle,
    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),
    "OpenPipeWireRemote",
    g_variant_new ("(o@a{sv})",
                   arg_session_handle,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    fd_list,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_screen_cast_call_open_pipewire_remote_finish:
 * @proxy: A #XdpDbusScreenCastProxy.
 * @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_dbus_screen_cast_call_open_pipewire_remote().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_screen_cast_call_open_pipewire_remote().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_screen_cast_call_open_pipewire_remote_finish (
    XdpDbusScreenCast *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_dbus_screen_cast_call_open_pipewire_remote_sync:
 * @proxy: A #XdpDbusScreenCastProxy.
 * @arg_session_handle: 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-portal-ScreenCast.OpenPipeWireRemote">OpenPipeWireRemote()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_screen_cast_call_open_pipewire_remote() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_screen_cast_call_open_pipewire_remote_sync (
    XdpDbusScreenCast *proxy,
    const gchar *arg_session_handle,
    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),
    "OpenPipeWireRemote",
    g_variant_new ("(o@a{sv})",
                   arg_session_handle,
                   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_dbus_screen_cast_complete_create_session:
 * @object: A #XdpDbusScreenCast.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @handle: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-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_dbus_screen_cast_complete_create_session (
    XdpDbusScreenCast *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    const gchar *handle)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(o)",
                   handle));
}

/**
 * xdp_dbus_screen_cast_complete_select_sources:
 * @object: A #XdpDbusScreenCast.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @handle: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-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_dbus_screen_cast_complete_select_sources (
    XdpDbusScreenCast *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    const gchar *handle)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(o)",
                   handle));
}

/**
 * xdp_dbus_screen_cast_complete_start:
 * @object: A #XdpDbusScreenCast.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @handle: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-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_dbus_screen_cast_complete_start (
    XdpDbusScreenCast *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    const gchar *handle)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(o)",
                   handle));
}

/**
 * xdp_dbus_screen_cast_complete_open_pipewire_remote:
 * @object: A #XdpDbusScreenCast.
 * @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-portal-ScreenCast.OpenPipeWireRemote">OpenPipeWireRemote()</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_dbus_screen_cast_complete_open_pipewire_remote (
    XdpDbusScreenCast *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);
}

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

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

/**
 * XdpDbusScreenCastProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpDbusScreenCastProxy.
 */

struct _XdpDbusScreenCastProxyPrivate
{
  GData *qdata;
};

static void xdp_dbus_screen_cast_proxy_iface_init (XdpDbusScreenCastIface *iface);

#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpDbusScreenCastProxy, xdp_dbus_screen_cast_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (XdpDbusScreenCastProxy)
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_SCREEN_CAST, xdp_dbus_screen_cast_proxy_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpDbusScreenCastProxy, xdp_dbus_screen_cast_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_SCREEN_CAST, xdp_dbus_screen_cast_proxy_iface_init))

#endif
static void
xdp_dbus_screen_cast_proxy_finalize (GObject *object)
{
  XdpDbusScreenCastProxy *proxy = XDP_DBUS_SCREEN_CAST_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (xdp_dbus_screen_cast_proxy_parent_class)->finalize (object);
}

static void
xdp_dbus_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_dbus_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_dbus_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.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_dbus_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_dbus_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.portal.ScreenCast", info->parent_struct.name, variant),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    NULL, (GAsyncReadyCallback) xdp_dbus_screen_cast_proxy_set_property_cb, (GDBusPropertyInfo *) &info->parent_struct);
  g_variant_unref (variant);
}

static void
xdp_dbus_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_dbus_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_DBUS_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_DBUS_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_dbus_screen_cast_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  XdpDbusScreenCastProxy *proxy = XDP_DBUS_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_dbus_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_dbus_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_dbus_screen_cast_proxy_get_available_source_types (XdpDbusScreenCast *object)
{
  XdpDbusScreenCastProxy *proxy = XDP_DBUS_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_dbus_screen_cast_proxy_get_available_cursor_modes (XdpDbusScreenCast *object)
{
  XdpDbusScreenCastProxy *proxy = XDP_DBUS_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_dbus_screen_cast_proxy_get_version (XdpDbusScreenCast *object)
{
  XdpDbusScreenCastProxy *proxy = XDP_DBUS_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_dbus_screen_cast_proxy_init (XdpDbusScreenCastProxy *proxy)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  proxy->priv = xdp_dbus_screen_cast_proxy_get_instance_private (proxy);
#else
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, XDP_DBUS_TYPE_SCREEN_CAST_PROXY, XdpDbusScreenCastProxyPrivate);
#endif

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

static void
xdp_dbus_screen_cast_proxy_class_init (XdpDbusScreenCastProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = xdp_dbus_screen_cast_proxy_finalize;
  gobject_class->get_property = xdp_dbus_screen_cast_proxy_get_property;
  gobject_class->set_property = xdp_dbus_screen_cast_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = xdp_dbus_screen_cast_proxy_g_signal;
  proxy_class->g_properties_changed = xdp_dbus_screen_cast_proxy_g_properties_changed;

  xdp_dbus_screen_cast_override_properties (gobject_class, 1);

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

static void
xdp_dbus_screen_cast_proxy_iface_init (XdpDbusScreenCastIface *iface)
{
  iface->get_available_source_types = xdp_dbus_screen_cast_proxy_get_available_source_types;
  iface->get_available_cursor_modes = xdp_dbus_screen_cast_proxy_get_available_cursor_modes;
  iface->get_version = xdp_dbus_screen_cast_proxy_get_version;
}

/**
 * xdp_dbus_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-portal-ScreenCast.top_of_page">org.freedesktop.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_dbus_screen_cast_proxy_new_finish() to get the result of the operation.
 *
 * See xdp_dbus_screen_cast_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_dbus_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_DBUS_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.portal.ScreenCast", NULL);
}

/**
 * xdp_dbus_screen_cast_proxy_new_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_screen_cast_proxy_new().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_dbus_screen_cast_proxy_new().
 *
 * Returns: (transfer full) (type XdpDbusScreenCastProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusScreenCast *
xdp_dbus_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_DBUS_SCREEN_CAST (ret);
  else
    return NULL;
}

/**
 * xdp_dbus_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-portal-ScreenCast.top_of_page">org.freedesktop.portal.ScreenCast</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_screen_cast_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpDbusScreenCastProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusScreenCast *
xdp_dbus_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_DBUS_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.portal.ScreenCast", NULL);
  if (ret != NULL)
    return XDP_DBUS_SCREEN_CAST (ret);
  else
    return NULL;
}


/**
 * xdp_dbus_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_dbus_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_dbus_screen_cast_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See xdp_dbus_screen_cast_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_dbus_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_DBUS_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.portal.ScreenCast", NULL);
}

/**
 * xdp_dbus_screen_cast_proxy_new_for_bus_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_screen_cast_proxy_new_for_bus().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_dbus_screen_cast_proxy_new_for_bus().
 *
 * Returns: (transfer full) (type XdpDbusScreenCastProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusScreenCast *
xdp_dbus_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_DBUS_SCREEN_CAST (ret);
  else
    return NULL;
}

/**
 * xdp_dbus_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_dbus_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_dbus_screen_cast_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpDbusScreenCastProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusScreenCast *
xdp_dbus_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_DBUS_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.portal.ScreenCast", NULL);
  if (ret != NULL)
    return XDP_DBUS_SCREEN_CAST (ret);
  else
    return NULL;
}


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

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

/**
 * XdpDbusScreenCastSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpDbusScreenCastSkeleton.
 */

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

static void
_xdp_dbus_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)
{
  XdpDbusScreenCastSkeleton *skeleton = XDP_DBUS_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_DBUS_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_DBUS_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_dbus_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)
{
  XdpDbusScreenCastSkeleton *skeleton = XDP_DBUS_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_dbus_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_dbus_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)
{
  XdpDbusScreenCastSkeleton *skeleton = XDP_DBUS_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_dbus_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_dbus_screen_cast_skeleton_vtable =
{
  _xdp_dbus_screen_cast_skeleton_handle_method_call,
  _xdp_dbus_screen_cast_skeleton_handle_get_property,
  _xdp_dbus_screen_cast_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
xdp_dbus_screen_cast_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return xdp_dbus_screen_cast_interface_info ();
}

static GDBusInterfaceVTable *
xdp_dbus_screen_cast_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_xdp_dbus_screen_cast_skeleton_vtable;
}

static GVariant *
xdp_dbus_screen_cast_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  XdpDbusScreenCastSkeleton *skeleton = XDP_DBUS_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_dbus_screen_cast_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _xdp_dbus_screen_cast_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _xdp_dbus_screen_cast_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _xdp_dbus_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.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_dbus_screen_cast_emit_changed (gpointer user_data);

static void
xdp_dbus_screen_cast_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
{
  XdpDbusScreenCastSkeleton *skeleton = XDP_DBUS_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_dbus_screen_cast_emit_changed (skeleton);
}

static void xdp_dbus_screen_cast_skeleton_iface_init (XdpDbusScreenCastIface *iface);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpDbusScreenCastSkeleton, xdp_dbus_screen_cast_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (XdpDbusScreenCastSkeleton)
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_SCREEN_CAST, xdp_dbus_screen_cast_skeleton_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpDbusScreenCastSkeleton, xdp_dbus_screen_cast_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_SCREEN_CAST, xdp_dbus_screen_cast_skeleton_iface_init))

#endif
static void
xdp_dbus_screen_cast_skeleton_finalize (GObject *object)
{
  XdpDbusScreenCastSkeleton *skeleton = XDP_DBUS_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_dbus_screen_cast_skeleton_parent_class)->finalize (object);
}

static void
xdp_dbus_screen_cast_skeleton_get_property (GObject      *object,
  guint         prop_id,
  GValue       *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  XdpDbusScreenCastSkeleton *skeleton = XDP_DBUS_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_dbus_screen_cast_emit_changed (gpointer user_data)
{
  XdpDbusScreenCastSkeleton *skeleton = XDP_DBUS_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.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_dbus_screen_cast_schedule_emit_changed (XdpDbusScreenCastSkeleton *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_dbus_screen_cast_skeleton_notify (GObject      *object,
  GParamSpec *pspec G_GNUC_UNUSED)
{
  XdpDbusScreenCastSkeleton *skeleton = XDP_DBUS_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_dbus_screen_cast_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
      g_source_set_name (skeleton->priv->changed_properties_idle_source, "[generated] _xdp_dbus_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_dbus_screen_cast_skeleton_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec)
{
  const _ExtendedGDBusPropertyInfo *info;
  XdpDbusScreenCastSkeleton *skeleton = XDP_DBUS_SCREEN_CAST_SKELETON (object);
  g_assert (prop_id != 0 && prop_id - 1 < 3);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_dbus_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_dbus_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_dbus_screen_cast_skeleton_init (XdpDbusScreenCastSkeleton *skeleton)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  skeleton->priv = xdp_dbus_screen_cast_skeleton_get_instance_private (skeleton);
#else
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, XDP_DBUS_TYPE_SCREEN_CAST_SKELETON, XdpDbusScreenCastSkeletonPrivate);
#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_dbus_screen_cast_skeleton_get_available_source_types (XdpDbusScreenCast *object)
{
  XdpDbusScreenCastSkeleton *skeleton = XDP_DBUS_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_dbus_screen_cast_skeleton_get_available_cursor_modes (XdpDbusScreenCast *object)
{
  XdpDbusScreenCastSkeleton *skeleton = XDP_DBUS_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_dbus_screen_cast_skeleton_get_version (XdpDbusScreenCast *object)
{
  XdpDbusScreenCastSkeleton *skeleton = XDP_DBUS_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_dbus_screen_cast_skeleton_class_init (XdpDbusScreenCastSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize = xdp_dbus_screen_cast_skeleton_finalize;
  gobject_class->get_property = xdp_dbus_screen_cast_skeleton_get_property;
  gobject_class->set_property = xdp_dbus_screen_cast_skeleton_set_property;
  gobject_class->notify       = xdp_dbus_screen_cast_skeleton_notify;


  xdp_dbus_screen_cast_override_properties (gobject_class, 1);

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = xdp_dbus_screen_cast_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = xdp_dbus_screen_cast_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = xdp_dbus_screen_cast_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = xdp_dbus_screen_cast_skeleton_dbus_interface_get_vtable;

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

static void
xdp_dbus_screen_cast_skeleton_iface_init (XdpDbusScreenCastIface *iface)
{
  iface->get_available_source_types = xdp_dbus_screen_cast_skeleton_get_available_source_types;
  iface->get_available_cursor_modes = xdp_dbus_screen_cast_skeleton_get_available_cursor_modes;
  iface->get_version = xdp_dbus_screen_cast_skeleton_get_version;
}

/**
 * xdp_dbus_screen_cast_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-ScreenCast.top_of_page">org.freedesktop.portal.ScreenCast</link>.
 *
 * Returns: (transfer full) (type XdpDbusScreenCastSkeleton): The skeleton object.
 */
XdpDbusScreenCast *
xdp_dbus_screen_cast_skeleton_new (void)
{
  return XDP_DBUS_SCREEN_CAST (g_object_new (XDP_DBUS_TYPE_SCREEN_CAST_SKELETON, NULL));
}

/* ------------------------------------------------------------------------
 * Code for interface org.freedesktop.portal.Screenshot
 * ------------------------------------------------------------------------
 */

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

/* ---- Introspection data for org.freedesktop.portal.Screenshot ---- */

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

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

static const GDBusArgInfo * const _xdp_dbus_screenshot_method_info_screenshot_IN_ARG_pointers[] =
{
  &_xdp_dbus_screenshot_method_info_screenshot_IN_ARG_parent_window.parent_struct,
  &_xdp_dbus_screenshot_method_info_screenshot_IN_ARG_options.parent_struct,
  NULL
};

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

static const GDBusArgInfo * const _xdp_dbus_screenshot_method_info_screenshot_OUT_ARG_pointers[] =
{
  &_xdp_dbus_screenshot_method_info_screenshot_OUT_ARG_handle.parent_struct,
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_screenshot_method_screenshot_annotation_info_pointers[] =
{
  &_xdp_dbus_screenshot_method_screenshot_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_screenshot_method_info_screenshot =
{
  {
    -1,
    (gchar *) "Screenshot",
    (GDBusArgInfo **) &_xdp_dbus_screenshot_method_info_screenshot_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_screenshot_method_info_screenshot_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_dbus_screenshot_method_screenshot_annotation_info_pointers
  },
  "handle-screenshot",
  FALSE
};

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

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

static const GDBusArgInfo * const _xdp_dbus_screenshot_method_info_pick_color_IN_ARG_pointers[] =
{
  &_xdp_dbus_screenshot_method_info_pick_color_IN_ARG_parent_window.parent_struct,
  &_xdp_dbus_screenshot_method_info_pick_color_IN_ARG_options.parent_struct,
  NULL
};

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

static const GDBusArgInfo * const _xdp_dbus_screenshot_method_info_pick_color_OUT_ARG_pointers[] =
{
  &_xdp_dbus_screenshot_method_info_pick_color_OUT_ARG_handle.parent_struct,
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_screenshot_method_pick_color_annotation_info_pointers[] =
{
  &_xdp_dbus_screenshot_method_pick_color_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_screenshot_method_info_pick_color =
{
  {
    -1,
    (gchar *) "PickColor",
    (GDBusArgInfo **) &_xdp_dbus_screenshot_method_info_pick_color_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_screenshot_method_info_pick_color_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_dbus_screenshot_method_pick_color_annotation_info_pointers
  },
  "handle-pick-color",
  FALSE
};

static const GDBusMethodInfo * const _xdp_dbus_screenshot_method_info_pointers[] =
{
  &_xdp_dbus_screenshot_method_info_screenshot.parent_struct,
  &_xdp_dbus_screenshot_method_info_pick_color.parent_struct,
  NULL
};

static const _ExtendedGDBusPropertyInfo _xdp_dbus_screenshot_property_info_available_targets =
{
  {
    -1,
    (gchar *) "AvailableTargets",
    (gchar *) "u",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "available-targets",
  FALSE,
  TRUE
};

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

static const GDBusPropertyInfo * const _xdp_dbus_screenshot_property_info_pointers[] =
{
  &_xdp_dbus_screenshot_property_info_available_targets.parent_struct,
  &_xdp_dbus_screenshot_property_info_version.parent_struct,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _xdp_dbus_screenshot_interface_info =
{
  {
    -1,
    (gchar *) "org.freedesktop.portal.Screenshot",
    (GDBusMethodInfo **) &_xdp_dbus_screenshot_method_info_pointers,
    NULL,
    (GDBusPropertyInfo **) &_xdp_dbus_screenshot_property_info_pointers,
    NULL
  },
  "screenshot",
};


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

/**
 * xdp_dbus_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 #XdpDbusScreenshot interface for a concrete class.
 * The properties are overridden in the order they are defined.
 *
 * Returns: The last property id.
 */
guint
xdp_dbus_screenshot_override_properties (GObjectClass *klass, guint property_id_begin)
{
  g_object_class_override_property (klass, property_id_begin++, "available-targets");
  g_object_class_override_property (klass, property_id_begin++, "version");
  return property_id_begin - 1;
}


inline static void
xdp_dbus_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_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_dbus_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_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}


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

/**
 * XdpDbusScreenshotIface:
 * @parent_iface: The parent interface.
 * @handle_pick_color: Handler for the #XdpDbusScreenshot::handle-pick-color signal.
 * @handle_screenshot: Handler for the #XdpDbusScreenshot::handle-screenshot signal.
 * @get_available_targets: Getter for the #XdpDbusScreenshot:available-targets property.
 * @get_version: Getter for the #XdpDbusScreenshot:version property.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-Screenshot.top_of_page">org.freedesktop.portal.Screenshot</link>.
 */

typedef XdpDbusScreenshotIface XdpDbusScreenshotInterface;
G_DEFINE_INTERFACE (XdpDbusScreenshot, xdp_dbus_screenshot, G_TYPE_OBJECT)

static void
xdp_dbus_screenshot_default_init (XdpDbusScreenshotIface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * XdpDbusScreenshot::handle-screenshot:
   * @object: A #XdpDbusScreenshot.
   * @invocation: A #GDBusMethodInvocation.
   * @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-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_dbus_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 (XdpDbusScreenshotIface, handle_screenshot),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_screenshot_method_marshal_screenshot,
    G_TYPE_BOOLEAN,
    3,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_VARIANT);

  /**
   * XdpDbusScreenshot::handle-pick-color:
   * @object: A #XdpDbusScreenshot.
   * @invocation: A #GDBusMethodInvocation.
   * @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-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_dbus_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 (XdpDbusScreenshotIface, handle_pick_color),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_screenshot_method_marshal_pick_color,
    G_TYPE_BOOLEAN,
    3,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_VARIANT);

  /* GObject properties for D-Bus properties: */
  /**
   * XdpDbusScreenshot:available-targets:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-portal-Screenshot.AvailableTargets">"AvailableTargets"</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-targets", "AvailableTargets", "AvailableTargets", 0, G_MAXUINT32, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * XdpDbusScreenshot:version:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-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_dbus_screenshot_get_available_targets: (skip)
 * @object: A #XdpDbusScreenshot.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-portal-Screenshot.AvailableTargets">"AvailableTargets"</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_dbus_screenshot_get_available_targets (XdpDbusScreenshot *object)
{
  g_return_val_if_fail (XDP_DBUS_IS_SCREENSHOT (object), 0);

  return XDP_DBUS_SCREENSHOT_GET_IFACE (object)->get_available_targets (object);
}

/**
 * xdp_dbus_screenshot_set_available_targets: (skip)
 * @object: A #XdpDbusScreenshot.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-freedesktop-portal-Screenshot.AvailableTargets">"AvailableTargets"</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_dbus_screenshot_set_available_targets (XdpDbusScreenshot *object, guint value)
{
  g_object_set (G_OBJECT (object), "available-targets", value, NULL);
}

/**
 * xdp_dbus_screenshot_get_version: (skip)
 * @object: A #XdpDbusScreenshot.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-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_dbus_screenshot_get_version (XdpDbusScreenshot *object)
{
  g_return_val_if_fail (XDP_DBUS_IS_SCREENSHOT (object), 0);

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

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

/**
 * xdp_dbus_screenshot_call_screenshot:
 * @proxy: A #XdpDbusScreenshotProxy.
 * @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-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_dbus_screenshot_call_screenshot_finish() to get the result of the operation.
 *
 * See xdp_dbus_screenshot_call_screenshot_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_screenshot_call_screenshot (
    XdpDbusScreenshot *proxy,
    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 ("(s@a{sv})",
                   arg_parent_window,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_screenshot_call_screenshot_finish:
 * @proxy: A #XdpDbusScreenshotProxy.
 * @out_handle: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_screenshot_call_screenshot().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_screenshot_call_screenshot().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_screenshot_call_screenshot_finish (
    XdpDbusScreenshot *proxy,
    gchar ** out_handle,
    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,
                 "(o)",
                 out_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_screenshot_call_screenshot_sync:
 * @proxy: A #XdpDbusScreenshotProxy.
 * @arg_parent_window: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @out_handle: (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-portal-Screenshot.Screenshot">Screenshot()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_screenshot_call_screenshot() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_screenshot_call_screenshot_sync (
    XdpDbusScreenshot *proxy,
    const gchar *arg_parent_window,
    GVariant *arg_options,
    gchar ** out_handle,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "Screenshot",
    g_variant_new ("(s@a{sv})",
                   arg_parent_window,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(o)",
                 out_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_screenshot_call_pick_color:
 * @proxy: A #XdpDbusScreenshotProxy.
 * @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-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_dbus_screenshot_call_pick_color_finish() to get the result of the operation.
 *
 * See xdp_dbus_screenshot_call_pick_color_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_screenshot_call_pick_color (
    XdpDbusScreenshot *proxy,
    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 ("(s@a{sv})",
                   arg_parent_window,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_screenshot_call_pick_color_finish:
 * @proxy: A #XdpDbusScreenshotProxy.
 * @out_handle: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_screenshot_call_pick_color().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_screenshot_call_pick_color().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_screenshot_call_pick_color_finish (
    XdpDbusScreenshot *proxy,
    gchar ** out_handle,
    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,
                 "(o)",
                 out_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_screenshot_call_pick_color_sync:
 * @proxy: A #XdpDbusScreenshotProxy.
 * @arg_parent_window: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @out_handle: (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-portal-Screenshot.PickColor">PickColor()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_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_dbus_screenshot_call_pick_color_sync (
    XdpDbusScreenshot *proxy,
    const gchar *arg_parent_window,
    GVariant *arg_options,
    gchar ** out_handle,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "PickColor",
    g_variant_new ("(s@a{sv})",
                   arg_parent_window,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(o)",
                 out_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_screenshot_complete_screenshot:
 * @object: A #XdpDbusScreenshot.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @handle: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-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_dbus_screenshot_complete_screenshot (
    XdpDbusScreenshot *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    const gchar *handle)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(o)",
                   handle));
}

/**
 * xdp_dbus_screenshot_complete_pick_color:
 * @object: A #XdpDbusScreenshot.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @handle: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-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_dbus_screenshot_complete_pick_color (
    XdpDbusScreenshot *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    const gchar *handle)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(o)",
                   handle));
}

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

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

/**
 * XdpDbusScreenshotProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpDbusScreenshotProxy.
 */

struct _XdpDbusScreenshotProxyPrivate
{
  GData *qdata;
};

static void xdp_dbus_screenshot_proxy_iface_init (XdpDbusScreenshotIface *iface);

#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpDbusScreenshotProxy, xdp_dbus_screenshot_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (XdpDbusScreenshotProxy)
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_SCREENSHOT, xdp_dbus_screenshot_proxy_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpDbusScreenshotProxy, xdp_dbus_screenshot_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_SCREENSHOT, xdp_dbus_screenshot_proxy_iface_init))

#endif
static void
xdp_dbus_screenshot_proxy_finalize (GObject *object)
{
  XdpDbusScreenshotProxy *proxy = XDP_DBUS_SCREENSHOT_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (xdp_dbus_screenshot_proxy_parent_class)->finalize (object);
}

static void
xdp_dbus_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 < 2);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_dbus_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_dbus_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.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_dbus_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 < 2);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_dbus_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.portal.Screenshot", info->parent_struct.name, variant),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    NULL, (GAsyncReadyCallback) xdp_dbus_screenshot_proxy_set_property_cb, (GDBusPropertyInfo *) &info->parent_struct);
  g_variant_unref (variant);
}

static void
xdp_dbus_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_dbus_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_DBUS_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_DBUS_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_dbus_screenshot_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  XdpDbusScreenshotProxy *proxy = XDP_DBUS_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_dbus_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_dbus_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_dbus_screenshot_proxy_get_available_targets (XdpDbusScreenshot *object)
{
  XdpDbusScreenshotProxy *proxy = XDP_DBUS_SCREENSHOT_PROXY (object);
  GVariant *variant;
  guint value = 0;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "AvailableTargets");
  if (variant != NULL)
    {
      value = g_variant_get_uint32 (variant);
      g_variant_unref (variant);
    }
  return value;
}

static guint 
xdp_dbus_screenshot_proxy_get_version (XdpDbusScreenshot *object)
{
  XdpDbusScreenshotProxy *proxy = XDP_DBUS_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_dbus_screenshot_proxy_init (XdpDbusScreenshotProxy *proxy)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  proxy->priv = xdp_dbus_screenshot_proxy_get_instance_private (proxy);
#else
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, XDP_DBUS_TYPE_SCREENSHOT_PROXY, XdpDbusScreenshotProxyPrivate);
#endif

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

static void
xdp_dbus_screenshot_proxy_class_init (XdpDbusScreenshotProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = xdp_dbus_screenshot_proxy_finalize;
  gobject_class->get_property = xdp_dbus_screenshot_proxy_get_property;
  gobject_class->set_property = xdp_dbus_screenshot_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = xdp_dbus_screenshot_proxy_g_signal;
  proxy_class->g_properties_changed = xdp_dbus_screenshot_proxy_g_properties_changed;

  xdp_dbus_screenshot_override_properties (gobject_class, 1);

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

static void
xdp_dbus_screenshot_proxy_iface_init (XdpDbusScreenshotIface *iface)
{
  iface->get_available_targets = xdp_dbus_screenshot_proxy_get_available_targets;
  iface->get_version = xdp_dbus_screenshot_proxy_get_version;
}

/**
 * xdp_dbus_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-portal-Screenshot.top_of_page">org.freedesktop.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_dbus_screenshot_proxy_new_finish() to get the result of the operation.
 *
 * See xdp_dbus_screenshot_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_dbus_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_DBUS_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.portal.Screenshot", NULL);
}

/**
 * xdp_dbus_screenshot_proxy_new_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_screenshot_proxy_new().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_dbus_screenshot_proxy_new().
 *
 * Returns: (transfer full) (type XdpDbusScreenshotProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusScreenshot *
xdp_dbus_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_DBUS_SCREENSHOT (ret);
  else
    return NULL;
}

/**
 * xdp_dbus_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-portal-Screenshot.top_of_page">org.freedesktop.portal.Screenshot</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_screenshot_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpDbusScreenshotProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusScreenshot *
xdp_dbus_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_DBUS_TYPE_SCREENSHOT_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.portal.Screenshot", NULL);
  if (ret != NULL)
    return XDP_DBUS_SCREENSHOT (ret);
  else
    return NULL;
}


/**
 * xdp_dbus_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_dbus_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_dbus_screenshot_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See xdp_dbus_screenshot_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_dbus_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_DBUS_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.portal.Screenshot", NULL);
}

/**
 * xdp_dbus_screenshot_proxy_new_for_bus_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_screenshot_proxy_new_for_bus().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_dbus_screenshot_proxy_new_for_bus().
 *
 * Returns: (transfer full) (type XdpDbusScreenshotProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusScreenshot *
xdp_dbus_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_DBUS_SCREENSHOT (ret);
  else
    return NULL;
}

/**
 * xdp_dbus_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_dbus_screenshot_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_screenshot_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpDbusScreenshotProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusScreenshot *
xdp_dbus_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_DBUS_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.portal.Screenshot", NULL);
  if (ret != NULL)
    return XDP_DBUS_SCREENSHOT (ret);
  else
    return NULL;
}


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

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

/**
 * XdpDbusScreenshotSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpDbusScreenshotSkeleton.
 */

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

static void
_xdp_dbus_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)
{
  XdpDbusScreenshotSkeleton *skeleton = XDP_DBUS_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_DBUS_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_DBUS_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_dbus_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)
{
  XdpDbusScreenshotSkeleton *skeleton = XDP_DBUS_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_dbus_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_dbus_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)
{
  XdpDbusScreenshotSkeleton *skeleton = XDP_DBUS_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_dbus_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_dbus_screenshot_skeleton_vtable =
{
  _xdp_dbus_screenshot_skeleton_handle_method_call,
  _xdp_dbus_screenshot_skeleton_handle_get_property,
  _xdp_dbus_screenshot_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
xdp_dbus_screenshot_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return xdp_dbus_screenshot_interface_info ();
}

static GDBusInterfaceVTable *
xdp_dbus_screenshot_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_xdp_dbus_screenshot_skeleton_vtable;
}

static GVariant *
xdp_dbus_screenshot_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  XdpDbusScreenshotSkeleton *skeleton = XDP_DBUS_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_dbus_screenshot_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _xdp_dbus_screenshot_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _xdp_dbus_screenshot_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _xdp_dbus_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.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_dbus_screenshot_emit_changed (gpointer user_data);

static void
xdp_dbus_screenshot_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
{
  XdpDbusScreenshotSkeleton *skeleton = XDP_DBUS_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_dbus_screenshot_emit_changed (skeleton);
}

static void xdp_dbus_screenshot_skeleton_iface_init (XdpDbusScreenshotIface *iface);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpDbusScreenshotSkeleton, xdp_dbus_screenshot_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (XdpDbusScreenshotSkeleton)
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_SCREENSHOT, xdp_dbus_screenshot_skeleton_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpDbusScreenshotSkeleton, xdp_dbus_screenshot_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_SCREENSHOT, xdp_dbus_screenshot_skeleton_iface_init))

#endif
static void
xdp_dbus_screenshot_skeleton_finalize (GObject *object)
{
  XdpDbusScreenshotSkeleton *skeleton = XDP_DBUS_SCREENSHOT_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_dbus_screenshot_skeleton_parent_class)->finalize (object);
}

static void
xdp_dbus_screenshot_skeleton_get_property (GObject      *object,
  guint         prop_id,
  GValue       *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  XdpDbusScreenshotSkeleton *skeleton = XDP_DBUS_SCREENSHOT_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_dbus_screenshot_emit_changed (gpointer user_data)
{
  XdpDbusScreenshotSkeleton *skeleton = XDP_DBUS_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.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_dbus_screenshot_schedule_emit_changed (XdpDbusScreenshotSkeleton *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_dbus_screenshot_skeleton_notify (GObject      *object,
  GParamSpec *pspec G_GNUC_UNUSED)
{
  XdpDbusScreenshotSkeleton *skeleton = XDP_DBUS_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_dbus_screenshot_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
      g_source_set_name (skeleton->priv->changed_properties_idle_source, "[generated] _xdp_dbus_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_dbus_screenshot_skeleton_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec)
{
  const _ExtendedGDBusPropertyInfo *info;
  XdpDbusScreenshotSkeleton *skeleton = XDP_DBUS_SCREENSHOT_SKELETON (object);
  g_assert (prop_id != 0 && prop_id - 1 < 2);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_dbus_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_dbus_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_dbus_screenshot_skeleton_init (XdpDbusScreenshotSkeleton *skeleton)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  skeleton->priv = xdp_dbus_screenshot_skeleton_get_instance_private (skeleton);
#else
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, XDP_DBUS_TYPE_SCREENSHOT_SKELETON, XdpDbusScreenshotSkeletonPrivate);
#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_dbus_screenshot_skeleton_get_available_targets (XdpDbusScreenshot *object)
{
  XdpDbusScreenshotSkeleton *skeleton = XDP_DBUS_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 guint 
xdp_dbus_screenshot_skeleton_get_version (XdpDbusScreenshot *object)
{
  XdpDbusScreenshotSkeleton *skeleton = XDP_DBUS_SCREENSHOT_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_dbus_screenshot_skeleton_class_init (XdpDbusScreenshotSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize = xdp_dbus_screenshot_skeleton_finalize;
  gobject_class->get_property = xdp_dbus_screenshot_skeleton_get_property;
  gobject_class->set_property = xdp_dbus_screenshot_skeleton_set_property;
  gobject_class->notify       = xdp_dbus_screenshot_skeleton_notify;


  xdp_dbus_screenshot_override_properties (gobject_class, 1);

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = xdp_dbus_screenshot_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = xdp_dbus_screenshot_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = xdp_dbus_screenshot_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = xdp_dbus_screenshot_skeleton_dbus_interface_get_vtable;

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

static void
xdp_dbus_screenshot_skeleton_iface_init (XdpDbusScreenshotIface *iface)
{
  iface->get_available_targets = xdp_dbus_screenshot_skeleton_get_available_targets;
  iface->get_version = xdp_dbus_screenshot_skeleton_get_version;
}

/**
 * xdp_dbus_screenshot_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-Screenshot.top_of_page">org.freedesktop.portal.Screenshot</link>.
 *
 * Returns: (transfer full) (type XdpDbusScreenshotSkeleton): The skeleton object.
 */
XdpDbusScreenshot *
xdp_dbus_screenshot_skeleton_new (void)
{
  return XDP_DBUS_SCREENSHOT (g_object_new (XDP_DBUS_TYPE_SCREENSHOT_SKELETON, NULL));
}

/* ------------------------------------------------------------------------
 * Code for interface org.freedesktop.portal.Secret
 * ------------------------------------------------------------------------
 */

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

/* ---- Introspection data for org.freedesktop.portal.Secret ---- */

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

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

static const GDBusArgInfo * const _xdp_dbus_secret_method_info_retrieve_secret_IN_ARG_pointers[] =
{
  &_xdp_dbus_secret_method_info_retrieve_secret_IN_ARG_fd.parent_struct,
  &_xdp_dbus_secret_method_info_retrieve_secret_IN_ARG_options.parent_struct,
  NULL
};

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

static const GDBusArgInfo * const _xdp_dbus_secret_method_info_retrieve_secret_OUT_ARG_pointers[] =
{
  &_xdp_dbus_secret_method_info_retrieve_secret_OUT_ARG_handle.parent_struct,
  NULL
};

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

static const GDBusAnnotationInfo * const _xdp_dbus_secret_method_retrieve_secret_annotation_info_pointers[] =
{
  &_xdp_dbus_secret_method_retrieve_secret_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_secret_method_info_retrieve_secret =
{
  {
    -1,
    (gchar *) "RetrieveSecret",
    (GDBusArgInfo **) &_xdp_dbus_secret_method_info_retrieve_secret_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_secret_method_info_retrieve_secret_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_dbus_secret_method_retrieve_secret_annotation_info_pointers
  },
  "handle-retrieve-secret",
  TRUE
};

static const GDBusMethodInfo * const _xdp_dbus_secret_method_info_pointers[] =
{
  &_xdp_dbus_secret_method_info_retrieve_secret.parent_struct,
  NULL
};

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

static const GDBusPropertyInfo * const _xdp_dbus_secret_property_info_pointers[] =
{
  &_xdp_dbus_secret_property_info_version.parent_struct,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _xdp_dbus_secret_interface_info =
{
  {
    -1,
    (gchar *) "org.freedesktop.portal.Secret",
    (GDBusMethodInfo **) &_xdp_dbus_secret_method_info_pointers,
    NULL,
    (GDBusPropertyInfo **) &_xdp_dbus_secret_property_info_pointers,
    NULL
  },
  "secret",
};


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

/**
 * xdp_dbus_secret_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 #XdpDbusSecret interface for a concrete class.
 * The properties are overridden in the order they are defined.
 *
 * Returns: The last property id.
 */
guint
xdp_dbus_secret_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_dbus_secret_method_marshal_retrieve_secret (
    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_VARIANT_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}


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

/**
 * XdpDbusSecretIface:
 * @parent_iface: The parent interface.
 * @handle_retrieve_secret: Handler for the #XdpDbusSecret::handle-retrieve-secret signal.
 * @get_version: Getter for the #XdpDbusSecret:version property.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-Secret.top_of_page">org.freedesktop.portal.Secret</link>.
 */

typedef XdpDbusSecretIface XdpDbusSecretInterface;
G_DEFINE_INTERFACE (XdpDbusSecret, xdp_dbus_secret, G_TYPE_OBJECT)

static void
xdp_dbus_secret_default_init (XdpDbusSecretIface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * XdpDbusSecret::handle-retrieve-secret:
   * @object: A #XdpDbusSecret.
   * @invocation: A #GDBusMethodInvocation.
   * @fd_list: (nullable): A #GUnixFDList or %NULL.
   * @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-portal-Secret.RetrieveSecret">RetrieveSecret()</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_dbus_secret_complete_retrieve_secret() 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-retrieve-secret",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpDbusSecretIface, handle_retrieve_secret),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_secret_method_marshal_retrieve_secret,
    G_TYPE_BOOLEAN,
    4,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UNIX_FD_LIST, G_TYPE_VARIANT, G_TYPE_VARIANT);

  /* GObject properties for D-Bus properties: */
  /**
   * XdpDbusSecret:version:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-portal-Secret.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_dbus_secret_get_version: (skip)
 * @object: A #XdpDbusSecret.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-portal-Secret.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_dbus_secret_get_version (XdpDbusSecret *object)
{
  g_return_val_if_fail (XDP_DBUS_IS_SECRET (object), 0);

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

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

/**
 * xdp_dbus_secret_call_retrieve_secret:
 * @proxy: A #XdpDbusSecretProxy.
 * @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-portal-Secret.RetrieveSecret">RetrieveSecret()</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_dbus_secret_call_retrieve_secret_finish() to get the result of the operation.
 *
 * See xdp_dbus_secret_call_retrieve_secret_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_secret_call_retrieve_secret (
    XdpDbusSecret *proxy,
    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),
    "RetrieveSecret",
    g_variant_new ("(@h@a{sv})",
                   arg_fd,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    fd_list,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_secret_call_retrieve_secret_finish:
 * @proxy: A #XdpDbusSecretProxy.
 * @out_handle: (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_dbus_secret_call_retrieve_secret().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_secret_call_retrieve_secret().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_secret_call_retrieve_secret_finish (
    XdpDbusSecret *proxy,
    gchar ** out_handle,
    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,
                 "(o)",
                 out_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_secret_call_retrieve_secret_sync:
 * @proxy: A #XdpDbusSecretProxy.
 * @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_handle: (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-portal-Secret.RetrieveSecret">RetrieveSecret()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_secret_call_retrieve_secret() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_secret_call_retrieve_secret_sync (
    XdpDbusSecret *proxy,
    GVariant *arg_fd,
    GVariant *arg_options,
    GUnixFDList  *fd_list,
    gchar ** out_handle,
    GUnixFDList **out_fd_list,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_with_unix_fd_list_sync (G_DBUS_PROXY (proxy),
    "RetrieveSecret",
    g_variant_new ("(@h@a{sv})",
                   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,
                 "(o)",
                 out_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_secret_complete_retrieve_secret:
 * @object: A #XdpDbusSecret.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @fd_list: (nullable): A #GUnixFDList or %NULL.
 * @handle: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-portal-Secret.RetrieveSecret">RetrieveSecret()</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_dbus_secret_complete_retrieve_secret (
    XdpDbusSecret *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    GUnixFDList *fd_list,
    const gchar *handle)
{
  g_dbus_method_invocation_return_value_with_unix_fd_list (invocation,
    g_variant_new ("(o)",
                   handle),
    fd_list);
}

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

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

/**
 * XdpDbusSecretProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpDbusSecretProxy.
 */

struct _XdpDbusSecretProxyPrivate
{
  GData *qdata;
};

static void xdp_dbus_secret_proxy_iface_init (XdpDbusSecretIface *iface);

#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpDbusSecretProxy, xdp_dbus_secret_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (XdpDbusSecretProxy)
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_SECRET, xdp_dbus_secret_proxy_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpDbusSecretProxy, xdp_dbus_secret_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_SECRET, xdp_dbus_secret_proxy_iface_init))

#endif
static void
xdp_dbus_secret_proxy_finalize (GObject *object)
{
  XdpDbusSecretProxy *proxy = XDP_DBUS_SECRET_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (xdp_dbus_secret_proxy_parent_class)->finalize (object);
}

static void
xdp_dbus_secret_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_dbus_secret_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_dbus_secret_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.portal.Secret: %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_dbus_secret_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_dbus_secret_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.portal.Secret", info->parent_struct.name, variant),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    NULL, (GAsyncReadyCallback) xdp_dbus_secret_proxy_set_property_cb, (GDBusPropertyInfo *) &info->parent_struct);
  g_variant_unref (variant);
}

static void
xdp_dbus_secret_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_dbus_secret_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_DBUS_TYPE_SECRET);
  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_DBUS_TYPE_SECRET);
  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_dbus_secret_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  XdpDbusSecretProxy *proxy = XDP_DBUS_SECRET_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_dbus_secret_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_dbus_secret_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_dbus_secret_proxy_get_version (XdpDbusSecret *object)
{
  XdpDbusSecretProxy *proxy = XDP_DBUS_SECRET_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_dbus_secret_proxy_init (XdpDbusSecretProxy *proxy)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  proxy->priv = xdp_dbus_secret_proxy_get_instance_private (proxy);
#else
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, XDP_DBUS_TYPE_SECRET_PROXY, XdpDbusSecretProxyPrivate);
#endif

  g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), xdp_dbus_secret_interface_info ());
}

static void
xdp_dbus_secret_proxy_class_init (XdpDbusSecretProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = xdp_dbus_secret_proxy_finalize;
  gobject_class->get_property = xdp_dbus_secret_proxy_get_property;
  gobject_class->set_property = xdp_dbus_secret_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = xdp_dbus_secret_proxy_g_signal;
  proxy_class->g_properties_changed = xdp_dbus_secret_proxy_g_properties_changed;

  xdp_dbus_secret_override_properties (gobject_class, 1);

#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
  g_type_class_add_private (klass, sizeof (XdpDbusSecretProxyPrivate));
#endif
}

static void
xdp_dbus_secret_proxy_iface_init (XdpDbusSecretIface *iface)
{
  iface->get_version = xdp_dbus_secret_proxy_get_version;
}

/**
 * xdp_dbus_secret_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-portal-Secret.top_of_page">org.freedesktop.portal.Secret</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_dbus_secret_proxy_new_finish() to get the result of the operation.
 *
 * See xdp_dbus_secret_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_dbus_secret_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_DBUS_TYPE_SECRET_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.portal.Secret", NULL);
}

/**
 * xdp_dbus_secret_proxy_new_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_secret_proxy_new().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_dbus_secret_proxy_new().
 *
 * Returns: (transfer full) (type XdpDbusSecretProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusSecret *
xdp_dbus_secret_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_DBUS_SECRET (ret);
  else
    return NULL;
}

/**
 * xdp_dbus_secret_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-portal-Secret.top_of_page">org.freedesktop.portal.Secret</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_secret_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpDbusSecretProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusSecret *
xdp_dbus_secret_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_DBUS_TYPE_SECRET_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.portal.Secret", NULL);
  if (ret != NULL)
    return XDP_DBUS_SECRET (ret);
  else
    return NULL;
}


/**
 * xdp_dbus_secret_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_dbus_secret_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_dbus_secret_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See xdp_dbus_secret_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_dbus_secret_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_DBUS_TYPE_SECRET_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.portal.Secret", NULL);
}

/**
 * xdp_dbus_secret_proxy_new_for_bus_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_secret_proxy_new_for_bus().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_dbus_secret_proxy_new_for_bus().
 *
 * Returns: (transfer full) (type XdpDbusSecretProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusSecret *
xdp_dbus_secret_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_DBUS_SECRET (ret);
  else
    return NULL;
}

/**
 * xdp_dbus_secret_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_dbus_secret_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_secret_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpDbusSecretProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusSecret *
xdp_dbus_secret_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_DBUS_TYPE_SECRET_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.portal.Secret", NULL);
  if (ret != NULL)
    return XDP_DBUS_SECRET (ret);
  else
    return NULL;
}


/* ------------------------------------------------------------------------ */

/**
 * XdpDbusSecretSkeleton:
 *
 * The #XdpDbusSecretSkeleton structure contains only private data and should only be accessed using the provided API.
 */

/**
 * XdpDbusSecretSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpDbusSecretSkeleton.
 */

struct _XdpDbusSecretSkeletonPrivate
{
  GValue *properties;
  GList *changed_properties;
  GSource *changed_properties_idle_source;
  GMainContext *context;
  GMutex lock;
};

static void
_xdp_dbus_secret_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)
{
  XdpDbusSecretSkeleton *skeleton = XDP_DBUS_SECRET_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_DBUS_TYPE_SECRET);
  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_DBUS_TYPE_SECRET);
  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_dbus_secret_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)
{
  XdpDbusSecretSkeleton *skeleton = XDP_DBUS_SECRET_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_dbus_secret_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_dbus_secret_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)
{
  XdpDbusSecretSkeleton *skeleton = XDP_DBUS_SECRET_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_dbus_secret_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_dbus_secret_skeleton_vtable =
{
  _xdp_dbus_secret_skeleton_handle_method_call,
  _xdp_dbus_secret_skeleton_handle_get_property,
  _xdp_dbus_secret_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
xdp_dbus_secret_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return xdp_dbus_secret_interface_info ();
}

static GDBusInterfaceVTable *
xdp_dbus_secret_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_xdp_dbus_secret_skeleton_vtable;
}

static GVariant *
xdp_dbus_secret_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  XdpDbusSecretSkeleton *skeleton = XDP_DBUS_SECRET_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_dbus_secret_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _xdp_dbus_secret_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _xdp_dbus_secret_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _xdp_dbus_secret_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.portal.Secret", 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_dbus_secret_emit_changed (gpointer user_data);

static void
xdp_dbus_secret_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
{
  XdpDbusSecretSkeleton *skeleton = XDP_DBUS_SECRET_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_dbus_secret_emit_changed (skeleton);
}

static void xdp_dbus_secret_skeleton_iface_init (XdpDbusSecretIface *iface);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpDbusSecretSkeleton, xdp_dbus_secret_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (XdpDbusSecretSkeleton)
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_SECRET, xdp_dbus_secret_skeleton_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpDbusSecretSkeleton, xdp_dbus_secret_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_SECRET, xdp_dbus_secret_skeleton_iface_init))

#endif
static void
xdp_dbus_secret_skeleton_finalize (GObject *object)
{
  XdpDbusSecretSkeleton *skeleton = XDP_DBUS_SECRET_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_dbus_secret_skeleton_parent_class)->finalize (object);
}

static void
xdp_dbus_secret_skeleton_get_property (GObject      *object,
  guint         prop_id,
  GValue       *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  XdpDbusSecretSkeleton *skeleton = XDP_DBUS_SECRET_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_dbus_secret_emit_changed (gpointer user_data)
{
  XdpDbusSecretSkeleton *skeleton = XDP_DBUS_SECRET_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.portal.Secret",
                                           &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_dbus_secret_schedule_emit_changed (XdpDbusSecretSkeleton *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_dbus_secret_skeleton_notify (GObject      *object,
  GParamSpec *pspec G_GNUC_UNUSED)
{
  XdpDbusSecretSkeleton *skeleton = XDP_DBUS_SECRET_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_dbus_secret_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
      g_source_set_name (skeleton->priv->changed_properties_idle_source, "[generated] _xdp_dbus_secret_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_dbus_secret_skeleton_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec)
{
  const _ExtendedGDBusPropertyInfo *info;
  XdpDbusSecretSkeleton *skeleton = XDP_DBUS_SECRET_SKELETON (object);
  g_assert (prop_id != 0 && prop_id - 1 < 1);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_dbus_secret_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_dbus_secret_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_dbus_secret_skeleton_init (XdpDbusSecretSkeleton *skeleton)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  skeleton->priv = xdp_dbus_secret_skeleton_get_instance_private (skeleton);
#else
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, XDP_DBUS_TYPE_SECRET_SKELETON, XdpDbusSecretSkeletonPrivate);
#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_dbus_secret_skeleton_get_version (XdpDbusSecret *object)
{
  XdpDbusSecretSkeleton *skeleton = XDP_DBUS_SECRET_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_dbus_secret_skeleton_class_init (XdpDbusSecretSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize = xdp_dbus_secret_skeleton_finalize;
  gobject_class->get_property = xdp_dbus_secret_skeleton_get_property;
  gobject_class->set_property = xdp_dbus_secret_skeleton_set_property;
  gobject_class->notify       = xdp_dbus_secret_skeleton_notify;


  xdp_dbus_secret_override_properties (gobject_class, 1);

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = xdp_dbus_secret_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = xdp_dbus_secret_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = xdp_dbus_secret_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = xdp_dbus_secret_skeleton_dbus_interface_get_vtable;

#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
  g_type_class_add_private (klass, sizeof (XdpDbusSecretSkeletonPrivate));
#endif
}

static void
xdp_dbus_secret_skeleton_iface_init (XdpDbusSecretIface *iface)
{
  iface->get_version = xdp_dbus_secret_skeleton_get_version;
}

/**
 * xdp_dbus_secret_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-Secret.top_of_page">org.freedesktop.portal.Secret</link>.
 *
 * Returns: (transfer full) (type XdpDbusSecretSkeleton): The skeleton object.
 */
XdpDbusSecret *
xdp_dbus_secret_skeleton_new (void)
{
  return XDP_DBUS_SECRET (g_object_new (XDP_DBUS_TYPE_SECRET_SKELETON, NULL));
}

/* ------------------------------------------------------------------------
 * Code for interface org.freedesktop.portal.Session
 * ------------------------------------------------------------------------
 */

/**
 * SECTION:XdpDbusSession
 * @title: XdpDbusSession
 * @short_description: Generated C code for the org.freedesktop.portal.Session D-Bus interface
 *
 * This section contains code for working with the <link linkend="gdbus-interface-org-freedesktop-portal-Session.top_of_page">org.freedesktop.portal.Session</link> D-Bus interface in C.
 */

enum
{
  XDP_DBUS__SESSION_CLOSED,
};

static unsigned XDP_DBUS__SESSION_SIGNALS[1] = { 0 };

/* ---- Introspection data for org.freedesktop.portal.Session ---- */

static const _ExtendedGDBusMethodInfo _xdp_dbus_session_method_info_close =
{
  {
    -1,
    (gchar *) "Close",
    NULL,
    NULL,
    NULL
  },
  "handle-close",
  FALSE
};

static const GDBusMethodInfo * const _xdp_dbus_session_method_info_pointers[] =
{
  &_xdp_dbus_session_method_info_close.parent_struct,
  NULL
};

static const _ExtendedGDBusArgInfo _xdp_dbus_session_signal_info_closed_ARG_details =
{
  {
    -1,
    (gchar *) "details",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_dbus_session_signal_info_closed_ARG_pointers[] =
{
  &_xdp_dbus_session_signal_info_closed_ARG_details.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_dbus_session_signal_closed_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.Out0",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo * const _xdp_dbus_session_signal_closed_annotation_info_pointers[] =
{
  &_xdp_dbus_session_signal_closed_annotation_info_0,
  NULL
};

static const _ExtendedGDBusSignalInfo _xdp_dbus_session_signal_info_closed =
{
  {
    -1,
    (gchar *) "Closed",
    (GDBusArgInfo **) &_xdp_dbus_session_signal_info_closed_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_dbus_session_signal_closed_annotation_info_pointers
  },
  "closed"
};

static const GDBusSignalInfo * const _xdp_dbus_session_signal_info_pointers[] =
{
  &_xdp_dbus_session_signal_info_closed.parent_struct,
  NULL
};

static const _ExtendedGDBusPropertyInfo _xdp_dbus_session_property_info_version =
{
  {
    -1,
    (gchar *) "version",
    (gchar *) "u",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "version",
  FALSE,
  TRUE
};

static const GDBusPropertyInfo * const _xdp_dbus_session_property_info_pointers[] =
{
  &_xdp_dbus_session_property_info_version.parent_struct,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _xdp_dbus_session_interface_info =
{
  {
    -1,
    (gchar *) "org.freedesktop.portal.Session",
    (GDBusMethodInfo **) &_xdp_dbus_session_method_info_pointers,
    (GDBusSignalInfo **) &_xdp_dbus_session_signal_info_pointers,
    (GDBusPropertyInfo **) &_xdp_dbus_session_property_info_pointers,
    NULL
  },
  "session",
};


/**
 * xdp_dbus_session_interface_info:
 *
 * Gets a machine-readable description of the <link linkend="gdbus-interface-org-freedesktop-portal-Session.top_of_page">org.freedesktop.portal.Session</link> D-Bus interface.
 *
 * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
 */
GDBusInterfaceInfo *
xdp_dbus_session_interface_info (void)
{
  return (GDBusInterfaceInfo *) &_xdp_dbus_session_interface_info.parent_struct;
}

/**
 * xdp_dbus_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 #XdpDbusSession interface for a concrete class.
 * The properties are overridden in the order they are defined.
 *
 * Returns: The last property id.
 */
guint
xdp_dbus_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_dbus_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__VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_dbus_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);
}


/**
 * XdpDbusSession:
 *
 * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-Session.top_of_page">org.freedesktop.portal.Session</link>.
 */

/**
 * XdpDbusSessionIface:
 * @parent_iface: The parent interface.
 * @handle_close: Handler for the #XdpDbusSession::handle-close signal.
 * @get_version: Getter for the #XdpDbusSession:version property.
 * @closed: Handler for the #XdpDbusSession::closed signal.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-Session.top_of_page">org.freedesktop.portal.Session</link>.
 */

typedef XdpDbusSessionIface XdpDbusSessionInterface;
G_DEFINE_INTERFACE (XdpDbusSession, xdp_dbus_session, G_TYPE_OBJECT)

static void
xdp_dbus_session_default_init (XdpDbusSessionIface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * XdpDbusSession::handle-close:
   * @object: A #XdpDbusSession.
   * @invocation: A #GDBusMethodInvocation.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-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_dbus_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 (XdpDbusSessionIface, handle_close),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_session_method_marshal_close,
    G_TYPE_BOOLEAN,
    1,
    G_TYPE_DBUS_METHOD_INVOCATION);

  /* GObject signals for received D-Bus signals: */
  /**
   * XdpDbusSession::closed:
   * @object: A #XdpDbusSession.
   * @arg_details: Argument.
   *
   * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-freedesktop-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_DBUS__SESSION_SIGNALS[XDP_DBUS__SESSION_CLOSED] =
    g_signal_new ("closed",
      G_TYPE_FROM_INTERFACE (iface),
      G_SIGNAL_RUN_LAST,
      G_STRUCT_OFFSET (XdpDbusSessionIface, closed),
      NULL,
      NULL,
      xdp_dbus_session_signal_marshal_closed,
      G_TYPE_NONE,
      1, G_TYPE_VARIANT);

  /* GObject properties for D-Bus properties: */
  /**
   * XdpDbusSession:version:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-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_dbus_session_get_version: (skip)
 * @object: A #XdpDbusSession.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-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_dbus_session_get_version (XdpDbusSession *object)
{
  g_return_val_if_fail (XDP_DBUS_IS_SESSION (object), 0);

  return XDP_DBUS_SESSION_GET_IFACE (object)->get_version (object);
}

/**
 * xdp_dbus_session_set_version: (skip)
 * @object: A #XdpDbusSession.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-freedesktop-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_dbus_session_set_version (XdpDbusSession *object, guint value)
{
  g_object_set (G_OBJECT (object), "version", value, NULL);
}

/**
 * xdp_dbus_session_emit_closed:
 * @object: A #XdpDbusSession.
 * @arg_details: Argument to pass with the signal.
 *
 * Emits the <link linkend="gdbus-signal-org-freedesktop-portal-Session.Closed">"Closed"</link> D-Bus signal.
 */
void
xdp_dbus_session_emit_closed (
    XdpDbusSession *object,
    GVariant *arg_details)
{
  g_signal_emit (object, XDP_DBUS__SESSION_SIGNALS[XDP_DBUS__SESSION_CLOSED], 0, arg_details);
}

/**
 * xdp_dbus_session_call_close:
 * @proxy: A #XdpDbusSessionProxy.
 * @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-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_dbus_session_call_close_finish() to get the result of the operation.
 *
 * See xdp_dbus_session_call_close_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_session_call_close (
    XdpDbusSession *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_dbus_session_call_close_finish:
 * @proxy: A #XdpDbusSessionProxy.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_session_call_close().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_session_call_close().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_session_call_close_finish (
    XdpDbusSession *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_dbus_session_call_close_sync:
 * @proxy: A #XdpDbusSessionProxy.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-portal-Session.Close">Close()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_session_call_close() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_session_call_close_sync (
    XdpDbusSession *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_dbus_session_complete_close:
 * @object: A #XdpDbusSession.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-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_dbus_session_complete_close (
    XdpDbusSession *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("()"));
}

/* ------------------------------------------------------------------------ */

/**
 * XdpDbusSessionProxy:
 *
 * The #XdpDbusSessionProxy structure contains only private data and should only be accessed using the provided API.
 */

/**
 * XdpDbusSessionProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpDbusSessionProxy.
 */

struct _XdpDbusSessionProxyPrivate
{
  GData *qdata;
};

static void xdp_dbus_session_proxy_iface_init (XdpDbusSessionIface *iface);

#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpDbusSessionProxy, xdp_dbus_session_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (XdpDbusSessionProxy)
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_SESSION, xdp_dbus_session_proxy_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpDbusSessionProxy, xdp_dbus_session_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_SESSION, xdp_dbus_session_proxy_iface_init))

#endif
static void
xdp_dbus_session_proxy_finalize (GObject *object)
{
  XdpDbusSessionProxy *proxy = XDP_DBUS_SESSION_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (xdp_dbus_session_proxy_parent_class)->finalize (object);
}

static void
xdp_dbus_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_dbus_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_dbus_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.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_dbus_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_dbus_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.portal.Session", info->parent_struct.name, variant),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    NULL, (GAsyncReadyCallback) xdp_dbus_session_proxy_set_property_cb, (GDBusPropertyInfo *) &info->parent_struct);
  g_variant_unref (variant);
}

static void
xdp_dbus_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_dbus_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_DBUS_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_DBUS_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_dbus_session_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  XdpDbusSessionProxy *proxy = XDP_DBUS_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_dbus_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_dbus_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_dbus_session_proxy_get_version (XdpDbusSession *object)
{
  XdpDbusSessionProxy *proxy = XDP_DBUS_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_dbus_session_proxy_init (XdpDbusSessionProxy *proxy)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  proxy->priv = xdp_dbus_session_proxy_get_instance_private (proxy);
#else
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, XDP_DBUS_TYPE_SESSION_PROXY, XdpDbusSessionProxyPrivate);
#endif

  g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), xdp_dbus_session_interface_info ());
}

static void
xdp_dbus_session_proxy_class_init (XdpDbusSessionProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = xdp_dbus_session_proxy_finalize;
  gobject_class->get_property = xdp_dbus_session_proxy_get_property;
  gobject_class->set_property = xdp_dbus_session_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = xdp_dbus_session_proxy_g_signal;
  proxy_class->g_properties_changed = xdp_dbus_session_proxy_g_properties_changed;

  xdp_dbus_session_override_properties (gobject_class, 1);

#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
  g_type_class_add_private (klass, sizeof (XdpDbusSessionProxyPrivate));
#endif
}

static void
xdp_dbus_session_proxy_iface_init (XdpDbusSessionIface *iface)
{
  iface->get_version = xdp_dbus_session_proxy_get_version;
}

/**
 * xdp_dbus_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-portal-Session.top_of_page">org.freedesktop.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_dbus_session_proxy_new_finish() to get the result of the operation.
 *
 * See xdp_dbus_session_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_dbus_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_DBUS_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.portal.Session", NULL);
}

/**
 * xdp_dbus_session_proxy_new_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_session_proxy_new().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_dbus_session_proxy_new().
 *
 * Returns: (transfer full) (type XdpDbusSessionProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusSession *
xdp_dbus_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_DBUS_SESSION (ret);
  else
    return NULL;
}

/**
 * xdp_dbus_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-portal-Session.top_of_page">org.freedesktop.portal.Session</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_session_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpDbusSessionProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusSession *
xdp_dbus_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_DBUS_TYPE_SESSION_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.portal.Session", NULL);
  if (ret != NULL)
    return XDP_DBUS_SESSION (ret);
  else
    return NULL;
}


/**
 * xdp_dbus_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_dbus_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_dbus_session_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See xdp_dbus_session_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_dbus_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_DBUS_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.portal.Session", NULL);
}

/**
 * xdp_dbus_session_proxy_new_for_bus_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_session_proxy_new_for_bus().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_dbus_session_proxy_new_for_bus().
 *
 * Returns: (transfer full) (type XdpDbusSessionProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusSession *
xdp_dbus_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_DBUS_SESSION (ret);
  else
    return NULL;
}

/**
 * xdp_dbus_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_dbus_session_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_session_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpDbusSessionProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusSession *
xdp_dbus_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_DBUS_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.portal.Session", NULL);
  if (ret != NULL)
    return XDP_DBUS_SESSION (ret);
  else
    return NULL;
}


/* ------------------------------------------------------------------------ */

/**
 * XdpDbusSessionSkeleton:
 *
 * The #XdpDbusSessionSkeleton structure contains only private data and should only be accessed using the provided API.
 */

/**
 * XdpDbusSessionSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpDbusSessionSkeleton.
 */

struct _XdpDbusSessionSkeletonPrivate
{
  GValue *properties;
  GList *changed_properties;
  GSource *changed_properties_idle_source;
  GMainContext *context;
  GMutex lock;
};

static void
_xdp_dbus_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)
{
  XdpDbusSessionSkeleton *skeleton = XDP_DBUS_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_DBUS_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_DBUS_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_dbus_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)
{
  XdpDbusSessionSkeleton *skeleton = XDP_DBUS_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_dbus_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_dbus_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)
{
  XdpDbusSessionSkeleton *skeleton = XDP_DBUS_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_dbus_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_dbus_session_skeleton_vtable =
{
  _xdp_dbus_session_skeleton_handle_method_call,
  _xdp_dbus_session_skeleton_handle_get_property,
  _xdp_dbus_session_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
xdp_dbus_session_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return xdp_dbus_session_interface_info ();
}

static GDBusInterfaceVTable *
xdp_dbus_session_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_xdp_dbus_session_skeleton_vtable;
}

static GVariant *
xdp_dbus_session_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  XdpDbusSessionSkeleton *skeleton = XDP_DBUS_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_dbus_session_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _xdp_dbus_session_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _xdp_dbus_session_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _xdp_dbus_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.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_dbus_session_emit_changed (gpointer user_data);

static void
xdp_dbus_session_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
{
  XdpDbusSessionSkeleton *skeleton = XDP_DBUS_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_dbus_session_emit_changed (skeleton);
}

static void
_xdp_dbus_session_on_signal_closed (
    XdpDbusSession *object,
    GVariant *arg_details)
{
  XdpDbusSessionSkeleton *skeleton = XDP_DBUS_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 ("(@a{sv})",
                   arg_details));
  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.portal.Session", "Closed",
        signal_variant, NULL);
    }
  g_variant_unref (signal_variant);
  g_list_free_full (connections, g_object_unref);
}

static void xdp_dbus_session_skeleton_iface_init (XdpDbusSessionIface *iface);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpDbusSessionSkeleton, xdp_dbus_session_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (XdpDbusSessionSkeleton)
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_SESSION, xdp_dbus_session_skeleton_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpDbusSessionSkeleton, xdp_dbus_session_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_SESSION, xdp_dbus_session_skeleton_iface_init))

#endif
static void
xdp_dbus_session_skeleton_finalize (GObject *object)
{
  XdpDbusSessionSkeleton *skeleton = XDP_DBUS_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_dbus_session_skeleton_parent_class)->finalize (object);
}

static void
xdp_dbus_session_skeleton_get_property (GObject      *object,
  guint         prop_id,
  GValue       *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  XdpDbusSessionSkeleton *skeleton = XDP_DBUS_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_dbus_session_emit_changed (gpointer user_data)
{
  XdpDbusSessionSkeleton *skeleton = XDP_DBUS_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.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_dbus_session_schedule_emit_changed (XdpDbusSessionSkeleton *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_dbus_session_skeleton_notify (GObject      *object,
  GParamSpec *pspec G_GNUC_UNUSED)
{
  XdpDbusSessionSkeleton *skeleton = XDP_DBUS_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_dbus_session_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
      g_source_set_name (skeleton->priv->changed_properties_idle_source, "[generated] _xdp_dbus_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_dbus_session_skeleton_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec)
{
  const _ExtendedGDBusPropertyInfo *info;
  XdpDbusSessionSkeleton *skeleton = XDP_DBUS_SESSION_SKELETON (object);
  g_assert (prop_id != 0 && prop_id - 1 < 1);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_dbus_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_dbus_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_dbus_session_skeleton_init (XdpDbusSessionSkeleton *skeleton)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  skeleton->priv = xdp_dbus_session_skeleton_get_instance_private (skeleton);
#else
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, XDP_DBUS_TYPE_SESSION_SKELETON, XdpDbusSessionSkeletonPrivate);
#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_dbus_session_skeleton_get_version (XdpDbusSession *object)
{
  XdpDbusSessionSkeleton *skeleton = XDP_DBUS_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_dbus_session_skeleton_class_init (XdpDbusSessionSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize = xdp_dbus_session_skeleton_finalize;
  gobject_class->get_property = xdp_dbus_session_skeleton_get_property;
  gobject_class->set_property = xdp_dbus_session_skeleton_set_property;
  gobject_class->notify       = xdp_dbus_session_skeleton_notify;


  xdp_dbus_session_override_properties (gobject_class, 1);

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = xdp_dbus_session_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = xdp_dbus_session_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = xdp_dbus_session_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = xdp_dbus_session_skeleton_dbus_interface_get_vtable;

#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
  g_type_class_add_private (klass, sizeof (XdpDbusSessionSkeletonPrivate));
#endif
}

static void
xdp_dbus_session_skeleton_iface_init (XdpDbusSessionIface *iface)
{
  iface->closed = _xdp_dbus_session_on_signal_closed;
  iface->get_version = xdp_dbus_session_skeleton_get_version;
}

/**
 * xdp_dbus_session_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-Session.top_of_page">org.freedesktop.portal.Session</link>.
 *
 * Returns: (transfer full) (type XdpDbusSessionSkeleton): The skeleton object.
 */
XdpDbusSession *
xdp_dbus_session_skeleton_new (void)
{
  return XDP_DBUS_SESSION (g_object_new (XDP_DBUS_TYPE_SESSION_SKELETON, NULL));
}

/* ------------------------------------------------------------------------
 * Code for interface org.freedesktop.portal.Settings
 * ------------------------------------------------------------------------
 */

/**
 * SECTION:XdpDbusSettings
 * @title: XdpDbusSettings
 * @short_description: Generated C code for the org.freedesktop.portal.Settings D-Bus interface
 *
 * This section contains code for working with the <link linkend="gdbus-interface-org-freedesktop-portal-Settings.top_of_page">org.freedesktop.portal.Settings</link> D-Bus interface in C.
 */

enum
{
  XDP_DBUS__SETTINGS_SETTING_CHANGED,
};

static unsigned XDP_DBUS__SETTINGS_SIGNALS[1] = { 0 };

/* ---- Introspection data for org.freedesktop.portal.Settings ---- */

static const _ExtendedGDBusArgInfo _xdp_dbus_settings_method_info_read_all_IN_ARG_namespaces =
{
  {
    -1,
    (gchar *) "namespaces",
    (gchar *) "as",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_dbus_settings_method_info_read_all_IN_ARG_pointers[] =
{
  &_xdp_dbus_settings_method_info_read_all_IN_ARG_namespaces.parent_struct,
  NULL
};

static const _ExtendedGDBusArgInfo _xdp_dbus_settings_method_info_read_all_OUT_ARG_value =
{
  {
    -1,
    (gchar *) "value",
    (gchar *) "a{sa{sv}}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_dbus_settings_method_info_read_all_OUT_ARG_pointers[] =
{
  &_xdp_dbus_settings_method_info_read_all_OUT_ARG_value.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_dbus_settings_method_read_all_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.Out0",
  (gchar *) "QMap<QString,QVariantMap>",
  NULL
};

static const GDBusAnnotationInfo * const _xdp_dbus_settings_method_read_all_annotation_info_pointers[] =
{
  &_xdp_dbus_settings_method_read_all_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_settings_method_info_read_all =
{
  {
    -1,
    (gchar *) "ReadAll",
    (GDBusArgInfo **) &_xdp_dbus_settings_method_info_read_all_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_settings_method_info_read_all_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_dbus_settings_method_read_all_annotation_info_pointers
  },
  "handle-read-all",
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_dbus_settings_method_info_read_IN_ARG_namespace =
{
  {
    -1,
    (gchar *) "namespace",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_dbus_settings_method_info_read_IN_ARG_key =
{
  {
    -1,
    (gchar *) "key",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_dbus_settings_method_info_read_IN_ARG_pointers[] =
{
  &_xdp_dbus_settings_method_info_read_IN_ARG_namespace.parent_struct,
  &_xdp_dbus_settings_method_info_read_IN_ARG_key.parent_struct,
  NULL
};

static const _ExtendedGDBusArgInfo _xdp_dbus_settings_method_info_read_OUT_ARG_value =
{
  {
    -1,
    (gchar *) "value",
    (gchar *) "v",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_dbus_settings_method_info_read_OUT_ARG_pointers[] =
{
  &_xdp_dbus_settings_method_info_read_OUT_ARG_value.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_dbus_settings_method_read_annotation_info_0 =
{
  -1,
  (gchar *) "org.freedesktop.DBus.Deprecated",
  (gchar *) "true",
  NULL
};

static const GDBusAnnotationInfo * const _xdp_dbus_settings_method_read_annotation_info_pointers[] =
{
  &_xdp_dbus_settings_method_read_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_settings_method_info_read =
{
  {
    -1,
    (gchar *) "Read",
    (GDBusArgInfo **) &_xdp_dbus_settings_method_info_read_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_settings_method_info_read_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_dbus_settings_method_read_annotation_info_pointers
  },
  "handle-read",
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_dbus_settings_method_info_read_one_IN_ARG_namespace =
{
  {
    -1,
    (gchar *) "namespace",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_dbus_settings_method_info_read_one_IN_ARG_key =
{
  {
    -1,
    (gchar *) "key",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_dbus_settings_method_info_read_one_IN_ARG_pointers[] =
{
  &_xdp_dbus_settings_method_info_read_one_IN_ARG_namespace.parent_struct,
  &_xdp_dbus_settings_method_info_read_one_IN_ARG_key.parent_struct,
  NULL
};

static const _ExtendedGDBusArgInfo _xdp_dbus_settings_method_info_read_one_OUT_ARG_value =
{
  {
    -1,
    (gchar *) "value",
    (gchar *) "v",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_dbus_settings_method_info_read_one_OUT_ARG_pointers[] =
{
  &_xdp_dbus_settings_method_info_read_one_OUT_ARG_value.parent_struct,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_settings_method_info_read_one =
{
  {
    -1,
    (gchar *) "ReadOne",
    (GDBusArgInfo **) &_xdp_dbus_settings_method_info_read_one_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_settings_method_info_read_one_OUT_ARG_pointers,
    NULL
  },
  "handle-read-one",
  FALSE
};

static const GDBusMethodInfo * const _xdp_dbus_settings_method_info_pointers[] =
{
  &_xdp_dbus_settings_method_info_read_all.parent_struct,
  &_xdp_dbus_settings_method_info_read.parent_struct,
  &_xdp_dbus_settings_method_info_read_one.parent_struct,
  NULL
};

static const _ExtendedGDBusArgInfo _xdp_dbus_settings_signal_info_setting_changed_ARG_namespace =
{
  {
    -1,
    (gchar *) "namespace",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_dbus_settings_signal_info_setting_changed_ARG_key =
{
  {
    -1,
    (gchar *) "key",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_dbus_settings_signal_info_setting_changed_ARG_value =
{
  {
    -1,
    (gchar *) "value",
    (gchar *) "v",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_dbus_settings_signal_info_setting_changed_ARG_pointers[] =
{
  &_xdp_dbus_settings_signal_info_setting_changed_ARG_namespace.parent_struct,
  &_xdp_dbus_settings_signal_info_setting_changed_ARG_key.parent_struct,
  &_xdp_dbus_settings_signal_info_setting_changed_ARG_value.parent_struct,
  NULL
};

static const _ExtendedGDBusSignalInfo _xdp_dbus_settings_signal_info_setting_changed =
{
  {
    -1,
    (gchar *) "SettingChanged",
    (GDBusArgInfo **) &_xdp_dbus_settings_signal_info_setting_changed_ARG_pointers,
    NULL
  },
  "setting-changed"
};

static const GDBusSignalInfo * const _xdp_dbus_settings_signal_info_pointers[] =
{
  &_xdp_dbus_settings_signal_info_setting_changed.parent_struct,
  NULL
};

static const _ExtendedGDBusPropertyInfo _xdp_dbus_settings_property_info_version =
{
  {
    -1,
    (gchar *) "version",
    (gchar *) "u",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "version",
  FALSE,
  TRUE
};

static const GDBusPropertyInfo * const _xdp_dbus_settings_property_info_pointers[] =
{
  &_xdp_dbus_settings_property_info_version.parent_struct,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _xdp_dbus_settings_interface_info =
{
  {
    -1,
    (gchar *) "org.freedesktop.portal.Settings",
    (GDBusMethodInfo **) &_xdp_dbus_settings_method_info_pointers,
    (GDBusSignalInfo **) &_xdp_dbus_settings_signal_info_pointers,
    (GDBusPropertyInfo **) &_xdp_dbus_settings_property_info_pointers,
    NULL
  },
  "settings",
};


/**
 * xdp_dbus_settings_interface_info:
 *
 * Gets a machine-readable description of the <link linkend="gdbus-interface-org-freedesktop-portal-Settings.top_of_page">org.freedesktop.portal.Settings</link> D-Bus interface.
 *
 * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
 */
GDBusInterfaceInfo *
xdp_dbus_settings_interface_info (void)
{
  return (GDBusInterfaceInfo *) &_xdp_dbus_settings_interface_info.parent_struct;
}

/**
 * xdp_dbus_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 #XdpDbusSettings interface for a concrete class.
 * The properties are overridden in the order they are defined.
 *
 * Returns: The last property id.
 */
guint
xdp_dbus_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_dbus_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_dbus_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_dbus_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);
}

inline static void
xdp_dbus_settings_method_marshal_read_one (
    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);
}


/**
 * XdpDbusSettings:
 *
 * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-Settings.top_of_page">org.freedesktop.portal.Settings</link>.
 */

/**
 * XdpDbusSettingsIface:
 * @parent_iface: The parent interface.
 * @handle_read: Handler for the #XdpDbusSettings::handle-read signal.
 * @handle_read_all: Handler for the #XdpDbusSettings::handle-read-all signal.
 * @handle_read_one: Handler for the #XdpDbusSettings::handle-read-one signal.
 * @get_version: Getter for the #XdpDbusSettings:version property.
 * @setting_changed: Handler for the #XdpDbusSettings::setting-changed signal.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-Settings.top_of_page">org.freedesktop.portal.Settings</link>.
 */

typedef XdpDbusSettingsIface XdpDbusSettingsInterface;
G_DEFINE_INTERFACE (XdpDbusSettings, xdp_dbus_settings, G_TYPE_OBJECT)

static void
xdp_dbus_settings_default_init (XdpDbusSettingsIface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * XdpDbusSettings::handle-read-all:
   * @object: A #XdpDbusSettings.
   * @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-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_dbus_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 (XdpDbusSettingsIface, handle_read_all),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_settings_method_marshal_read_all,
    G_TYPE_BOOLEAN,
    2,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRV);

  /**
   * XdpDbusSettings::handle-read:
   * @object: A #XdpDbusSettings.
   * @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-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_dbus_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.
   *
   * Deprecated: The D-Bus method has been deprecated.
   */
  g_signal_new ("handle-read",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpDbusSettingsIface, handle_read),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_settings_method_marshal_read,
    G_TYPE_BOOLEAN,
    3,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_STRING);

  /**
   * XdpDbusSettings::handle-read-one:
   * @object: A #XdpDbusSettings.
   * @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-portal-Settings.ReadOne">ReadOne()</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_dbus_settings_complete_read_one() 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-one",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpDbusSettingsIface, handle_read_one),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_settings_method_marshal_read_one,
    G_TYPE_BOOLEAN,
    3,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_STRING);

  /* GObject signals for received D-Bus signals: */
  /**
   * XdpDbusSettings::setting-changed:
   * @object: A #XdpDbusSettings.
   * @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-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_DBUS__SETTINGS_SIGNALS[XDP_DBUS__SETTINGS_SETTING_CHANGED] =
    g_signal_new ("setting-changed",
      G_TYPE_FROM_INTERFACE (iface),
      G_SIGNAL_RUN_LAST,
      G_STRUCT_OFFSET (XdpDbusSettingsIface, setting_changed),
      NULL,
      NULL,
      xdp_dbus_settings_signal_marshal_setting_changed,
      G_TYPE_NONE,
      3, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_VARIANT);

  /* GObject properties for D-Bus properties: */
  /**
   * XdpDbusSettings:version:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-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_dbus_settings_get_version: (skip)
 * @object: A #XdpDbusSettings.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-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_dbus_settings_get_version (XdpDbusSettings *object)
{
  g_return_val_if_fail (XDP_DBUS_IS_SETTINGS (object), 0);

  return XDP_DBUS_SETTINGS_GET_IFACE (object)->get_version (object);
}

/**
 * xdp_dbus_settings_set_version: (skip)
 * @object: A #XdpDbusSettings.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-freedesktop-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_dbus_settings_set_version (XdpDbusSettings *object, guint value)
{
  g_object_set (G_OBJECT (object), "version", value, NULL);
}

/**
 * xdp_dbus_settings_emit_setting_changed:
 * @object: A #XdpDbusSettings.
 * @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-portal-Settings.SettingChanged">"SettingChanged"</link> D-Bus signal.
 */
void
xdp_dbus_settings_emit_setting_changed (
    XdpDbusSettings *object,
    const gchar *arg_namespace,
    const gchar *arg_key,
    GVariant *arg_value)
{
  g_signal_emit (object, XDP_DBUS__SETTINGS_SIGNALS[XDP_DBUS__SETTINGS_SETTING_CHANGED], 0, arg_namespace, arg_key, arg_value);
}

/**
 * xdp_dbus_settings_call_read_all:
 * @proxy: A #XdpDbusSettingsProxy.
 * @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-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_dbus_settings_call_read_all_finish() to get the result of the operation.
 *
 * See xdp_dbus_settings_call_read_all_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_settings_call_read_all (
    XdpDbusSettings *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_dbus_settings_call_read_all_finish:
 * @proxy: A #XdpDbusSettingsProxy.
 * @out_value: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_settings_call_read_all().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_settings_call_read_all().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_settings_call_read_all_finish (
    XdpDbusSettings *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_dbus_settings_call_read_all_sync:
 * @proxy: A #XdpDbusSettingsProxy.
 * @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-portal-Settings.ReadAll">ReadAll()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_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_dbus_settings_call_read_all_sync (
    XdpDbusSettings *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_dbus_settings_call_read:
 * @proxy: A #XdpDbusSettingsProxy.
 * @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-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_dbus_settings_call_read_finish() to get the result of the operation.
 *
 * See xdp_dbus_settings_call_read_sync() for the synchronous, blocking version of this method.
 *
 * Deprecated: The D-Bus method has been deprecated.
 */
void
xdp_dbus_settings_call_read (
    XdpDbusSettings *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_dbus_settings_call_read_finish:
 * @proxy: A #XdpDbusSettingsProxy.
 * @out_value: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_settings_call_read().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_settings_call_read().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 *
 * Deprecated: The D-Bus method has been deprecated.
 */
gboolean
xdp_dbus_settings_call_read_finish (
    XdpDbusSettings *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_dbus_settings_call_read_sync:
 * @proxy: A #XdpDbusSettingsProxy.
 * @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-portal-Settings.Read">Read()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_settings_call_read() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 *
 * Deprecated: The D-Bus method has been deprecated.
 */
gboolean
xdp_dbus_settings_call_read_sync (
    XdpDbusSettings *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_dbus_settings_call_read_one:
 * @proxy: A #XdpDbusSettingsProxy.
 * @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-portal-Settings.ReadOne">ReadOne()</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_dbus_settings_call_read_one_finish() to get the result of the operation.
 *
 * See xdp_dbus_settings_call_read_one_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_settings_call_read_one (
    XdpDbusSettings *proxy,
    const gchar *arg_namespace,
    const gchar *arg_key,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "ReadOne",
    g_variant_new ("(ss)",
                   arg_namespace,
                   arg_key),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_settings_call_read_one_finish:
 * @proxy: A #XdpDbusSettingsProxy.
 * @out_value: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_settings_call_read_one().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_settings_call_read_one().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_settings_call_read_one_finish (
    XdpDbusSettings *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_dbus_settings_call_read_one_sync:
 * @proxy: A #XdpDbusSettingsProxy.
 * @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-portal-Settings.ReadOne">ReadOne()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_settings_call_read_one() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_settings_call_read_one_sync (
    XdpDbusSettings *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),
    "ReadOne",
    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_dbus_settings_complete_read_all:
 * @object: A #XdpDbusSettings.
 * @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-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_dbus_settings_complete_read_all (
    XdpDbusSettings *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    GVariant *value)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(@a{sa{sv}})",
                   value));
}

/**
 * xdp_dbus_settings_complete_read:
 * @object: A #XdpDbusSettings.
 * @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-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.
 *
 * Deprecated: The D-Bus method has been deprecated.
 */
void
xdp_dbus_settings_complete_read (
    XdpDbusSettings *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    GVariant *value)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(@v)",
                   value));
}

/**
 * xdp_dbus_settings_complete_read_one:
 * @object: A #XdpDbusSettings.
 * @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-portal-Settings.ReadOne">ReadOne()</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_dbus_settings_complete_read_one (
    XdpDbusSettings *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    GVariant *value)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(@v)",
                   value));
}

/* ------------------------------------------------------------------------ */

/**
 * XdpDbusSettingsProxy:
 *
 * The #XdpDbusSettingsProxy structure contains only private data and should only be accessed using the provided API.
 */

/**
 * XdpDbusSettingsProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpDbusSettingsProxy.
 */

struct _XdpDbusSettingsProxyPrivate
{
  GData *qdata;
};

static void xdp_dbus_settings_proxy_iface_init (XdpDbusSettingsIface *iface);

#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpDbusSettingsProxy, xdp_dbus_settings_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (XdpDbusSettingsProxy)
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_SETTINGS, xdp_dbus_settings_proxy_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpDbusSettingsProxy, xdp_dbus_settings_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_SETTINGS, xdp_dbus_settings_proxy_iface_init))

#endif
static void
xdp_dbus_settings_proxy_finalize (GObject *object)
{
  XdpDbusSettingsProxy *proxy = XDP_DBUS_SETTINGS_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (xdp_dbus_settings_proxy_parent_class)->finalize (object);
}

static void
xdp_dbus_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_dbus_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_dbus_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.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_dbus_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_dbus_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.portal.Settings", info->parent_struct.name, variant),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    NULL, (GAsyncReadyCallback) xdp_dbus_settings_proxy_set_property_cb, (GDBusPropertyInfo *) &info->parent_struct);
  g_variant_unref (variant);
}

static void
xdp_dbus_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_dbus_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_DBUS_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_DBUS_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_dbus_settings_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  XdpDbusSettingsProxy *proxy = XDP_DBUS_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_dbus_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_dbus_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_dbus_settings_proxy_get_version (XdpDbusSettings *object)
{
  XdpDbusSettingsProxy *proxy = XDP_DBUS_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_dbus_settings_proxy_init (XdpDbusSettingsProxy *proxy)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  proxy->priv = xdp_dbus_settings_proxy_get_instance_private (proxy);
#else
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, XDP_DBUS_TYPE_SETTINGS_PROXY, XdpDbusSettingsProxyPrivate);
#endif

  g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), xdp_dbus_settings_interface_info ());
}

static void
xdp_dbus_settings_proxy_class_init (XdpDbusSettingsProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = xdp_dbus_settings_proxy_finalize;
  gobject_class->get_property = xdp_dbus_settings_proxy_get_property;
  gobject_class->set_property = xdp_dbus_settings_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = xdp_dbus_settings_proxy_g_signal;
  proxy_class->g_properties_changed = xdp_dbus_settings_proxy_g_properties_changed;

  xdp_dbus_settings_override_properties (gobject_class, 1);

#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
  g_type_class_add_private (klass, sizeof (XdpDbusSettingsProxyPrivate));
#endif
}

static void
xdp_dbus_settings_proxy_iface_init (XdpDbusSettingsIface *iface)
{
  iface->get_version = xdp_dbus_settings_proxy_get_version;
}

/**
 * xdp_dbus_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-portal-Settings.top_of_page">org.freedesktop.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_dbus_settings_proxy_new_finish() to get the result of the operation.
 *
 * See xdp_dbus_settings_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_dbus_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_DBUS_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.portal.Settings", NULL);
}

/**
 * xdp_dbus_settings_proxy_new_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_settings_proxy_new().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_dbus_settings_proxy_new().
 *
 * Returns: (transfer full) (type XdpDbusSettingsProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusSettings *
xdp_dbus_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_DBUS_SETTINGS (ret);
  else
    return NULL;
}

/**
 * xdp_dbus_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-portal-Settings.top_of_page">org.freedesktop.portal.Settings</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_settings_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpDbusSettingsProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusSettings *
xdp_dbus_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_DBUS_TYPE_SETTINGS_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.portal.Settings", NULL);
  if (ret != NULL)
    return XDP_DBUS_SETTINGS (ret);
  else
    return NULL;
}


/**
 * xdp_dbus_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_dbus_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_dbus_settings_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See xdp_dbus_settings_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_dbus_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_DBUS_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.portal.Settings", NULL);
}

/**
 * xdp_dbus_settings_proxy_new_for_bus_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_settings_proxy_new_for_bus().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_dbus_settings_proxy_new_for_bus().
 *
 * Returns: (transfer full) (type XdpDbusSettingsProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusSettings *
xdp_dbus_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_DBUS_SETTINGS (ret);
  else
    return NULL;
}

/**
 * xdp_dbus_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_dbus_settings_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_settings_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpDbusSettingsProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusSettings *
xdp_dbus_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_DBUS_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.portal.Settings", NULL);
  if (ret != NULL)
    return XDP_DBUS_SETTINGS (ret);
  else
    return NULL;
}


/* ------------------------------------------------------------------------ */

/**
 * XdpDbusSettingsSkeleton:
 *
 * The #XdpDbusSettingsSkeleton structure contains only private data and should only be accessed using the provided API.
 */

/**
 * XdpDbusSettingsSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpDbusSettingsSkeleton.
 */

struct _XdpDbusSettingsSkeletonPrivate
{
  GValue *properties;
  GList *changed_properties;
  GSource *changed_properties_idle_source;
  GMainContext *context;
  GMutex lock;
};

static void
_xdp_dbus_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)
{
  XdpDbusSettingsSkeleton *skeleton = XDP_DBUS_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_DBUS_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_DBUS_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_dbus_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)
{
  XdpDbusSettingsSkeleton *skeleton = XDP_DBUS_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_dbus_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_dbus_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)
{
  XdpDbusSettingsSkeleton *skeleton = XDP_DBUS_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_dbus_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_dbus_settings_skeleton_vtable =
{
  _xdp_dbus_settings_skeleton_handle_method_call,
  _xdp_dbus_settings_skeleton_handle_get_property,
  _xdp_dbus_settings_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
xdp_dbus_settings_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return xdp_dbus_settings_interface_info ();
}

static GDBusInterfaceVTable *
xdp_dbus_settings_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_xdp_dbus_settings_skeleton_vtable;
}

static GVariant *
xdp_dbus_settings_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  XdpDbusSettingsSkeleton *skeleton = XDP_DBUS_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_dbus_settings_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _xdp_dbus_settings_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _xdp_dbus_settings_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _xdp_dbus_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.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_dbus_settings_emit_changed (gpointer user_data);

static void
xdp_dbus_settings_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
{
  XdpDbusSettingsSkeleton *skeleton = XDP_DBUS_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_dbus_settings_emit_changed (skeleton);
}

static void
_xdp_dbus_settings_on_signal_setting_changed (
    XdpDbusSettings *object,
    const gchar *arg_namespace,
    const gchar *arg_key,
    GVariant *arg_value)
{
  XdpDbusSettingsSkeleton *skeleton = XDP_DBUS_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.portal.Settings", "SettingChanged",
        signal_variant, NULL);
    }
  g_variant_unref (signal_variant);
  g_list_free_full (connections, g_object_unref);
}

static void xdp_dbus_settings_skeleton_iface_init (XdpDbusSettingsIface *iface);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpDbusSettingsSkeleton, xdp_dbus_settings_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (XdpDbusSettingsSkeleton)
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_SETTINGS, xdp_dbus_settings_skeleton_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpDbusSettingsSkeleton, xdp_dbus_settings_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_SETTINGS, xdp_dbus_settings_skeleton_iface_init))

#endif
static void
xdp_dbus_settings_skeleton_finalize (GObject *object)
{
  XdpDbusSettingsSkeleton *skeleton = XDP_DBUS_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_dbus_settings_skeleton_parent_class)->finalize (object);
}

static void
xdp_dbus_settings_skeleton_get_property (GObject      *object,
  guint         prop_id,
  GValue       *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  XdpDbusSettingsSkeleton *skeleton = XDP_DBUS_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_dbus_settings_emit_changed (gpointer user_data)
{
  XdpDbusSettingsSkeleton *skeleton = XDP_DBUS_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.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_dbus_settings_schedule_emit_changed (XdpDbusSettingsSkeleton *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_dbus_settings_skeleton_notify (GObject      *object,
  GParamSpec *pspec G_GNUC_UNUSED)
{
  XdpDbusSettingsSkeleton *skeleton = XDP_DBUS_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_dbus_settings_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
      g_source_set_name (skeleton->priv->changed_properties_idle_source, "[generated] _xdp_dbus_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_dbus_settings_skeleton_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec)
{
  const _ExtendedGDBusPropertyInfo *info;
  XdpDbusSettingsSkeleton *skeleton = XDP_DBUS_SETTINGS_SKELETON (object);
  g_assert (prop_id != 0 && prop_id - 1 < 1);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_dbus_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_dbus_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_dbus_settings_skeleton_init (XdpDbusSettingsSkeleton *skeleton)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  skeleton->priv = xdp_dbus_settings_skeleton_get_instance_private (skeleton);
#else
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, XDP_DBUS_TYPE_SETTINGS_SKELETON, XdpDbusSettingsSkeletonPrivate);
#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_dbus_settings_skeleton_get_version (XdpDbusSettings *object)
{
  XdpDbusSettingsSkeleton *skeleton = XDP_DBUS_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_dbus_settings_skeleton_class_init (XdpDbusSettingsSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize = xdp_dbus_settings_skeleton_finalize;
  gobject_class->get_property = xdp_dbus_settings_skeleton_get_property;
  gobject_class->set_property = xdp_dbus_settings_skeleton_set_property;
  gobject_class->notify       = xdp_dbus_settings_skeleton_notify;


  xdp_dbus_settings_override_properties (gobject_class, 1);

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = xdp_dbus_settings_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = xdp_dbus_settings_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = xdp_dbus_settings_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = xdp_dbus_settings_skeleton_dbus_interface_get_vtable;

#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
  g_type_class_add_private (klass, sizeof (XdpDbusSettingsSkeletonPrivate));
#endif
}

static void
xdp_dbus_settings_skeleton_iface_init (XdpDbusSettingsIface *iface)
{
  iface->setting_changed = _xdp_dbus_settings_on_signal_setting_changed;
  iface->get_version = xdp_dbus_settings_skeleton_get_version;
}

/**
 * xdp_dbus_settings_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-Settings.top_of_page">org.freedesktop.portal.Settings</link>.
 *
 * Returns: (transfer full) (type XdpDbusSettingsSkeleton): The skeleton object.
 */
XdpDbusSettings *
xdp_dbus_settings_skeleton_new (void)
{
  return XDP_DBUS_SETTINGS (g_object_new (XDP_DBUS_TYPE_SETTINGS_SKELETON, NULL));
}

/* ------------------------------------------------------------------------
 * Code for interface org.freedesktop.portal.Trash
 * ------------------------------------------------------------------------
 */

/**
 * SECTION:XdpDbusTrash
 * @title: XdpDbusTrash
 * @short_description: Generated C code for the org.freedesktop.portal.Trash D-Bus interface
 *
 * This section contains code for working with the <link linkend="gdbus-interface-org-freedesktop-portal-Trash.top_of_page">org.freedesktop.portal.Trash</link> D-Bus interface in C.
 */

/* ---- Introspection data for org.freedesktop.portal.Trash ---- */

static const _ExtendedGDBusArgInfo _xdp_dbus_trash_method_info_trash_file_IN_ARG_fd =
{
  {
    -1,
    (gchar *) "fd",
    (gchar *) "h",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_dbus_trash_method_info_trash_file_IN_ARG_pointers[] =
{
  &_xdp_dbus_trash_method_info_trash_file_IN_ARG_fd.parent_struct,
  NULL
};

static const _ExtendedGDBusArgInfo _xdp_dbus_trash_method_info_trash_file_OUT_ARG_result =
{
  {
    -1,
    (gchar *) "result",
    (gchar *) "u",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_dbus_trash_method_info_trash_file_OUT_ARG_pointers[] =
{
  &_xdp_dbus_trash_method_info_trash_file_OUT_ARG_result.parent_struct,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_trash_method_info_trash_file =
{
  {
    -1,
    (gchar *) "TrashFile",
    (GDBusArgInfo **) &_xdp_dbus_trash_method_info_trash_file_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_trash_method_info_trash_file_OUT_ARG_pointers,
    NULL
  },
  "handle-trash-file",
  TRUE
};

static const GDBusMethodInfo * const _xdp_dbus_trash_method_info_pointers[] =
{
  &_xdp_dbus_trash_method_info_trash_file.parent_struct,
  NULL
};

static const _ExtendedGDBusPropertyInfo _xdp_dbus_trash_property_info_version =
{
  {
    -1,
    (gchar *) "version",
    (gchar *) "u",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "version",
  FALSE,
  TRUE
};

static const GDBusPropertyInfo * const _xdp_dbus_trash_property_info_pointers[] =
{
  &_xdp_dbus_trash_property_info_version.parent_struct,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _xdp_dbus_trash_interface_info =
{
  {
    -1,
    (gchar *) "org.freedesktop.portal.Trash",
    (GDBusMethodInfo **) &_xdp_dbus_trash_method_info_pointers,
    NULL,
    (GDBusPropertyInfo **) &_xdp_dbus_trash_property_info_pointers,
    NULL
  },
  "trash",
};


/**
 * xdp_dbus_trash_interface_info:
 *
 * Gets a machine-readable description of the <link linkend="gdbus-interface-org-freedesktop-portal-Trash.top_of_page">org.freedesktop.portal.Trash</link> D-Bus interface.
 *
 * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
 */
GDBusInterfaceInfo *
xdp_dbus_trash_interface_info (void)
{
  return (GDBusInterfaceInfo *) &_xdp_dbus_trash_interface_info.parent_struct;
}

/**
 * xdp_dbus_trash_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 #XdpDbusTrash interface for a concrete class.
 * The properties are overridden in the order they are defined.
 *
 * Returns: The last property id.
 */
guint
xdp_dbus_trash_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_dbus_trash_method_marshal_trash_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_OBJECT_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}


/**
 * XdpDbusTrash:
 *
 * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-Trash.top_of_page">org.freedesktop.portal.Trash</link>.
 */

/**
 * XdpDbusTrashIface:
 * @parent_iface: The parent interface.
 * @handle_trash_file: Handler for the #XdpDbusTrash::handle-trash-file signal.
 * @get_version: Getter for the #XdpDbusTrash:version property.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-Trash.top_of_page">org.freedesktop.portal.Trash</link>.
 */

typedef XdpDbusTrashIface XdpDbusTrashInterface;
G_DEFINE_INTERFACE (XdpDbusTrash, xdp_dbus_trash, G_TYPE_OBJECT)

static void
xdp_dbus_trash_default_init (XdpDbusTrashIface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * XdpDbusTrash::handle-trash-file:
   * @object: A #XdpDbusTrash.
   * @invocation: A #GDBusMethodInvocation.
   * @fd_list: (nullable): A #GUnixFDList or %NULL.
   * @arg_fd: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-portal-Trash.TrashFile">TrashFile()</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_dbus_trash_complete_trash_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-trash-file",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpDbusTrashIface, handle_trash_file),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_trash_method_marshal_trash_file,
    G_TYPE_BOOLEAN,
    3,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UNIX_FD_LIST, G_TYPE_VARIANT);

  /* GObject properties for D-Bus properties: */
  /**
   * XdpDbusTrash:version:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-portal-Trash.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_dbus_trash_get_version: (skip)
 * @object: A #XdpDbusTrash.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-portal-Trash.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_dbus_trash_get_version (XdpDbusTrash *object)
{
  g_return_val_if_fail (XDP_DBUS_IS_TRASH (object), 0);

  return XDP_DBUS_TRASH_GET_IFACE (object)->get_version (object);
}

/**
 * xdp_dbus_trash_set_version: (skip)
 * @object: A #XdpDbusTrash.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-freedesktop-portal-Trash.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_dbus_trash_set_version (XdpDbusTrash *object, guint value)
{
  g_object_set (G_OBJECT (object), "version", value, NULL);
}

/**
 * xdp_dbus_trash_call_trash_file:
 * @proxy: A #XdpDbusTrashProxy.
 * @arg_fd: 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-portal-Trash.TrashFile">TrashFile()</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_dbus_trash_call_trash_file_finish() to get the result of the operation.
 *
 * See xdp_dbus_trash_call_trash_file_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_trash_call_trash_file (
    XdpDbusTrash *proxy,
    GVariant *arg_fd,
    GUnixFDList *fd_list,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call_with_unix_fd_list (G_DBUS_PROXY (proxy),
    "TrashFile",
    g_variant_new ("(@h)",
                   arg_fd),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    fd_list,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_trash_call_trash_file_finish:
 * @proxy: A #XdpDbusTrashProxy.
 * @out_result: (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_dbus_trash_call_trash_file().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_trash_call_trash_file().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_trash_call_trash_file_finish (
    XdpDbusTrash *proxy,
    guint* out_result,
    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)",
                 out_result);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_trash_call_trash_file_sync:
 * @proxy: A #XdpDbusTrashProxy.
 * @arg_fd: Argument to pass with the method invocation.
 * @fd_list: (nullable): A #GUnixFDList or %NULL.
 * @out_result: (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-portal-Trash.TrashFile">TrashFile()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_trash_call_trash_file() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_trash_call_trash_file_sync (
    XdpDbusTrash *proxy,
    GVariant *arg_fd,
    GUnixFDList  *fd_list,
    guint* out_result,
    GUnixFDList **out_fd_list,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_with_unix_fd_list_sync (G_DBUS_PROXY (proxy),
    "TrashFile",
    g_variant_new ("(@h)",
                   arg_fd),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    fd_list,
    out_fd_list,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(u)",
                 out_result);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_trash_complete_trash_file:
 * @object: A #XdpDbusTrash.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @fd_list: (nullable): A #GUnixFDList or %NULL.
 * @result: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-portal-Trash.TrashFile">TrashFile()</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_dbus_trash_complete_trash_file (
    XdpDbusTrash *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    GUnixFDList *fd_list,
    guint result)
{
  g_dbus_method_invocation_return_value_with_unix_fd_list (invocation,
    g_variant_new ("(u)",
                   result),
    fd_list);
}

/* ------------------------------------------------------------------------ */

/**
 * XdpDbusTrashProxy:
 *
 * The #XdpDbusTrashProxy structure contains only private data and should only be accessed using the provided API.
 */

/**
 * XdpDbusTrashProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpDbusTrashProxy.
 */

struct _XdpDbusTrashProxyPrivate
{
  GData *qdata;
};

static void xdp_dbus_trash_proxy_iface_init (XdpDbusTrashIface *iface);

#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpDbusTrashProxy, xdp_dbus_trash_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (XdpDbusTrashProxy)
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_TRASH, xdp_dbus_trash_proxy_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpDbusTrashProxy, xdp_dbus_trash_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_TRASH, xdp_dbus_trash_proxy_iface_init))

#endif
static void
xdp_dbus_trash_proxy_finalize (GObject *object)
{
  XdpDbusTrashProxy *proxy = XDP_DBUS_TRASH_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (xdp_dbus_trash_proxy_parent_class)->finalize (object);
}

static void
xdp_dbus_trash_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_dbus_trash_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_dbus_trash_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.portal.Trash: %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_dbus_trash_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_dbus_trash_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.portal.Trash", info->parent_struct.name, variant),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    NULL, (GAsyncReadyCallback) xdp_dbus_trash_proxy_set_property_cb, (GDBusPropertyInfo *) &info->parent_struct);
  g_variant_unref (variant);
}

static void
xdp_dbus_trash_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_dbus_trash_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_DBUS_TYPE_TRASH);
  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_DBUS_TYPE_TRASH);
  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_dbus_trash_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  XdpDbusTrashProxy *proxy = XDP_DBUS_TRASH_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_dbus_trash_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_dbus_trash_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_dbus_trash_proxy_get_version (XdpDbusTrash *object)
{
  XdpDbusTrashProxy *proxy = XDP_DBUS_TRASH_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_dbus_trash_proxy_init (XdpDbusTrashProxy *proxy)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  proxy->priv = xdp_dbus_trash_proxy_get_instance_private (proxy);
#else
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, XDP_DBUS_TYPE_TRASH_PROXY, XdpDbusTrashProxyPrivate);
#endif

  g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), xdp_dbus_trash_interface_info ());
}

static void
xdp_dbus_trash_proxy_class_init (XdpDbusTrashProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = xdp_dbus_trash_proxy_finalize;
  gobject_class->get_property = xdp_dbus_trash_proxy_get_property;
  gobject_class->set_property = xdp_dbus_trash_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = xdp_dbus_trash_proxy_g_signal;
  proxy_class->g_properties_changed = xdp_dbus_trash_proxy_g_properties_changed;

  xdp_dbus_trash_override_properties (gobject_class, 1);

#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
  g_type_class_add_private (klass, sizeof (XdpDbusTrashProxyPrivate));
#endif
}

static void
xdp_dbus_trash_proxy_iface_init (XdpDbusTrashIface *iface)
{
  iface->get_version = xdp_dbus_trash_proxy_get_version;
}

/**
 * xdp_dbus_trash_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-portal-Trash.top_of_page">org.freedesktop.portal.Trash</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_dbus_trash_proxy_new_finish() to get the result of the operation.
 *
 * See xdp_dbus_trash_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_dbus_trash_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_DBUS_TYPE_TRASH_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.portal.Trash", NULL);
}

/**
 * xdp_dbus_trash_proxy_new_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_trash_proxy_new().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_dbus_trash_proxy_new().
 *
 * Returns: (transfer full) (type XdpDbusTrashProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusTrash *
xdp_dbus_trash_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_DBUS_TRASH (ret);
  else
    return NULL;
}

/**
 * xdp_dbus_trash_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-portal-Trash.top_of_page">org.freedesktop.portal.Trash</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_trash_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpDbusTrashProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusTrash *
xdp_dbus_trash_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_DBUS_TYPE_TRASH_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.portal.Trash", NULL);
  if (ret != NULL)
    return XDP_DBUS_TRASH (ret);
  else
    return NULL;
}


/**
 * xdp_dbus_trash_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_dbus_trash_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_dbus_trash_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See xdp_dbus_trash_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_dbus_trash_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_DBUS_TYPE_TRASH_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.portal.Trash", NULL);
}

/**
 * xdp_dbus_trash_proxy_new_for_bus_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_trash_proxy_new_for_bus().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_dbus_trash_proxy_new_for_bus().
 *
 * Returns: (transfer full) (type XdpDbusTrashProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusTrash *
xdp_dbus_trash_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_DBUS_TRASH (ret);
  else
    return NULL;
}

/**
 * xdp_dbus_trash_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_dbus_trash_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_trash_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpDbusTrashProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusTrash *
xdp_dbus_trash_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_DBUS_TYPE_TRASH_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.portal.Trash", NULL);
  if (ret != NULL)
    return XDP_DBUS_TRASH (ret);
  else
    return NULL;
}


/* ------------------------------------------------------------------------ */

/**
 * XdpDbusTrashSkeleton:
 *
 * The #XdpDbusTrashSkeleton structure contains only private data and should only be accessed using the provided API.
 */

/**
 * XdpDbusTrashSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpDbusTrashSkeleton.
 */

struct _XdpDbusTrashSkeletonPrivate
{
  GValue *properties;
  GList *changed_properties;
  GSource *changed_properties_idle_source;
  GMainContext *context;
  GMutex lock;
};

static void
_xdp_dbus_trash_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)
{
  XdpDbusTrashSkeleton *skeleton = XDP_DBUS_TRASH_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_DBUS_TYPE_TRASH);
  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_DBUS_TYPE_TRASH);
  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_dbus_trash_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)
{
  XdpDbusTrashSkeleton *skeleton = XDP_DBUS_TRASH_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_dbus_trash_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_dbus_trash_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)
{
  XdpDbusTrashSkeleton *skeleton = XDP_DBUS_TRASH_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_dbus_trash_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_dbus_trash_skeleton_vtable =
{
  _xdp_dbus_trash_skeleton_handle_method_call,
  _xdp_dbus_trash_skeleton_handle_get_property,
  _xdp_dbus_trash_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
xdp_dbus_trash_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return xdp_dbus_trash_interface_info ();
}

static GDBusInterfaceVTable *
xdp_dbus_trash_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_xdp_dbus_trash_skeleton_vtable;
}

static GVariant *
xdp_dbus_trash_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  XdpDbusTrashSkeleton *skeleton = XDP_DBUS_TRASH_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_dbus_trash_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _xdp_dbus_trash_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _xdp_dbus_trash_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _xdp_dbus_trash_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.portal.Trash", 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_dbus_trash_emit_changed (gpointer user_data);

static void
xdp_dbus_trash_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
{
  XdpDbusTrashSkeleton *skeleton = XDP_DBUS_TRASH_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_dbus_trash_emit_changed (skeleton);
}

static void xdp_dbus_trash_skeleton_iface_init (XdpDbusTrashIface *iface);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpDbusTrashSkeleton, xdp_dbus_trash_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (XdpDbusTrashSkeleton)
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_TRASH, xdp_dbus_trash_skeleton_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpDbusTrashSkeleton, xdp_dbus_trash_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_TRASH, xdp_dbus_trash_skeleton_iface_init))

#endif
static void
xdp_dbus_trash_skeleton_finalize (GObject *object)
{
  XdpDbusTrashSkeleton *skeleton = XDP_DBUS_TRASH_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_dbus_trash_skeleton_parent_class)->finalize (object);
}

static void
xdp_dbus_trash_skeleton_get_property (GObject      *object,
  guint         prop_id,
  GValue       *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  XdpDbusTrashSkeleton *skeleton = XDP_DBUS_TRASH_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_dbus_trash_emit_changed (gpointer user_data)
{
  XdpDbusTrashSkeleton *skeleton = XDP_DBUS_TRASH_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.portal.Trash",
                                           &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_dbus_trash_schedule_emit_changed (XdpDbusTrashSkeleton *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_dbus_trash_skeleton_notify (GObject      *object,
  GParamSpec *pspec G_GNUC_UNUSED)
{
  XdpDbusTrashSkeleton *skeleton = XDP_DBUS_TRASH_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_dbus_trash_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
      g_source_set_name (skeleton->priv->changed_properties_idle_source, "[generated] _xdp_dbus_trash_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_dbus_trash_skeleton_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec)
{
  const _ExtendedGDBusPropertyInfo *info;
  XdpDbusTrashSkeleton *skeleton = XDP_DBUS_TRASH_SKELETON (object);
  g_assert (prop_id != 0 && prop_id - 1 < 1);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_dbus_trash_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_dbus_trash_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_dbus_trash_skeleton_init (XdpDbusTrashSkeleton *skeleton)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  skeleton->priv = xdp_dbus_trash_skeleton_get_instance_private (skeleton);
#else
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, XDP_DBUS_TYPE_TRASH_SKELETON, XdpDbusTrashSkeletonPrivate);
#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_dbus_trash_skeleton_get_version (XdpDbusTrash *object)
{
  XdpDbusTrashSkeleton *skeleton = XDP_DBUS_TRASH_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_dbus_trash_skeleton_class_init (XdpDbusTrashSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize = xdp_dbus_trash_skeleton_finalize;
  gobject_class->get_property = xdp_dbus_trash_skeleton_get_property;
  gobject_class->set_property = xdp_dbus_trash_skeleton_set_property;
  gobject_class->notify       = xdp_dbus_trash_skeleton_notify;


  xdp_dbus_trash_override_properties (gobject_class, 1);

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = xdp_dbus_trash_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = xdp_dbus_trash_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = xdp_dbus_trash_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = xdp_dbus_trash_skeleton_dbus_interface_get_vtable;

#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
  g_type_class_add_private (klass, sizeof (XdpDbusTrashSkeletonPrivate));
#endif
}

static void
xdp_dbus_trash_skeleton_iface_init (XdpDbusTrashIface *iface)
{
  iface->get_version = xdp_dbus_trash_skeleton_get_version;
}

/**
 * xdp_dbus_trash_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-Trash.top_of_page">org.freedesktop.portal.Trash</link>.
 *
 * Returns: (transfer full) (type XdpDbusTrashSkeleton): The skeleton object.
 */
XdpDbusTrash *
xdp_dbus_trash_skeleton_new (void)
{
  return XDP_DBUS_TRASH (g_object_new (XDP_DBUS_TYPE_TRASH_SKELETON, NULL));
}

/* ------------------------------------------------------------------------
 * Code for interface org.freedesktop.portal.Usb
 * ------------------------------------------------------------------------
 */

/**
 * SECTION:XdpDbusUsb
 * @title: XdpDbusUsb
 * @short_description: Generated C code for the org.freedesktop.portal.Usb D-Bus interface
 *
 * This section contains code for working with the <link linkend="gdbus-interface-org-freedesktop-portal-Usb.top_of_page">org.freedesktop.portal.Usb</link> D-Bus interface in C.
 */

enum
{
  XDP_DBUS__USB_DEVICE_EVENTS,
};

static unsigned XDP_DBUS__USB_SIGNALS[1] = { 0 };

/* ---- Introspection data for org.freedesktop.portal.Usb ---- */

static const _ExtendedGDBusArgInfo _xdp_dbus_usb_method_info_create_session_IN_ARG_options =
{
  {
    -1,
    (gchar *) "options",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_dbus_usb_method_info_create_session_IN_ARG_pointers[] =
{
  &_xdp_dbus_usb_method_info_create_session_IN_ARG_options.parent_struct,
  NULL
};

static const _ExtendedGDBusArgInfo _xdp_dbus_usb_method_info_create_session_OUT_ARG_session_handle =
{
  {
    -1,
    (gchar *) "session_handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_dbus_usb_method_info_create_session_OUT_ARG_pointers[] =
{
  &_xdp_dbus_usb_method_info_create_session_OUT_ARG_session_handle.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_dbus_usb_method_create_session_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.In0",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo * const _xdp_dbus_usb_method_create_session_annotation_info_pointers[] =
{
  &_xdp_dbus_usb_method_create_session_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_usb_method_info_create_session =
{
  {
    -1,
    (gchar *) "CreateSession",
    (GDBusArgInfo **) &_xdp_dbus_usb_method_info_create_session_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_usb_method_info_create_session_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_dbus_usb_method_create_session_annotation_info_pointers
  },
  "handle-create-session",
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_dbus_usb_method_info_enumerate_devices_IN_ARG_options =
{
  {
    -1,
    (gchar *) "options",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_dbus_usb_method_info_enumerate_devices_IN_ARG_pointers[] =
{
  &_xdp_dbus_usb_method_info_enumerate_devices_IN_ARG_options.parent_struct,
  NULL
};

static const _ExtendedGDBusArgInfo _xdp_dbus_usb_method_info_enumerate_devices_OUT_ARG_devices =
{
  {
    -1,
    (gchar *) "devices",
    (gchar *) "a(sa{sv})",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_dbus_usb_method_info_enumerate_devices_OUT_ARG_pointers[] =
{
  &_xdp_dbus_usb_method_info_enumerate_devices_OUT_ARG_devices.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_dbus_usb_method_enumerate_devices_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.In0",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo _xdp_dbus_usb_method_enumerate_devices_annotation_info_1 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.Out0",
  (gchar *) "QList<QPair<QString,QVariantMap>>",
  NULL
};

static const GDBusAnnotationInfo * const _xdp_dbus_usb_method_enumerate_devices_annotation_info_pointers[] =
{
  &_xdp_dbus_usb_method_enumerate_devices_annotation_info_0,
  &_xdp_dbus_usb_method_enumerate_devices_annotation_info_1,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_usb_method_info_enumerate_devices =
{
  {
    -1,
    (gchar *) "EnumerateDevices",
    (GDBusArgInfo **) &_xdp_dbus_usb_method_info_enumerate_devices_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_usb_method_info_enumerate_devices_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_dbus_usb_method_enumerate_devices_annotation_info_pointers
  },
  "handle-enumerate-devices",
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_dbus_usb_method_info_acquire_devices_IN_ARG_parent_window =
{
  {
    -1,
    (gchar *) "parent_window",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_dbus_usb_method_info_acquire_devices_IN_ARG_devices =
{
  {
    -1,
    (gchar *) "devices",
    (gchar *) "a(sa{sv})",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_dbus_usb_method_info_acquire_devices_IN_ARG_options =
{
  {
    -1,
    (gchar *) "options",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_dbus_usb_method_info_acquire_devices_IN_ARG_pointers[] =
{
  &_xdp_dbus_usb_method_info_acquire_devices_IN_ARG_parent_window.parent_struct,
  &_xdp_dbus_usb_method_info_acquire_devices_IN_ARG_devices.parent_struct,
  &_xdp_dbus_usb_method_info_acquire_devices_IN_ARG_options.parent_struct,
  NULL
};

static const _ExtendedGDBusArgInfo _xdp_dbus_usb_method_info_acquire_devices_OUT_ARG_handle =
{
  {
    -1,
    (gchar *) "handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_dbus_usb_method_info_acquire_devices_OUT_ARG_pointers[] =
{
  &_xdp_dbus_usb_method_info_acquire_devices_OUT_ARG_handle.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_dbus_usb_method_acquire_devices_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.In1",
  (gchar *) "QList<QPair<QString,QVariantMap>>",
  NULL
};

static const GDBusAnnotationInfo _xdp_dbus_usb_method_acquire_devices_annotation_info_1 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.In2",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo * const _xdp_dbus_usb_method_acquire_devices_annotation_info_pointers[] =
{
  &_xdp_dbus_usb_method_acquire_devices_annotation_info_0,
  &_xdp_dbus_usb_method_acquire_devices_annotation_info_1,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_usb_method_info_acquire_devices =
{
  {
    -1,
    (gchar *) "AcquireDevices",
    (GDBusArgInfo **) &_xdp_dbus_usb_method_info_acquire_devices_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_usb_method_info_acquire_devices_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_dbus_usb_method_acquire_devices_annotation_info_pointers
  },
  "handle-acquire-devices",
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_dbus_usb_method_info_finish_acquire_devices_IN_ARG_handle =
{
  {
    -1,
    (gchar *) "handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_dbus_usb_method_info_finish_acquire_devices_IN_ARG_options =
{
  {
    -1,
    (gchar *) "options",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_dbus_usb_method_info_finish_acquire_devices_IN_ARG_pointers[] =
{
  &_xdp_dbus_usb_method_info_finish_acquire_devices_IN_ARG_handle.parent_struct,
  &_xdp_dbus_usb_method_info_finish_acquire_devices_IN_ARG_options.parent_struct,
  NULL
};

static const _ExtendedGDBusArgInfo _xdp_dbus_usb_method_info_finish_acquire_devices_OUT_ARG_results =
{
  {
    -1,
    (gchar *) "results",
    (gchar *) "a(sa{sv})",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_dbus_usb_method_info_finish_acquire_devices_OUT_ARG_finished =
{
  {
    -1,
    (gchar *) "finished",
    (gchar *) "b",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_dbus_usb_method_info_finish_acquire_devices_OUT_ARG_pointers[] =
{
  &_xdp_dbus_usb_method_info_finish_acquire_devices_OUT_ARG_results.parent_struct,
  &_xdp_dbus_usb_method_info_finish_acquire_devices_OUT_ARG_finished.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_dbus_usb_method_finish_acquire_devices_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.In1",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo _xdp_dbus_usb_method_finish_acquire_devices_annotation_info_1 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.Out0",
  (gchar *) "QList<QPair<QString,QVariantMap>>",
  NULL
};

static const GDBusAnnotationInfo * const _xdp_dbus_usb_method_finish_acquire_devices_annotation_info_pointers[] =
{
  &_xdp_dbus_usb_method_finish_acquire_devices_annotation_info_0,
  &_xdp_dbus_usb_method_finish_acquire_devices_annotation_info_1,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_usb_method_info_finish_acquire_devices =
{
  {
    -1,
    (gchar *) "FinishAcquireDevices",
    (GDBusArgInfo **) &_xdp_dbus_usb_method_info_finish_acquire_devices_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_usb_method_info_finish_acquire_devices_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_dbus_usb_method_finish_acquire_devices_annotation_info_pointers
  },
  "handle-finish-acquire-devices",
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_dbus_usb_method_info_release_devices_IN_ARG_devices =
{
  {
    -1,
    (gchar *) "devices",
    (gchar *) "as",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_dbus_usb_method_info_release_devices_IN_ARG_options =
{
  {
    -1,
    (gchar *) "options",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_dbus_usb_method_info_release_devices_IN_ARG_pointers[] =
{
  &_xdp_dbus_usb_method_info_release_devices_IN_ARG_devices.parent_struct,
  &_xdp_dbus_usb_method_info_release_devices_IN_ARG_options.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_dbus_usb_method_release_devices_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.In1",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo * const _xdp_dbus_usb_method_release_devices_annotation_info_pointers[] =
{
  &_xdp_dbus_usb_method_release_devices_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_usb_method_info_release_devices =
{
  {
    -1,
    (gchar *) "ReleaseDevices",
    (GDBusArgInfo **) &_xdp_dbus_usb_method_info_release_devices_IN_ARG_pointers,
    NULL,
    (GDBusAnnotationInfo **) &_xdp_dbus_usb_method_release_devices_annotation_info_pointers
  },
  "handle-release-devices",
  FALSE
};

static const GDBusMethodInfo * const _xdp_dbus_usb_method_info_pointers[] =
{
  &_xdp_dbus_usb_method_info_create_session.parent_struct,
  &_xdp_dbus_usb_method_info_enumerate_devices.parent_struct,
  &_xdp_dbus_usb_method_info_acquire_devices.parent_struct,
  &_xdp_dbus_usb_method_info_finish_acquire_devices.parent_struct,
  &_xdp_dbus_usb_method_info_release_devices.parent_struct,
  NULL
};

static const _ExtendedGDBusArgInfo _xdp_dbus_usb_signal_info_device_events_ARG_session_handle =
{
  {
    -1,
    (gchar *) "session_handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_dbus_usb_signal_info_device_events_ARG_events =
{
  {
    -1,
    (gchar *) "events",
    (gchar *) "a(ssa{sv})",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_dbus_usb_signal_info_device_events_ARG_pointers[] =
{
  &_xdp_dbus_usb_signal_info_device_events_ARG_session_handle.parent_struct,
  &_xdp_dbus_usb_signal_info_device_events_ARG_events.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_dbus_usb_signal_device_events_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.Out1",
  (gchar *) "QList<std::tuple<QString,QString,QVariantMap>>",
  NULL
};

static const GDBusAnnotationInfo * const _xdp_dbus_usb_signal_device_events_annotation_info_pointers[] =
{
  &_xdp_dbus_usb_signal_device_events_annotation_info_0,
  NULL
};

static const _ExtendedGDBusSignalInfo _xdp_dbus_usb_signal_info_device_events =
{
  {
    -1,
    (gchar *) "DeviceEvents",
    (GDBusArgInfo **) &_xdp_dbus_usb_signal_info_device_events_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_dbus_usb_signal_device_events_annotation_info_pointers
  },
  "device-events"
};

static const GDBusSignalInfo * const _xdp_dbus_usb_signal_info_pointers[] =
{
  &_xdp_dbus_usb_signal_info_device_events.parent_struct,
  NULL
};

static const _ExtendedGDBusPropertyInfo _xdp_dbus_usb_property_info_version =
{
  {
    -1,
    (gchar *) "version",
    (gchar *) "u",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "version",
  FALSE,
  TRUE
};

static const GDBusPropertyInfo * const _xdp_dbus_usb_property_info_pointers[] =
{
  &_xdp_dbus_usb_property_info_version.parent_struct,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _xdp_dbus_usb_interface_info =
{
  {
    -1,
    (gchar *) "org.freedesktop.portal.Usb",
    (GDBusMethodInfo **) &_xdp_dbus_usb_method_info_pointers,
    (GDBusSignalInfo **) &_xdp_dbus_usb_signal_info_pointers,
    (GDBusPropertyInfo **) &_xdp_dbus_usb_property_info_pointers,
    NULL
  },
  "usb",
};


/**
 * xdp_dbus_usb_interface_info:
 *
 * Gets a machine-readable description of the <link linkend="gdbus-interface-org-freedesktop-portal-Usb.top_of_page">org.freedesktop.portal.Usb</link> D-Bus interface.
 *
 * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
 */
GDBusInterfaceInfo *
xdp_dbus_usb_interface_info (void)
{
  return (GDBusInterfaceInfo *) &_xdp_dbus_usb_interface_info.parent_struct;
}

/**
 * xdp_dbus_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 #XdpDbusUsb interface for a concrete class.
 * The properties are overridden in the order they are defined.
 *
 * Returns: The last property id.
 */
guint
xdp_dbus_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_dbus_usb_signal_marshal_device_events (
    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_dbus_usb_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_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_dbus_usb_method_marshal_enumerate_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_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_dbus_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_VARIANT_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_dbus_usb_method_marshal_finish_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_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_dbus_usb_method_marshal_release_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_BOXED_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}


/**
 * XdpDbusUsb:
 *
 * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-Usb.top_of_page">org.freedesktop.portal.Usb</link>.
 */

/**
 * XdpDbusUsbIface:
 * @parent_iface: The parent interface.
 * @handle_acquire_devices: Handler for the #XdpDbusUsb::handle-acquire-devices signal.
 * @handle_create_session: Handler for the #XdpDbusUsb::handle-create-session signal.
 * @handle_enumerate_devices: Handler for the #XdpDbusUsb::handle-enumerate-devices signal.
 * @handle_finish_acquire_devices: Handler for the #XdpDbusUsb::handle-finish-acquire-devices signal.
 * @handle_release_devices: Handler for the #XdpDbusUsb::handle-release-devices signal.
 * @get_version: Getter for the #XdpDbusUsb:version property.
 * @device_events: Handler for the #XdpDbusUsb::device-events signal.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-Usb.top_of_page">org.freedesktop.portal.Usb</link>.
 */

typedef XdpDbusUsbIface XdpDbusUsbInterface;
G_DEFINE_INTERFACE (XdpDbusUsb, xdp_dbus_usb, G_TYPE_OBJECT)

static void
xdp_dbus_usb_default_init (XdpDbusUsbIface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * XdpDbusUsb::handle-create-session:
   * @object: A #XdpDbusUsb.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_options: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-portal-Usb.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_dbus_usb_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 (XdpDbusUsbIface, handle_create_session),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_usb_method_marshal_create_session,
    G_TYPE_BOOLEAN,
    2,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_VARIANT);

  /**
   * XdpDbusUsb::handle-enumerate-devices:
   * @object: A #XdpDbusUsb.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_options: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-portal-Usb.EnumerateDevices">EnumerateDevices()</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_dbus_usb_complete_enumerate_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-enumerate-devices",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpDbusUsbIface, handle_enumerate_devices),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_usb_method_marshal_enumerate_devices,
    G_TYPE_BOOLEAN,
    2,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_VARIANT);

  /**
   * XdpDbusUsb::handle-acquire-devices:
   * @object: A #XdpDbusUsb.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_parent_window: 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-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_dbus_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 (XdpDbusUsbIface, handle_acquire_devices),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_usb_method_marshal_acquire_devices,
    G_TYPE_BOOLEAN,
    4,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_VARIANT, G_TYPE_VARIANT);

  /**
   * XdpDbusUsb::handle-finish-acquire-devices:
   * @object: A #XdpDbusUsb.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_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-portal-Usb.FinishAcquireDevices">FinishAcquireDevices()</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_dbus_usb_complete_finish_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-finish-acquire-devices",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpDbusUsbIface, handle_finish_acquire_devices),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_usb_method_marshal_finish_acquire_devices,
    G_TYPE_BOOLEAN,
    3,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_VARIANT);

  /**
   * XdpDbusUsb::handle-release-devices:
   * @object: A #XdpDbusUsb.
   * @invocation: A #GDBusMethodInvocation.
   * @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-portal-Usb.ReleaseDevices">ReleaseDevices()</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_dbus_usb_complete_release_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-release-devices",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpDbusUsbIface, handle_release_devices),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_usb_method_marshal_release_devices,
    G_TYPE_BOOLEAN,
    3,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRV, G_TYPE_VARIANT);

  /* GObject signals for received D-Bus signals: */
  /**
   * XdpDbusUsb::device-events:
   * @object: A #XdpDbusUsb.
   * @arg_session_handle: Argument.
   * @arg_events: Argument.
   *
   * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-freedesktop-portal-Usb.DeviceEvents">"DeviceEvents"</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_DBUS__USB_SIGNALS[XDP_DBUS__USB_DEVICE_EVENTS] =
    g_signal_new ("device-events",
      G_TYPE_FROM_INTERFACE (iface),
      G_SIGNAL_RUN_LAST,
      G_STRUCT_OFFSET (XdpDbusUsbIface, device_events),
      NULL,
      NULL,
      xdp_dbus_usb_signal_marshal_device_events,
      G_TYPE_NONE,
      2, G_TYPE_STRING, G_TYPE_VARIANT);

  /* GObject properties for D-Bus properties: */
  /**
   * XdpDbusUsb:version:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-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_dbus_usb_get_version: (skip)
 * @object: A #XdpDbusUsb.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-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_dbus_usb_get_version (XdpDbusUsb *object)
{
  g_return_val_if_fail (XDP_DBUS_IS_USB (object), 0);

  return XDP_DBUS_USB_GET_IFACE (object)->get_version (object);
}

/**
 * xdp_dbus_usb_set_version: (skip)
 * @object: A #XdpDbusUsb.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-freedesktop-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_dbus_usb_set_version (XdpDbusUsb *object, guint value)
{
  g_object_set (G_OBJECT (object), "version", value, NULL);
}

/**
 * xdp_dbus_usb_emit_device_events:
 * @object: A #XdpDbusUsb.
 * @arg_session_handle: Argument to pass with the signal.
 * @arg_events: Argument to pass with the signal.
 *
 * Emits the <link linkend="gdbus-signal-org-freedesktop-portal-Usb.DeviceEvents">"DeviceEvents"</link> D-Bus signal.
 */
void
xdp_dbus_usb_emit_device_events (
    XdpDbusUsb *object,
    const gchar *arg_session_handle,
    GVariant *arg_events)
{
  g_signal_emit (object, XDP_DBUS__USB_SIGNALS[XDP_DBUS__USB_DEVICE_EVENTS], 0, arg_session_handle, arg_events);
}

/**
 * xdp_dbus_usb_call_create_session:
 * @proxy: A #XdpDbusUsbProxy.
 * @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-portal-Usb.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_dbus_usb_call_create_session_finish() to get the result of the operation.
 *
 * See xdp_dbus_usb_call_create_session_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_usb_call_create_session (
    XdpDbusUsb *proxy,
    GVariant *arg_options,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "CreateSession",
    g_variant_new ("(@a{sv})",
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_usb_call_create_session_finish:
 * @proxy: A #XdpDbusUsbProxy.
 * @out_session_handle: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_usb_call_create_session().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_usb_call_create_session().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_usb_call_create_session_finish (
    XdpDbusUsb *proxy,
    gchar ** out_session_handle,
    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,
                 "(o)",
                 out_session_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_usb_call_create_session_sync:
 * @proxy: A #XdpDbusUsbProxy.
 * @arg_options: Argument to pass with the method invocation.
 * @out_session_handle: (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-portal-Usb.CreateSession">CreateSession()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_usb_call_create_session() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_usb_call_create_session_sync (
    XdpDbusUsb *proxy,
    GVariant *arg_options,
    gchar ** out_session_handle,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "CreateSession",
    g_variant_new ("(@a{sv})",
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(o)",
                 out_session_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_usb_call_enumerate_devices:
 * @proxy: A #XdpDbusUsbProxy.
 * @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-portal-Usb.EnumerateDevices">EnumerateDevices()</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_dbus_usb_call_enumerate_devices_finish() to get the result of the operation.
 *
 * See xdp_dbus_usb_call_enumerate_devices_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_usb_call_enumerate_devices (
    XdpDbusUsb *proxy,
    GVariant *arg_options,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "EnumerateDevices",
    g_variant_new ("(@a{sv})",
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_usb_call_enumerate_devices_finish:
 * @proxy: A #XdpDbusUsbProxy.
 * @out_devices: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_usb_call_enumerate_devices().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_usb_call_enumerate_devices().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_usb_call_enumerate_devices_finish (
    XdpDbusUsb *proxy,
    GVariant ** out_devices,
    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_devices);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_usb_call_enumerate_devices_sync:
 * @proxy: A #XdpDbusUsbProxy.
 * @arg_options: Argument to pass with the method invocation.
 * @out_devices: (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-portal-Usb.EnumerateDevices">EnumerateDevices()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_usb_call_enumerate_devices() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_usb_call_enumerate_devices_sync (
    XdpDbusUsb *proxy,
    GVariant *arg_options,
    GVariant ** out_devices,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "EnumerateDevices",
    g_variant_new ("(@a{sv})",
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(@a(sa{sv}))",
                 out_devices);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_usb_call_acquire_devices:
 * @proxy: A #XdpDbusUsbProxy.
 * @arg_parent_window: 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-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_dbus_usb_call_acquire_devices_finish() to get the result of the operation.
 *
 * See xdp_dbus_usb_call_acquire_devices_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_usb_call_acquire_devices (
    XdpDbusUsb *proxy,
    const gchar *arg_parent_window,
    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 ("(s@a(sa{sv})@a{sv})",
                   arg_parent_window,
                   arg_devices,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_usb_call_acquire_devices_finish:
 * @proxy: A #XdpDbusUsbProxy.
 * @out_handle: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_usb_call_acquire_devices().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_usb_call_acquire_devices().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_usb_call_acquire_devices_finish (
    XdpDbusUsb *proxy,
    gchar ** out_handle,
    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,
                 "(o)",
                 out_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_usb_call_acquire_devices_sync:
 * @proxy: A #XdpDbusUsbProxy.
 * @arg_parent_window: 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_handle: (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-portal-Usb.AcquireDevices">AcquireDevices()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_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_dbus_usb_call_acquire_devices_sync (
    XdpDbusUsb *proxy,
    const gchar *arg_parent_window,
    GVariant *arg_devices,
    GVariant *arg_options,
    gchar ** out_handle,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "AcquireDevices",
    g_variant_new ("(s@a(sa{sv})@a{sv})",
                   arg_parent_window,
                   arg_devices,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(o)",
                 out_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_usb_call_finish_acquire_devices:
 * @proxy: A #XdpDbusUsbProxy.
 * @arg_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-portal-Usb.FinishAcquireDevices">FinishAcquireDevices()</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_dbus_usb_call_finish_acquire_devices_finish() to get the result of the operation.
 *
 * See xdp_dbus_usb_call_finish_acquire_devices_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_usb_call_finish_acquire_devices (
    XdpDbusUsb *proxy,
    const gchar *arg_handle,
    GVariant *arg_options,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "FinishAcquireDevices",
    g_variant_new ("(o@a{sv})",
                   arg_handle,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_usb_call_finish_acquire_devices_finish:
 * @proxy: A #XdpDbusUsbProxy.
 * @out_results: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_finished: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_usb_call_finish_acquire_devices().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_usb_call_finish_acquire_devices().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_usb_call_finish_acquire_devices_finish (
    XdpDbusUsb *proxy,
    GVariant ** out_results,
    gboolean* out_finished,
    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})b)",
                 out_results,
                 out_finished);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_usb_call_finish_acquire_devices_sync:
 * @proxy: A #XdpDbusUsbProxy.
 * @arg_handle: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @out_results: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_finished: (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-portal-Usb.FinishAcquireDevices">FinishAcquireDevices()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_usb_call_finish_acquire_devices() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_usb_call_finish_acquire_devices_sync (
    XdpDbusUsb *proxy,
    const gchar *arg_handle,
    GVariant *arg_options,
    GVariant ** out_results,
    gboolean* out_finished,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "FinishAcquireDevices",
    g_variant_new ("(o@a{sv})",
                   arg_handle,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(@a(sa{sv})b)",
                 out_results,
                 out_finished);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_usb_call_release_devices:
 * @proxy: A #XdpDbusUsbProxy.
 * @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-portal-Usb.ReleaseDevices">ReleaseDevices()</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_dbus_usb_call_release_devices_finish() to get the result of the operation.
 *
 * See xdp_dbus_usb_call_release_devices_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_usb_call_release_devices (
    XdpDbusUsb *proxy,
    const gchar *const *arg_devices,
    GVariant *arg_options,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "ReleaseDevices",
    g_variant_new ("(^as@a{sv})",
                   arg_devices,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_usb_call_release_devices_finish:
 * @proxy: A #XdpDbusUsbProxy.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_usb_call_release_devices().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_usb_call_release_devices().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_usb_call_release_devices_finish (
    XdpDbusUsb *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_dbus_usb_call_release_devices_sync:
 * @proxy: A #XdpDbusUsbProxy.
 * @arg_devices: 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-portal-Usb.ReleaseDevices">ReleaseDevices()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_usb_call_release_devices() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_usb_call_release_devices_sync (
    XdpDbusUsb *proxy,
    const gchar *const *arg_devices,
    GVariant *arg_options,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "ReleaseDevices",
    g_variant_new ("(^as@a{sv})",
                   arg_devices,
                   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_dbus_usb_complete_create_session:
 * @object: A #XdpDbusUsb.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @session_handle: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-portal-Usb.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_dbus_usb_complete_create_session (
    XdpDbusUsb *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    const gchar *session_handle)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(o)",
                   session_handle));
}

/**
 * xdp_dbus_usb_complete_enumerate_devices:
 * @object: A #XdpDbusUsb.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @devices: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-portal-Usb.EnumerateDevices">EnumerateDevices()</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_dbus_usb_complete_enumerate_devices (
    XdpDbusUsb *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    GVariant *devices)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(@a(sa{sv}))",
                   devices));
}

/**
 * xdp_dbus_usb_complete_acquire_devices:
 * @object: A #XdpDbusUsb.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @handle: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-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_dbus_usb_complete_acquire_devices (
    XdpDbusUsb *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    const gchar *handle)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(o)",
                   handle));
}

/**
 * xdp_dbus_usb_complete_finish_acquire_devices:
 * @object: A #XdpDbusUsb.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @results: Parameter to return.
 * @finished: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-portal-Usb.FinishAcquireDevices">FinishAcquireDevices()</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_dbus_usb_complete_finish_acquire_devices (
    XdpDbusUsb *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    GVariant *results,
    gboolean finished)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(@a(sa{sv})b)",
                   results,
                   finished));
}

/**
 * xdp_dbus_usb_complete_release_devices:
 * @object: A #XdpDbusUsb.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-portal-Usb.ReleaseDevices">ReleaseDevices()</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_dbus_usb_complete_release_devices (
    XdpDbusUsb *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("()"));
}

/* ------------------------------------------------------------------------ */

/**
 * XdpDbusUsbProxy:
 *
 * The #XdpDbusUsbProxy structure contains only private data and should only be accessed using the provided API.
 */

/**
 * XdpDbusUsbProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpDbusUsbProxy.
 */

struct _XdpDbusUsbProxyPrivate
{
  GData *qdata;
};

static void xdp_dbus_usb_proxy_iface_init (XdpDbusUsbIface *iface);

#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpDbusUsbProxy, xdp_dbus_usb_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (XdpDbusUsbProxy)
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_USB, xdp_dbus_usb_proxy_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpDbusUsbProxy, xdp_dbus_usb_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_USB, xdp_dbus_usb_proxy_iface_init))

#endif
static void
xdp_dbus_usb_proxy_finalize (GObject *object)
{
  XdpDbusUsbProxy *proxy = XDP_DBUS_USB_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (xdp_dbus_usb_proxy_parent_class)->finalize (object);
}

static void
xdp_dbus_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_dbus_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_dbus_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.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_dbus_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_dbus_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.portal.Usb", info->parent_struct.name, variant),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    NULL, (GAsyncReadyCallback) xdp_dbus_usb_proxy_set_property_cb, (GDBusPropertyInfo *) &info->parent_struct);
  g_variant_unref (variant);
}

static void
xdp_dbus_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_dbus_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_DBUS_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_DBUS_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_dbus_usb_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  XdpDbusUsbProxy *proxy = XDP_DBUS_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_dbus_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_dbus_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_dbus_usb_proxy_get_version (XdpDbusUsb *object)
{
  XdpDbusUsbProxy *proxy = XDP_DBUS_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_dbus_usb_proxy_init (XdpDbusUsbProxy *proxy)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  proxy->priv = xdp_dbus_usb_proxy_get_instance_private (proxy);
#else
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, XDP_DBUS_TYPE_USB_PROXY, XdpDbusUsbProxyPrivate);
#endif

  g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), xdp_dbus_usb_interface_info ());
}

static void
xdp_dbus_usb_proxy_class_init (XdpDbusUsbProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = xdp_dbus_usb_proxy_finalize;
  gobject_class->get_property = xdp_dbus_usb_proxy_get_property;
  gobject_class->set_property = xdp_dbus_usb_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = xdp_dbus_usb_proxy_g_signal;
  proxy_class->g_properties_changed = xdp_dbus_usb_proxy_g_properties_changed;

  xdp_dbus_usb_override_properties (gobject_class, 1);

#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
  g_type_class_add_private (klass, sizeof (XdpDbusUsbProxyPrivate));
#endif
}

static void
xdp_dbus_usb_proxy_iface_init (XdpDbusUsbIface *iface)
{
  iface->get_version = xdp_dbus_usb_proxy_get_version;
}

/**
 * xdp_dbus_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-portal-Usb.top_of_page">org.freedesktop.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_dbus_usb_proxy_new_finish() to get the result of the operation.
 *
 * See xdp_dbus_usb_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_dbus_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_DBUS_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.portal.Usb", NULL);
}

/**
 * xdp_dbus_usb_proxy_new_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_usb_proxy_new().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_dbus_usb_proxy_new().
 *
 * Returns: (transfer full) (type XdpDbusUsbProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusUsb *
xdp_dbus_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_DBUS_USB (ret);
  else
    return NULL;
}

/**
 * xdp_dbus_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-portal-Usb.top_of_page">org.freedesktop.portal.Usb</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_usb_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpDbusUsbProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusUsb *
xdp_dbus_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_DBUS_TYPE_USB_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.portal.Usb", NULL);
  if (ret != NULL)
    return XDP_DBUS_USB (ret);
  else
    return NULL;
}


/**
 * xdp_dbus_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_dbus_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_dbus_usb_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See xdp_dbus_usb_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_dbus_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_DBUS_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.portal.Usb", NULL);
}

/**
 * xdp_dbus_usb_proxy_new_for_bus_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_usb_proxy_new_for_bus().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_dbus_usb_proxy_new_for_bus().
 *
 * Returns: (transfer full) (type XdpDbusUsbProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusUsb *
xdp_dbus_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_DBUS_USB (ret);
  else
    return NULL;
}

/**
 * xdp_dbus_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_dbus_usb_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_usb_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpDbusUsbProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusUsb *
xdp_dbus_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_DBUS_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.portal.Usb", NULL);
  if (ret != NULL)
    return XDP_DBUS_USB (ret);
  else
    return NULL;
}


/* ------------------------------------------------------------------------ */

/**
 * XdpDbusUsbSkeleton:
 *
 * The #XdpDbusUsbSkeleton structure contains only private data and should only be accessed using the provided API.
 */

/**
 * XdpDbusUsbSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpDbusUsbSkeleton.
 */

struct _XdpDbusUsbSkeletonPrivate
{
  GValue *properties;
  GList *changed_properties;
  GSource *changed_properties_idle_source;
  GMainContext *context;
  GMutex lock;
};

static void
_xdp_dbus_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)
{
  XdpDbusUsbSkeleton *skeleton = XDP_DBUS_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_DBUS_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_DBUS_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_dbus_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)
{
  XdpDbusUsbSkeleton *skeleton = XDP_DBUS_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_dbus_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_dbus_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)
{
  XdpDbusUsbSkeleton *skeleton = XDP_DBUS_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_dbus_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_dbus_usb_skeleton_vtable =
{
  _xdp_dbus_usb_skeleton_handle_method_call,
  _xdp_dbus_usb_skeleton_handle_get_property,
  _xdp_dbus_usb_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
xdp_dbus_usb_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return xdp_dbus_usb_interface_info ();
}

static GDBusInterfaceVTable *
xdp_dbus_usb_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_xdp_dbus_usb_skeleton_vtable;
}

static GVariant *
xdp_dbus_usb_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  XdpDbusUsbSkeleton *skeleton = XDP_DBUS_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_dbus_usb_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _xdp_dbus_usb_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _xdp_dbus_usb_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _xdp_dbus_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.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_dbus_usb_emit_changed (gpointer user_data);

static void
xdp_dbus_usb_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
{
  XdpDbusUsbSkeleton *skeleton = XDP_DBUS_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_dbus_usb_emit_changed (skeleton);
}

static void
_xdp_dbus_usb_on_signal_device_events (
    XdpDbusUsb *object,
    const gchar *arg_session_handle,
    GVariant *arg_events)
{
  XdpDbusUsbSkeleton *skeleton = XDP_DBUS_USB_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(ssa{sv}))",
                   arg_session_handle,
                   arg_events));
  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.portal.Usb", "DeviceEvents",
        signal_variant, NULL);
    }
  g_variant_unref (signal_variant);
  g_list_free_full (connections, g_object_unref);
}

static void xdp_dbus_usb_skeleton_iface_init (XdpDbusUsbIface *iface);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpDbusUsbSkeleton, xdp_dbus_usb_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (XdpDbusUsbSkeleton)
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_USB, xdp_dbus_usb_skeleton_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpDbusUsbSkeleton, xdp_dbus_usb_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_USB, xdp_dbus_usb_skeleton_iface_init))

#endif
static void
xdp_dbus_usb_skeleton_finalize (GObject *object)
{
  XdpDbusUsbSkeleton *skeleton = XDP_DBUS_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_dbus_usb_skeleton_parent_class)->finalize (object);
}

static void
xdp_dbus_usb_skeleton_get_property (GObject      *object,
  guint         prop_id,
  GValue       *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  XdpDbusUsbSkeleton *skeleton = XDP_DBUS_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_dbus_usb_emit_changed (gpointer user_data)
{
  XdpDbusUsbSkeleton *skeleton = XDP_DBUS_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.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_dbus_usb_schedule_emit_changed (XdpDbusUsbSkeleton *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_dbus_usb_skeleton_notify (GObject      *object,
  GParamSpec *pspec G_GNUC_UNUSED)
{
  XdpDbusUsbSkeleton *skeleton = XDP_DBUS_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_dbus_usb_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
      g_source_set_name (skeleton->priv->changed_properties_idle_source, "[generated] _xdp_dbus_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_dbus_usb_skeleton_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec)
{
  const _ExtendedGDBusPropertyInfo *info;
  XdpDbusUsbSkeleton *skeleton = XDP_DBUS_USB_SKELETON (object);
  g_assert (prop_id != 0 && prop_id - 1 < 1);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_dbus_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_dbus_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_dbus_usb_skeleton_init (XdpDbusUsbSkeleton *skeleton)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  skeleton->priv = xdp_dbus_usb_skeleton_get_instance_private (skeleton);
#else
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, XDP_DBUS_TYPE_USB_SKELETON, XdpDbusUsbSkeletonPrivate);
#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_dbus_usb_skeleton_get_version (XdpDbusUsb *object)
{
  XdpDbusUsbSkeleton *skeleton = XDP_DBUS_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_dbus_usb_skeleton_class_init (XdpDbusUsbSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize = xdp_dbus_usb_skeleton_finalize;
  gobject_class->get_property = xdp_dbus_usb_skeleton_get_property;
  gobject_class->set_property = xdp_dbus_usb_skeleton_set_property;
  gobject_class->notify       = xdp_dbus_usb_skeleton_notify;


  xdp_dbus_usb_override_properties (gobject_class, 1);

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = xdp_dbus_usb_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = xdp_dbus_usb_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = xdp_dbus_usb_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = xdp_dbus_usb_skeleton_dbus_interface_get_vtable;

#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
  g_type_class_add_private (klass, sizeof (XdpDbusUsbSkeletonPrivate));
#endif
}

static void
xdp_dbus_usb_skeleton_iface_init (XdpDbusUsbIface *iface)
{
  iface->device_events = _xdp_dbus_usb_on_signal_device_events;
  iface->get_version = xdp_dbus_usb_skeleton_get_version;
}

/**
 * xdp_dbus_usb_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-Usb.top_of_page">org.freedesktop.portal.Usb</link>.
 *
 * Returns: (transfer full) (type XdpDbusUsbSkeleton): The skeleton object.
 */
XdpDbusUsb *
xdp_dbus_usb_skeleton_new (void)
{
  return XDP_DBUS_USB (g_object_new (XDP_DBUS_TYPE_USB_SKELETON, NULL));
}

/* ------------------------------------------------------------------------
 * Code for interface org.freedesktop.portal.Wallpaper
 * ------------------------------------------------------------------------
 */

/**
 * SECTION:XdpDbusWallpaper
 * @title: XdpDbusWallpaper
 * @short_description: Generated C code for the org.freedesktop.portal.Wallpaper D-Bus interface
 *
 * This section contains code for working with the <link linkend="gdbus-interface-org-freedesktop-portal-Wallpaper.top_of_page">org.freedesktop.portal.Wallpaper</link> D-Bus interface in C.
 */

/* ---- Introspection data for org.freedesktop.portal.Wallpaper ---- */

static const _ExtendedGDBusArgInfo _xdp_dbus_wallpaper_method_info_set_wallpaper_uri_IN_ARG_parent_window =
{
  {
    -1,
    (gchar *) "parent_window",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_dbus_wallpaper_method_info_set_wallpaper_uri_IN_ARG_uri =
{
  {
    -1,
    (gchar *) "uri",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_dbus_wallpaper_method_info_set_wallpaper_uri_IN_ARG_options =
{
  {
    -1,
    (gchar *) "options",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_dbus_wallpaper_method_info_set_wallpaper_uri_IN_ARG_pointers[] =
{
  &_xdp_dbus_wallpaper_method_info_set_wallpaper_uri_IN_ARG_parent_window.parent_struct,
  &_xdp_dbus_wallpaper_method_info_set_wallpaper_uri_IN_ARG_uri.parent_struct,
  &_xdp_dbus_wallpaper_method_info_set_wallpaper_uri_IN_ARG_options.parent_struct,
  NULL
};

static const _ExtendedGDBusArgInfo _xdp_dbus_wallpaper_method_info_set_wallpaper_uri_OUT_ARG_handle =
{
  {
    -1,
    (gchar *) "handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_dbus_wallpaper_method_info_set_wallpaper_uri_OUT_ARG_pointers[] =
{
  &_xdp_dbus_wallpaper_method_info_set_wallpaper_uri_OUT_ARG_handle.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_dbus_wallpaper_method_set_wallpaper_uri_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.In2",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo * const _xdp_dbus_wallpaper_method_set_wallpaper_uri_annotation_info_pointers[] =
{
  &_xdp_dbus_wallpaper_method_set_wallpaper_uri_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_wallpaper_method_info_set_wallpaper_uri =
{
  {
    -1,
    (gchar *) "SetWallpaperURI",
    (GDBusArgInfo **) &_xdp_dbus_wallpaper_method_info_set_wallpaper_uri_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_wallpaper_method_info_set_wallpaper_uri_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_dbus_wallpaper_method_set_wallpaper_uri_annotation_info_pointers
  },
  "handle-set-wallpaper-uri",
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_dbus_wallpaper_method_info_set_wallpaper_file_IN_ARG_parent_window =
{
  {
    -1,
    (gchar *) "parent_window",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_dbus_wallpaper_method_info_set_wallpaper_file_IN_ARG_fd =
{
  {
    -1,
    (gchar *) "fd",
    (gchar *) "h",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_dbus_wallpaper_method_info_set_wallpaper_file_IN_ARG_options =
{
  {
    -1,
    (gchar *) "options",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_dbus_wallpaper_method_info_set_wallpaper_file_IN_ARG_pointers[] =
{
  &_xdp_dbus_wallpaper_method_info_set_wallpaper_file_IN_ARG_parent_window.parent_struct,
  &_xdp_dbus_wallpaper_method_info_set_wallpaper_file_IN_ARG_fd.parent_struct,
  &_xdp_dbus_wallpaper_method_info_set_wallpaper_file_IN_ARG_options.parent_struct,
  NULL
};

static const _ExtendedGDBusArgInfo _xdp_dbus_wallpaper_method_info_set_wallpaper_file_OUT_ARG_handle =
{
  {
    -1,
    (gchar *) "handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_dbus_wallpaper_method_info_set_wallpaper_file_OUT_ARG_pointers[] =
{
  &_xdp_dbus_wallpaper_method_info_set_wallpaper_file_OUT_ARG_handle.parent_struct,
  NULL
};

static const GDBusAnnotationInfo _xdp_dbus_wallpaper_method_set_wallpaper_file_annotation_info_0 =
{
  -1,
  (gchar *) "org.qtproject.QtDBus.QtTypeName.In2",
  (gchar *) "QVariantMap",
  NULL
};

static const GDBusAnnotationInfo * const _xdp_dbus_wallpaper_method_set_wallpaper_file_annotation_info_pointers[] =
{
  &_xdp_dbus_wallpaper_method_set_wallpaper_file_annotation_info_0,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_wallpaper_method_info_set_wallpaper_file =
{
  {
    -1,
    (gchar *) "SetWallpaperFile",
    (GDBusArgInfo **) &_xdp_dbus_wallpaper_method_info_set_wallpaper_file_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_wallpaper_method_info_set_wallpaper_file_OUT_ARG_pointers,
    (GDBusAnnotationInfo **) &_xdp_dbus_wallpaper_method_set_wallpaper_file_annotation_info_pointers
  },
  "handle-set-wallpaper-file",
  TRUE
};

static const GDBusMethodInfo * const _xdp_dbus_wallpaper_method_info_pointers[] =
{
  &_xdp_dbus_wallpaper_method_info_set_wallpaper_uri.parent_struct,
  &_xdp_dbus_wallpaper_method_info_set_wallpaper_file.parent_struct,
  NULL
};

static const _ExtendedGDBusPropertyInfo _xdp_dbus_wallpaper_property_info_version =
{
  {
    -1,
    (gchar *) "version",
    (gchar *) "u",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "version",
  FALSE,
  TRUE
};

static const GDBusPropertyInfo * const _xdp_dbus_wallpaper_property_info_pointers[] =
{
  &_xdp_dbus_wallpaper_property_info_version.parent_struct,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _xdp_dbus_wallpaper_interface_info =
{
  {
    -1,
    (gchar *) "org.freedesktop.portal.Wallpaper",
    (GDBusMethodInfo **) &_xdp_dbus_wallpaper_method_info_pointers,
    NULL,
    (GDBusPropertyInfo **) &_xdp_dbus_wallpaper_property_info_pointers,
    NULL
  },
  "wallpaper",
};


/**
 * xdp_dbus_wallpaper_interface_info:
 *
 * Gets a machine-readable description of the <link linkend="gdbus-interface-org-freedesktop-portal-Wallpaper.top_of_page">org.freedesktop.portal.Wallpaper</link> D-Bus interface.
 *
 * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
 */
GDBusInterfaceInfo *
xdp_dbus_wallpaper_interface_info (void)
{
  return (GDBusInterfaceInfo *) &_xdp_dbus_wallpaper_interface_info.parent_struct;
}

/**
 * xdp_dbus_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 #XdpDbusWallpaper interface for a concrete class.
 * The properties are overridden in the order they are defined.
 *
 * Returns: The last property id.
 */
guint
xdp_dbus_wallpaper_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_dbus_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_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_dbus_wallpaper_method_marshal_set_wallpaper_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_OBJECT_STRING_VARIANT_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}


/**
 * XdpDbusWallpaper:
 *
 * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-Wallpaper.top_of_page">org.freedesktop.portal.Wallpaper</link>.
 */

/**
 * XdpDbusWallpaperIface:
 * @parent_iface: The parent interface.
 * @handle_set_wallpaper_file: Handler for the #XdpDbusWallpaper::handle-set-wallpaper-file signal.
 * @handle_set_wallpaper_uri: Handler for the #XdpDbusWallpaper::handle-set-wallpaper-uri signal.
 * @get_version: Getter for the #XdpDbusWallpaper:version property.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-Wallpaper.top_of_page">org.freedesktop.portal.Wallpaper</link>.
 */

typedef XdpDbusWallpaperIface XdpDbusWallpaperInterface;
G_DEFINE_INTERFACE (XdpDbusWallpaper, xdp_dbus_wallpaper, G_TYPE_OBJECT)

static void
xdp_dbus_wallpaper_default_init (XdpDbusWallpaperIface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * XdpDbusWallpaper::handle-set-wallpaper-uri:
   * @object: A #XdpDbusWallpaper.
   * @invocation: A #GDBusMethodInvocation.
   * @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-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_dbus_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 (XdpDbusWallpaperIface, handle_set_wallpaper_uri),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_wallpaper_method_marshal_set_wallpaper_uri,
    G_TYPE_BOOLEAN,
    4,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_VARIANT);

  /**
   * XdpDbusWallpaper::handle-set-wallpaper-file:
   * @object: A #XdpDbusWallpaper.
   * @invocation: A #GDBusMethodInvocation.
   * @fd_list: (nullable): A #GUnixFDList or %NULL.
   * @arg_parent_window: 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-portal-Wallpaper.SetWallpaperFile">SetWallpaperFile()</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_dbus_wallpaper_complete_set_wallpaper_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-set-wallpaper-file",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpDbusWallpaperIface, handle_set_wallpaper_file),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_wallpaper_method_marshal_set_wallpaper_file,
    G_TYPE_BOOLEAN,
    5,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UNIX_FD_LIST, G_TYPE_STRING, G_TYPE_VARIANT, G_TYPE_VARIANT);

  /* GObject properties for D-Bus properties: */
  /**
   * XdpDbusWallpaper:version:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-portal-Wallpaper.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_dbus_wallpaper_get_version: (skip)
 * @object: A #XdpDbusWallpaper.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-portal-Wallpaper.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_dbus_wallpaper_get_version (XdpDbusWallpaper *object)
{
  g_return_val_if_fail (XDP_DBUS_IS_WALLPAPER (object), 0);

  return XDP_DBUS_WALLPAPER_GET_IFACE (object)->get_version (object);
}

/**
 * xdp_dbus_wallpaper_set_version: (skip)
 * @object: A #XdpDbusWallpaper.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-freedesktop-portal-Wallpaper.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_dbus_wallpaper_set_version (XdpDbusWallpaper *object, guint value)
{
  g_object_set (G_OBJECT (object), "version", value, NULL);
}

/**
 * xdp_dbus_wallpaper_call_set_wallpaper_uri:
 * @proxy: A #XdpDbusWallpaperProxy.
 * @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-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_dbus_wallpaper_call_set_wallpaper_uri_finish() to get the result of the operation.
 *
 * See xdp_dbus_wallpaper_call_set_wallpaper_uri_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_wallpaper_call_set_wallpaper_uri (
    XdpDbusWallpaper *proxy,
    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 ("(ss@a{sv})",
                   arg_parent_window,
                   arg_uri,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_wallpaper_call_set_wallpaper_uri_finish:
 * @proxy: A #XdpDbusWallpaperProxy.
 * @out_handle: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_wallpaper_call_set_wallpaper_uri().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_wallpaper_call_set_wallpaper_uri().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_wallpaper_call_set_wallpaper_uri_finish (
    XdpDbusWallpaper *proxy,
    gchar ** out_handle,
    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,
                 "(o)",
                 out_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_wallpaper_call_set_wallpaper_uri_sync:
 * @proxy: A #XdpDbusWallpaperProxy.
 * @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_handle: (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-portal-Wallpaper.SetWallpaperURI">SetWallpaperURI()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_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_dbus_wallpaper_call_set_wallpaper_uri_sync (
    XdpDbusWallpaper *proxy,
    const gchar *arg_parent_window,
    const gchar *arg_uri,
    GVariant *arg_options,
    gchar ** out_handle,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "SetWallpaperURI",
    g_variant_new ("(ss@a{sv})",
                   arg_parent_window,
                   arg_uri,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(o)",
                 out_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_wallpaper_call_set_wallpaper_file:
 * @proxy: A #XdpDbusWallpaperProxy.
 * @arg_parent_window: 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-portal-Wallpaper.SetWallpaperFile">SetWallpaperFile()</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_dbus_wallpaper_call_set_wallpaper_file_finish() to get the result of the operation.
 *
 * See xdp_dbus_wallpaper_call_set_wallpaper_file_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_wallpaper_call_set_wallpaper_file (
    XdpDbusWallpaper *proxy,
    const gchar *arg_parent_window,
    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),
    "SetWallpaperFile",
    g_variant_new ("(s@h@a{sv})",
                   arg_parent_window,
                   arg_fd,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    fd_list,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_wallpaper_call_set_wallpaper_file_finish:
 * @proxy: A #XdpDbusWallpaperProxy.
 * @out_handle: (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_dbus_wallpaper_call_set_wallpaper_file().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_wallpaper_call_set_wallpaper_file().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_wallpaper_call_set_wallpaper_file_finish (
    XdpDbusWallpaper *proxy,
    gchar ** out_handle,
    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,
                 "(o)",
                 out_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_wallpaper_call_set_wallpaper_file_sync:
 * @proxy: A #XdpDbusWallpaperProxy.
 * @arg_parent_window: 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_handle: (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-portal-Wallpaper.SetWallpaperFile">SetWallpaperFile()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_wallpaper_call_set_wallpaper_file() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_wallpaper_call_set_wallpaper_file_sync (
    XdpDbusWallpaper *proxy,
    const gchar *arg_parent_window,
    GVariant *arg_fd,
    GVariant *arg_options,
    GUnixFDList  *fd_list,
    gchar ** out_handle,
    GUnixFDList **out_fd_list,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_with_unix_fd_list_sync (G_DBUS_PROXY (proxy),
    "SetWallpaperFile",
    g_variant_new ("(s@h@a{sv})",
                   arg_parent_window,
                   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,
                 "(o)",
                 out_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_wallpaper_complete_set_wallpaper_uri:
 * @object: A #XdpDbusWallpaper.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @handle: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-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_dbus_wallpaper_complete_set_wallpaper_uri (
    XdpDbusWallpaper *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    const gchar *handle)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(o)",
                   handle));
}

/**
 * xdp_dbus_wallpaper_complete_set_wallpaper_file:
 * @object: A #XdpDbusWallpaper.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @fd_list: (nullable): A #GUnixFDList or %NULL.
 * @handle: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-portal-Wallpaper.SetWallpaperFile">SetWallpaperFile()</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_dbus_wallpaper_complete_set_wallpaper_file (
    XdpDbusWallpaper *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    GUnixFDList *fd_list,
    const gchar *handle)
{
  g_dbus_method_invocation_return_value_with_unix_fd_list (invocation,
    g_variant_new ("(o)",
                   handle),
    fd_list);
}

/* ------------------------------------------------------------------------ */

/**
 * XdpDbusWallpaperProxy:
 *
 * The #XdpDbusWallpaperProxy structure contains only private data and should only be accessed using the provided API.
 */

/**
 * XdpDbusWallpaperProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpDbusWallpaperProxy.
 */

struct _XdpDbusWallpaperProxyPrivate
{
  GData *qdata;
};

static void xdp_dbus_wallpaper_proxy_iface_init (XdpDbusWallpaperIface *iface);

#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpDbusWallpaperProxy, xdp_dbus_wallpaper_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (XdpDbusWallpaperProxy)
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_WALLPAPER, xdp_dbus_wallpaper_proxy_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpDbusWallpaperProxy, xdp_dbus_wallpaper_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_WALLPAPER, xdp_dbus_wallpaper_proxy_iface_init))

#endif
static void
xdp_dbus_wallpaper_proxy_finalize (GObject *object)
{
  XdpDbusWallpaperProxy *proxy = XDP_DBUS_WALLPAPER_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (xdp_dbus_wallpaper_proxy_parent_class)->finalize (object);
}

static void
xdp_dbus_wallpaper_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_dbus_wallpaper_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_dbus_wallpaper_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.portal.Wallpaper: %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_dbus_wallpaper_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_dbus_wallpaper_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.portal.Wallpaper", info->parent_struct.name, variant),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    NULL, (GAsyncReadyCallback) xdp_dbus_wallpaper_proxy_set_property_cb, (GDBusPropertyInfo *) &info->parent_struct);
  g_variant_unref (variant);
}

static void
xdp_dbus_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_dbus_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_DBUS_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_DBUS_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_dbus_wallpaper_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  XdpDbusWallpaperProxy *proxy = XDP_DBUS_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_dbus_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_dbus_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 guint 
xdp_dbus_wallpaper_proxy_get_version (XdpDbusWallpaper *object)
{
  XdpDbusWallpaperProxy *proxy = XDP_DBUS_WALLPAPER_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_dbus_wallpaper_proxy_init (XdpDbusWallpaperProxy *proxy)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  proxy->priv = xdp_dbus_wallpaper_proxy_get_instance_private (proxy);
#else
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, XDP_DBUS_TYPE_WALLPAPER_PROXY, XdpDbusWallpaperProxyPrivate);
#endif

  g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), xdp_dbus_wallpaper_interface_info ());
}

static void
xdp_dbus_wallpaper_proxy_class_init (XdpDbusWallpaperProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = xdp_dbus_wallpaper_proxy_finalize;
  gobject_class->get_property = xdp_dbus_wallpaper_proxy_get_property;
  gobject_class->set_property = xdp_dbus_wallpaper_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = xdp_dbus_wallpaper_proxy_g_signal;
  proxy_class->g_properties_changed = xdp_dbus_wallpaper_proxy_g_properties_changed;

  xdp_dbus_wallpaper_override_properties (gobject_class, 1);

#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
  g_type_class_add_private (klass, sizeof (XdpDbusWallpaperProxyPrivate));
#endif
}

static void
xdp_dbus_wallpaper_proxy_iface_init (XdpDbusWallpaperIface *iface)
{
  iface->get_version = xdp_dbus_wallpaper_proxy_get_version;
}

/**
 * xdp_dbus_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-portal-Wallpaper.top_of_page">org.freedesktop.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_dbus_wallpaper_proxy_new_finish() to get the result of the operation.
 *
 * See xdp_dbus_wallpaper_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_dbus_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_DBUS_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.portal.Wallpaper", NULL);
}

/**
 * xdp_dbus_wallpaper_proxy_new_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_wallpaper_proxy_new().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_dbus_wallpaper_proxy_new().
 *
 * Returns: (transfer full) (type XdpDbusWallpaperProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusWallpaper *
xdp_dbus_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_DBUS_WALLPAPER (ret);
  else
    return NULL;
}

/**
 * xdp_dbus_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-portal-Wallpaper.top_of_page">org.freedesktop.portal.Wallpaper</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_wallpaper_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpDbusWallpaperProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusWallpaper *
xdp_dbus_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_DBUS_TYPE_WALLPAPER_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.portal.Wallpaper", NULL);
  if (ret != NULL)
    return XDP_DBUS_WALLPAPER (ret);
  else
    return NULL;
}


/**
 * xdp_dbus_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_dbus_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_dbus_wallpaper_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See xdp_dbus_wallpaper_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_dbus_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_DBUS_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.portal.Wallpaper", NULL);
}

/**
 * xdp_dbus_wallpaper_proxy_new_for_bus_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_wallpaper_proxy_new_for_bus().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_dbus_wallpaper_proxy_new_for_bus().
 *
 * Returns: (transfer full) (type XdpDbusWallpaperProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusWallpaper *
xdp_dbus_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_DBUS_WALLPAPER (ret);
  else
    return NULL;
}

/**
 * xdp_dbus_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_dbus_wallpaper_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_wallpaper_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpDbusWallpaperProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusWallpaper *
xdp_dbus_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_DBUS_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.portal.Wallpaper", NULL);
  if (ret != NULL)
    return XDP_DBUS_WALLPAPER (ret);
  else
    return NULL;
}


/* ------------------------------------------------------------------------ */

/**
 * XdpDbusWallpaperSkeleton:
 *
 * The #XdpDbusWallpaperSkeleton structure contains only private data and should only be accessed using the provided API.
 */

/**
 * XdpDbusWallpaperSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpDbusWallpaperSkeleton.
 */

struct _XdpDbusWallpaperSkeletonPrivate
{
  GValue *properties;
  GList *changed_properties;
  GSource *changed_properties_idle_source;
  GMainContext *context;
  GMutex lock;
};

static void
_xdp_dbus_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)
{
  XdpDbusWallpaperSkeleton *skeleton = XDP_DBUS_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_DBUS_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_DBUS_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_dbus_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)
{
  XdpDbusWallpaperSkeleton *skeleton = XDP_DBUS_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_dbus_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_dbus_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)
{
  XdpDbusWallpaperSkeleton *skeleton = XDP_DBUS_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_dbus_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_dbus_wallpaper_skeleton_vtable =
{
  _xdp_dbus_wallpaper_skeleton_handle_method_call,
  _xdp_dbus_wallpaper_skeleton_handle_get_property,
  _xdp_dbus_wallpaper_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
xdp_dbus_wallpaper_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return xdp_dbus_wallpaper_interface_info ();
}

static GDBusInterfaceVTable *
xdp_dbus_wallpaper_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_xdp_dbus_wallpaper_skeleton_vtable;
}

static GVariant *
xdp_dbus_wallpaper_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  XdpDbusWallpaperSkeleton *skeleton = XDP_DBUS_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_dbus_wallpaper_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _xdp_dbus_wallpaper_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _xdp_dbus_wallpaper_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _xdp_dbus_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.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 gboolean _xdp_dbus_wallpaper_emit_changed (gpointer user_data);

static void
xdp_dbus_wallpaper_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
{
  XdpDbusWallpaperSkeleton *skeleton = XDP_DBUS_WALLPAPER_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_dbus_wallpaper_emit_changed (skeleton);
}

static void xdp_dbus_wallpaper_skeleton_iface_init (XdpDbusWallpaperIface *iface);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpDbusWallpaperSkeleton, xdp_dbus_wallpaper_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (XdpDbusWallpaperSkeleton)
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_WALLPAPER, xdp_dbus_wallpaper_skeleton_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpDbusWallpaperSkeleton, xdp_dbus_wallpaper_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_WALLPAPER, xdp_dbus_wallpaper_skeleton_iface_init))

#endif
static void
xdp_dbus_wallpaper_skeleton_finalize (GObject *object)
{
  XdpDbusWallpaperSkeleton *skeleton = XDP_DBUS_WALLPAPER_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_dbus_wallpaper_skeleton_parent_class)->finalize (object);
}

static void
xdp_dbus_wallpaper_skeleton_get_property (GObject      *object,
  guint         prop_id,
  GValue       *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  XdpDbusWallpaperSkeleton *skeleton = XDP_DBUS_WALLPAPER_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_dbus_wallpaper_emit_changed (gpointer user_data)
{
  XdpDbusWallpaperSkeleton *skeleton = XDP_DBUS_WALLPAPER_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.portal.Wallpaper",
                                           &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_dbus_wallpaper_schedule_emit_changed (XdpDbusWallpaperSkeleton *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_dbus_wallpaper_skeleton_notify (GObject      *object,
  GParamSpec *pspec G_GNUC_UNUSED)
{
  XdpDbusWallpaperSkeleton *skeleton = XDP_DBUS_WALLPAPER_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_dbus_wallpaper_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
      g_source_set_name (skeleton->priv->changed_properties_idle_source, "[generated] _xdp_dbus_wallpaper_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_dbus_wallpaper_skeleton_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec)
{
  const _ExtendedGDBusPropertyInfo *info;
  XdpDbusWallpaperSkeleton *skeleton = XDP_DBUS_WALLPAPER_SKELETON (object);
  g_assert (prop_id != 0 && prop_id - 1 < 1);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_dbus_wallpaper_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_dbus_wallpaper_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_dbus_wallpaper_skeleton_init (XdpDbusWallpaperSkeleton *skeleton)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  skeleton->priv = xdp_dbus_wallpaper_skeleton_get_instance_private (skeleton);
#else
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, XDP_DBUS_TYPE_WALLPAPER_SKELETON, XdpDbusWallpaperSkeletonPrivate);
#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_dbus_wallpaper_skeleton_get_version (XdpDbusWallpaper *object)
{
  XdpDbusWallpaperSkeleton *skeleton = XDP_DBUS_WALLPAPER_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_dbus_wallpaper_skeleton_class_init (XdpDbusWallpaperSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize = xdp_dbus_wallpaper_skeleton_finalize;
  gobject_class->get_property = xdp_dbus_wallpaper_skeleton_get_property;
  gobject_class->set_property = xdp_dbus_wallpaper_skeleton_set_property;
  gobject_class->notify       = xdp_dbus_wallpaper_skeleton_notify;


  xdp_dbus_wallpaper_override_properties (gobject_class, 1);

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = xdp_dbus_wallpaper_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = xdp_dbus_wallpaper_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = xdp_dbus_wallpaper_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = xdp_dbus_wallpaper_skeleton_dbus_interface_get_vtable;

#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
  g_type_class_add_private (klass, sizeof (XdpDbusWallpaperSkeletonPrivate));
#endif
}

static void
xdp_dbus_wallpaper_skeleton_iface_init (XdpDbusWallpaperIface *iface)
{
  iface->get_version = xdp_dbus_wallpaper_skeleton_get_version;
}

/**
 * xdp_dbus_wallpaper_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-Wallpaper.top_of_page">org.freedesktop.portal.Wallpaper</link>.
 *
 * Returns: (transfer full) (type XdpDbusWallpaperSkeleton): The skeleton object.
 */
XdpDbusWallpaper *
xdp_dbus_wallpaper_skeleton_new (void)
{
  return XDP_DBUS_WALLPAPER (g_object_new (XDP_DBUS_TYPE_WALLPAPER_SKELETON, NULL));
}

/* ------------------------------------------------------------------------
 * Code for interface org.freedesktop.portal.Flatpak
 * ------------------------------------------------------------------------
 */

/**
 * SECTION:XdpDbusFlatpak
 * @title: XdpDbusFlatpak
 * @short_description: Generated C code for the org.freedesktop.portal.Flatpak D-Bus interface
 *
 * This section contains code for working with the <link linkend="gdbus-interface-org-freedesktop-portal-Flatpak.top_of_page">org.freedesktop.portal.Flatpak</link> D-Bus interface in C.
 */

enum
{
  XDP_DBUS__FLATPAK_SPAWN_STARTED,
  XDP_DBUS__FLATPAK_SPAWN_EXITED,
};

static unsigned XDP_DBUS__FLATPAK_SIGNALS[2] = { 0 };

/* ---- Introspection data for org.freedesktop.portal.Flatpak ---- */

static const _ExtendedGDBusArgInfo _xdp_dbus_flatpak_method_info_spawn_IN_ARG_cwd_path =
{
  {
    -1,
    (gchar *) "cwd_path",
    (gchar *) "ay",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_dbus_flatpak_method_info_spawn_IN_ARG_argv =
{
  {
    -1,
    (gchar *) "argv",
    (gchar *) "aay",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_dbus_flatpak_method_info_spawn_IN_ARG_fds =
{
  {
    -1,
    (gchar *) "fds",
    (gchar *) "a{uh}",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_dbus_flatpak_method_info_spawn_IN_ARG_envs =
{
  {
    -1,
    (gchar *) "envs",
    (gchar *) "a{ss}",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_dbus_flatpak_method_info_spawn_IN_ARG_flags =
{
  {
    -1,
    (gchar *) "flags",
    (gchar *) "u",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_dbus_flatpak_method_info_spawn_IN_ARG_options =
{
  {
    -1,
    (gchar *) "options",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_dbus_flatpak_method_info_spawn_IN_ARG_pointers[] =
{
  &_xdp_dbus_flatpak_method_info_spawn_IN_ARG_cwd_path.parent_struct,
  &_xdp_dbus_flatpak_method_info_spawn_IN_ARG_argv.parent_struct,
  &_xdp_dbus_flatpak_method_info_spawn_IN_ARG_fds.parent_struct,
  &_xdp_dbus_flatpak_method_info_spawn_IN_ARG_envs.parent_struct,
  &_xdp_dbus_flatpak_method_info_spawn_IN_ARG_flags.parent_struct,
  &_xdp_dbus_flatpak_method_info_spawn_IN_ARG_options.parent_struct,
  NULL
};

static const _ExtendedGDBusArgInfo _xdp_dbus_flatpak_method_info_spawn_OUT_ARG_pid =
{
  {
    -1,
    (gchar *) "pid",
    (gchar *) "u",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_dbus_flatpak_method_info_spawn_OUT_ARG_pointers[] =
{
  &_xdp_dbus_flatpak_method_info_spawn_OUT_ARG_pid.parent_struct,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_flatpak_method_info_spawn =
{
  {
    -1,
    (gchar *) "Spawn",
    (GDBusArgInfo **) &_xdp_dbus_flatpak_method_info_spawn_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_flatpak_method_info_spawn_OUT_ARG_pointers,
    NULL
  },
  "handle-spawn",
  TRUE
};

static const _ExtendedGDBusArgInfo _xdp_dbus_flatpak_method_info_spawn_signal_IN_ARG_pid =
{
  {
    -1,
    (gchar *) "pid",
    (gchar *) "u",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_dbus_flatpak_method_info_spawn_signal_IN_ARG_signal =
{
  {
    -1,
    (gchar *) "signal",
    (gchar *) "u",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_dbus_flatpak_method_info_spawn_signal_IN_ARG_to_process_group =
{
  {
    -1,
    (gchar *) "to_process_group",
    (gchar *) "b",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_dbus_flatpak_method_info_spawn_signal_IN_ARG_pointers[] =
{
  &_xdp_dbus_flatpak_method_info_spawn_signal_IN_ARG_pid.parent_struct,
  &_xdp_dbus_flatpak_method_info_spawn_signal_IN_ARG_signal.parent_struct,
  &_xdp_dbus_flatpak_method_info_spawn_signal_IN_ARG_to_process_group.parent_struct,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_flatpak_method_info_spawn_signal =
{
  {
    -1,
    (gchar *) "SpawnSignal",
    (GDBusArgInfo **) &_xdp_dbus_flatpak_method_info_spawn_signal_IN_ARG_pointers,
    NULL,
    NULL
  },
  "handle-spawn-signal",
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_dbus_flatpak_method_info_create_update_monitor_IN_ARG_options =
{
  {
    -1,
    (gchar *) "options",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_dbus_flatpak_method_info_create_update_monitor_IN_ARG_pointers[] =
{
  &_xdp_dbus_flatpak_method_info_create_update_monitor_IN_ARG_options.parent_struct,
  NULL
};

static const _ExtendedGDBusArgInfo _xdp_dbus_flatpak_method_info_create_update_monitor_OUT_ARG_handle =
{
  {
    -1,
    (gchar *) "handle",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_dbus_flatpak_method_info_create_update_monitor_OUT_ARG_pointers[] =
{
  &_xdp_dbus_flatpak_method_info_create_update_monitor_OUT_ARG_handle.parent_struct,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_flatpak_method_info_create_update_monitor =
{
  {
    -1,
    (gchar *) "CreateUpdateMonitor",
    (GDBusArgInfo **) &_xdp_dbus_flatpak_method_info_create_update_monitor_IN_ARG_pointers,
    (GDBusArgInfo **) &_xdp_dbus_flatpak_method_info_create_update_monitor_OUT_ARG_pointers,
    NULL
  },
  "handle-create-update-monitor",
  FALSE
};

static const GDBusMethodInfo * const _xdp_dbus_flatpak_method_info_pointers[] =
{
  &_xdp_dbus_flatpak_method_info_spawn.parent_struct,
  &_xdp_dbus_flatpak_method_info_spawn_signal.parent_struct,
  &_xdp_dbus_flatpak_method_info_create_update_monitor.parent_struct,
  NULL
};

static const _ExtendedGDBusArgInfo _xdp_dbus_flatpak_signal_info_spawn_started_ARG_pid =
{
  {
    -1,
    (gchar *) "pid",
    (gchar *) "u",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_dbus_flatpak_signal_info_spawn_started_ARG_relpid =
{
  {
    -1,
    (gchar *) "relpid",
    (gchar *) "u",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_dbus_flatpak_signal_info_spawn_started_ARG_pointers[] =
{
  &_xdp_dbus_flatpak_signal_info_spawn_started_ARG_pid.parent_struct,
  &_xdp_dbus_flatpak_signal_info_spawn_started_ARG_relpid.parent_struct,
  NULL
};

static const _ExtendedGDBusSignalInfo _xdp_dbus_flatpak_signal_info_spawn_started =
{
  {
    -1,
    (gchar *) "SpawnStarted",
    (GDBusArgInfo **) &_xdp_dbus_flatpak_signal_info_spawn_started_ARG_pointers,
    NULL
  },
  "spawn-started"
};

static const _ExtendedGDBusArgInfo _xdp_dbus_flatpak_signal_info_spawn_exited_ARG_pid =
{
  {
    -1,
    (gchar *) "pid",
    (gchar *) "u",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_dbus_flatpak_signal_info_spawn_exited_ARG_exit_status =
{
  {
    -1,
    (gchar *) "exit_status",
    (gchar *) "u",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_dbus_flatpak_signal_info_spawn_exited_ARG_pointers[] =
{
  &_xdp_dbus_flatpak_signal_info_spawn_exited_ARG_pid.parent_struct,
  &_xdp_dbus_flatpak_signal_info_spawn_exited_ARG_exit_status.parent_struct,
  NULL
};

static const _ExtendedGDBusSignalInfo _xdp_dbus_flatpak_signal_info_spawn_exited =
{
  {
    -1,
    (gchar *) "SpawnExited",
    (GDBusArgInfo **) &_xdp_dbus_flatpak_signal_info_spawn_exited_ARG_pointers,
    NULL
  },
  "spawn-exited"
};

static const GDBusSignalInfo * const _xdp_dbus_flatpak_signal_info_pointers[] =
{
  &_xdp_dbus_flatpak_signal_info_spawn_started.parent_struct,
  &_xdp_dbus_flatpak_signal_info_spawn_exited.parent_struct,
  NULL
};

static const _ExtendedGDBusPropertyInfo _xdp_dbus_flatpak_property_info_version =
{
  {
    -1,
    (gchar *) "version",
    (gchar *) "u",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "version",
  FALSE,
  TRUE
};

static const _ExtendedGDBusPropertyInfo _xdp_dbus_flatpak_property_info_supports =
{
  {
    -1,
    (gchar *) "supports",
    (gchar *) "u",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "supports",
  FALSE,
  TRUE
};

static const GDBusPropertyInfo * const _xdp_dbus_flatpak_property_info_pointers[] =
{
  &_xdp_dbus_flatpak_property_info_version.parent_struct,
  &_xdp_dbus_flatpak_property_info_supports.parent_struct,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _xdp_dbus_flatpak_interface_info =
{
  {
    -1,
    (gchar *) "org.freedesktop.portal.Flatpak",
    (GDBusMethodInfo **) &_xdp_dbus_flatpak_method_info_pointers,
    (GDBusSignalInfo **) &_xdp_dbus_flatpak_signal_info_pointers,
    (GDBusPropertyInfo **) &_xdp_dbus_flatpak_property_info_pointers,
    NULL
  },
  "flatpak",
};


/**
 * xdp_dbus_flatpak_interface_info:
 *
 * Gets a machine-readable description of the <link linkend="gdbus-interface-org-freedesktop-portal-Flatpak.top_of_page">org.freedesktop.portal.Flatpak</link> D-Bus interface.
 *
 * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
 */
GDBusInterfaceInfo *
xdp_dbus_flatpak_interface_info (void)
{
  return (GDBusInterfaceInfo *) &_xdp_dbus_flatpak_interface_info.parent_struct;
}

/**
 * xdp_dbus_flatpak_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 #XdpDbusFlatpak interface for a concrete class.
 * The properties are overridden in the order they are defined.
 *
 * Returns: The last property id.
 */
guint
xdp_dbus_flatpak_override_properties (GObjectClass *klass, guint property_id_begin)
{
  g_object_class_override_property (klass, property_id_begin++, "version");
  g_object_class_override_property (klass, property_id_begin++, "supports");
  return property_id_begin - 1;
}


inline static void
xdp_dbus_flatpak_signal_marshal_spawn_started (
    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__UINT_UINT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_dbus_flatpak_signal_marshal_spawn_exited (
    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__UINT_UINT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_dbus_flatpak_method_marshal_spawn (
    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_BOXED_VARIANT_VARIANT_UINT_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_dbus_flatpak_method_marshal_spawn_signal (
    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_UINT_UINT_BOOLEAN (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_dbus_flatpak_method_marshal_create_update_monitor (
    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_VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}


/**
 * XdpDbusFlatpak:
 *
 * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-Flatpak.top_of_page">org.freedesktop.portal.Flatpak</link>.
 */

/**
 * XdpDbusFlatpakIface:
 * @parent_iface: The parent interface.
 * @handle_create_update_monitor: Handler for the #XdpDbusFlatpak::handle-create-update-monitor signal.
 * @handle_spawn: Handler for the #XdpDbusFlatpak::handle-spawn signal.
 * @handle_spawn_signal: Handler for the #XdpDbusFlatpak::handle-spawn-signal signal.
 * @get_supports: Getter for the #XdpDbusFlatpak:supports property.
 * @get_version: Getter for the #XdpDbusFlatpak:version property.
 * @spawn_exited: Handler for the #XdpDbusFlatpak::spawn-exited signal.
 * @spawn_started: Handler for the #XdpDbusFlatpak::spawn-started signal.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-Flatpak.top_of_page">org.freedesktop.portal.Flatpak</link>.
 */

typedef XdpDbusFlatpakIface XdpDbusFlatpakInterface;
G_DEFINE_INTERFACE (XdpDbusFlatpak, xdp_dbus_flatpak, G_TYPE_OBJECT)

static void
xdp_dbus_flatpak_default_init (XdpDbusFlatpakIface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * XdpDbusFlatpak::handle-spawn:
   * @object: A #XdpDbusFlatpak.
   * @invocation: A #GDBusMethodInvocation.
   * @fd_list: (nullable): A #GUnixFDList or %NULL.
   * @arg_cwd_path: Argument passed by remote caller.
   * @arg_argv: Argument passed by remote caller.
   * @arg_fds: Argument passed by remote caller.
   * @arg_envs: Argument passed by remote caller.
   * @arg_flags: 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-portal-Flatpak.Spawn">Spawn()</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_dbus_flatpak_complete_spawn() 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-spawn",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpDbusFlatpakIface, handle_spawn),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_flatpak_method_marshal_spawn,
    G_TYPE_BOOLEAN,
    8,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UNIX_FD_LIST, G_TYPE_STRING, G_TYPE_STRV, G_TYPE_VARIANT, G_TYPE_VARIANT, G_TYPE_UINT, G_TYPE_VARIANT);

  /**
   * XdpDbusFlatpak::handle-spawn-signal:
   * @object: A #XdpDbusFlatpak.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_pid: Argument passed by remote caller.
   * @arg_signal: Argument passed by remote caller.
   * @arg_to_process_group: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-portal-Flatpak.SpawnSignal">SpawnSignal()</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_dbus_flatpak_complete_spawn_signal() 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-spawn-signal",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpDbusFlatpakIface, handle_spawn_signal),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_flatpak_method_marshal_spawn_signal,
    G_TYPE_BOOLEAN,
    4,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_BOOLEAN);

  /**
   * XdpDbusFlatpak::handle-create-update-monitor:
   * @object: A #XdpDbusFlatpak.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_options: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-portal-Flatpak.CreateUpdateMonitor">CreateUpdateMonitor()</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_dbus_flatpak_complete_create_update_monitor() 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-update-monitor",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpDbusFlatpakIface, handle_create_update_monitor),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_flatpak_method_marshal_create_update_monitor,
    G_TYPE_BOOLEAN,
    2,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_VARIANT);

  /* GObject signals for received D-Bus signals: */
  /**
   * XdpDbusFlatpak::spawn-started:
   * @object: A #XdpDbusFlatpak.
   * @arg_pid: Argument.
   * @arg_relpid: Argument.
   *
   * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-freedesktop-portal-Flatpak.SpawnStarted">"SpawnStarted"</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_DBUS__FLATPAK_SIGNALS[XDP_DBUS__FLATPAK_SPAWN_STARTED] =
    g_signal_new ("spawn-started",
      G_TYPE_FROM_INTERFACE (iface),
      G_SIGNAL_RUN_LAST,
      G_STRUCT_OFFSET (XdpDbusFlatpakIface, spawn_started),
      NULL,
      NULL,
      xdp_dbus_flatpak_signal_marshal_spawn_started,
      G_TYPE_NONE,
      2, G_TYPE_UINT, G_TYPE_UINT);

  /**
   * XdpDbusFlatpak::spawn-exited:
   * @object: A #XdpDbusFlatpak.
   * @arg_pid: Argument.
   * @arg_exit_status: Argument.
   *
   * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-freedesktop-portal-Flatpak.SpawnExited">"SpawnExited"</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_DBUS__FLATPAK_SIGNALS[XDP_DBUS__FLATPAK_SPAWN_EXITED] =
    g_signal_new ("spawn-exited",
      G_TYPE_FROM_INTERFACE (iface),
      G_SIGNAL_RUN_LAST,
      G_STRUCT_OFFSET (XdpDbusFlatpakIface, spawn_exited),
      NULL,
      NULL,
      xdp_dbus_flatpak_signal_marshal_spawn_exited,
      G_TYPE_NONE,
      2, G_TYPE_UINT, G_TYPE_UINT);

  /* GObject properties for D-Bus properties: */
  /**
   * XdpDbusFlatpak:version:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-portal-Flatpak.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));
  /**
   * XdpDbusFlatpak:supports:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-portal-Flatpak.supports">"supports"</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 ("supports", "supports", "supports", 0, G_MAXUINT32, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
}

/**
 * xdp_dbus_flatpak_get_version: (skip)
 * @object: A #XdpDbusFlatpak.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-portal-Flatpak.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_dbus_flatpak_get_version (XdpDbusFlatpak *object)
{
  g_return_val_if_fail (XDP_DBUS_IS_FLATPAK (object), 0);

  return XDP_DBUS_FLATPAK_GET_IFACE (object)->get_version (object);
}

/**
 * xdp_dbus_flatpak_set_version: (skip)
 * @object: A #XdpDbusFlatpak.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-freedesktop-portal-Flatpak.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_dbus_flatpak_set_version (XdpDbusFlatpak *object, guint value)
{
  g_object_set (G_OBJECT (object), "version", value, NULL);
}

/**
 * xdp_dbus_flatpak_get_supports: (skip)
 * @object: A #XdpDbusFlatpak.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-portal-Flatpak.supports">"supports"</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_dbus_flatpak_get_supports (XdpDbusFlatpak *object)
{
  g_return_val_if_fail (XDP_DBUS_IS_FLATPAK (object), 0);

  return XDP_DBUS_FLATPAK_GET_IFACE (object)->get_supports (object);
}

/**
 * xdp_dbus_flatpak_set_supports: (skip)
 * @object: A #XdpDbusFlatpak.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-freedesktop-portal-Flatpak.supports">"supports"</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_dbus_flatpak_set_supports (XdpDbusFlatpak *object, guint value)
{
  g_object_set (G_OBJECT (object), "supports", value, NULL);
}

/**
 * xdp_dbus_flatpak_emit_spawn_started:
 * @object: A #XdpDbusFlatpak.
 * @arg_pid: Argument to pass with the signal.
 * @arg_relpid: Argument to pass with the signal.
 *
 * Emits the <link linkend="gdbus-signal-org-freedesktop-portal-Flatpak.SpawnStarted">"SpawnStarted"</link> D-Bus signal.
 */
void
xdp_dbus_flatpak_emit_spawn_started (
    XdpDbusFlatpak *object,
    guint arg_pid,
    guint arg_relpid)
{
  g_signal_emit (object, XDP_DBUS__FLATPAK_SIGNALS[XDP_DBUS__FLATPAK_SPAWN_STARTED], 0, arg_pid, arg_relpid);
}

/**
 * xdp_dbus_flatpak_emit_spawn_exited:
 * @object: A #XdpDbusFlatpak.
 * @arg_pid: Argument to pass with the signal.
 * @arg_exit_status: Argument to pass with the signal.
 *
 * Emits the <link linkend="gdbus-signal-org-freedesktop-portal-Flatpak.SpawnExited">"SpawnExited"</link> D-Bus signal.
 */
void
xdp_dbus_flatpak_emit_spawn_exited (
    XdpDbusFlatpak *object,
    guint arg_pid,
    guint arg_exit_status)
{
  g_signal_emit (object, XDP_DBUS__FLATPAK_SIGNALS[XDP_DBUS__FLATPAK_SPAWN_EXITED], 0, arg_pid, arg_exit_status);
}

/**
 * xdp_dbus_flatpak_call_spawn:
 * @proxy: A #XdpDbusFlatpakProxy.
 * @arg_cwd_path: Argument to pass with the method invocation.
 * @arg_argv: Argument to pass with the method invocation.
 * @arg_fds: Argument to pass with the method invocation.
 * @arg_envs: Argument to pass with the method invocation.
 * @arg_flags: 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-portal-Flatpak.Spawn">Spawn()</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_dbus_flatpak_call_spawn_finish() to get the result of the operation.
 *
 * See xdp_dbus_flatpak_call_spawn_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_flatpak_call_spawn (
    XdpDbusFlatpak *proxy,
    const gchar *arg_cwd_path,
    const gchar *const *arg_argv,
    GVariant *arg_fds,
    GVariant *arg_envs,
    guint arg_flags,
    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),
    "Spawn",
    g_variant_new ("(^ay^aay@a{uh}@a{ss}u@a{sv})",
                   arg_cwd_path,
                   arg_argv,
                   arg_fds,
                   arg_envs,
                   arg_flags,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    fd_list,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_flatpak_call_spawn_finish:
 * @proxy: A #XdpDbusFlatpakProxy.
 * @out_pid: (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_dbus_flatpak_call_spawn().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_flatpak_call_spawn().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_flatpak_call_spawn_finish (
    XdpDbusFlatpak *proxy,
    guint* out_pid,
    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)",
                 out_pid);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_flatpak_call_spawn_sync:
 * @proxy: A #XdpDbusFlatpakProxy.
 * @arg_cwd_path: Argument to pass with the method invocation.
 * @arg_argv: Argument to pass with the method invocation.
 * @arg_fds: Argument to pass with the method invocation.
 * @arg_envs: Argument to pass with the method invocation.
 * @arg_flags: Argument to pass with the method invocation.
 * @arg_options: Argument to pass with the method invocation.
 * @fd_list: (nullable): A #GUnixFDList or %NULL.
 * @out_pid: (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-portal-Flatpak.Spawn">Spawn()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_flatpak_call_spawn() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_flatpak_call_spawn_sync (
    XdpDbusFlatpak *proxy,
    const gchar *arg_cwd_path,
    const gchar *const *arg_argv,
    GVariant *arg_fds,
    GVariant *arg_envs,
    guint arg_flags,
    GVariant *arg_options,
    GUnixFDList  *fd_list,
    guint* out_pid,
    GUnixFDList **out_fd_list,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_with_unix_fd_list_sync (G_DBUS_PROXY (proxy),
    "Spawn",
    g_variant_new ("(^ay^aay@a{uh}@a{ss}u@a{sv})",
                   arg_cwd_path,
                   arg_argv,
                   arg_fds,
                   arg_envs,
                   arg_flags,
                   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)",
                 out_pid);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_flatpak_call_spawn_signal:
 * @proxy: A #XdpDbusFlatpakProxy.
 * @arg_pid: Argument to pass with the method invocation.
 * @arg_signal: Argument to pass with the method invocation.
 * @arg_to_process_group: 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-portal-Flatpak.SpawnSignal">SpawnSignal()</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_dbus_flatpak_call_spawn_signal_finish() to get the result of the operation.
 *
 * See xdp_dbus_flatpak_call_spawn_signal_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_flatpak_call_spawn_signal (
    XdpDbusFlatpak *proxy,
    guint arg_pid,
    guint arg_signal,
    gboolean arg_to_process_group,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "SpawnSignal",
    g_variant_new ("(uub)",
                   arg_pid,
                   arg_signal,
                   arg_to_process_group),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_flatpak_call_spawn_signal_finish:
 * @proxy: A #XdpDbusFlatpakProxy.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_flatpak_call_spawn_signal().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_flatpak_call_spawn_signal().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_flatpak_call_spawn_signal_finish (
    XdpDbusFlatpak *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_dbus_flatpak_call_spawn_signal_sync:
 * @proxy: A #XdpDbusFlatpakProxy.
 * @arg_pid: Argument to pass with the method invocation.
 * @arg_signal: Argument to pass with the method invocation.
 * @arg_to_process_group: 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-portal-Flatpak.SpawnSignal">SpawnSignal()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_flatpak_call_spawn_signal() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_flatpak_call_spawn_signal_sync (
    XdpDbusFlatpak *proxy,
    guint arg_pid,
    guint arg_signal,
    gboolean arg_to_process_group,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "SpawnSignal",
    g_variant_new ("(uub)",
                   arg_pid,
                   arg_signal,
                   arg_to_process_group),
    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_dbus_flatpak_call_create_update_monitor:
 * @proxy: A #XdpDbusFlatpakProxy.
 * @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-portal-Flatpak.CreateUpdateMonitor">CreateUpdateMonitor()</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_dbus_flatpak_call_create_update_monitor_finish() to get the result of the operation.
 *
 * See xdp_dbus_flatpak_call_create_update_monitor_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_flatpak_call_create_update_monitor (
    XdpDbusFlatpak *proxy,
    GVariant *arg_options,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "CreateUpdateMonitor",
    g_variant_new ("(@a{sv})",
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_flatpak_call_create_update_monitor_finish:
 * @proxy: A #XdpDbusFlatpakProxy.
 * @out_handle: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_flatpak_call_create_update_monitor().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_flatpak_call_create_update_monitor().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_flatpak_call_create_update_monitor_finish (
    XdpDbusFlatpak *proxy,
    gchar ** out_handle,
    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,
                 "(o)",
                 out_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_flatpak_call_create_update_monitor_sync:
 * @proxy: A #XdpDbusFlatpakProxy.
 * @arg_options: Argument to pass with the method invocation.
 * @out_handle: (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-portal-Flatpak.CreateUpdateMonitor">CreateUpdateMonitor()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_flatpak_call_create_update_monitor() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_flatpak_call_create_update_monitor_sync (
    XdpDbusFlatpak *proxy,
    GVariant *arg_options,
    gchar ** out_handle,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "CreateUpdateMonitor",
    g_variant_new ("(@a{sv})",
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(o)",
                 out_handle);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * xdp_dbus_flatpak_complete_spawn:
 * @object: A #XdpDbusFlatpak.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @fd_list: (nullable): A #GUnixFDList or %NULL.
 * @pid: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-portal-Flatpak.Spawn">Spawn()</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_dbus_flatpak_complete_spawn (
    XdpDbusFlatpak *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    GUnixFDList *fd_list,
    guint pid)
{
  g_dbus_method_invocation_return_value_with_unix_fd_list (invocation,
    g_variant_new ("(u)",
                   pid),
    fd_list);
}

/**
 * xdp_dbus_flatpak_complete_spawn_signal:
 * @object: A #XdpDbusFlatpak.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-portal-Flatpak.SpawnSignal">SpawnSignal()</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_dbus_flatpak_complete_spawn_signal (
    XdpDbusFlatpak *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("()"));
}

/**
 * xdp_dbus_flatpak_complete_create_update_monitor:
 * @object: A #XdpDbusFlatpak.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @handle: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-portal-Flatpak.CreateUpdateMonitor">CreateUpdateMonitor()</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_dbus_flatpak_complete_create_update_monitor (
    XdpDbusFlatpak *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    const gchar *handle)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(o)",
                   handle));
}

/* ------------------------------------------------------------------------ */

/**
 * XdpDbusFlatpakProxy:
 *
 * The #XdpDbusFlatpakProxy structure contains only private data and should only be accessed using the provided API.
 */

/**
 * XdpDbusFlatpakProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpDbusFlatpakProxy.
 */

struct _XdpDbusFlatpakProxyPrivate
{
  GData *qdata;
};

static void xdp_dbus_flatpak_proxy_iface_init (XdpDbusFlatpakIface *iface);

#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpDbusFlatpakProxy, xdp_dbus_flatpak_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (XdpDbusFlatpakProxy)
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_FLATPAK, xdp_dbus_flatpak_proxy_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpDbusFlatpakProxy, xdp_dbus_flatpak_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_FLATPAK, xdp_dbus_flatpak_proxy_iface_init))

#endif
static void
xdp_dbus_flatpak_proxy_finalize (GObject *object)
{
  XdpDbusFlatpakProxy *proxy = XDP_DBUS_FLATPAK_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (xdp_dbus_flatpak_proxy_parent_class)->finalize (object);
}

static void
xdp_dbus_flatpak_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_dbus_flatpak_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_dbus_flatpak_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.portal.Flatpak: %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_dbus_flatpak_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_dbus_flatpak_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.portal.Flatpak", info->parent_struct.name, variant),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    NULL, (GAsyncReadyCallback) xdp_dbus_flatpak_proxy_set_property_cb, (GDBusPropertyInfo *) &info->parent_struct);
  g_variant_unref (variant);
}

static void
xdp_dbus_flatpak_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_dbus_flatpak_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_DBUS_TYPE_FLATPAK);
  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_DBUS_TYPE_FLATPAK);
  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_dbus_flatpak_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  XdpDbusFlatpakProxy *proxy = XDP_DBUS_FLATPAK_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_dbus_flatpak_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_dbus_flatpak_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_dbus_flatpak_proxy_get_version (XdpDbusFlatpak *object)
{
  XdpDbusFlatpakProxy *proxy = XDP_DBUS_FLATPAK_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 guint 
xdp_dbus_flatpak_proxy_get_supports (XdpDbusFlatpak *object)
{
  XdpDbusFlatpakProxy *proxy = XDP_DBUS_FLATPAK_PROXY (object);
  GVariant *variant;
  guint value = 0;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "supports");
  if (variant != NULL)
    {
      value = g_variant_get_uint32 (variant);
      g_variant_unref (variant);
    }
  return value;
}

static void
xdp_dbus_flatpak_proxy_init (XdpDbusFlatpakProxy *proxy)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  proxy->priv = xdp_dbus_flatpak_proxy_get_instance_private (proxy);
#else
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, XDP_DBUS_TYPE_FLATPAK_PROXY, XdpDbusFlatpakProxyPrivate);
#endif

  g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), xdp_dbus_flatpak_interface_info ());
}

static void
xdp_dbus_flatpak_proxy_class_init (XdpDbusFlatpakProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = xdp_dbus_flatpak_proxy_finalize;
  gobject_class->get_property = xdp_dbus_flatpak_proxy_get_property;
  gobject_class->set_property = xdp_dbus_flatpak_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = xdp_dbus_flatpak_proxy_g_signal;
  proxy_class->g_properties_changed = xdp_dbus_flatpak_proxy_g_properties_changed;

  xdp_dbus_flatpak_override_properties (gobject_class, 1);

#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
  g_type_class_add_private (klass, sizeof (XdpDbusFlatpakProxyPrivate));
#endif
}

static void
xdp_dbus_flatpak_proxy_iface_init (XdpDbusFlatpakIface *iface)
{
  iface->get_version = xdp_dbus_flatpak_proxy_get_version;
  iface->get_supports = xdp_dbus_flatpak_proxy_get_supports;
}

/**
 * xdp_dbus_flatpak_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-portal-Flatpak.top_of_page">org.freedesktop.portal.Flatpak</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_dbus_flatpak_proxy_new_finish() to get the result of the operation.
 *
 * See xdp_dbus_flatpak_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_dbus_flatpak_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_DBUS_TYPE_FLATPAK_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.portal.Flatpak", NULL);
}

/**
 * xdp_dbus_flatpak_proxy_new_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_flatpak_proxy_new().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_dbus_flatpak_proxy_new().
 *
 * Returns: (transfer full) (type XdpDbusFlatpakProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusFlatpak *
xdp_dbus_flatpak_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_DBUS_FLATPAK (ret);
  else
    return NULL;
}

/**
 * xdp_dbus_flatpak_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-portal-Flatpak.top_of_page">org.freedesktop.portal.Flatpak</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_flatpak_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpDbusFlatpakProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusFlatpak *
xdp_dbus_flatpak_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_DBUS_TYPE_FLATPAK_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.portal.Flatpak", NULL);
  if (ret != NULL)
    return XDP_DBUS_FLATPAK (ret);
  else
    return NULL;
}


/**
 * xdp_dbus_flatpak_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_dbus_flatpak_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_dbus_flatpak_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See xdp_dbus_flatpak_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_dbus_flatpak_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_DBUS_TYPE_FLATPAK_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.portal.Flatpak", NULL);
}

/**
 * xdp_dbus_flatpak_proxy_new_for_bus_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_flatpak_proxy_new_for_bus().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_dbus_flatpak_proxy_new_for_bus().
 *
 * Returns: (transfer full) (type XdpDbusFlatpakProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusFlatpak *
xdp_dbus_flatpak_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_DBUS_FLATPAK (ret);
  else
    return NULL;
}

/**
 * xdp_dbus_flatpak_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_dbus_flatpak_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_flatpak_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpDbusFlatpakProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusFlatpak *
xdp_dbus_flatpak_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_DBUS_TYPE_FLATPAK_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.portal.Flatpak", NULL);
  if (ret != NULL)
    return XDP_DBUS_FLATPAK (ret);
  else
    return NULL;
}


/* ------------------------------------------------------------------------ */

/**
 * XdpDbusFlatpakSkeleton:
 *
 * The #XdpDbusFlatpakSkeleton structure contains only private data and should only be accessed using the provided API.
 */

/**
 * XdpDbusFlatpakSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpDbusFlatpakSkeleton.
 */

struct _XdpDbusFlatpakSkeletonPrivate
{
  GValue *properties;
  GList *changed_properties;
  GSource *changed_properties_idle_source;
  GMainContext *context;
  GMutex lock;
};

static void
_xdp_dbus_flatpak_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)
{
  XdpDbusFlatpakSkeleton *skeleton = XDP_DBUS_FLATPAK_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_DBUS_TYPE_FLATPAK);
  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_DBUS_TYPE_FLATPAK);
  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_dbus_flatpak_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)
{
  XdpDbusFlatpakSkeleton *skeleton = XDP_DBUS_FLATPAK_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_dbus_flatpak_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_dbus_flatpak_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)
{
  XdpDbusFlatpakSkeleton *skeleton = XDP_DBUS_FLATPAK_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_dbus_flatpak_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_dbus_flatpak_skeleton_vtable =
{
  _xdp_dbus_flatpak_skeleton_handle_method_call,
  _xdp_dbus_flatpak_skeleton_handle_get_property,
  _xdp_dbus_flatpak_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
xdp_dbus_flatpak_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return xdp_dbus_flatpak_interface_info ();
}

static GDBusInterfaceVTable *
xdp_dbus_flatpak_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_xdp_dbus_flatpak_skeleton_vtable;
}

static GVariant *
xdp_dbus_flatpak_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  XdpDbusFlatpakSkeleton *skeleton = XDP_DBUS_FLATPAK_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_dbus_flatpak_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _xdp_dbus_flatpak_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _xdp_dbus_flatpak_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _xdp_dbus_flatpak_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.portal.Flatpak", 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_dbus_flatpak_emit_changed (gpointer user_data);

static void
xdp_dbus_flatpak_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
{
  XdpDbusFlatpakSkeleton *skeleton = XDP_DBUS_FLATPAK_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_dbus_flatpak_emit_changed (skeleton);
}

static void
_xdp_dbus_flatpak_on_signal_spawn_started (
    XdpDbusFlatpak *object,
    guint arg_pid,
    guint arg_relpid)
{
  XdpDbusFlatpakSkeleton *skeleton = XDP_DBUS_FLATPAK_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 ("(uu)",
                   arg_pid,
                   arg_relpid));
  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.portal.Flatpak", "SpawnStarted",
        signal_variant, NULL);
    }
  g_variant_unref (signal_variant);
  g_list_free_full (connections, g_object_unref);
}

static void
_xdp_dbus_flatpak_on_signal_spawn_exited (
    XdpDbusFlatpak *object,
    guint arg_pid,
    guint arg_exit_status)
{
  XdpDbusFlatpakSkeleton *skeleton = XDP_DBUS_FLATPAK_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 ("(uu)",
                   arg_pid,
                   arg_exit_status));
  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.portal.Flatpak", "SpawnExited",
        signal_variant, NULL);
    }
  g_variant_unref (signal_variant);
  g_list_free_full (connections, g_object_unref);
}

static void xdp_dbus_flatpak_skeleton_iface_init (XdpDbusFlatpakIface *iface);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpDbusFlatpakSkeleton, xdp_dbus_flatpak_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (XdpDbusFlatpakSkeleton)
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_FLATPAK, xdp_dbus_flatpak_skeleton_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpDbusFlatpakSkeleton, xdp_dbus_flatpak_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_FLATPAK, xdp_dbus_flatpak_skeleton_iface_init))

#endif
static void
xdp_dbus_flatpak_skeleton_finalize (GObject *object)
{
  XdpDbusFlatpakSkeleton *skeleton = XDP_DBUS_FLATPAK_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_dbus_flatpak_skeleton_parent_class)->finalize (object);
}

static void
xdp_dbus_flatpak_skeleton_get_property (GObject      *object,
  guint         prop_id,
  GValue       *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  XdpDbusFlatpakSkeleton *skeleton = XDP_DBUS_FLATPAK_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_dbus_flatpak_emit_changed (gpointer user_data)
{
  XdpDbusFlatpakSkeleton *skeleton = XDP_DBUS_FLATPAK_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.portal.Flatpak",
                                           &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_dbus_flatpak_schedule_emit_changed (XdpDbusFlatpakSkeleton *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_dbus_flatpak_skeleton_notify (GObject      *object,
  GParamSpec *pspec G_GNUC_UNUSED)
{
  XdpDbusFlatpakSkeleton *skeleton = XDP_DBUS_FLATPAK_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_dbus_flatpak_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
      g_source_set_name (skeleton->priv->changed_properties_idle_source, "[generated] _xdp_dbus_flatpak_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_dbus_flatpak_skeleton_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec)
{
  const _ExtendedGDBusPropertyInfo *info;
  XdpDbusFlatpakSkeleton *skeleton = XDP_DBUS_FLATPAK_SKELETON (object);
  g_assert (prop_id != 0 && prop_id - 1 < 2);
  info = (const _ExtendedGDBusPropertyInfo *) _xdp_dbus_flatpak_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_dbus_flatpak_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_dbus_flatpak_skeleton_init (XdpDbusFlatpakSkeleton *skeleton)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  skeleton->priv = xdp_dbus_flatpak_skeleton_get_instance_private (skeleton);
#else
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, XDP_DBUS_TYPE_FLATPAK_SKELETON, XdpDbusFlatpakSkeletonPrivate);
#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_dbus_flatpak_skeleton_get_version (XdpDbusFlatpak *object)
{
  XdpDbusFlatpakSkeleton *skeleton = XDP_DBUS_FLATPAK_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_dbus_flatpak_skeleton_get_supports (XdpDbusFlatpak *object)
{
  XdpDbusFlatpakSkeleton *skeleton = XDP_DBUS_FLATPAK_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_dbus_flatpak_skeleton_class_init (XdpDbusFlatpakSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize = xdp_dbus_flatpak_skeleton_finalize;
  gobject_class->get_property = xdp_dbus_flatpak_skeleton_get_property;
  gobject_class->set_property = xdp_dbus_flatpak_skeleton_set_property;
  gobject_class->notify       = xdp_dbus_flatpak_skeleton_notify;


  xdp_dbus_flatpak_override_properties (gobject_class, 1);

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = xdp_dbus_flatpak_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = xdp_dbus_flatpak_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = xdp_dbus_flatpak_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = xdp_dbus_flatpak_skeleton_dbus_interface_get_vtable;

#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
  g_type_class_add_private (klass, sizeof (XdpDbusFlatpakSkeletonPrivate));
#endif
}

static void
xdp_dbus_flatpak_skeleton_iface_init (XdpDbusFlatpakIface *iface)
{
  iface->spawn_started = _xdp_dbus_flatpak_on_signal_spawn_started;
  iface->spawn_exited = _xdp_dbus_flatpak_on_signal_spawn_exited;
  iface->get_version = xdp_dbus_flatpak_skeleton_get_version;
  iface->get_supports = xdp_dbus_flatpak_skeleton_get_supports;
}

/**
 * xdp_dbus_flatpak_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-Flatpak.top_of_page">org.freedesktop.portal.Flatpak</link>.
 *
 * Returns: (transfer full) (type XdpDbusFlatpakSkeleton): The skeleton object.
 */
XdpDbusFlatpak *
xdp_dbus_flatpak_skeleton_new (void)
{
  return XDP_DBUS_FLATPAK (g_object_new (XDP_DBUS_TYPE_FLATPAK_SKELETON, NULL));
}

/* ------------------------------------------------------------------------
 * Code for interface org.freedesktop.portal.Flatpak.UpdateMonitor
 * ------------------------------------------------------------------------
 */

/**
 * SECTION:XdpDbusFlatpakUpdateMonitor
 * @title: XdpDbusFlatpakUpdateMonitor
 * @short_description: Generated C code for the org.freedesktop.portal.Flatpak.UpdateMonitor D-Bus interface
 *
 * This section contains code for working with the <link linkend="gdbus-interface-org-freedesktop-portal-Flatpak-UpdateMonitor.top_of_page">org.freedesktop.portal.Flatpak.UpdateMonitor</link> D-Bus interface in C.
 */

enum
{
  XDP_DBUS__FLATPAK_UPDATE_MONITOR_UPDATE_AVAILABLE,
  XDP_DBUS__FLATPAK_UPDATE_MONITOR_PROGRESS,
};

static unsigned XDP_DBUS__FLATPAK_UPDATE_MONITOR_SIGNALS[2] = { 0 };

/* ---- Introspection data for org.freedesktop.portal.Flatpak.UpdateMonitor ---- */

static const _ExtendedGDBusMethodInfo _xdp_dbus_flatpak_update_monitor_method_info_close =
{
  {
    -1,
    (gchar *) "Close",
    NULL,
    NULL,
    NULL
  },
  "handle-close",
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_dbus_flatpak_update_monitor_method_info_update_IN_ARG_parent_window =
{
  {
    -1,
    (gchar *) "parent_window",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _xdp_dbus_flatpak_update_monitor_method_info_update_IN_ARG_options =
{
  {
    -1,
    (gchar *) "options",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_dbus_flatpak_update_monitor_method_info_update_IN_ARG_pointers[] =
{
  &_xdp_dbus_flatpak_update_monitor_method_info_update_IN_ARG_parent_window.parent_struct,
  &_xdp_dbus_flatpak_update_monitor_method_info_update_IN_ARG_options.parent_struct,
  NULL
};

static const _ExtendedGDBusMethodInfo _xdp_dbus_flatpak_update_monitor_method_info_update =
{
  {
    -1,
    (gchar *) "Update",
    (GDBusArgInfo **) &_xdp_dbus_flatpak_update_monitor_method_info_update_IN_ARG_pointers,
    NULL,
    NULL
  },
  "handle-update",
  FALSE
};

static const GDBusMethodInfo * const _xdp_dbus_flatpak_update_monitor_method_info_pointers[] =
{
  &_xdp_dbus_flatpak_update_monitor_method_info_close.parent_struct,
  &_xdp_dbus_flatpak_update_monitor_method_info_update.parent_struct,
  NULL
};

static const _ExtendedGDBusArgInfo _xdp_dbus_flatpak_update_monitor_signal_info_update_available_ARG_update_info =
{
  {
    -1,
    (gchar *) "update_info",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_dbus_flatpak_update_monitor_signal_info_update_available_ARG_pointers[] =
{
  &_xdp_dbus_flatpak_update_monitor_signal_info_update_available_ARG_update_info.parent_struct,
  NULL
};

static const _ExtendedGDBusSignalInfo _xdp_dbus_flatpak_update_monitor_signal_info_update_available =
{
  {
    -1,
    (gchar *) "UpdateAvailable",
    (GDBusArgInfo **) &_xdp_dbus_flatpak_update_monitor_signal_info_update_available_ARG_pointers,
    NULL
  },
  "update-available"
};

static const _ExtendedGDBusArgInfo _xdp_dbus_flatpak_update_monitor_signal_info_progress_ARG_info =
{
  {
    -1,
    (gchar *) "info",
    (gchar *) "a{sv}",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _xdp_dbus_flatpak_update_monitor_signal_info_progress_ARG_pointers[] =
{
  &_xdp_dbus_flatpak_update_monitor_signal_info_progress_ARG_info.parent_struct,
  NULL
};

static const _ExtendedGDBusSignalInfo _xdp_dbus_flatpak_update_monitor_signal_info_progress =
{
  {
    -1,
    (gchar *) "Progress",
    (GDBusArgInfo **) &_xdp_dbus_flatpak_update_monitor_signal_info_progress_ARG_pointers,
    NULL
  },
  "progress"
};

static const GDBusSignalInfo * const _xdp_dbus_flatpak_update_monitor_signal_info_pointers[] =
{
  &_xdp_dbus_flatpak_update_monitor_signal_info_update_available.parent_struct,
  &_xdp_dbus_flatpak_update_monitor_signal_info_progress.parent_struct,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _xdp_dbus_flatpak_update_monitor_interface_info =
{
  {
    -1,
    (gchar *) "org.freedesktop.portal.Flatpak.UpdateMonitor",
    (GDBusMethodInfo **) &_xdp_dbus_flatpak_update_monitor_method_info_pointers,
    (GDBusSignalInfo **) &_xdp_dbus_flatpak_update_monitor_signal_info_pointers,
    NULL,
    NULL
  },
  "flatpak-update-monitor",
};


/**
 * xdp_dbus_flatpak_update_monitor_interface_info:
 *
 * Gets a machine-readable description of the <link linkend="gdbus-interface-org-freedesktop-portal-Flatpak-UpdateMonitor.top_of_page">org.freedesktop.portal.Flatpak.UpdateMonitor</link> D-Bus interface.
 *
 * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
 */
GDBusInterfaceInfo *
xdp_dbus_flatpak_update_monitor_interface_info (void)
{
  return (GDBusInterfaceInfo *) &_xdp_dbus_flatpak_update_monitor_interface_info.parent_struct;
}

/**
 * xdp_dbus_flatpak_update_monitor_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 #XdpDbusFlatpakUpdateMonitor interface for a concrete class.
 * The properties are overridden in the order they are defined.
 *
 * Returns: The last property id.
 */
guint
xdp_dbus_flatpak_update_monitor_override_properties (GObjectClass *klass G_GNUC_UNUSED, guint property_id_begin)
{
  return property_id_begin - 1;
}


inline static void
xdp_dbus_flatpak_update_monitor_signal_marshal_update_available (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  g_cclosure_marshal_VOID__VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_dbus_flatpak_update_monitor_signal_marshal_progress (
    GClosure     *closure,
    GValue       *return_value,
    unsigned int  n_param_values,
    const GValue *param_values,
    void         *invocation_hint,
    void         *marshal_data)
{
  g_cclosure_marshal_VOID__VARIANT (closure,
    return_value, n_param_values, param_values, invocation_hint, marshal_data);
}

inline static void
xdp_dbus_flatpak_update_monitor_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);
}

inline static void
xdp_dbus_flatpak_update_monitor_method_marshal_update (
    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);
}


/**
 * XdpDbusFlatpakUpdateMonitor:
 *
 * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-Flatpak-UpdateMonitor.top_of_page">org.freedesktop.portal.Flatpak.UpdateMonitor</link>.
 */

/**
 * XdpDbusFlatpakUpdateMonitorIface:
 * @parent_iface: The parent interface.
 * @handle_close: Handler for the #XdpDbusFlatpakUpdateMonitor::handle-close signal.
 * @handle_update: Handler for the #XdpDbusFlatpakUpdateMonitor::handle-update signal.
 * @progress: Handler for the #XdpDbusFlatpakUpdateMonitor::progress signal.
 * @update_available: Handler for the #XdpDbusFlatpakUpdateMonitor::update-available signal.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-Flatpak-UpdateMonitor.top_of_page">org.freedesktop.portal.Flatpak.UpdateMonitor</link>.
 */

typedef XdpDbusFlatpakUpdateMonitorIface XdpDbusFlatpakUpdateMonitorInterface;
G_DEFINE_INTERFACE (XdpDbusFlatpakUpdateMonitor, xdp_dbus_flatpak_update_monitor, G_TYPE_OBJECT)

static void
xdp_dbus_flatpak_update_monitor_default_init (XdpDbusFlatpakUpdateMonitorIface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * XdpDbusFlatpakUpdateMonitor::handle-close:
   * @object: A #XdpDbusFlatpakUpdateMonitor.
   * @invocation: A #GDBusMethodInvocation.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-portal-Flatpak-UpdateMonitor.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_dbus_flatpak_update_monitor_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 (XdpDbusFlatpakUpdateMonitorIface, handle_close),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_flatpak_update_monitor_method_marshal_close,
    G_TYPE_BOOLEAN,
    1,
    G_TYPE_DBUS_METHOD_INVOCATION);

  /**
   * XdpDbusFlatpakUpdateMonitor::handle-update:
   * @object: A #XdpDbusFlatpakUpdateMonitor.
   * @invocation: A #GDBusMethodInvocation.
   * @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-portal-Flatpak-UpdateMonitor.Update">Update()</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_dbus_flatpak_update_monitor_complete_update() 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",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (XdpDbusFlatpakUpdateMonitorIface, handle_update),
    g_signal_accumulator_true_handled,
    NULL,
      xdp_dbus_flatpak_update_monitor_method_marshal_update,
    G_TYPE_BOOLEAN,
    3,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_VARIANT);

  /* GObject signals for received D-Bus signals: */
  /**
   * XdpDbusFlatpakUpdateMonitor::update-available:
   * @object: A #XdpDbusFlatpakUpdateMonitor.
   * @arg_update_info: Argument.
   *
   * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-freedesktop-portal-Flatpak-UpdateMonitor.UpdateAvailable">"UpdateAvailable"</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_DBUS__FLATPAK_UPDATE_MONITOR_SIGNALS[XDP_DBUS__FLATPAK_UPDATE_MONITOR_UPDATE_AVAILABLE] =
    g_signal_new ("update-available",
      G_TYPE_FROM_INTERFACE (iface),
      G_SIGNAL_RUN_LAST,
      G_STRUCT_OFFSET (XdpDbusFlatpakUpdateMonitorIface, update_available),
      NULL,
      NULL,
      xdp_dbus_flatpak_update_monitor_signal_marshal_update_available,
      G_TYPE_NONE,
      1, G_TYPE_VARIANT);

  /**
   * XdpDbusFlatpakUpdateMonitor::progress:
   * @object: A #XdpDbusFlatpakUpdateMonitor.
   * @arg_info: Argument.
   *
   * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-freedesktop-portal-Flatpak-UpdateMonitor.Progress">"Progress"</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_DBUS__FLATPAK_UPDATE_MONITOR_SIGNALS[XDP_DBUS__FLATPAK_UPDATE_MONITOR_PROGRESS] =
    g_signal_new ("progress",
      G_TYPE_FROM_INTERFACE (iface),
      G_SIGNAL_RUN_LAST,
      G_STRUCT_OFFSET (XdpDbusFlatpakUpdateMonitorIface, progress),
      NULL,
      NULL,
      xdp_dbus_flatpak_update_monitor_signal_marshal_progress,
      G_TYPE_NONE,
      1, G_TYPE_VARIANT);

}

/**
 * xdp_dbus_flatpak_update_monitor_emit_update_available:
 * @object: A #XdpDbusFlatpakUpdateMonitor.
 * @arg_update_info: Argument to pass with the signal.
 *
 * Emits the <link linkend="gdbus-signal-org-freedesktop-portal-Flatpak-UpdateMonitor.UpdateAvailable">"UpdateAvailable"</link> D-Bus signal.
 */
void
xdp_dbus_flatpak_update_monitor_emit_update_available (
    XdpDbusFlatpakUpdateMonitor *object,
    GVariant *arg_update_info)
{
  g_signal_emit (object, XDP_DBUS__FLATPAK_UPDATE_MONITOR_SIGNALS[XDP_DBUS__FLATPAK_UPDATE_MONITOR_UPDATE_AVAILABLE], 0, arg_update_info);
}

/**
 * xdp_dbus_flatpak_update_monitor_emit_progress:
 * @object: A #XdpDbusFlatpakUpdateMonitor.
 * @arg_info: Argument to pass with the signal.
 *
 * Emits the <link linkend="gdbus-signal-org-freedesktop-portal-Flatpak-UpdateMonitor.Progress">"Progress"</link> D-Bus signal.
 */
void
xdp_dbus_flatpak_update_monitor_emit_progress (
    XdpDbusFlatpakUpdateMonitor *object,
    GVariant *arg_info)
{
  g_signal_emit (object, XDP_DBUS__FLATPAK_UPDATE_MONITOR_SIGNALS[XDP_DBUS__FLATPAK_UPDATE_MONITOR_PROGRESS], 0, arg_info);
}

/**
 * xdp_dbus_flatpak_update_monitor_call_close:
 * @proxy: A #XdpDbusFlatpakUpdateMonitorProxy.
 * @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-portal-Flatpak-UpdateMonitor.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_dbus_flatpak_update_monitor_call_close_finish() to get the result of the operation.
 *
 * See xdp_dbus_flatpak_update_monitor_call_close_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_flatpak_update_monitor_call_close (
    XdpDbusFlatpakUpdateMonitor *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_dbus_flatpak_update_monitor_call_close_finish:
 * @proxy: A #XdpDbusFlatpakUpdateMonitorProxy.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_flatpak_update_monitor_call_close().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_flatpak_update_monitor_call_close().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_flatpak_update_monitor_call_close_finish (
    XdpDbusFlatpakUpdateMonitor *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_dbus_flatpak_update_monitor_call_close_sync:
 * @proxy: A #XdpDbusFlatpakUpdateMonitorProxy.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-portal-Flatpak-UpdateMonitor.Close">Close()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_flatpak_update_monitor_call_close() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_flatpak_update_monitor_call_close_sync (
    XdpDbusFlatpakUpdateMonitor *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_dbus_flatpak_update_monitor_call_update:
 * @proxy: A #XdpDbusFlatpakUpdateMonitorProxy.
 * @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-portal-Flatpak-UpdateMonitor.Update">Update()</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_dbus_flatpak_update_monitor_call_update_finish() to get the result of the operation.
 *
 * See xdp_dbus_flatpak_update_monitor_call_update_sync() for the synchronous, blocking version of this method.
 */
void
xdp_dbus_flatpak_update_monitor_call_update (
    XdpDbusFlatpakUpdateMonitor *proxy,
    const gchar *arg_parent_window,
    GVariant *arg_options,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "Update",
    g_variant_new ("(s@a{sv})",
                   arg_parent_window,
                   arg_options),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * xdp_dbus_flatpak_update_monitor_call_update_finish:
 * @proxy: A #XdpDbusFlatpakUpdateMonitorProxy.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_flatpak_update_monitor_call_update().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with xdp_dbus_flatpak_update_monitor_call_update().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_flatpak_update_monitor_call_update_finish (
    XdpDbusFlatpakUpdateMonitor *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_dbus_flatpak_update_monitor_call_update_sync:
 * @proxy: A #XdpDbusFlatpakUpdateMonitorProxy.
 * @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.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-portal-Flatpak-UpdateMonitor.Update">Update()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_flatpak_update_monitor_call_update() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
xdp_dbus_flatpak_update_monitor_call_update_sync (
    XdpDbusFlatpakUpdateMonitor *proxy,
    const gchar *arg_parent_window,
    GVariant *arg_options,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "Update",
    g_variant_new ("(s@a{sv})",
                   arg_parent_window,
                   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_dbus_flatpak_update_monitor_complete_close:
 * @object: A #XdpDbusFlatpakUpdateMonitor.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-portal-Flatpak-UpdateMonitor.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_dbus_flatpak_update_monitor_complete_close (
    XdpDbusFlatpakUpdateMonitor *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("()"));
}

/**
 * xdp_dbus_flatpak_update_monitor_complete_update:
 * @object: A #XdpDbusFlatpakUpdateMonitor.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-portal-Flatpak-UpdateMonitor.Update">Update()</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_dbus_flatpak_update_monitor_complete_update (
    XdpDbusFlatpakUpdateMonitor *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("()"));
}

/* ------------------------------------------------------------------------ */

/**
 * XdpDbusFlatpakUpdateMonitorProxy:
 *
 * The #XdpDbusFlatpakUpdateMonitorProxy structure contains only private data and should only be accessed using the provided API.
 */

/**
 * XdpDbusFlatpakUpdateMonitorProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpDbusFlatpakUpdateMonitorProxy.
 */

struct _XdpDbusFlatpakUpdateMonitorProxyPrivate
{
  GData *qdata;
};

static void xdp_dbus_flatpak_update_monitor_proxy_iface_init (XdpDbusFlatpakUpdateMonitorIface *iface);

#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpDbusFlatpakUpdateMonitorProxy, xdp_dbus_flatpak_update_monitor_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (XdpDbusFlatpakUpdateMonitorProxy)
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_FLATPAK_UPDATE_MONITOR, xdp_dbus_flatpak_update_monitor_proxy_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpDbusFlatpakUpdateMonitorProxy, xdp_dbus_flatpak_update_monitor_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_FLATPAK_UPDATE_MONITOR, xdp_dbus_flatpak_update_monitor_proxy_iface_init))

#endif
static void
xdp_dbus_flatpak_update_monitor_proxy_finalize (GObject *object)
{
  XdpDbusFlatpakUpdateMonitorProxy *proxy = XDP_DBUS_FLATPAK_UPDATE_MONITOR_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (xdp_dbus_flatpak_update_monitor_proxy_parent_class)->finalize (object);
}

static void
xdp_dbus_flatpak_update_monitor_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_dbus_flatpak_update_monitor_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_dbus_flatpak_update_monitor_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_dbus_flatpak_update_monitor_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_DBUS_TYPE_FLATPAK_UPDATE_MONITOR);
  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_DBUS_TYPE_FLATPAK_UPDATE_MONITOR);
  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_dbus_flatpak_update_monitor_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  XdpDbusFlatpakUpdateMonitorProxy *proxy = XDP_DBUS_FLATPAK_UPDATE_MONITOR_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_dbus_flatpak_update_monitor_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_dbus_flatpak_update_monitor_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_dbus_flatpak_update_monitor_proxy_init (XdpDbusFlatpakUpdateMonitorProxy *proxy)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  proxy->priv = xdp_dbus_flatpak_update_monitor_proxy_get_instance_private (proxy);
#else
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, XDP_DBUS_TYPE_FLATPAK_UPDATE_MONITOR_PROXY, XdpDbusFlatpakUpdateMonitorProxyPrivate);
#endif

  g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), xdp_dbus_flatpak_update_monitor_interface_info ());
}

static void
xdp_dbus_flatpak_update_monitor_proxy_class_init (XdpDbusFlatpakUpdateMonitorProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = xdp_dbus_flatpak_update_monitor_proxy_finalize;
  gobject_class->get_property = xdp_dbus_flatpak_update_monitor_proxy_get_property;
  gobject_class->set_property = xdp_dbus_flatpak_update_monitor_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = xdp_dbus_flatpak_update_monitor_proxy_g_signal;
  proxy_class->g_properties_changed = xdp_dbus_flatpak_update_monitor_proxy_g_properties_changed;

#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
  g_type_class_add_private (klass, sizeof (XdpDbusFlatpakUpdateMonitorProxyPrivate));
#endif
}

static void
xdp_dbus_flatpak_update_monitor_proxy_iface_init (XdpDbusFlatpakUpdateMonitorIface *iface G_GNUC_UNUSED)
{
}

/**
 * xdp_dbus_flatpak_update_monitor_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-portal-Flatpak-UpdateMonitor.top_of_page">org.freedesktop.portal.Flatpak.UpdateMonitor</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_dbus_flatpak_update_monitor_proxy_new_finish() to get the result of the operation.
 *
 * See xdp_dbus_flatpak_update_monitor_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_dbus_flatpak_update_monitor_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_DBUS_TYPE_FLATPAK_UPDATE_MONITOR_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.portal.Flatpak.UpdateMonitor", NULL);
}

/**
 * xdp_dbus_flatpak_update_monitor_proxy_new_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_flatpak_update_monitor_proxy_new().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_dbus_flatpak_update_monitor_proxy_new().
 *
 * Returns: (transfer full) (type XdpDbusFlatpakUpdateMonitorProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusFlatpakUpdateMonitor *
xdp_dbus_flatpak_update_monitor_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_DBUS_FLATPAK_UPDATE_MONITOR (ret);
  else
    return NULL;
}

/**
 * xdp_dbus_flatpak_update_monitor_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-portal-Flatpak-UpdateMonitor.top_of_page">org.freedesktop.portal.Flatpak.UpdateMonitor</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_flatpak_update_monitor_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpDbusFlatpakUpdateMonitorProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusFlatpakUpdateMonitor *
xdp_dbus_flatpak_update_monitor_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_DBUS_TYPE_FLATPAK_UPDATE_MONITOR_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.portal.Flatpak.UpdateMonitor", NULL);
  if (ret != NULL)
    return XDP_DBUS_FLATPAK_UPDATE_MONITOR (ret);
  else
    return NULL;
}


/**
 * xdp_dbus_flatpak_update_monitor_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_dbus_flatpak_update_monitor_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_dbus_flatpak_update_monitor_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See xdp_dbus_flatpak_update_monitor_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
xdp_dbus_flatpak_update_monitor_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_DBUS_TYPE_FLATPAK_UPDATE_MONITOR_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.portal.Flatpak.UpdateMonitor", NULL);
}

/**
 * xdp_dbus_flatpak_update_monitor_proxy_new_for_bus_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xdp_dbus_flatpak_update_monitor_proxy_new_for_bus().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with xdp_dbus_flatpak_update_monitor_proxy_new_for_bus().
 *
 * Returns: (transfer full) (type XdpDbusFlatpakUpdateMonitorProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusFlatpakUpdateMonitor *
xdp_dbus_flatpak_update_monitor_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_DBUS_FLATPAK_UPDATE_MONITOR (ret);
  else
    return NULL;
}

/**
 * xdp_dbus_flatpak_update_monitor_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_dbus_flatpak_update_monitor_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See xdp_dbus_flatpak_update_monitor_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type XdpDbusFlatpakUpdateMonitorProxy): The constructed proxy object or %NULL if @error is set.
 */
XdpDbusFlatpakUpdateMonitor *
xdp_dbus_flatpak_update_monitor_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_DBUS_TYPE_FLATPAK_UPDATE_MONITOR_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.portal.Flatpak.UpdateMonitor", NULL);
  if (ret != NULL)
    return XDP_DBUS_FLATPAK_UPDATE_MONITOR (ret);
  else
    return NULL;
}


/* ------------------------------------------------------------------------ */

/**
 * XdpDbusFlatpakUpdateMonitorSkeleton:
 *
 * The #XdpDbusFlatpakUpdateMonitorSkeleton structure contains only private data and should only be accessed using the provided API.
 */

/**
 * XdpDbusFlatpakUpdateMonitorSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #XdpDbusFlatpakUpdateMonitorSkeleton.
 */

struct _XdpDbusFlatpakUpdateMonitorSkeletonPrivate
{
  GValue *properties;
  GList *changed_properties;
  GSource *changed_properties_idle_source;
  GMainContext *context;
  GMutex lock;
};

static void
_xdp_dbus_flatpak_update_monitor_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)
{
  XdpDbusFlatpakUpdateMonitorSkeleton *skeleton = XDP_DBUS_FLATPAK_UPDATE_MONITOR_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_DBUS_TYPE_FLATPAK_UPDATE_MONITOR);
  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_DBUS_TYPE_FLATPAK_UPDATE_MONITOR);
  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_dbus_flatpak_update_monitor_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)
{
  XdpDbusFlatpakUpdateMonitorSkeleton *skeleton = XDP_DBUS_FLATPAK_UPDATE_MONITOR_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_dbus_flatpak_update_monitor_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_dbus_flatpak_update_monitor_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)
{
  XdpDbusFlatpakUpdateMonitorSkeleton *skeleton = XDP_DBUS_FLATPAK_UPDATE_MONITOR_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_dbus_flatpak_update_monitor_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_dbus_flatpak_update_monitor_skeleton_vtable =
{
  _xdp_dbus_flatpak_update_monitor_skeleton_handle_method_call,
  _xdp_dbus_flatpak_update_monitor_skeleton_handle_get_property,
  _xdp_dbus_flatpak_update_monitor_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
xdp_dbus_flatpak_update_monitor_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return xdp_dbus_flatpak_update_monitor_interface_info ();
}

static GDBusInterfaceVTable *
xdp_dbus_flatpak_update_monitor_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_xdp_dbus_flatpak_update_monitor_skeleton_vtable;
}

static GVariant *
xdp_dbus_flatpak_update_monitor_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  XdpDbusFlatpakUpdateMonitorSkeleton *skeleton = XDP_DBUS_FLATPAK_UPDATE_MONITOR_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_dbus_flatpak_update_monitor_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _xdp_dbus_flatpak_update_monitor_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _xdp_dbus_flatpak_update_monitor_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _xdp_dbus_flatpak_update_monitor_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.portal.Flatpak.UpdateMonitor", 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_dbus_flatpak_update_monitor_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton G_GNUC_UNUSED)
{
}

static void
_xdp_dbus_flatpak_update_monitor_on_signal_update_available (
    XdpDbusFlatpakUpdateMonitor *object,
    GVariant *arg_update_info)
{
  XdpDbusFlatpakUpdateMonitorSkeleton *skeleton = XDP_DBUS_FLATPAK_UPDATE_MONITOR_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 ("(@a{sv})",
                   arg_update_info));
  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.portal.Flatpak.UpdateMonitor", "UpdateAvailable",
        signal_variant, NULL);
    }
  g_variant_unref (signal_variant);
  g_list_free_full (connections, g_object_unref);
}

static void
_xdp_dbus_flatpak_update_monitor_on_signal_progress (
    XdpDbusFlatpakUpdateMonitor *object,
    GVariant *arg_info)
{
  XdpDbusFlatpakUpdateMonitorSkeleton *skeleton = XDP_DBUS_FLATPAK_UPDATE_MONITOR_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 ("(@a{sv})",
                   arg_info));
  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.portal.Flatpak.UpdateMonitor", "Progress",
        signal_variant, NULL);
    }
  g_variant_unref (signal_variant);
  g_list_free_full (connections, g_object_unref);
}

static void xdp_dbus_flatpak_update_monitor_skeleton_iface_init (XdpDbusFlatpakUpdateMonitorIface *iface);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (XdpDbusFlatpakUpdateMonitorSkeleton, xdp_dbus_flatpak_update_monitor_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (XdpDbusFlatpakUpdateMonitorSkeleton)
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_FLATPAK_UPDATE_MONITOR, xdp_dbus_flatpak_update_monitor_skeleton_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (XdpDbusFlatpakUpdateMonitorSkeleton, xdp_dbus_flatpak_update_monitor_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (XDP_DBUS_TYPE_FLATPAK_UPDATE_MONITOR, xdp_dbus_flatpak_update_monitor_skeleton_iface_init))

#endif
static void
xdp_dbus_flatpak_update_monitor_skeleton_finalize (GObject *object)
{
  XdpDbusFlatpakUpdateMonitorSkeleton *skeleton = XDP_DBUS_FLATPAK_UPDATE_MONITOR_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_dbus_flatpak_update_monitor_skeleton_parent_class)->finalize (object);
}

static void
xdp_dbus_flatpak_update_monitor_skeleton_init (XdpDbusFlatpakUpdateMonitorSkeleton *skeleton)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  skeleton->priv = xdp_dbus_flatpak_update_monitor_skeleton_get_instance_private (skeleton);
#else
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, XDP_DBUS_TYPE_FLATPAK_UPDATE_MONITOR_SKELETON, XdpDbusFlatpakUpdateMonitorSkeletonPrivate);
#endif

  g_mutex_init (&skeleton->priv->lock);
  skeleton->priv->context = g_main_context_ref_thread_default ();
}

static void
xdp_dbus_flatpak_update_monitor_skeleton_class_init (XdpDbusFlatpakUpdateMonitorSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize = xdp_dbus_flatpak_update_monitor_skeleton_finalize;

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = xdp_dbus_flatpak_update_monitor_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = xdp_dbus_flatpak_update_monitor_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = xdp_dbus_flatpak_update_monitor_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = xdp_dbus_flatpak_update_monitor_skeleton_dbus_interface_get_vtable;

#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
  g_type_class_add_private (klass, sizeof (XdpDbusFlatpakUpdateMonitorSkeletonPrivate));
#endif
}

static void
xdp_dbus_flatpak_update_monitor_skeleton_iface_init (XdpDbusFlatpakUpdateMonitorIface *iface)
{
  iface->update_available = _xdp_dbus_flatpak_update_monitor_on_signal_update_available;
  iface->progress = _xdp_dbus_flatpak_update_monitor_on_signal_progress;
}

/**
 * xdp_dbus_flatpak_update_monitor_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-Flatpak-UpdateMonitor.top_of_page">org.freedesktop.portal.Flatpak.UpdateMonitor</link>.
 *
 * Returns: (transfer full) (type XdpDbusFlatpakUpdateMonitorSkeleton): The skeleton object.
 */
XdpDbusFlatpakUpdateMonitor *
xdp_dbus_flatpak_update_monitor_skeleton_new (void)
{
  return XDP_DBUS_FLATPAK_UPDATE_MONITOR (g_object_new (XDP_DBUS_TYPE_FLATPAK_UPDATE_MONITOR_SKELETON, NULL));
}

