/*
 * 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 "grd-dbus-remote-desktop.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 (
    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_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_credentials,
        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_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_Certificate,
        GVariant *arg_PrivateKey,
        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_STRING (
    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_StringStringStringFunc)
       (void *data1,
        const gchar *arg_routing_token,
        const gchar *arg_username,
        const gchar *arg_password,
        void *data2);
  _GDbusCodegenMarshalVoid_StringStringStringFunc 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_StringStringStringFunc)
    (marshal_data ? marshal_data : cc->callback);

  callback (data1,
            g_marshal_value_peek_string (param_values + 1),
            g_marshal_value_peek_string (param_values + 2),
            g_marshal_value_peek_string (param_values + 3),
            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_username,
        const gchar *arg_password,
        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_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_ObjectObjectFunc)
       (void *data1,
        GDBusMethodInvocation *arg_method_invocation,
        GUnixFDList *arg_fd_list,
        void *data2);
  _GDbusCodegenMarshalBoolean_ObjectObjectFunc 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_ObjectObjectFunc)
    (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),
              data2);

  g_value_set_boolean (return_value, v_return);
}

/* ------------------------------------------------------------------------
 * Code for interface org.gnome.RemoteDesktop
 * ------------------------------------------------------------------------
 */

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

/* ---- Introspection data for org.gnome.RemoteDesktop ---- */

static const _ExtendedGDBusPropertyInfo _grd_dbus_remote_desktop_org_gnome_remote_desktop_property_info_runtime_mode =
{
  {
    -1,
    (gchar *) "RuntimeMode",
    (gchar *) "s",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "runtime-mode",
  FALSE,
  TRUE
};

static const GDBusPropertyInfo * const _grd_dbus_remote_desktop_org_gnome_remote_desktop_property_info_pointers[] =
{
  &_grd_dbus_remote_desktop_org_gnome_remote_desktop_property_info_runtime_mode.parent_struct,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _grd_dbus_remote_desktop_org_gnome_remote_desktop_interface_info =
{
  {
    -1,
    (gchar *) "org.gnome.RemoteDesktop",
    NULL,
    NULL,
    (GDBusPropertyInfo **) &_grd_dbus_remote_desktop_org_gnome_remote_desktop_property_info_pointers,
    NULL
  },
  "org-gnome-remote-desktop",
};


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

/**
 * grd_dbus_remote_desktop_org_gnome_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 #GrdDBusRemoteDesktopOrgGnomeRemoteDesktop interface for a concrete class.
 * The properties are overridden in the order they are defined.
 *
 * Returns: The last property id.
 */
guint
grd_dbus_remote_desktop_org_gnome_remote_desktop_override_properties (GObjectClass *klass, guint property_id_begin)
{
  g_object_class_override_property (klass, property_id_begin++, "runtime-mode");
  return property_id_begin - 1;
}



/**
 * GrdDBusRemoteDesktopOrgGnomeRemoteDesktop:
 *
 * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-gnome-RemoteDesktop.top_of_page">org.gnome.RemoteDesktop</link>.
 */

/**
 * GrdDBusRemoteDesktopOrgGnomeRemoteDesktopIface:
 * @parent_iface: The parent interface.
 * @get_runtime_mode: Getter for the #GrdDBusRemoteDesktopOrgGnomeRemoteDesktop:runtime-mode property.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-gnome-RemoteDesktop.top_of_page">org.gnome.RemoteDesktop</link>.
 */

typedef GrdDBusRemoteDesktopOrgGnomeRemoteDesktopIface GrdDBusRemoteDesktopOrgGnomeRemoteDesktopInterface;
G_DEFINE_INTERFACE (GrdDBusRemoteDesktopOrgGnomeRemoteDesktop, grd_dbus_remote_desktop_org_gnome_remote_desktop, G_TYPE_OBJECT)

static void
grd_dbus_remote_desktop_org_gnome_remote_desktop_default_init (GrdDBusRemoteDesktopOrgGnomeRemoteDesktopIface *iface)
{
  /* GObject properties for D-Bus properties: */
  /**
   * GrdDBusRemoteDesktopOrgGnomeRemoteDesktop:runtime-mode:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-gnome-RemoteDesktop.RuntimeMode">"RuntimeMode"</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_string ("runtime-mode", "RuntimeMode", "RuntimeMode", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
}

/**
 * grd_dbus_remote_desktop_org_gnome_remote_desktop_get_runtime_mode: (skip)
 * @object: A #GrdDBusRemoteDesktopOrgGnomeRemoteDesktop.
 *
 * Gets the value of the <link linkend="gdbus-property-org-gnome-RemoteDesktop.RuntimeMode">"RuntimeMode"</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 grd_dbus_remote_desktop_org_gnome_remote_desktop_dup_runtime_mode() 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.
 */
const gchar *
grd_dbus_remote_desktop_org_gnome_remote_desktop_get_runtime_mode (GrdDBusRemoteDesktopOrgGnomeRemoteDesktop *object)
{
  g_return_val_if_fail (GRD_DBUS_REMOTE_DESKTOP_IS_ORG_GNOME_REMOTE_DESKTOP (object), NULL);

  return GRD_DBUS_REMOTE_DESKTOP_ORG_GNOME_REMOTE_DESKTOP_GET_IFACE (object)->get_runtime_mode (object);
}

/**
 * grd_dbus_remote_desktop_org_gnome_remote_desktop_dup_runtime_mode: (skip)
 * @object: A #GrdDBusRemoteDesktopOrgGnomeRemoteDesktop.
 *
 * Gets a copy of the <link linkend="gdbus-property-org-gnome-RemoteDesktop.RuntimeMode">"RuntimeMode"</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_free().
 */
gchar *
grd_dbus_remote_desktop_org_gnome_remote_desktop_dup_runtime_mode (GrdDBusRemoteDesktopOrgGnomeRemoteDesktop *object)
{
  gchar *value;
  g_object_get (G_OBJECT (object), "runtime-mode", &value, NULL);
  return value;
}

/**
 * grd_dbus_remote_desktop_org_gnome_remote_desktop_set_runtime_mode: (skip)
 * @object: A #GrdDBusRemoteDesktopOrgGnomeRemoteDesktop.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-gnome-RemoteDesktop.RuntimeMode">"RuntimeMode"</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
grd_dbus_remote_desktop_org_gnome_remote_desktop_set_runtime_mode (GrdDBusRemoteDesktopOrgGnomeRemoteDesktop *object, const gchar *value)
{
  g_object_set (G_OBJECT (object), "runtime-mode", value, NULL);
}

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

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

/**
 * GrdDBusRemoteDesktopOrgGnomeRemoteDesktopProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #GrdDBusRemoteDesktopOrgGnomeRemoteDesktopProxy.
 */

struct _GrdDBusRemoteDesktopOrgGnomeRemoteDesktopProxyPrivate
{
  GData *qdata;
};

static void grd_dbus_remote_desktop_org_gnome_remote_desktop_proxy_iface_init (GrdDBusRemoteDesktopOrgGnomeRemoteDesktopIface *iface);

#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (GrdDBusRemoteDesktopOrgGnomeRemoteDesktopProxy, grd_dbus_remote_desktop_org_gnome_remote_desktop_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (GrdDBusRemoteDesktopOrgGnomeRemoteDesktopProxy)
                         G_IMPLEMENT_INTERFACE (GRD_DBUS_REMOTE_DESKTOP_TYPE_ORG_GNOME_REMOTE_DESKTOP, grd_dbus_remote_desktop_org_gnome_remote_desktop_proxy_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (GrdDBusRemoteDesktopOrgGnomeRemoteDesktopProxy, grd_dbus_remote_desktop_org_gnome_remote_desktop_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (GRD_DBUS_REMOTE_DESKTOP_TYPE_ORG_GNOME_REMOTE_DESKTOP, grd_dbus_remote_desktop_org_gnome_remote_desktop_proxy_iface_init))

#endif
static void
grd_dbus_remote_desktop_org_gnome_remote_desktop_proxy_finalize (GObject *object)
{
  GrdDBusRemoteDesktopOrgGnomeRemoteDesktopProxy *proxy = GRD_DBUS_REMOTE_DESKTOP_ORG_GNOME_REMOTE_DESKTOP_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (grd_dbus_remote_desktop_org_gnome_remote_desktop_proxy_parent_class)->finalize (object);
}

static void
grd_dbus_remote_desktop_org_gnome_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 < 1);
  info = (const _ExtendedGDBusPropertyInfo *) _grd_dbus_remote_desktop_org_gnome_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
grd_dbus_remote_desktop_org_gnome_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.gnome.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
grd_dbus_remote_desktop_org_gnome_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 < 1);
  info = (const _ExtendedGDBusPropertyInfo *) _grd_dbus_remote_desktop_org_gnome_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.gnome.RemoteDesktop", info->parent_struct.name, variant),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    NULL, (GAsyncReadyCallback) grd_dbus_remote_desktop_org_gnome_remote_desktop_proxy_set_property_cb, (GDBusPropertyInfo *) &info->parent_struct);
  g_variant_unref (variant);
}

static void
grd_dbus_remote_desktop_org_gnome_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 *) &_grd_dbus_remote_desktop_org_gnome_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], GRD_DBUS_REMOTE_DESKTOP_TYPE_ORG_GNOME_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, GRD_DBUS_REMOTE_DESKTOP_TYPE_ORG_GNOME_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
grd_dbus_remote_desktop_org_gnome_remote_desktop_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  GrdDBusRemoteDesktopOrgGnomeRemoteDesktopProxy *proxy = GRD_DBUS_REMOTE_DESKTOP_ORG_GNOME_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 *) &_grd_dbus_remote_desktop_org_gnome_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 *) &_grd_dbus_remote_desktop_org_gnome_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 const gchar *
grd_dbus_remote_desktop_org_gnome_remote_desktop_proxy_get_runtime_mode (GrdDBusRemoteDesktopOrgGnomeRemoteDesktop *object)
{
  GrdDBusRemoteDesktopOrgGnomeRemoteDesktopProxy *proxy = GRD_DBUS_REMOTE_DESKTOP_ORG_GNOME_REMOTE_DESKTOP_PROXY (object);
  GVariant *variant;
  const gchar *value = NULL;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "RuntimeMode");
  if (variant != NULL)
    {
      value = g_variant_get_string (variant, NULL);
      g_variant_unref (variant);
    }
  return value;
}

static void
grd_dbus_remote_desktop_org_gnome_remote_desktop_proxy_init (GrdDBusRemoteDesktopOrgGnomeRemoteDesktopProxy *proxy)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  proxy->priv = grd_dbus_remote_desktop_org_gnome_remote_desktop_proxy_get_instance_private (proxy);
#else
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, GRD_DBUS_REMOTE_DESKTOP_TYPE_ORG_GNOME_REMOTE_DESKTOP_PROXY, GrdDBusRemoteDesktopOrgGnomeRemoteDesktopProxyPrivate);
#endif

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

static void
grd_dbus_remote_desktop_org_gnome_remote_desktop_proxy_class_init (GrdDBusRemoteDesktopOrgGnomeRemoteDesktopProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = grd_dbus_remote_desktop_org_gnome_remote_desktop_proxy_finalize;
  gobject_class->get_property = grd_dbus_remote_desktop_org_gnome_remote_desktop_proxy_get_property;
  gobject_class->set_property = grd_dbus_remote_desktop_org_gnome_remote_desktop_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = grd_dbus_remote_desktop_org_gnome_remote_desktop_proxy_g_signal;
  proxy_class->g_properties_changed = grd_dbus_remote_desktop_org_gnome_remote_desktop_proxy_g_properties_changed;

  grd_dbus_remote_desktop_org_gnome_remote_desktop_override_properties (gobject_class, 1);

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

static void
grd_dbus_remote_desktop_org_gnome_remote_desktop_proxy_iface_init (GrdDBusRemoteDesktopOrgGnomeRemoteDesktopIface *iface)
{
  iface->get_runtime_mode = grd_dbus_remote_desktop_org_gnome_remote_desktop_proxy_get_runtime_mode;
}

/**
 * grd_dbus_remote_desktop_org_gnome_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-gnome-RemoteDesktop.top_of_page">org.gnome.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 grd_dbus_remote_desktop_org_gnome_remote_desktop_proxy_new_finish() to get the result of the operation.
 *
 * See grd_dbus_remote_desktop_org_gnome_remote_desktop_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
grd_dbus_remote_desktop_org_gnome_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 (GRD_DBUS_REMOTE_DESKTOP_TYPE_ORG_GNOME_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.gnome.RemoteDesktop", NULL);
}

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

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


/**
 * grd_dbus_remote_desktop_org_gnome_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 grd_dbus_remote_desktop_org_gnome_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 grd_dbus_remote_desktop_org_gnome_remote_desktop_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See grd_dbus_remote_desktop_org_gnome_remote_desktop_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
grd_dbus_remote_desktop_org_gnome_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 (GRD_DBUS_REMOTE_DESKTOP_TYPE_ORG_GNOME_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.gnome.RemoteDesktop", NULL);
}

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

/**
 * grd_dbus_remote_desktop_org_gnome_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 grd_dbus_remote_desktop_org_gnome_remote_desktop_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See grd_dbus_remote_desktop_org_gnome_remote_desktop_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type GrdDBusRemoteDesktopOrgGnomeRemoteDesktopProxy): The constructed proxy object or %NULL if @error is set.
 */
GrdDBusRemoteDesktopOrgGnomeRemoteDesktop *
grd_dbus_remote_desktop_org_gnome_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 (GRD_DBUS_REMOTE_DESKTOP_TYPE_ORG_GNOME_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.gnome.RemoteDesktop", NULL);
  if (ret != NULL)
    return GRD_DBUS_REMOTE_DESKTOP_ORG_GNOME_REMOTE_DESKTOP (ret);
  else
    return NULL;
}


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

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

/**
 * GrdDBusRemoteDesktopOrgGnomeRemoteDesktopSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #GrdDBusRemoteDesktopOrgGnomeRemoteDesktopSkeleton.
 */

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

static void
_grd_dbus_remote_desktop_org_gnome_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)
{
  GrdDBusRemoteDesktopOrgGnomeRemoteDesktopSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_ORG_GNOME_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], GRD_DBUS_REMOTE_DESKTOP_TYPE_ORG_GNOME_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, GRD_DBUS_REMOTE_DESKTOP_TYPE_ORG_GNOME_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 *
_grd_dbus_remote_desktop_org_gnome_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)
{
  GrdDBusRemoteDesktopOrgGnomeRemoteDesktopSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_ORG_GNOME_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 *) &_grd_dbus_remote_desktop_org_gnome_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
_grd_dbus_remote_desktop_org_gnome_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)
{
  GrdDBusRemoteDesktopOrgGnomeRemoteDesktopSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_ORG_GNOME_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 *) &_grd_dbus_remote_desktop_org_gnome_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 _grd_dbus_remote_desktop_org_gnome_remote_desktop_skeleton_vtable =
{
  _grd_dbus_remote_desktop_org_gnome_remote_desktop_skeleton_handle_method_call,
  _grd_dbus_remote_desktop_org_gnome_remote_desktop_skeleton_handle_get_property,
  _grd_dbus_remote_desktop_org_gnome_remote_desktop_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
grd_dbus_remote_desktop_org_gnome_remote_desktop_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return grd_dbus_remote_desktop_org_gnome_remote_desktop_interface_info ();
}

static GDBusInterfaceVTable *
grd_dbus_remote_desktop_org_gnome_remote_desktop_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_grd_dbus_remote_desktop_org_gnome_remote_desktop_skeleton_vtable;
}

static GVariant *
grd_dbus_remote_desktop_org_gnome_remote_desktop_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  GrdDBusRemoteDesktopOrgGnomeRemoteDesktopSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_ORG_GNOME_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 (_grd_dbus_remote_desktop_org_gnome_remote_desktop_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _grd_dbus_remote_desktop_org_gnome_remote_desktop_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _grd_dbus_remote_desktop_org_gnome_remote_desktop_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _grd_dbus_remote_desktop_org_gnome_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.gnome.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 _grd_dbus_remote_desktop_org_gnome_remote_desktop_emit_changed (gpointer user_data);

static void
grd_dbus_remote_desktop_org_gnome_remote_desktop_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
{
  GrdDBusRemoteDesktopOrgGnomeRemoteDesktopSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_ORG_GNOME_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)
    _grd_dbus_remote_desktop_org_gnome_remote_desktop_emit_changed (skeleton);
}

static void grd_dbus_remote_desktop_org_gnome_remote_desktop_skeleton_iface_init (GrdDBusRemoteDesktopOrgGnomeRemoteDesktopIface *iface);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (GrdDBusRemoteDesktopOrgGnomeRemoteDesktopSkeleton, grd_dbus_remote_desktop_org_gnome_remote_desktop_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (GrdDBusRemoteDesktopOrgGnomeRemoteDesktopSkeleton)
                         G_IMPLEMENT_INTERFACE (GRD_DBUS_REMOTE_DESKTOP_TYPE_ORG_GNOME_REMOTE_DESKTOP, grd_dbus_remote_desktop_org_gnome_remote_desktop_skeleton_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (GrdDBusRemoteDesktopOrgGnomeRemoteDesktopSkeleton, grd_dbus_remote_desktop_org_gnome_remote_desktop_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (GRD_DBUS_REMOTE_DESKTOP_TYPE_ORG_GNOME_REMOTE_DESKTOP, grd_dbus_remote_desktop_org_gnome_remote_desktop_skeleton_iface_init))

#endif
static void
grd_dbus_remote_desktop_org_gnome_remote_desktop_skeleton_finalize (GObject *object)
{
  GrdDBusRemoteDesktopOrgGnomeRemoteDesktopSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_ORG_GNOME_REMOTE_DESKTOP_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 (grd_dbus_remote_desktop_org_gnome_remote_desktop_skeleton_parent_class)->finalize (object);
}

static void
grd_dbus_remote_desktop_org_gnome_remote_desktop_skeleton_get_property (GObject      *object,
  guint         prop_id,
  GValue       *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  GrdDBusRemoteDesktopOrgGnomeRemoteDesktopSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_ORG_GNOME_REMOTE_DESKTOP_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
_grd_dbus_remote_desktop_org_gnome_remote_desktop_emit_changed (gpointer user_data)
{
  GrdDBusRemoteDesktopOrgGnomeRemoteDesktopSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_ORG_GNOME_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.gnome.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
_grd_dbus_remote_desktop_org_gnome_remote_desktop_schedule_emit_changed (GrdDBusRemoteDesktopOrgGnomeRemoteDesktopSkeleton *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
grd_dbus_remote_desktop_org_gnome_remote_desktop_skeleton_notify (GObject      *object,
  GParamSpec *pspec G_GNUC_UNUSED)
{
  GrdDBusRemoteDesktopOrgGnomeRemoteDesktopSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_ORG_GNOME_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, _grd_dbus_remote_desktop_org_gnome_remote_desktop_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
      g_source_set_name (skeleton->priv->changed_properties_idle_source, "[generated] _grd_dbus_remote_desktop_org_gnome_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
grd_dbus_remote_desktop_org_gnome_remote_desktop_skeleton_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec)
{
  const _ExtendedGDBusPropertyInfo *info;
  GrdDBusRemoteDesktopOrgGnomeRemoteDesktopSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_ORG_GNOME_REMOTE_DESKTOP_SKELETON (object);
  g_assert (prop_id != 0 && prop_id - 1 < 1);
  info = (const _ExtendedGDBusPropertyInfo *) _grd_dbus_remote_desktop_org_gnome_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)
        _grd_dbus_remote_desktop_org_gnome_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
grd_dbus_remote_desktop_org_gnome_remote_desktop_skeleton_init (GrdDBusRemoteDesktopOrgGnomeRemoteDesktopSkeleton *skeleton)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  skeleton->priv = grd_dbus_remote_desktop_org_gnome_remote_desktop_skeleton_get_instance_private (skeleton);
#else
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, GRD_DBUS_REMOTE_DESKTOP_TYPE_ORG_GNOME_REMOTE_DESKTOP_SKELETON, GrdDBusRemoteDesktopOrgGnomeRemoteDesktopSkeletonPrivate);
#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_STRING);
}

static const gchar *
grd_dbus_remote_desktop_org_gnome_remote_desktop_skeleton_get_runtime_mode (GrdDBusRemoteDesktopOrgGnomeRemoteDesktop *object)
{
  GrdDBusRemoteDesktopOrgGnomeRemoteDesktopSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_ORG_GNOME_REMOTE_DESKTOP_SKELETON (object);
  const gchar *value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_marshal_value_peek_string (&(skeleton->priv->properties[0]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static void
grd_dbus_remote_desktop_org_gnome_remote_desktop_skeleton_class_init (GrdDBusRemoteDesktopOrgGnomeRemoteDesktopSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize = grd_dbus_remote_desktop_org_gnome_remote_desktop_skeleton_finalize;
  gobject_class->get_property = grd_dbus_remote_desktop_org_gnome_remote_desktop_skeleton_get_property;
  gobject_class->set_property = grd_dbus_remote_desktop_org_gnome_remote_desktop_skeleton_set_property;
  gobject_class->notify       = grd_dbus_remote_desktop_org_gnome_remote_desktop_skeleton_notify;


  grd_dbus_remote_desktop_org_gnome_remote_desktop_override_properties (gobject_class, 1);

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = grd_dbus_remote_desktop_org_gnome_remote_desktop_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = grd_dbus_remote_desktop_org_gnome_remote_desktop_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = grd_dbus_remote_desktop_org_gnome_remote_desktop_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = grd_dbus_remote_desktop_org_gnome_remote_desktop_skeleton_dbus_interface_get_vtable;

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

static void
grd_dbus_remote_desktop_org_gnome_remote_desktop_skeleton_iface_init (GrdDBusRemoteDesktopOrgGnomeRemoteDesktopIface *iface)
{
  iface->get_runtime_mode = grd_dbus_remote_desktop_org_gnome_remote_desktop_skeleton_get_runtime_mode;
}

/**
 * grd_dbus_remote_desktop_org_gnome_remote_desktop_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-gnome-RemoteDesktop.top_of_page">org.gnome.RemoteDesktop</link>.
 *
 * Returns: (transfer full) (type GrdDBusRemoteDesktopOrgGnomeRemoteDesktopSkeleton): The skeleton object.
 */
GrdDBusRemoteDesktopOrgGnomeRemoteDesktop *
grd_dbus_remote_desktop_org_gnome_remote_desktop_skeleton_new (void)
{
  return GRD_DBUS_REMOTE_DESKTOP_ORG_GNOME_REMOTE_DESKTOP (g_object_new (GRD_DBUS_REMOTE_DESKTOP_TYPE_ORG_GNOME_REMOTE_DESKTOP_SKELETON, NULL));
}

/* ------------------------------------------------------------------------
 * Code for interface org.gnome.RemoteDesktop.Rdp.Server
 * ------------------------------------------------------------------------
 */

/**
 * SECTION:GrdDBusRemoteDesktopRdpServer
 * @title: GrdDBusRemoteDesktopRdpServer
 * @short_description: Generated C code for the org.gnome.RemoteDesktop.Rdp.Server D-Bus interface
 *
 * This section contains code for working with the <link linkend="gdbus-interface-org-gnome-RemoteDesktop-Rdp-Server.top_of_page">org.gnome.RemoteDesktop.Rdp.Server</link> D-Bus interface in C.
 */

enum
{
  GRD_DBUS_REMOTE_DESKTOP__RDP_SERVER_BINDING,
  GRD_DBUS_REMOTE_DESKTOP__RDP_SERVER_NEW_CONNECTION,
};

static unsigned GRD_DBUS_REMOTE_DESKTOP__RDP_SERVER_SIGNALS[2] = { 0 };

/* ---- Introspection data for org.gnome.RemoteDesktop.Rdp.Server ---- */

static const _ExtendedGDBusArgInfo _grd_dbus_remote_desktop_rdp_server_signal_info_binding_ARG_port =
{
  {
    -1,
    (gchar *) "port",
    (gchar *) "i",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _grd_dbus_remote_desktop_rdp_server_signal_info_binding_ARG_pointers[] =
{
  &_grd_dbus_remote_desktop_rdp_server_signal_info_binding_ARG_port.parent_struct,
  NULL
};

static const _ExtendedGDBusSignalInfo _grd_dbus_remote_desktop_rdp_server_signal_info_binding =
{
  {
    -1,
    (gchar *) "Binding",
    (GDBusArgInfo **) &_grd_dbus_remote_desktop_rdp_server_signal_info_binding_ARG_pointers,
    NULL
  },
  "binding"
};

static const _ExtendedGDBusSignalInfo _grd_dbus_remote_desktop_rdp_server_signal_info_new_connection =
{
  {
    -1,
    (gchar *) "NewConnection",
    NULL,
    NULL
  },
  "new-connection"
};

static const GDBusSignalInfo * const _grd_dbus_remote_desktop_rdp_server_signal_info_pointers[] =
{
  &_grd_dbus_remote_desktop_rdp_server_signal_info_binding.parent_struct,
  &_grd_dbus_remote_desktop_rdp_server_signal_info_new_connection.parent_struct,
  NULL
};

static const _ExtendedGDBusPropertyInfo _grd_dbus_remote_desktop_rdp_server_property_info_enabled =
{
  {
    -1,
    (gchar *) "Enabled",
    (gchar *) "b",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "enabled",
  FALSE,
  TRUE
};

static const _ExtendedGDBusPropertyInfo _grd_dbus_remote_desktop_rdp_server_property_info_port =
{
  {
    -1,
    (gchar *) "Port",
    (gchar *) "i",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "port",
  FALSE,
  TRUE
};

static const _ExtendedGDBusPropertyInfo _grd_dbus_remote_desktop_rdp_server_property_info_negotiate_port =
{
  {
    -1,
    (gchar *) "NegotiatePort",
    (gchar *) "b",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "negotiate-port",
  FALSE,
  TRUE
};

static const _ExtendedGDBusPropertyInfo _grd_dbus_remote_desktop_rdp_server_property_info_tls_cert =
{
  {
    -1,
    (gchar *) "TlsCert",
    (gchar *) "s",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "tls-cert",
  FALSE,
  TRUE
};

static const _ExtendedGDBusPropertyInfo _grd_dbus_remote_desktop_rdp_server_property_info_tls_fingerprint =
{
  {
    -1,
    (gchar *) "TlsFingerprint",
    (gchar *) "s",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "tls-fingerprint",
  FALSE,
  TRUE
};

static const _ExtendedGDBusPropertyInfo _grd_dbus_remote_desktop_rdp_server_property_info_tls_key =
{
  {
    -1,
    (gchar *) "TlsKey",
    (gchar *) "s",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "tls-key",
  FALSE,
  TRUE
};

static const _ExtendedGDBusPropertyInfo _grd_dbus_remote_desktop_rdp_server_property_info_auth_methods =
{
  {
    -1,
    (gchar *) "AuthMethods",
    (gchar *) "u",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "auth-methods",
  FALSE,
  TRUE
};

static const _ExtendedGDBusPropertyInfo _grd_dbus_remote_desktop_rdp_server_property_info_kerberos_keytab =
{
  {
    -1,
    (gchar *) "KerberosKeytab",
    (gchar *) "s",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "kerberos-keytab",
  FALSE,
  TRUE
};

static const _ExtendedGDBusPropertyInfo _grd_dbus_remote_desktop_rdp_server_property_info_view_only =
{
  {
    -1,
    (gchar *) "ViewOnly",
    (gchar *) "b",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "view-only",
  FALSE,
  TRUE
};

static const GDBusPropertyInfo * const _grd_dbus_remote_desktop_rdp_server_property_info_pointers[] =
{
  &_grd_dbus_remote_desktop_rdp_server_property_info_enabled.parent_struct,
  &_grd_dbus_remote_desktop_rdp_server_property_info_port.parent_struct,
  &_grd_dbus_remote_desktop_rdp_server_property_info_negotiate_port.parent_struct,
  &_grd_dbus_remote_desktop_rdp_server_property_info_tls_cert.parent_struct,
  &_grd_dbus_remote_desktop_rdp_server_property_info_tls_fingerprint.parent_struct,
  &_grd_dbus_remote_desktop_rdp_server_property_info_tls_key.parent_struct,
  &_grd_dbus_remote_desktop_rdp_server_property_info_auth_methods.parent_struct,
  &_grd_dbus_remote_desktop_rdp_server_property_info_kerberos_keytab.parent_struct,
  &_grd_dbus_remote_desktop_rdp_server_property_info_view_only.parent_struct,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _grd_dbus_remote_desktop_rdp_server_interface_info =
{
  {
    -1,
    (gchar *) "org.gnome.RemoteDesktop.Rdp.Server",
    NULL,
    (GDBusSignalInfo **) &_grd_dbus_remote_desktop_rdp_server_signal_info_pointers,
    (GDBusPropertyInfo **) &_grd_dbus_remote_desktop_rdp_server_property_info_pointers,
    NULL
  },
  "rdp-server",
};


/**
 * grd_dbus_remote_desktop_rdp_server_interface_info:
 *
 * Gets a machine-readable description of the <link linkend="gdbus-interface-org-gnome-RemoteDesktop-Rdp-Server.top_of_page">org.gnome.RemoteDesktop.Rdp.Server</link> D-Bus interface.
 *
 * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
 */
GDBusInterfaceInfo *
grd_dbus_remote_desktop_rdp_server_interface_info (void)
{
  return (GDBusInterfaceInfo *) &_grd_dbus_remote_desktop_rdp_server_interface_info.parent_struct;
}

/**
 * grd_dbus_remote_desktop_rdp_server_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 #GrdDBusRemoteDesktopRdpServer interface for a concrete class.
 * The properties are overridden in the order they are defined.
 *
 * Returns: The last property id.
 */
guint
grd_dbus_remote_desktop_rdp_server_override_properties (GObjectClass *klass, guint property_id_begin)
{
  g_object_class_override_property (klass, property_id_begin++, "enabled");
  g_object_class_override_property (klass, property_id_begin++, "port");
  g_object_class_override_property (klass, property_id_begin++, "negotiate-port");
  g_object_class_override_property (klass, property_id_begin++, "tls-cert");
  g_object_class_override_property (klass, property_id_begin++, "tls-fingerprint");
  g_object_class_override_property (klass, property_id_begin++, "tls-key");
  g_object_class_override_property (klass, property_id_begin++, "auth-methods");
  g_object_class_override_property (klass, property_id_begin++, "kerberos-keytab");
  g_object_class_override_property (klass, property_id_begin++, "view-only");
  return property_id_begin - 1;
}


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

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


/**
 * GrdDBusRemoteDesktopRdpServer:
 *
 * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-gnome-RemoteDesktop-Rdp-Server.top_of_page">org.gnome.RemoteDesktop.Rdp.Server</link>.
 */

/**
 * GrdDBusRemoteDesktopRdpServerIface:
 * @parent_iface: The parent interface.
 * @get_auth_methods: Getter for the #GrdDBusRemoteDesktopRdpServer:auth-methods property.
 * @get_enabled: Getter for the #GrdDBusRemoteDesktopRdpServer:enabled property.
 * @get_kerberos_keytab: Getter for the #GrdDBusRemoteDesktopRdpServer:kerberos-keytab property.
 * @get_negotiate_port: Getter for the #GrdDBusRemoteDesktopRdpServer:negotiate-port property.
 * @get_port: Getter for the #GrdDBusRemoteDesktopRdpServer:port property.
 * @get_tls_cert: Getter for the #GrdDBusRemoteDesktopRdpServer:tls-cert property.
 * @get_tls_fingerprint: Getter for the #GrdDBusRemoteDesktopRdpServer:tls-fingerprint property.
 * @get_tls_key: Getter for the #GrdDBusRemoteDesktopRdpServer:tls-key property.
 * @get_view_only: Getter for the #GrdDBusRemoteDesktopRdpServer:view-only property.
 * @binding: Handler for the #GrdDBusRemoteDesktopRdpServer::binding signal.
 * @new_connection: Handler for the #GrdDBusRemoteDesktopRdpServer::new-connection signal.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-gnome-RemoteDesktop-Rdp-Server.top_of_page">org.gnome.RemoteDesktop.Rdp.Server</link>.
 */

typedef GrdDBusRemoteDesktopRdpServerIface GrdDBusRemoteDesktopRdpServerInterface;
G_DEFINE_INTERFACE (GrdDBusRemoteDesktopRdpServer, grd_dbus_remote_desktop_rdp_server, G_TYPE_OBJECT)

static void
grd_dbus_remote_desktop_rdp_server_default_init (GrdDBusRemoteDesktopRdpServerIface *iface)
{
  /* GObject signals for received D-Bus signals: */
  /**
   * GrdDBusRemoteDesktopRdpServer::binding:
   * @object: A #GrdDBusRemoteDesktopRdpServer.
   * @arg_port: Argument.
   *
   * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-gnome-RemoteDesktop-Rdp-Server.Binding">"Binding"</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.
   */
  GRD_DBUS_REMOTE_DESKTOP__RDP_SERVER_SIGNALS[GRD_DBUS_REMOTE_DESKTOP__RDP_SERVER_BINDING] =
    g_signal_new ("binding",
      G_TYPE_FROM_INTERFACE (iface),
      G_SIGNAL_RUN_LAST,
      G_STRUCT_OFFSET (GrdDBusRemoteDesktopRdpServerIface, binding),
      NULL,
      NULL,
      grd_dbus_remote_desktop_rdp_server_signal_marshal_binding,
      G_TYPE_NONE,
      1, G_TYPE_INT);

  /**
   * GrdDBusRemoteDesktopRdpServer::new-connection:
   * @object: A #GrdDBusRemoteDesktopRdpServer.
   *
   * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-gnome-RemoteDesktop-Rdp-Server.NewConnection">"NewConnection"</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.
   */
  GRD_DBUS_REMOTE_DESKTOP__RDP_SERVER_SIGNALS[GRD_DBUS_REMOTE_DESKTOP__RDP_SERVER_NEW_CONNECTION] =
    g_signal_new ("new-connection",
      G_TYPE_FROM_INTERFACE (iface),
      G_SIGNAL_RUN_LAST,
      G_STRUCT_OFFSET (GrdDBusRemoteDesktopRdpServerIface, new_connection),
      NULL,
      NULL,
      grd_dbus_remote_desktop_rdp_server_signal_marshal_new_connection,
      G_TYPE_NONE,
      0);

  /* GObject properties for D-Bus properties: */
  /**
   * GrdDBusRemoteDesktopRdpServer:enabled:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-gnome-RemoteDesktop-Rdp-Server.Enabled">"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 ("enabled", "Enabled", "Enabled", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * GrdDBusRemoteDesktopRdpServer:port:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-gnome-RemoteDesktop-Rdp-Server.Port">"Port"</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 ("port", "Port", "Port", G_MININT32, G_MAXINT32, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * GrdDBusRemoteDesktopRdpServer:negotiate-port:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-gnome-RemoteDesktop-Rdp-Server.NegotiatePort">"NegotiatePort"</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 ("negotiate-port", "NegotiatePort", "NegotiatePort", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * GrdDBusRemoteDesktopRdpServer:tls-cert:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-gnome-RemoteDesktop-Rdp-Server.TlsCert">"TlsCert"</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_string ("tls-cert", "TlsCert", "TlsCert", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * GrdDBusRemoteDesktopRdpServer:tls-fingerprint:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-gnome-RemoteDesktop-Rdp-Server.TlsFingerprint">"TlsFingerprint"</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_string ("tls-fingerprint", "TlsFingerprint", "TlsFingerprint", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * GrdDBusRemoteDesktopRdpServer:tls-key:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-gnome-RemoteDesktop-Rdp-Server.TlsKey">"TlsKey"</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_string ("tls-key", "TlsKey", "TlsKey", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * GrdDBusRemoteDesktopRdpServer:auth-methods:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-gnome-RemoteDesktop-Rdp-Server.AuthMethods">"AuthMethods"</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 ("auth-methods", "AuthMethods", "AuthMethods", 0, G_MAXUINT32, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * GrdDBusRemoteDesktopRdpServer:kerberos-keytab:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-gnome-RemoteDesktop-Rdp-Server.KerberosKeytab">"KerberosKeytab"</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_string ("kerberos-keytab", "KerberosKeytab", "KerberosKeytab", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * GrdDBusRemoteDesktopRdpServer:view-only:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-gnome-RemoteDesktop-Rdp-Server.ViewOnly">"ViewOnly"</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 ("view-only", "ViewOnly", "ViewOnly", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
}

/**
 * grd_dbus_remote_desktop_rdp_server_get_enabled: (skip)
 * @object: A #GrdDBusRemoteDesktopRdpServer.
 *
 * Gets the value of the <link linkend="gdbus-property-org-gnome-RemoteDesktop-Rdp-Server.Enabled">"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 
grd_dbus_remote_desktop_rdp_server_get_enabled (GrdDBusRemoteDesktopRdpServer *object)
{
  g_return_val_if_fail (GRD_DBUS_REMOTE_DESKTOP_IS_RDP_SERVER (object), FALSE);

  return GRD_DBUS_REMOTE_DESKTOP_RDP_SERVER_GET_IFACE (object)->get_enabled (object);
}

/**
 * grd_dbus_remote_desktop_rdp_server_set_enabled: (skip)
 * @object: A #GrdDBusRemoteDesktopRdpServer.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-gnome-RemoteDesktop-Rdp-Server.Enabled">"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
grd_dbus_remote_desktop_rdp_server_set_enabled (GrdDBusRemoteDesktopRdpServer *object, gboolean value)
{
  g_object_set (G_OBJECT (object), "enabled", value, NULL);
}

/**
 * grd_dbus_remote_desktop_rdp_server_get_port: (skip)
 * @object: A #GrdDBusRemoteDesktopRdpServer.
 *
 * Gets the value of the <link linkend="gdbus-property-org-gnome-RemoteDesktop-Rdp-Server.Port">"Port"</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 
grd_dbus_remote_desktop_rdp_server_get_port (GrdDBusRemoteDesktopRdpServer *object)
{
  g_return_val_if_fail (GRD_DBUS_REMOTE_DESKTOP_IS_RDP_SERVER (object), 0);

  return GRD_DBUS_REMOTE_DESKTOP_RDP_SERVER_GET_IFACE (object)->get_port (object);
}

/**
 * grd_dbus_remote_desktop_rdp_server_set_port: (skip)
 * @object: A #GrdDBusRemoteDesktopRdpServer.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-gnome-RemoteDesktop-Rdp-Server.Port">"Port"</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
grd_dbus_remote_desktop_rdp_server_set_port (GrdDBusRemoteDesktopRdpServer *object, gint value)
{
  g_object_set (G_OBJECT (object), "port", value, NULL);
}

/**
 * grd_dbus_remote_desktop_rdp_server_get_negotiate_port: (skip)
 * @object: A #GrdDBusRemoteDesktopRdpServer.
 *
 * Gets the value of the <link linkend="gdbus-property-org-gnome-RemoteDesktop-Rdp-Server.NegotiatePort">"NegotiatePort"</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 
grd_dbus_remote_desktop_rdp_server_get_negotiate_port (GrdDBusRemoteDesktopRdpServer *object)
{
  g_return_val_if_fail (GRD_DBUS_REMOTE_DESKTOP_IS_RDP_SERVER (object), FALSE);

  return GRD_DBUS_REMOTE_DESKTOP_RDP_SERVER_GET_IFACE (object)->get_negotiate_port (object);
}

/**
 * grd_dbus_remote_desktop_rdp_server_set_negotiate_port: (skip)
 * @object: A #GrdDBusRemoteDesktopRdpServer.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-gnome-RemoteDesktop-Rdp-Server.NegotiatePort">"NegotiatePort"</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
grd_dbus_remote_desktop_rdp_server_set_negotiate_port (GrdDBusRemoteDesktopRdpServer *object, gboolean value)
{
  g_object_set (G_OBJECT (object), "negotiate-port", value, NULL);
}

/**
 * grd_dbus_remote_desktop_rdp_server_get_tls_cert: (skip)
 * @object: A #GrdDBusRemoteDesktopRdpServer.
 *
 * Gets the value of the <link linkend="gdbus-property-org-gnome-RemoteDesktop-Rdp-Server.TlsCert">"TlsCert"</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 grd_dbus_remote_desktop_rdp_server_dup_tls_cert() 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.
 */
const gchar *
grd_dbus_remote_desktop_rdp_server_get_tls_cert (GrdDBusRemoteDesktopRdpServer *object)
{
  g_return_val_if_fail (GRD_DBUS_REMOTE_DESKTOP_IS_RDP_SERVER (object), NULL);

  return GRD_DBUS_REMOTE_DESKTOP_RDP_SERVER_GET_IFACE (object)->get_tls_cert (object);
}

/**
 * grd_dbus_remote_desktop_rdp_server_dup_tls_cert: (skip)
 * @object: A #GrdDBusRemoteDesktopRdpServer.
 *
 * Gets a copy of the <link linkend="gdbus-property-org-gnome-RemoteDesktop-Rdp-Server.TlsCert">"TlsCert"</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_free().
 */
gchar *
grd_dbus_remote_desktop_rdp_server_dup_tls_cert (GrdDBusRemoteDesktopRdpServer *object)
{
  gchar *value;
  g_object_get (G_OBJECT (object), "tls-cert", &value, NULL);
  return value;
}

/**
 * grd_dbus_remote_desktop_rdp_server_set_tls_cert: (skip)
 * @object: A #GrdDBusRemoteDesktopRdpServer.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-gnome-RemoteDesktop-Rdp-Server.TlsCert">"TlsCert"</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
grd_dbus_remote_desktop_rdp_server_set_tls_cert (GrdDBusRemoteDesktopRdpServer *object, const gchar *value)
{
  g_object_set (G_OBJECT (object), "tls-cert", value, NULL);
}

/**
 * grd_dbus_remote_desktop_rdp_server_get_tls_fingerprint: (skip)
 * @object: A #GrdDBusRemoteDesktopRdpServer.
 *
 * Gets the value of the <link linkend="gdbus-property-org-gnome-RemoteDesktop-Rdp-Server.TlsFingerprint">"TlsFingerprint"</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 grd_dbus_remote_desktop_rdp_server_dup_tls_fingerprint() 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.
 */
const gchar *
grd_dbus_remote_desktop_rdp_server_get_tls_fingerprint (GrdDBusRemoteDesktopRdpServer *object)
{
  g_return_val_if_fail (GRD_DBUS_REMOTE_DESKTOP_IS_RDP_SERVER (object), NULL);

  return GRD_DBUS_REMOTE_DESKTOP_RDP_SERVER_GET_IFACE (object)->get_tls_fingerprint (object);
}

/**
 * grd_dbus_remote_desktop_rdp_server_dup_tls_fingerprint: (skip)
 * @object: A #GrdDBusRemoteDesktopRdpServer.
 *
 * Gets a copy of the <link linkend="gdbus-property-org-gnome-RemoteDesktop-Rdp-Server.TlsFingerprint">"TlsFingerprint"</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_free().
 */
gchar *
grd_dbus_remote_desktop_rdp_server_dup_tls_fingerprint (GrdDBusRemoteDesktopRdpServer *object)
{
  gchar *value;
  g_object_get (G_OBJECT (object), "tls-fingerprint", &value, NULL);
  return value;
}

/**
 * grd_dbus_remote_desktop_rdp_server_set_tls_fingerprint: (skip)
 * @object: A #GrdDBusRemoteDesktopRdpServer.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-gnome-RemoteDesktop-Rdp-Server.TlsFingerprint">"TlsFingerprint"</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
grd_dbus_remote_desktop_rdp_server_set_tls_fingerprint (GrdDBusRemoteDesktopRdpServer *object, const gchar *value)
{
  g_object_set (G_OBJECT (object), "tls-fingerprint", value, NULL);
}

/**
 * grd_dbus_remote_desktop_rdp_server_get_tls_key: (skip)
 * @object: A #GrdDBusRemoteDesktopRdpServer.
 *
 * Gets the value of the <link linkend="gdbus-property-org-gnome-RemoteDesktop-Rdp-Server.TlsKey">"TlsKey"</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 grd_dbus_remote_desktop_rdp_server_dup_tls_key() 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.
 */
const gchar *
grd_dbus_remote_desktop_rdp_server_get_tls_key (GrdDBusRemoteDesktopRdpServer *object)
{
  g_return_val_if_fail (GRD_DBUS_REMOTE_DESKTOP_IS_RDP_SERVER (object), NULL);

  return GRD_DBUS_REMOTE_DESKTOP_RDP_SERVER_GET_IFACE (object)->get_tls_key (object);
}

/**
 * grd_dbus_remote_desktop_rdp_server_dup_tls_key: (skip)
 * @object: A #GrdDBusRemoteDesktopRdpServer.
 *
 * Gets a copy of the <link linkend="gdbus-property-org-gnome-RemoteDesktop-Rdp-Server.TlsKey">"TlsKey"</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_free().
 */
gchar *
grd_dbus_remote_desktop_rdp_server_dup_tls_key (GrdDBusRemoteDesktopRdpServer *object)
{
  gchar *value;
  g_object_get (G_OBJECT (object), "tls-key", &value, NULL);
  return value;
}

/**
 * grd_dbus_remote_desktop_rdp_server_set_tls_key: (skip)
 * @object: A #GrdDBusRemoteDesktopRdpServer.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-gnome-RemoteDesktop-Rdp-Server.TlsKey">"TlsKey"</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
grd_dbus_remote_desktop_rdp_server_set_tls_key (GrdDBusRemoteDesktopRdpServer *object, const gchar *value)
{
  g_object_set (G_OBJECT (object), "tls-key", value, NULL);
}

/**
 * grd_dbus_remote_desktop_rdp_server_get_auth_methods: (skip)
 * @object: A #GrdDBusRemoteDesktopRdpServer.
 *
 * Gets the value of the <link linkend="gdbus-property-org-gnome-RemoteDesktop-Rdp-Server.AuthMethods">"AuthMethods"</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 
grd_dbus_remote_desktop_rdp_server_get_auth_methods (GrdDBusRemoteDesktopRdpServer *object)
{
  g_return_val_if_fail (GRD_DBUS_REMOTE_DESKTOP_IS_RDP_SERVER (object), 0);

  return GRD_DBUS_REMOTE_DESKTOP_RDP_SERVER_GET_IFACE (object)->get_auth_methods (object);
}

/**
 * grd_dbus_remote_desktop_rdp_server_set_auth_methods: (skip)
 * @object: A #GrdDBusRemoteDesktopRdpServer.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-gnome-RemoteDesktop-Rdp-Server.AuthMethods">"AuthMethods"</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
grd_dbus_remote_desktop_rdp_server_set_auth_methods (GrdDBusRemoteDesktopRdpServer *object, guint value)
{
  g_object_set (G_OBJECT (object), "auth-methods", value, NULL);
}

/**
 * grd_dbus_remote_desktop_rdp_server_get_kerberos_keytab: (skip)
 * @object: A #GrdDBusRemoteDesktopRdpServer.
 *
 * Gets the value of the <link linkend="gdbus-property-org-gnome-RemoteDesktop-Rdp-Server.KerberosKeytab">"KerberosKeytab"</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 grd_dbus_remote_desktop_rdp_server_dup_kerberos_keytab() 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.
 */
const gchar *
grd_dbus_remote_desktop_rdp_server_get_kerberos_keytab (GrdDBusRemoteDesktopRdpServer *object)
{
  g_return_val_if_fail (GRD_DBUS_REMOTE_DESKTOP_IS_RDP_SERVER (object), NULL);

  return GRD_DBUS_REMOTE_DESKTOP_RDP_SERVER_GET_IFACE (object)->get_kerberos_keytab (object);
}

/**
 * grd_dbus_remote_desktop_rdp_server_dup_kerberos_keytab: (skip)
 * @object: A #GrdDBusRemoteDesktopRdpServer.
 *
 * Gets a copy of the <link linkend="gdbus-property-org-gnome-RemoteDesktop-Rdp-Server.KerberosKeytab">"KerberosKeytab"</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_free().
 */
gchar *
grd_dbus_remote_desktop_rdp_server_dup_kerberos_keytab (GrdDBusRemoteDesktopRdpServer *object)
{
  gchar *value;
  g_object_get (G_OBJECT (object), "kerberos-keytab", &value, NULL);
  return value;
}

/**
 * grd_dbus_remote_desktop_rdp_server_set_kerberos_keytab: (skip)
 * @object: A #GrdDBusRemoteDesktopRdpServer.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-gnome-RemoteDesktop-Rdp-Server.KerberosKeytab">"KerberosKeytab"</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
grd_dbus_remote_desktop_rdp_server_set_kerberos_keytab (GrdDBusRemoteDesktopRdpServer *object, const gchar *value)
{
  g_object_set (G_OBJECT (object), "kerberos-keytab", value, NULL);
}

/**
 * grd_dbus_remote_desktop_rdp_server_get_view_only: (skip)
 * @object: A #GrdDBusRemoteDesktopRdpServer.
 *
 * Gets the value of the <link linkend="gdbus-property-org-gnome-RemoteDesktop-Rdp-Server.ViewOnly">"ViewOnly"</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 
grd_dbus_remote_desktop_rdp_server_get_view_only (GrdDBusRemoteDesktopRdpServer *object)
{
  g_return_val_if_fail (GRD_DBUS_REMOTE_DESKTOP_IS_RDP_SERVER (object), FALSE);

  return GRD_DBUS_REMOTE_DESKTOP_RDP_SERVER_GET_IFACE (object)->get_view_only (object);
}

/**
 * grd_dbus_remote_desktop_rdp_server_set_view_only: (skip)
 * @object: A #GrdDBusRemoteDesktopRdpServer.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-gnome-RemoteDesktop-Rdp-Server.ViewOnly">"ViewOnly"</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
grd_dbus_remote_desktop_rdp_server_set_view_only (GrdDBusRemoteDesktopRdpServer *object, gboolean value)
{
  g_object_set (G_OBJECT (object), "view-only", value, NULL);
}

/**
 * grd_dbus_remote_desktop_rdp_server_emit_binding:
 * @object: A #GrdDBusRemoteDesktopRdpServer.
 * @arg_port: Argument to pass with the signal.
 *
 * Emits the <link linkend="gdbus-signal-org-gnome-RemoteDesktop-Rdp-Server.Binding">"Binding"</link> D-Bus signal.
 */
void
grd_dbus_remote_desktop_rdp_server_emit_binding (
    GrdDBusRemoteDesktopRdpServer *object,
    gint arg_port)
{
  g_signal_emit (object, GRD_DBUS_REMOTE_DESKTOP__RDP_SERVER_SIGNALS[GRD_DBUS_REMOTE_DESKTOP__RDP_SERVER_BINDING], 0, arg_port);
}

/**
 * grd_dbus_remote_desktop_rdp_server_emit_new_connection:
 * @object: A #GrdDBusRemoteDesktopRdpServer.
 *
 * Emits the <link linkend="gdbus-signal-org-gnome-RemoteDesktop-Rdp-Server.NewConnection">"NewConnection"</link> D-Bus signal.
 */
void
grd_dbus_remote_desktop_rdp_server_emit_new_connection (
    GrdDBusRemoteDesktopRdpServer *object)
{
  g_signal_emit (object, GRD_DBUS_REMOTE_DESKTOP__RDP_SERVER_SIGNALS[GRD_DBUS_REMOTE_DESKTOP__RDP_SERVER_NEW_CONNECTION], 0);
}

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

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

/**
 * GrdDBusRemoteDesktopRdpServerProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #GrdDBusRemoteDesktopRdpServerProxy.
 */

struct _GrdDBusRemoteDesktopRdpServerProxyPrivate
{
  GData *qdata;
};

static void grd_dbus_remote_desktop_rdp_server_proxy_iface_init (GrdDBusRemoteDesktopRdpServerIface *iface);

#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (GrdDBusRemoteDesktopRdpServerProxy, grd_dbus_remote_desktop_rdp_server_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (GrdDBusRemoteDesktopRdpServerProxy)
                         G_IMPLEMENT_INTERFACE (GRD_DBUS_REMOTE_DESKTOP_TYPE_RDP_SERVER, grd_dbus_remote_desktop_rdp_server_proxy_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (GrdDBusRemoteDesktopRdpServerProxy, grd_dbus_remote_desktop_rdp_server_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (GRD_DBUS_REMOTE_DESKTOP_TYPE_RDP_SERVER, grd_dbus_remote_desktop_rdp_server_proxy_iface_init))

#endif
static void
grd_dbus_remote_desktop_rdp_server_proxy_finalize (GObject *object)
{
  GrdDBusRemoteDesktopRdpServerProxy *proxy = GRD_DBUS_REMOTE_DESKTOP_RDP_SERVER_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (grd_dbus_remote_desktop_rdp_server_proxy_parent_class)->finalize (object);
}

static void
grd_dbus_remote_desktop_rdp_server_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 < 9);
  info = (const _ExtendedGDBusPropertyInfo *) _grd_dbus_remote_desktop_rdp_server_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
grd_dbus_remote_desktop_rdp_server_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.gnome.RemoteDesktop.Rdp.Server: %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
grd_dbus_remote_desktop_rdp_server_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 < 9);
  info = (const _ExtendedGDBusPropertyInfo *) _grd_dbus_remote_desktop_rdp_server_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.gnome.RemoteDesktop.Rdp.Server", info->parent_struct.name, variant),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    NULL, (GAsyncReadyCallback) grd_dbus_remote_desktop_rdp_server_proxy_set_property_cb, (GDBusPropertyInfo *) &info->parent_struct);
  g_variant_unref (variant);
}

static void
grd_dbus_remote_desktop_rdp_server_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 *) &_grd_dbus_remote_desktop_rdp_server_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], GRD_DBUS_REMOTE_DESKTOP_TYPE_RDP_SERVER);
  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, GRD_DBUS_REMOTE_DESKTOP_TYPE_RDP_SERVER);
  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
grd_dbus_remote_desktop_rdp_server_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  GrdDBusRemoteDesktopRdpServerProxy *proxy = GRD_DBUS_REMOTE_DESKTOP_RDP_SERVER_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 *) &_grd_dbus_remote_desktop_rdp_server_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 *) &_grd_dbus_remote_desktop_rdp_server_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 
grd_dbus_remote_desktop_rdp_server_proxy_get_enabled (GrdDBusRemoteDesktopRdpServer *object)
{
  GrdDBusRemoteDesktopRdpServerProxy *proxy = GRD_DBUS_REMOTE_DESKTOP_RDP_SERVER_PROXY (object);
  GVariant *variant;
  gboolean value = FALSE;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Enabled");
  if (variant != NULL)
    {
      value = g_variant_get_boolean (variant);
      g_variant_unref (variant);
    }
  return value;
}

static gint 
grd_dbus_remote_desktop_rdp_server_proxy_get_port (GrdDBusRemoteDesktopRdpServer *object)
{
  GrdDBusRemoteDesktopRdpServerProxy *proxy = GRD_DBUS_REMOTE_DESKTOP_RDP_SERVER_PROXY (object);
  GVariant *variant;
  gint value = 0;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Port");
  if (variant != NULL)
    {
      value = g_variant_get_int32 (variant);
      g_variant_unref (variant);
    }
  return value;
}

static gboolean 
grd_dbus_remote_desktop_rdp_server_proxy_get_negotiate_port (GrdDBusRemoteDesktopRdpServer *object)
{
  GrdDBusRemoteDesktopRdpServerProxy *proxy = GRD_DBUS_REMOTE_DESKTOP_RDP_SERVER_PROXY (object);
  GVariant *variant;
  gboolean value = FALSE;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "NegotiatePort");
  if (variant != NULL)
    {
      value = g_variant_get_boolean (variant);
      g_variant_unref (variant);
    }
  return value;
}

static const gchar *
grd_dbus_remote_desktop_rdp_server_proxy_get_tls_cert (GrdDBusRemoteDesktopRdpServer *object)
{
  GrdDBusRemoteDesktopRdpServerProxy *proxy = GRD_DBUS_REMOTE_DESKTOP_RDP_SERVER_PROXY (object);
  GVariant *variant;
  const gchar *value = NULL;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "TlsCert");
  if (variant != NULL)
    {
      value = g_variant_get_string (variant, NULL);
      g_variant_unref (variant);
    }
  return value;
}

static const gchar *
grd_dbus_remote_desktop_rdp_server_proxy_get_tls_fingerprint (GrdDBusRemoteDesktopRdpServer *object)
{
  GrdDBusRemoteDesktopRdpServerProxy *proxy = GRD_DBUS_REMOTE_DESKTOP_RDP_SERVER_PROXY (object);
  GVariant *variant;
  const gchar *value = NULL;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "TlsFingerprint");
  if (variant != NULL)
    {
      value = g_variant_get_string (variant, NULL);
      g_variant_unref (variant);
    }
  return value;
}

static const gchar *
grd_dbus_remote_desktop_rdp_server_proxy_get_tls_key (GrdDBusRemoteDesktopRdpServer *object)
{
  GrdDBusRemoteDesktopRdpServerProxy *proxy = GRD_DBUS_REMOTE_DESKTOP_RDP_SERVER_PROXY (object);
  GVariant *variant;
  const gchar *value = NULL;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "TlsKey");
  if (variant != NULL)
    {
      value = g_variant_get_string (variant, NULL);
      g_variant_unref (variant);
    }
  return value;
}

static guint 
grd_dbus_remote_desktop_rdp_server_proxy_get_auth_methods (GrdDBusRemoteDesktopRdpServer *object)
{
  GrdDBusRemoteDesktopRdpServerProxy *proxy = GRD_DBUS_REMOTE_DESKTOP_RDP_SERVER_PROXY (object);
  GVariant *variant;
  guint value = 0;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "AuthMethods");
  if (variant != NULL)
    {
      value = g_variant_get_uint32 (variant);
      g_variant_unref (variant);
    }
  return value;
}

static const gchar *
grd_dbus_remote_desktop_rdp_server_proxy_get_kerberos_keytab (GrdDBusRemoteDesktopRdpServer *object)
{
  GrdDBusRemoteDesktopRdpServerProxy *proxy = GRD_DBUS_REMOTE_DESKTOP_RDP_SERVER_PROXY (object);
  GVariant *variant;
  const gchar *value = NULL;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "KerberosKeytab");
  if (variant != NULL)
    {
      value = g_variant_get_string (variant, NULL);
      g_variant_unref (variant);
    }
  return value;
}

static gboolean 
grd_dbus_remote_desktop_rdp_server_proxy_get_view_only (GrdDBusRemoteDesktopRdpServer *object)
{
  GrdDBusRemoteDesktopRdpServerProxy *proxy = GRD_DBUS_REMOTE_DESKTOP_RDP_SERVER_PROXY (object);
  GVariant *variant;
  gboolean value = FALSE;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "ViewOnly");
  if (variant != NULL)
    {
      value = g_variant_get_boolean (variant);
      g_variant_unref (variant);
    }
  return value;
}

static void
grd_dbus_remote_desktop_rdp_server_proxy_init (GrdDBusRemoteDesktopRdpServerProxy *proxy)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  proxy->priv = grd_dbus_remote_desktop_rdp_server_proxy_get_instance_private (proxy);
#else
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, GRD_DBUS_REMOTE_DESKTOP_TYPE_RDP_SERVER_PROXY, GrdDBusRemoteDesktopRdpServerProxyPrivate);
#endif

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

static void
grd_dbus_remote_desktop_rdp_server_proxy_class_init (GrdDBusRemoteDesktopRdpServerProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = grd_dbus_remote_desktop_rdp_server_proxy_finalize;
  gobject_class->get_property = grd_dbus_remote_desktop_rdp_server_proxy_get_property;
  gobject_class->set_property = grd_dbus_remote_desktop_rdp_server_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = grd_dbus_remote_desktop_rdp_server_proxy_g_signal;
  proxy_class->g_properties_changed = grd_dbus_remote_desktop_rdp_server_proxy_g_properties_changed;

  grd_dbus_remote_desktop_rdp_server_override_properties (gobject_class, 1);

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

static void
grd_dbus_remote_desktop_rdp_server_proxy_iface_init (GrdDBusRemoteDesktopRdpServerIface *iface)
{
  iface->get_enabled = grd_dbus_remote_desktop_rdp_server_proxy_get_enabled;
  iface->get_port = grd_dbus_remote_desktop_rdp_server_proxy_get_port;
  iface->get_negotiate_port = grd_dbus_remote_desktop_rdp_server_proxy_get_negotiate_port;
  iface->get_tls_cert = grd_dbus_remote_desktop_rdp_server_proxy_get_tls_cert;
  iface->get_tls_fingerprint = grd_dbus_remote_desktop_rdp_server_proxy_get_tls_fingerprint;
  iface->get_tls_key = grd_dbus_remote_desktop_rdp_server_proxy_get_tls_key;
  iface->get_auth_methods = grd_dbus_remote_desktop_rdp_server_proxy_get_auth_methods;
  iface->get_kerberos_keytab = grd_dbus_remote_desktop_rdp_server_proxy_get_kerberos_keytab;
  iface->get_view_only = grd_dbus_remote_desktop_rdp_server_proxy_get_view_only;
}

/**
 * grd_dbus_remote_desktop_rdp_server_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-gnome-RemoteDesktop-Rdp-Server.top_of_page">org.gnome.RemoteDesktop.Rdp.Server</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 grd_dbus_remote_desktop_rdp_server_proxy_new_finish() to get the result of the operation.
 *
 * See grd_dbus_remote_desktop_rdp_server_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
grd_dbus_remote_desktop_rdp_server_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 (GRD_DBUS_REMOTE_DESKTOP_TYPE_RDP_SERVER_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.gnome.RemoteDesktop.Rdp.Server", NULL);
}

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

/**
 * grd_dbus_remote_desktop_rdp_server_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-gnome-RemoteDesktop-Rdp-Server.top_of_page">org.gnome.RemoteDesktop.Rdp.Server</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See grd_dbus_remote_desktop_rdp_server_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type GrdDBusRemoteDesktopRdpServerProxy): The constructed proxy object or %NULL if @error is set.
 */
GrdDBusRemoteDesktopRdpServer *
grd_dbus_remote_desktop_rdp_server_proxy_new_sync (
    GDBusConnection     *connection,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GError             **error)
{
  GInitable *ret;
  ret = g_initable_new (GRD_DBUS_REMOTE_DESKTOP_TYPE_RDP_SERVER_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.gnome.RemoteDesktop.Rdp.Server", NULL);
  if (ret != NULL)
    return GRD_DBUS_REMOTE_DESKTOP_RDP_SERVER (ret);
  else
    return NULL;
}


/**
 * grd_dbus_remote_desktop_rdp_server_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 grd_dbus_remote_desktop_rdp_server_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 grd_dbus_remote_desktop_rdp_server_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See grd_dbus_remote_desktop_rdp_server_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
grd_dbus_remote_desktop_rdp_server_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 (GRD_DBUS_REMOTE_DESKTOP_TYPE_RDP_SERVER_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.gnome.RemoteDesktop.Rdp.Server", NULL);
}

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

/**
 * grd_dbus_remote_desktop_rdp_server_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 grd_dbus_remote_desktop_rdp_server_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See grd_dbus_remote_desktop_rdp_server_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type GrdDBusRemoteDesktopRdpServerProxy): The constructed proxy object or %NULL if @error is set.
 */
GrdDBusRemoteDesktopRdpServer *
grd_dbus_remote_desktop_rdp_server_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 (GRD_DBUS_REMOTE_DESKTOP_TYPE_RDP_SERVER_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.gnome.RemoteDesktop.Rdp.Server", NULL);
  if (ret != NULL)
    return GRD_DBUS_REMOTE_DESKTOP_RDP_SERVER (ret);
  else
    return NULL;
}


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

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

/**
 * GrdDBusRemoteDesktopRdpServerSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #GrdDBusRemoteDesktopRdpServerSkeleton.
 */

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

static void
_grd_dbus_remote_desktop_rdp_server_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)
{
  GrdDBusRemoteDesktopRdpServerSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_RDP_SERVER_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], GRD_DBUS_REMOTE_DESKTOP_TYPE_RDP_SERVER);
  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, GRD_DBUS_REMOTE_DESKTOP_TYPE_RDP_SERVER);
  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 *
_grd_dbus_remote_desktop_rdp_server_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)
{
  GrdDBusRemoteDesktopRdpServerSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_RDP_SERVER_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 *) &_grd_dbus_remote_desktop_rdp_server_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
_grd_dbus_remote_desktop_rdp_server_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)
{
  GrdDBusRemoteDesktopRdpServerSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_RDP_SERVER_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 *) &_grd_dbus_remote_desktop_rdp_server_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 _grd_dbus_remote_desktop_rdp_server_skeleton_vtable =
{
  _grd_dbus_remote_desktop_rdp_server_skeleton_handle_method_call,
  _grd_dbus_remote_desktop_rdp_server_skeleton_handle_get_property,
  _grd_dbus_remote_desktop_rdp_server_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
grd_dbus_remote_desktop_rdp_server_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return grd_dbus_remote_desktop_rdp_server_interface_info ();
}

static GDBusInterfaceVTable *
grd_dbus_remote_desktop_rdp_server_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_grd_dbus_remote_desktop_rdp_server_skeleton_vtable;
}

static GVariant *
grd_dbus_remote_desktop_rdp_server_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  GrdDBusRemoteDesktopRdpServerSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_RDP_SERVER_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 (_grd_dbus_remote_desktop_rdp_server_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _grd_dbus_remote_desktop_rdp_server_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _grd_dbus_remote_desktop_rdp_server_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _grd_dbus_remote_desktop_rdp_server_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.gnome.RemoteDesktop.Rdp.Server", 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 _grd_dbus_remote_desktop_rdp_server_emit_changed (gpointer user_data);

static void
grd_dbus_remote_desktop_rdp_server_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
{
  GrdDBusRemoteDesktopRdpServerSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_RDP_SERVER_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)
    _grd_dbus_remote_desktop_rdp_server_emit_changed (skeleton);
}

static void
_grd_dbus_remote_desktop_rdp_server_on_signal_binding (
    GrdDBusRemoteDesktopRdpServer *object,
    gint arg_port)
{
  GrdDBusRemoteDesktopRdpServerSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_RDP_SERVER_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 ("(i)",
                   arg_port));
  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.gnome.RemoteDesktop.Rdp.Server", "Binding",
        signal_variant, NULL);
    }
  g_variant_unref (signal_variant);
  g_list_free_full (connections, g_object_unref);
}

static void
_grd_dbus_remote_desktop_rdp_server_on_signal_new_connection (
    GrdDBusRemoteDesktopRdpServer *object)
{
  GrdDBusRemoteDesktopRdpServerSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_RDP_SERVER_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.gnome.RemoteDesktop.Rdp.Server", "NewConnection",
        signal_variant, NULL);
    }
  g_variant_unref (signal_variant);
  g_list_free_full (connections, g_object_unref);
}

static void grd_dbus_remote_desktop_rdp_server_skeleton_iface_init (GrdDBusRemoteDesktopRdpServerIface *iface);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (GrdDBusRemoteDesktopRdpServerSkeleton, grd_dbus_remote_desktop_rdp_server_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (GrdDBusRemoteDesktopRdpServerSkeleton)
                         G_IMPLEMENT_INTERFACE (GRD_DBUS_REMOTE_DESKTOP_TYPE_RDP_SERVER, grd_dbus_remote_desktop_rdp_server_skeleton_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (GrdDBusRemoteDesktopRdpServerSkeleton, grd_dbus_remote_desktop_rdp_server_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (GRD_DBUS_REMOTE_DESKTOP_TYPE_RDP_SERVER, grd_dbus_remote_desktop_rdp_server_skeleton_iface_init))

#endif
static void
grd_dbus_remote_desktop_rdp_server_skeleton_finalize (GObject *object)
{
  GrdDBusRemoteDesktopRdpServerSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_RDP_SERVER_SKELETON (object);
  guint n;
  for (n = 0; n < 9; 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 (grd_dbus_remote_desktop_rdp_server_skeleton_parent_class)->finalize (object);
}

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

static gboolean
_grd_dbus_remote_desktop_rdp_server_emit_changed (gpointer user_data)
{
  GrdDBusRemoteDesktopRdpServerSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_RDP_SERVER_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.gnome.RemoteDesktop.Rdp.Server",
                                           &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
_grd_dbus_remote_desktop_rdp_server_schedule_emit_changed (GrdDBusRemoteDesktopRdpServerSkeleton *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
grd_dbus_remote_desktop_rdp_server_skeleton_notify (GObject      *object,
  GParamSpec *pspec G_GNUC_UNUSED)
{
  GrdDBusRemoteDesktopRdpServerSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_RDP_SERVER_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, _grd_dbus_remote_desktop_rdp_server_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
      g_source_set_name (skeleton->priv->changed_properties_idle_source, "[generated] _grd_dbus_remote_desktop_rdp_server_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
grd_dbus_remote_desktop_rdp_server_skeleton_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec)
{
  const _ExtendedGDBusPropertyInfo *info;
  GrdDBusRemoteDesktopRdpServerSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_RDP_SERVER_SKELETON (object);
  g_assert (prop_id != 0 && prop_id - 1 < 9);
  info = (const _ExtendedGDBusPropertyInfo *) _grd_dbus_remote_desktop_rdp_server_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)
        _grd_dbus_remote_desktop_rdp_server_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
grd_dbus_remote_desktop_rdp_server_skeleton_init (GrdDBusRemoteDesktopRdpServerSkeleton *skeleton)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  skeleton->priv = grd_dbus_remote_desktop_rdp_server_skeleton_get_instance_private (skeleton);
#else
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, GRD_DBUS_REMOTE_DESKTOP_TYPE_RDP_SERVER_SKELETON, GrdDBusRemoteDesktopRdpServerSkeletonPrivate);
#endif

  g_mutex_init (&skeleton->priv->lock);
  skeleton->priv->context = g_main_context_ref_thread_default ();
  skeleton->priv->properties = g_new0 (GValue, 9);
  g_value_init (&skeleton->priv->properties[0], G_TYPE_BOOLEAN);
  g_value_init (&skeleton->priv->properties[1], G_TYPE_INT);
  g_value_init (&skeleton->priv->properties[2], G_TYPE_BOOLEAN);
  g_value_init (&skeleton->priv->properties[3], G_TYPE_STRING);
  g_value_init (&skeleton->priv->properties[4], G_TYPE_STRING);
  g_value_init (&skeleton->priv->properties[5], G_TYPE_STRING);
  g_value_init (&skeleton->priv->properties[6], G_TYPE_UINT);
  g_value_init (&skeleton->priv->properties[7], G_TYPE_STRING);
  g_value_init (&skeleton->priv->properties[8], G_TYPE_BOOLEAN);
}

static gboolean 
grd_dbus_remote_desktop_rdp_server_skeleton_get_enabled (GrdDBusRemoteDesktopRdpServer *object)
{
  GrdDBusRemoteDesktopRdpServerSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_RDP_SERVER_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 gint 
grd_dbus_remote_desktop_rdp_server_skeleton_get_port (GrdDBusRemoteDesktopRdpServer *object)
{
  GrdDBusRemoteDesktopRdpServerSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_RDP_SERVER_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 gboolean 
grd_dbus_remote_desktop_rdp_server_skeleton_get_negotiate_port (GrdDBusRemoteDesktopRdpServer *object)
{
  GrdDBusRemoteDesktopRdpServerSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_RDP_SERVER_SKELETON (object);
  gboolean value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_marshal_value_peek_boolean (&(skeleton->priv->properties[2]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static const gchar *
grd_dbus_remote_desktop_rdp_server_skeleton_get_tls_cert (GrdDBusRemoteDesktopRdpServer *object)
{
  GrdDBusRemoteDesktopRdpServerSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_RDP_SERVER_SKELETON (object);
  const gchar *value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_marshal_value_peek_string (&(skeleton->priv->properties[3]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static const gchar *
grd_dbus_remote_desktop_rdp_server_skeleton_get_tls_fingerprint (GrdDBusRemoteDesktopRdpServer *object)
{
  GrdDBusRemoteDesktopRdpServerSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_RDP_SERVER_SKELETON (object);
  const gchar *value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_marshal_value_peek_string (&(skeleton->priv->properties[4]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static const gchar *
grd_dbus_remote_desktop_rdp_server_skeleton_get_tls_key (GrdDBusRemoteDesktopRdpServer *object)
{
  GrdDBusRemoteDesktopRdpServerSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_RDP_SERVER_SKELETON (object);
  const gchar *value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_marshal_value_peek_string (&(skeleton->priv->properties[5]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static guint 
grd_dbus_remote_desktop_rdp_server_skeleton_get_auth_methods (GrdDBusRemoteDesktopRdpServer *object)
{
  GrdDBusRemoteDesktopRdpServerSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_RDP_SERVER_SKELETON (object);
  guint value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_marshal_value_peek_uint (&(skeleton->priv->properties[6]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static const gchar *
grd_dbus_remote_desktop_rdp_server_skeleton_get_kerberos_keytab (GrdDBusRemoteDesktopRdpServer *object)
{
  GrdDBusRemoteDesktopRdpServerSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_RDP_SERVER_SKELETON (object);
  const gchar *value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_marshal_value_peek_string (&(skeleton->priv->properties[7]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static gboolean 
grd_dbus_remote_desktop_rdp_server_skeleton_get_view_only (GrdDBusRemoteDesktopRdpServer *object)
{
  GrdDBusRemoteDesktopRdpServerSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_RDP_SERVER_SKELETON (object);
  gboolean value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_marshal_value_peek_boolean (&(skeleton->priv->properties[8]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static void
grd_dbus_remote_desktop_rdp_server_skeleton_class_init (GrdDBusRemoteDesktopRdpServerSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize = grd_dbus_remote_desktop_rdp_server_skeleton_finalize;
  gobject_class->get_property = grd_dbus_remote_desktop_rdp_server_skeleton_get_property;
  gobject_class->set_property = grd_dbus_remote_desktop_rdp_server_skeleton_set_property;
  gobject_class->notify       = grd_dbus_remote_desktop_rdp_server_skeleton_notify;


  grd_dbus_remote_desktop_rdp_server_override_properties (gobject_class, 1);

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = grd_dbus_remote_desktop_rdp_server_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = grd_dbus_remote_desktop_rdp_server_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = grd_dbus_remote_desktop_rdp_server_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = grd_dbus_remote_desktop_rdp_server_skeleton_dbus_interface_get_vtable;

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

static void
grd_dbus_remote_desktop_rdp_server_skeleton_iface_init (GrdDBusRemoteDesktopRdpServerIface *iface)
{
  iface->binding = _grd_dbus_remote_desktop_rdp_server_on_signal_binding;
  iface->new_connection = _grd_dbus_remote_desktop_rdp_server_on_signal_new_connection;
  iface->get_enabled = grd_dbus_remote_desktop_rdp_server_skeleton_get_enabled;
  iface->get_port = grd_dbus_remote_desktop_rdp_server_skeleton_get_port;
  iface->get_negotiate_port = grd_dbus_remote_desktop_rdp_server_skeleton_get_negotiate_port;
  iface->get_tls_cert = grd_dbus_remote_desktop_rdp_server_skeleton_get_tls_cert;
  iface->get_tls_fingerprint = grd_dbus_remote_desktop_rdp_server_skeleton_get_tls_fingerprint;
  iface->get_tls_key = grd_dbus_remote_desktop_rdp_server_skeleton_get_tls_key;
  iface->get_auth_methods = grd_dbus_remote_desktop_rdp_server_skeleton_get_auth_methods;
  iface->get_kerberos_keytab = grd_dbus_remote_desktop_rdp_server_skeleton_get_kerberos_keytab;
  iface->get_view_only = grd_dbus_remote_desktop_rdp_server_skeleton_get_view_only;
}

/**
 * grd_dbus_remote_desktop_rdp_server_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-gnome-RemoteDesktop-Rdp-Server.top_of_page">org.gnome.RemoteDesktop.Rdp.Server</link>.
 *
 * Returns: (transfer full) (type GrdDBusRemoteDesktopRdpServerSkeleton): The skeleton object.
 */
GrdDBusRemoteDesktopRdpServer *
grd_dbus_remote_desktop_rdp_server_skeleton_new (void)
{
  return GRD_DBUS_REMOTE_DESKTOP_RDP_SERVER (g_object_new (GRD_DBUS_REMOTE_DESKTOP_TYPE_RDP_SERVER_SKELETON, NULL));
}

/* ------------------------------------------------------------------------
 * Code for interface org.gnome.RemoteDesktop.Configuration.Rdp.Server
 * ------------------------------------------------------------------------
 */

/**
 * SECTION:GrdDBusRemoteDesktopConfigurationRdpServer
 * @title: GrdDBusRemoteDesktopConfigurationRdpServer
 * @short_description: Generated C code for the org.gnome.RemoteDesktop.Configuration.Rdp.Server D-Bus interface
 *
 * This section contains code for working with the <link linkend="gdbus-interface-org-gnome-RemoteDesktop-Configuration-Rdp-Server.top_of_page">org.gnome.RemoteDesktop.Configuration.Rdp.Server</link> D-Bus interface in C.
 */

/* ---- Introspection data for org.gnome.RemoteDesktop.Configuration.Rdp.Server ---- */

static const _ExtendedGDBusMethodInfo _grd_dbus_remote_desktop_configuration_rdp_server_method_info_enable =
{
  {
    -1,
    (gchar *) "Enable",
    NULL,
    NULL,
    NULL
  },
  "handle-enable",
  FALSE
};

static const _ExtendedGDBusMethodInfo _grd_dbus_remote_desktop_configuration_rdp_server_method_info_disable =
{
  {
    -1,
    (gchar *) "Disable",
    NULL,
    NULL,
    NULL
  },
  "handle-disable",
  FALSE
};

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

static const GDBusArgInfo * const _grd_dbus_remote_desktop_configuration_rdp_server_method_info_get_credentials_OUT_ARG_pointers[] =
{
  &_grd_dbus_remote_desktop_configuration_rdp_server_method_info_get_credentials_OUT_ARG_credentials.parent_struct,
  NULL
};

static const _ExtendedGDBusMethodInfo _grd_dbus_remote_desktop_configuration_rdp_server_method_info_get_credentials =
{
  {
    -1,
    (gchar *) "GetCredentials",
    NULL,
    (GDBusArgInfo **) &_grd_dbus_remote_desktop_configuration_rdp_server_method_info_get_credentials_OUT_ARG_pointers,
    NULL
  },
  "handle-get-credentials",
  FALSE
};

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

static const GDBusArgInfo * const _grd_dbus_remote_desktop_configuration_rdp_server_method_info_set_credentials_IN_ARG_pointers[] =
{
  &_grd_dbus_remote_desktop_configuration_rdp_server_method_info_set_credentials_IN_ARG_credentials.parent_struct,
  NULL
};

static const _ExtendedGDBusMethodInfo _grd_dbus_remote_desktop_configuration_rdp_server_method_info_set_credentials =
{
  {
    -1,
    (gchar *) "SetCredentials",
    (GDBusArgInfo **) &_grd_dbus_remote_desktop_configuration_rdp_server_method_info_set_credentials_IN_ARG_pointers,
    NULL,
    NULL
  },
  "handle-set-credentials",
  FALSE
};

static const _ExtendedGDBusArgInfo _grd_dbus_remote_desktop_configuration_rdp_server_method_info_import_certificate_IN_ARG_Certificate =
{
  {
    -1,
    (gchar *) "Certificate",
    (gchar *) "(sh)",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _grd_dbus_remote_desktop_configuration_rdp_server_method_info_import_certificate_IN_ARG_PrivateKey =
{
  {
    -1,
    (gchar *) "PrivateKey",
    (gchar *) "(sh)",
    NULL
  },
  FALSE
};

static const GDBusArgInfo * const _grd_dbus_remote_desktop_configuration_rdp_server_method_info_import_certificate_IN_ARG_pointers[] =
{
  &_grd_dbus_remote_desktop_configuration_rdp_server_method_info_import_certificate_IN_ARG_Certificate.parent_struct,
  &_grd_dbus_remote_desktop_configuration_rdp_server_method_info_import_certificate_IN_ARG_PrivateKey.parent_struct,
  NULL
};

static const _ExtendedGDBusMethodInfo _grd_dbus_remote_desktop_configuration_rdp_server_method_info_import_certificate =
{
  {
    -1,
    (gchar *) "ImportCertificate",
    (GDBusArgInfo **) &_grd_dbus_remote_desktop_configuration_rdp_server_method_info_import_certificate_IN_ARG_pointers,
    NULL,
    NULL
  },
  "handle-import-certificate",
  TRUE
};

static const GDBusMethodInfo * const _grd_dbus_remote_desktop_configuration_rdp_server_method_info_pointers[] =
{
  &_grd_dbus_remote_desktop_configuration_rdp_server_method_info_enable.parent_struct,
  &_grd_dbus_remote_desktop_configuration_rdp_server_method_info_disable.parent_struct,
  &_grd_dbus_remote_desktop_configuration_rdp_server_method_info_get_credentials.parent_struct,
  &_grd_dbus_remote_desktop_configuration_rdp_server_method_info_set_credentials.parent_struct,
  &_grd_dbus_remote_desktop_configuration_rdp_server_method_info_import_certificate.parent_struct,
  NULL
};

static const _ExtendedGDBusPropertyInfo _grd_dbus_remote_desktop_configuration_rdp_server_property_info_enabled =
{
  {
    -1,
    (gchar *) "Enabled",
    (gchar *) "b",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "enabled",
  FALSE,
  TRUE
};

static const _ExtendedGDBusPropertyInfo _grd_dbus_remote_desktop_configuration_rdp_server_property_info_port =
{
  {
    -1,
    (gchar *) "Port",
    (gchar *) "i",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "port",
  FALSE,
  TRUE
};

static const _ExtendedGDBusPropertyInfo _grd_dbus_remote_desktop_configuration_rdp_server_property_info_tls_cert =
{
  {
    -1,
    (gchar *) "TlsCert",
    (gchar *) "s",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "tls-cert",
  FALSE,
  TRUE
};

static const _ExtendedGDBusPropertyInfo _grd_dbus_remote_desktop_configuration_rdp_server_property_info_tls_fingerprint =
{
  {
    -1,
    (gchar *) "TlsFingerprint",
    (gchar *) "s",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "tls-fingerprint",
  FALSE,
  TRUE
};

static const _ExtendedGDBusPropertyInfo _grd_dbus_remote_desktop_configuration_rdp_server_property_info_tls_key =
{
  {
    -1,
    (gchar *) "TlsKey",
    (gchar *) "s",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "tls-key",
  FALSE,
  TRUE
};

static const _ExtendedGDBusPropertyInfo _grd_dbus_remote_desktop_configuration_rdp_server_property_info_auth_methods =
{
  {
    -1,
    (gchar *) "AuthMethods",
    (gchar *) "u",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "auth-methods",
  FALSE,
  TRUE
};

static const _ExtendedGDBusPropertyInfo _grd_dbus_remote_desktop_configuration_rdp_server_property_info_kerberos_keytab =
{
  {
    -1,
    (gchar *) "KerberosKeytab",
    (gchar *) "s",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "kerberos-keytab",
  FALSE,
  TRUE
};

static const GDBusPropertyInfo * const _grd_dbus_remote_desktop_configuration_rdp_server_property_info_pointers[] =
{
  &_grd_dbus_remote_desktop_configuration_rdp_server_property_info_enabled.parent_struct,
  &_grd_dbus_remote_desktop_configuration_rdp_server_property_info_port.parent_struct,
  &_grd_dbus_remote_desktop_configuration_rdp_server_property_info_tls_cert.parent_struct,
  &_grd_dbus_remote_desktop_configuration_rdp_server_property_info_tls_fingerprint.parent_struct,
  &_grd_dbus_remote_desktop_configuration_rdp_server_property_info_tls_key.parent_struct,
  &_grd_dbus_remote_desktop_configuration_rdp_server_property_info_auth_methods.parent_struct,
  &_grd_dbus_remote_desktop_configuration_rdp_server_property_info_kerberos_keytab.parent_struct,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _grd_dbus_remote_desktop_configuration_rdp_server_interface_info =
{
  {
    -1,
    (gchar *) "org.gnome.RemoteDesktop.Configuration.Rdp.Server",
    (GDBusMethodInfo **) &_grd_dbus_remote_desktop_configuration_rdp_server_method_info_pointers,
    NULL,
    (GDBusPropertyInfo **) &_grd_dbus_remote_desktop_configuration_rdp_server_property_info_pointers,
    NULL
  },
  "configuration-rdp-server",
};


/**
 * grd_dbus_remote_desktop_configuration_rdp_server_interface_info:
 *
 * Gets a machine-readable description of the <link linkend="gdbus-interface-org-gnome-RemoteDesktop-Configuration-Rdp-Server.top_of_page">org.gnome.RemoteDesktop.Configuration.Rdp.Server</link> D-Bus interface.
 *
 * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
 */
GDBusInterfaceInfo *
grd_dbus_remote_desktop_configuration_rdp_server_interface_info (void)
{
  return (GDBusInterfaceInfo *) &_grd_dbus_remote_desktop_configuration_rdp_server_interface_info.parent_struct;
}

/**
 * grd_dbus_remote_desktop_configuration_rdp_server_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 #GrdDBusRemoteDesktopConfigurationRdpServer interface for a concrete class.
 * The properties are overridden in the order they are defined.
 *
 * Returns: The last property id.
 */
guint
grd_dbus_remote_desktop_configuration_rdp_server_override_properties (GObjectClass *klass, guint property_id_begin)
{
  g_object_class_override_property (klass, property_id_begin++, "enabled");
  g_object_class_override_property (klass, property_id_begin++, "port");
  g_object_class_override_property (klass, property_id_begin++, "tls-cert");
  g_object_class_override_property (klass, property_id_begin++, "tls-fingerprint");
  g_object_class_override_property (klass, property_id_begin++, "tls-key");
  g_object_class_override_property (klass, property_id_begin++, "auth-methods");
  g_object_class_override_property (klass, property_id_begin++, "kerberos-keytab");
  return property_id_begin - 1;
}


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

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

inline static void
grd_dbus_remote_desktop_configuration_rdp_server_method_marshal_get_credentials (
    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
grd_dbus_remote_desktop_configuration_rdp_server_method_marshal_set_credentials (
    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
grd_dbus_remote_desktop_configuration_rdp_server_method_marshal_import_certificate (
    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);
}


/**
 * GrdDBusRemoteDesktopConfigurationRdpServer:
 *
 * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-gnome-RemoteDesktop-Configuration-Rdp-Server.top_of_page">org.gnome.RemoteDesktop.Configuration.Rdp.Server</link>.
 */

/**
 * GrdDBusRemoteDesktopConfigurationRdpServerIface:
 * @parent_iface: The parent interface.
 * @handle_disable: Handler for the #GrdDBusRemoteDesktopConfigurationRdpServer::handle-disable signal.
 * @handle_enable: Handler for the #GrdDBusRemoteDesktopConfigurationRdpServer::handle-enable signal.
 * @handle_get_credentials: Handler for the #GrdDBusRemoteDesktopConfigurationRdpServer::handle-get-credentials signal.
 * @handle_import_certificate: Handler for the #GrdDBusRemoteDesktopConfigurationRdpServer::handle-import-certificate signal.
 * @handle_set_credentials: Handler for the #GrdDBusRemoteDesktopConfigurationRdpServer::handle-set-credentials signal.
 * @get_auth_methods: Getter for the #GrdDBusRemoteDesktopConfigurationRdpServer:auth-methods property.
 * @get_enabled: Getter for the #GrdDBusRemoteDesktopConfigurationRdpServer:enabled property.
 * @get_kerberos_keytab: Getter for the #GrdDBusRemoteDesktopConfigurationRdpServer:kerberos-keytab property.
 * @get_port: Getter for the #GrdDBusRemoteDesktopConfigurationRdpServer:port property.
 * @get_tls_cert: Getter for the #GrdDBusRemoteDesktopConfigurationRdpServer:tls-cert property.
 * @get_tls_fingerprint: Getter for the #GrdDBusRemoteDesktopConfigurationRdpServer:tls-fingerprint property.
 * @get_tls_key: Getter for the #GrdDBusRemoteDesktopConfigurationRdpServer:tls-key property.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-gnome-RemoteDesktop-Configuration-Rdp-Server.top_of_page">org.gnome.RemoteDesktop.Configuration.Rdp.Server</link>.
 */

typedef GrdDBusRemoteDesktopConfigurationRdpServerIface GrdDBusRemoteDesktopConfigurationRdpServerInterface;
G_DEFINE_INTERFACE (GrdDBusRemoteDesktopConfigurationRdpServer, grd_dbus_remote_desktop_configuration_rdp_server, G_TYPE_OBJECT)

static void
grd_dbus_remote_desktop_configuration_rdp_server_default_init (GrdDBusRemoteDesktopConfigurationRdpServerIface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * GrdDBusRemoteDesktopConfigurationRdpServer::handle-enable:
   * @object: A #GrdDBusRemoteDesktopConfigurationRdpServer.
   * @invocation: A #GDBusMethodInvocation.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-gnome-RemoteDesktop-Configuration-Rdp-Server.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 grd_dbus_remote_desktop_configuration_rdp_server_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 (GrdDBusRemoteDesktopConfigurationRdpServerIface, handle_enable),
    g_signal_accumulator_true_handled,
    NULL,
      grd_dbus_remote_desktop_configuration_rdp_server_method_marshal_enable,
    G_TYPE_BOOLEAN,
    1,
    G_TYPE_DBUS_METHOD_INVOCATION);

  /**
   * GrdDBusRemoteDesktopConfigurationRdpServer::handle-disable:
   * @object: A #GrdDBusRemoteDesktopConfigurationRdpServer.
   * @invocation: A #GDBusMethodInvocation.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-gnome-RemoteDesktop-Configuration-Rdp-Server.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 grd_dbus_remote_desktop_configuration_rdp_server_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 (GrdDBusRemoteDesktopConfigurationRdpServerIface, handle_disable),
    g_signal_accumulator_true_handled,
    NULL,
      grd_dbus_remote_desktop_configuration_rdp_server_method_marshal_disable,
    G_TYPE_BOOLEAN,
    1,
    G_TYPE_DBUS_METHOD_INVOCATION);

  /**
   * GrdDBusRemoteDesktopConfigurationRdpServer::handle-get-credentials:
   * @object: A #GrdDBusRemoteDesktopConfigurationRdpServer.
   * @invocation: A #GDBusMethodInvocation.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-gnome-RemoteDesktop-Configuration-Rdp-Server.GetCredentials">GetCredentials()</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 grd_dbus_remote_desktop_configuration_rdp_server_complete_get_credentials() 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-credentials",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (GrdDBusRemoteDesktopConfigurationRdpServerIface, handle_get_credentials),
    g_signal_accumulator_true_handled,
    NULL,
      grd_dbus_remote_desktop_configuration_rdp_server_method_marshal_get_credentials,
    G_TYPE_BOOLEAN,
    1,
    G_TYPE_DBUS_METHOD_INVOCATION);

  /**
   * GrdDBusRemoteDesktopConfigurationRdpServer::handle-set-credentials:
   * @object: A #GrdDBusRemoteDesktopConfigurationRdpServer.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_credentials: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-gnome-RemoteDesktop-Configuration-Rdp-Server.SetCredentials">SetCredentials()</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 grd_dbus_remote_desktop_configuration_rdp_server_complete_set_credentials() 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-credentials",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (GrdDBusRemoteDesktopConfigurationRdpServerIface, handle_set_credentials),
    g_signal_accumulator_true_handled,
    NULL,
      grd_dbus_remote_desktop_configuration_rdp_server_method_marshal_set_credentials,
    G_TYPE_BOOLEAN,
    2,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_VARIANT);

  /**
   * GrdDBusRemoteDesktopConfigurationRdpServer::handle-import-certificate:
   * @object: A #GrdDBusRemoteDesktopConfigurationRdpServer.
   * @invocation: A #GDBusMethodInvocation.
   * @fd_list: (nullable): A #GUnixFDList or %NULL.
   * @arg_Certificate: Argument passed by remote caller.
   * @arg_PrivateKey: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-gnome-RemoteDesktop-Configuration-Rdp-Server.ImportCertificate">ImportCertificate()</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 grd_dbus_remote_desktop_configuration_rdp_server_complete_import_certificate() 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-import-certificate",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (GrdDBusRemoteDesktopConfigurationRdpServerIface, handle_import_certificate),
    g_signal_accumulator_true_handled,
    NULL,
      grd_dbus_remote_desktop_configuration_rdp_server_method_marshal_import_certificate,
    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: */
  /**
   * GrdDBusRemoteDesktopConfigurationRdpServer:enabled:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-gnome-RemoteDesktop-Configuration-Rdp-Server.Enabled">"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 ("enabled", "Enabled", "Enabled", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * GrdDBusRemoteDesktopConfigurationRdpServer:port:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-gnome-RemoteDesktop-Configuration-Rdp-Server.Port">"Port"</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 ("port", "Port", "Port", G_MININT32, G_MAXINT32, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * GrdDBusRemoteDesktopConfigurationRdpServer:tls-cert:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-gnome-RemoteDesktop-Configuration-Rdp-Server.TlsCert">"TlsCert"</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_string ("tls-cert", "TlsCert", "TlsCert", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * GrdDBusRemoteDesktopConfigurationRdpServer:tls-fingerprint:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-gnome-RemoteDesktop-Configuration-Rdp-Server.TlsFingerprint">"TlsFingerprint"</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_string ("tls-fingerprint", "TlsFingerprint", "TlsFingerprint", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * GrdDBusRemoteDesktopConfigurationRdpServer:tls-key:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-gnome-RemoteDesktop-Configuration-Rdp-Server.TlsKey">"TlsKey"</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_string ("tls-key", "TlsKey", "TlsKey", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * GrdDBusRemoteDesktopConfigurationRdpServer:auth-methods:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-gnome-RemoteDesktop-Configuration-Rdp-Server.AuthMethods">"AuthMethods"</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 ("auth-methods", "AuthMethods", "AuthMethods", 0, G_MAXUINT32, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * GrdDBusRemoteDesktopConfigurationRdpServer:kerberos-keytab:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-gnome-RemoteDesktop-Configuration-Rdp-Server.KerberosKeytab">"KerberosKeytab"</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_string ("kerberos-keytab", "KerberosKeytab", "KerberosKeytab", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
}

/**
 * grd_dbus_remote_desktop_configuration_rdp_server_get_enabled: (skip)
 * @object: A #GrdDBusRemoteDesktopConfigurationRdpServer.
 *
 * Gets the value of the <link linkend="gdbus-property-org-gnome-RemoteDesktop-Configuration-Rdp-Server.Enabled">"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 
grd_dbus_remote_desktop_configuration_rdp_server_get_enabled (GrdDBusRemoteDesktopConfigurationRdpServer *object)
{
  g_return_val_if_fail (GRD_DBUS_REMOTE_DESKTOP_IS_CONFIGURATION_RDP_SERVER (object), FALSE);

  return GRD_DBUS_REMOTE_DESKTOP_CONFIGURATION_RDP_SERVER_GET_IFACE (object)->get_enabled (object);
}

/**
 * grd_dbus_remote_desktop_configuration_rdp_server_set_enabled: (skip)
 * @object: A #GrdDBusRemoteDesktopConfigurationRdpServer.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-gnome-RemoteDesktop-Configuration-Rdp-Server.Enabled">"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
grd_dbus_remote_desktop_configuration_rdp_server_set_enabled (GrdDBusRemoteDesktopConfigurationRdpServer *object, gboolean value)
{
  g_object_set (G_OBJECT (object), "enabled", value, NULL);
}

/**
 * grd_dbus_remote_desktop_configuration_rdp_server_get_port: (skip)
 * @object: A #GrdDBusRemoteDesktopConfigurationRdpServer.
 *
 * Gets the value of the <link linkend="gdbus-property-org-gnome-RemoteDesktop-Configuration-Rdp-Server.Port">"Port"</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 
grd_dbus_remote_desktop_configuration_rdp_server_get_port (GrdDBusRemoteDesktopConfigurationRdpServer *object)
{
  g_return_val_if_fail (GRD_DBUS_REMOTE_DESKTOP_IS_CONFIGURATION_RDP_SERVER (object), 0);

  return GRD_DBUS_REMOTE_DESKTOP_CONFIGURATION_RDP_SERVER_GET_IFACE (object)->get_port (object);
}

/**
 * grd_dbus_remote_desktop_configuration_rdp_server_set_port: (skip)
 * @object: A #GrdDBusRemoteDesktopConfigurationRdpServer.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-gnome-RemoteDesktop-Configuration-Rdp-Server.Port">"Port"</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
grd_dbus_remote_desktop_configuration_rdp_server_set_port (GrdDBusRemoteDesktopConfigurationRdpServer *object, gint value)
{
  g_object_set (G_OBJECT (object), "port", value, NULL);
}

/**
 * grd_dbus_remote_desktop_configuration_rdp_server_get_tls_cert: (skip)
 * @object: A #GrdDBusRemoteDesktopConfigurationRdpServer.
 *
 * Gets the value of the <link linkend="gdbus-property-org-gnome-RemoteDesktop-Configuration-Rdp-Server.TlsCert">"TlsCert"</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 grd_dbus_remote_desktop_configuration_rdp_server_dup_tls_cert() 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.
 */
const gchar *
grd_dbus_remote_desktop_configuration_rdp_server_get_tls_cert (GrdDBusRemoteDesktopConfigurationRdpServer *object)
{
  g_return_val_if_fail (GRD_DBUS_REMOTE_DESKTOP_IS_CONFIGURATION_RDP_SERVER (object), NULL);

  return GRD_DBUS_REMOTE_DESKTOP_CONFIGURATION_RDP_SERVER_GET_IFACE (object)->get_tls_cert (object);
}

/**
 * grd_dbus_remote_desktop_configuration_rdp_server_dup_tls_cert: (skip)
 * @object: A #GrdDBusRemoteDesktopConfigurationRdpServer.
 *
 * Gets a copy of the <link linkend="gdbus-property-org-gnome-RemoteDesktop-Configuration-Rdp-Server.TlsCert">"TlsCert"</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_free().
 */
gchar *
grd_dbus_remote_desktop_configuration_rdp_server_dup_tls_cert (GrdDBusRemoteDesktopConfigurationRdpServer *object)
{
  gchar *value;
  g_object_get (G_OBJECT (object), "tls-cert", &value, NULL);
  return value;
}

/**
 * grd_dbus_remote_desktop_configuration_rdp_server_set_tls_cert: (skip)
 * @object: A #GrdDBusRemoteDesktopConfigurationRdpServer.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-gnome-RemoteDesktop-Configuration-Rdp-Server.TlsCert">"TlsCert"</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
grd_dbus_remote_desktop_configuration_rdp_server_set_tls_cert (GrdDBusRemoteDesktopConfigurationRdpServer *object, const gchar *value)
{
  g_object_set (G_OBJECT (object), "tls-cert", value, NULL);
}

/**
 * grd_dbus_remote_desktop_configuration_rdp_server_get_tls_fingerprint: (skip)
 * @object: A #GrdDBusRemoteDesktopConfigurationRdpServer.
 *
 * Gets the value of the <link linkend="gdbus-property-org-gnome-RemoteDesktop-Configuration-Rdp-Server.TlsFingerprint">"TlsFingerprint"</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 grd_dbus_remote_desktop_configuration_rdp_server_dup_tls_fingerprint() 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.
 */
const gchar *
grd_dbus_remote_desktop_configuration_rdp_server_get_tls_fingerprint (GrdDBusRemoteDesktopConfigurationRdpServer *object)
{
  g_return_val_if_fail (GRD_DBUS_REMOTE_DESKTOP_IS_CONFIGURATION_RDP_SERVER (object), NULL);

  return GRD_DBUS_REMOTE_DESKTOP_CONFIGURATION_RDP_SERVER_GET_IFACE (object)->get_tls_fingerprint (object);
}

/**
 * grd_dbus_remote_desktop_configuration_rdp_server_dup_tls_fingerprint: (skip)
 * @object: A #GrdDBusRemoteDesktopConfigurationRdpServer.
 *
 * Gets a copy of the <link linkend="gdbus-property-org-gnome-RemoteDesktop-Configuration-Rdp-Server.TlsFingerprint">"TlsFingerprint"</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_free().
 */
gchar *
grd_dbus_remote_desktop_configuration_rdp_server_dup_tls_fingerprint (GrdDBusRemoteDesktopConfigurationRdpServer *object)
{
  gchar *value;
  g_object_get (G_OBJECT (object), "tls-fingerprint", &value, NULL);
  return value;
}

/**
 * grd_dbus_remote_desktop_configuration_rdp_server_set_tls_fingerprint: (skip)
 * @object: A #GrdDBusRemoteDesktopConfigurationRdpServer.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-gnome-RemoteDesktop-Configuration-Rdp-Server.TlsFingerprint">"TlsFingerprint"</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
grd_dbus_remote_desktop_configuration_rdp_server_set_tls_fingerprint (GrdDBusRemoteDesktopConfigurationRdpServer *object, const gchar *value)
{
  g_object_set (G_OBJECT (object), "tls-fingerprint", value, NULL);
}

/**
 * grd_dbus_remote_desktop_configuration_rdp_server_get_tls_key: (skip)
 * @object: A #GrdDBusRemoteDesktopConfigurationRdpServer.
 *
 * Gets the value of the <link linkend="gdbus-property-org-gnome-RemoteDesktop-Configuration-Rdp-Server.TlsKey">"TlsKey"</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 grd_dbus_remote_desktop_configuration_rdp_server_dup_tls_key() 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.
 */
const gchar *
grd_dbus_remote_desktop_configuration_rdp_server_get_tls_key (GrdDBusRemoteDesktopConfigurationRdpServer *object)
{
  g_return_val_if_fail (GRD_DBUS_REMOTE_DESKTOP_IS_CONFIGURATION_RDP_SERVER (object), NULL);

  return GRD_DBUS_REMOTE_DESKTOP_CONFIGURATION_RDP_SERVER_GET_IFACE (object)->get_tls_key (object);
}

/**
 * grd_dbus_remote_desktop_configuration_rdp_server_dup_tls_key: (skip)
 * @object: A #GrdDBusRemoteDesktopConfigurationRdpServer.
 *
 * Gets a copy of the <link linkend="gdbus-property-org-gnome-RemoteDesktop-Configuration-Rdp-Server.TlsKey">"TlsKey"</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_free().
 */
gchar *
grd_dbus_remote_desktop_configuration_rdp_server_dup_tls_key (GrdDBusRemoteDesktopConfigurationRdpServer *object)
{
  gchar *value;
  g_object_get (G_OBJECT (object), "tls-key", &value, NULL);
  return value;
}

/**
 * grd_dbus_remote_desktop_configuration_rdp_server_set_tls_key: (skip)
 * @object: A #GrdDBusRemoteDesktopConfigurationRdpServer.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-gnome-RemoteDesktop-Configuration-Rdp-Server.TlsKey">"TlsKey"</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
grd_dbus_remote_desktop_configuration_rdp_server_set_tls_key (GrdDBusRemoteDesktopConfigurationRdpServer *object, const gchar *value)
{
  g_object_set (G_OBJECT (object), "tls-key", value, NULL);
}

/**
 * grd_dbus_remote_desktop_configuration_rdp_server_get_auth_methods: (skip)
 * @object: A #GrdDBusRemoteDesktopConfigurationRdpServer.
 *
 * Gets the value of the <link linkend="gdbus-property-org-gnome-RemoteDesktop-Configuration-Rdp-Server.AuthMethods">"AuthMethods"</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 
grd_dbus_remote_desktop_configuration_rdp_server_get_auth_methods (GrdDBusRemoteDesktopConfigurationRdpServer *object)
{
  g_return_val_if_fail (GRD_DBUS_REMOTE_DESKTOP_IS_CONFIGURATION_RDP_SERVER (object), 0);

  return GRD_DBUS_REMOTE_DESKTOP_CONFIGURATION_RDP_SERVER_GET_IFACE (object)->get_auth_methods (object);
}

/**
 * grd_dbus_remote_desktop_configuration_rdp_server_set_auth_methods: (skip)
 * @object: A #GrdDBusRemoteDesktopConfigurationRdpServer.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-gnome-RemoteDesktop-Configuration-Rdp-Server.AuthMethods">"AuthMethods"</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
grd_dbus_remote_desktop_configuration_rdp_server_set_auth_methods (GrdDBusRemoteDesktopConfigurationRdpServer *object, guint value)
{
  g_object_set (G_OBJECT (object), "auth-methods", value, NULL);
}

/**
 * grd_dbus_remote_desktop_configuration_rdp_server_get_kerberos_keytab: (skip)
 * @object: A #GrdDBusRemoteDesktopConfigurationRdpServer.
 *
 * Gets the value of the <link linkend="gdbus-property-org-gnome-RemoteDesktop-Configuration-Rdp-Server.KerberosKeytab">"KerberosKeytab"</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 grd_dbus_remote_desktop_configuration_rdp_server_dup_kerberos_keytab() 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.
 */
const gchar *
grd_dbus_remote_desktop_configuration_rdp_server_get_kerberos_keytab (GrdDBusRemoteDesktopConfigurationRdpServer *object)
{
  g_return_val_if_fail (GRD_DBUS_REMOTE_DESKTOP_IS_CONFIGURATION_RDP_SERVER (object), NULL);

  return GRD_DBUS_REMOTE_DESKTOP_CONFIGURATION_RDP_SERVER_GET_IFACE (object)->get_kerberos_keytab (object);
}

/**
 * grd_dbus_remote_desktop_configuration_rdp_server_dup_kerberos_keytab: (skip)
 * @object: A #GrdDBusRemoteDesktopConfigurationRdpServer.
 *
 * Gets a copy of the <link linkend="gdbus-property-org-gnome-RemoteDesktop-Configuration-Rdp-Server.KerberosKeytab">"KerberosKeytab"</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_free().
 */
gchar *
grd_dbus_remote_desktop_configuration_rdp_server_dup_kerberos_keytab (GrdDBusRemoteDesktopConfigurationRdpServer *object)
{
  gchar *value;
  g_object_get (G_OBJECT (object), "kerberos-keytab", &value, NULL);
  return value;
}

/**
 * grd_dbus_remote_desktop_configuration_rdp_server_set_kerberos_keytab: (skip)
 * @object: A #GrdDBusRemoteDesktopConfigurationRdpServer.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-gnome-RemoteDesktop-Configuration-Rdp-Server.KerberosKeytab">"KerberosKeytab"</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
grd_dbus_remote_desktop_configuration_rdp_server_set_kerberos_keytab (GrdDBusRemoteDesktopConfigurationRdpServer *object, const gchar *value)
{
  g_object_set (G_OBJECT (object), "kerberos-keytab", value, NULL);
}

/**
 * grd_dbus_remote_desktop_configuration_rdp_server_call_enable:
 * @proxy: A #GrdDBusRemoteDesktopConfigurationRdpServerProxy.
 * @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-gnome-RemoteDesktop-Configuration-Rdp-Server.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 grd_dbus_remote_desktop_configuration_rdp_server_call_enable_finish() to get the result of the operation.
 *
 * See grd_dbus_remote_desktop_configuration_rdp_server_call_enable_sync() for the synchronous, blocking version of this method.
 */
void
grd_dbus_remote_desktop_configuration_rdp_server_call_enable (
    GrdDBusRemoteDesktopConfigurationRdpServer *proxy,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "Enable",
    g_variant_new ("()"),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * grd_dbus_remote_desktop_configuration_rdp_server_call_enable_finish:
 * @proxy: A #GrdDBusRemoteDesktopConfigurationRdpServerProxy.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to grd_dbus_remote_desktop_configuration_rdp_server_call_enable().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with grd_dbus_remote_desktop_configuration_rdp_server_call_enable().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
grd_dbus_remote_desktop_configuration_rdp_server_call_enable_finish (
    GrdDBusRemoteDesktopConfigurationRdpServer *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;
}

/**
 * grd_dbus_remote_desktop_configuration_rdp_server_call_enable_sync:
 * @proxy: A #GrdDBusRemoteDesktopConfigurationRdpServerProxy.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-gnome-RemoteDesktop-Configuration-Rdp-Server.Enable">Enable()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See grd_dbus_remote_desktop_configuration_rdp_server_call_enable() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
grd_dbus_remote_desktop_configuration_rdp_server_call_enable_sync (
    GrdDBusRemoteDesktopConfigurationRdpServer *proxy,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "Enable",
    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;
}

/**
 * grd_dbus_remote_desktop_configuration_rdp_server_call_disable:
 * @proxy: A #GrdDBusRemoteDesktopConfigurationRdpServerProxy.
 * @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-gnome-RemoteDesktop-Configuration-Rdp-Server.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 grd_dbus_remote_desktop_configuration_rdp_server_call_disable_finish() to get the result of the operation.
 *
 * See grd_dbus_remote_desktop_configuration_rdp_server_call_disable_sync() for the synchronous, blocking version of this method.
 */
void
grd_dbus_remote_desktop_configuration_rdp_server_call_disable (
    GrdDBusRemoteDesktopConfigurationRdpServer *proxy,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "Disable",
    g_variant_new ("()"),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * grd_dbus_remote_desktop_configuration_rdp_server_call_disable_finish:
 * @proxy: A #GrdDBusRemoteDesktopConfigurationRdpServerProxy.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to grd_dbus_remote_desktop_configuration_rdp_server_call_disable().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with grd_dbus_remote_desktop_configuration_rdp_server_call_disable().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
grd_dbus_remote_desktop_configuration_rdp_server_call_disable_finish (
    GrdDBusRemoteDesktopConfigurationRdpServer *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;
}

/**
 * grd_dbus_remote_desktop_configuration_rdp_server_call_disable_sync:
 * @proxy: A #GrdDBusRemoteDesktopConfigurationRdpServerProxy.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-gnome-RemoteDesktop-Configuration-Rdp-Server.Disable">Disable()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See grd_dbus_remote_desktop_configuration_rdp_server_call_disable() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
grd_dbus_remote_desktop_configuration_rdp_server_call_disable_sync (
    GrdDBusRemoteDesktopConfigurationRdpServer *proxy,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "Disable",
    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;
}

/**
 * grd_dbus_remote_desktop_configuration_rdp_server_call_get_credentials:
 * @proxy: A #GrdDBusRemoteDesktopConfigurationRdpServerProxy.
 * @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-gnome-RemoteDesktop-Configuration-Rdp-Server.GetCredentials">GetCredentials()</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 grd_dbus_remote_desktop_configuration_rdp_server_call_get_credentials_finish() to get the result of the operation.
 *
 * See grd_dbus_remote_desktop_configuration_rdp_server_call_get_credentials_sync() for the synchronous, blocking version of this method.
 */
void
grd_dbus_remote_desktop_configuration_rdp_server_call_get_credentials (
    GrdDBusRemoteDesktopConfigurationRdpServer *proxy,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "GetCredentials",
    g_variant_new ("()"),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

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

/**
 * grd_dbus_remote_desktop_configuration_rdp_server_call_get_credentials_sync:
 * @proxy: A #GrdDBusRemoteDesktopConfigurationRdpServerProxy.
 * @out_credentials: (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-gnome-RemoteDesktop-Configuration-Rdp-Server.GetCredentials">GetCredentials()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See grd_dbus_remote_desktop_configuration_rdp_server_call_get_credentials() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
grd_dbus_remote_desktop_configuration_rdp_server_call_get_credentials_sync (
    GrdDBusRemoteDesktopConfigurationRdpServer *proxy,
    GVariant ** out_credentials,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "GetCredentials",
    g_variant_new ("()"),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(@a{sv})",
                 out_credentials);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * grd_dbus_remote_desktop_configuration_rdp_server_call_set_credentials:
 * @proxy: A #GrdDBusRemoteDesktopConfigurationRdpServerProxy.
 * @arg_credentials: 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-gnome-RemoteDesktop-Configuration-Rdp-Server.SetCredentials">SetCredentials()</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 grd_dbus_remote_desktop_configuration_rdp_server_call_set_credentials_finish() to get the result of the operation.
 *
 * See grd_dbus_remote_desktop_configuration_rdp_server_call_set_credentials_sync() for the synchronous, blocking version of this method.
 */
void
grd_dbus_remote_desktop_configuration_rdp_server_call_set_credentials (
    GrdDBusRemoteDesktopConfigurationRdpServer *proxy,
    GVariant *arg_credentials,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "SetCredentials",
    g_variant_new ("(@a{sv})",
                   arg_credentials),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * grd_dbus_remote_desktop_configuration_rdp_server_call_set_credentials_finish:
 * @proxy: A #GrdDBusRemoteDesktopConfigurationRdpServerProxy.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to grd_dbus_remote_desktop_configuration_rdp_server_call_set_credentials().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with grd_dbus_remote_desktop_configuration_rdp_server_call_set_credentials().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
grd_dbus_remote_desktop_configuration_rdp_server_call_set_credentials_finish (
    GrdDBusRemoteDesktopConfigurationRdpServer *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;
}

/**
 * grd_dbus_remote_desktop_configuration_rdp_server_call_set_credentials_sync:
 * @proxy: A #GrdDBusRemoteDesktopConfigurationRdpServerProxy.
 * @arg_credentials: 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-gnome-RemoteDesktop-Configuration-Rdp-Server.SetCredentials">SetCredentials()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See grd_dbus_remote_desktop_configuration_rdp_server_call_set_credentials() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
grd_dbus_remote_desktop_configuration_rdp_server_call_set_credentials_sync (
    GrdDBusRemoteDesktopConfigurationRdpServer *proxy,
    GVariant *arg_credentials,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "SetCredentials",
    g_variant_new ("(@a{sv})",
                   arg_credentials),
    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;
}

/**
 * grd_dbus_remote_desktop_configuration_rdp_server_call_import_certificate:
 * @proxy: A #GrdDBusRemoteDesktopConfigurationRdpServerProxy.
 * @arg_Certificate: Argument to pass with the method invocation.
 * @arg_PrivateKey: 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-gnome-RemoteDesktop-Configuration-Rdp-Server.ImportCertificate">ImportCertificate()</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 grd_dbus_remote_desktop_configuration_rdp_server_call_import_certificate_finish() to get the result of the operation.
 *
 * See grd_dbus_remote_desktop_configuration_rdp_server_call_import_certificate_sync() for the synchronous, blocking version of this method.
 */
void
grd_dbus_remote_desktop_configuration_rdp_server_call_import_certificate (
    GrdDBusRemoteDesktopConfigurationRdpServer *proxy,
    GVariant *arg_Certificate,
    GVariant *arg_PrivateKey,
    GUnixFDList *fd_list,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call_with_unix_fd_list (G_DBUS_PROXY (proxy),
    "ImportCertificate",
    g_variant_new ("(@(sh)@(sh))",
                   arg_Certificate,
                   arg_PrivateKey),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    fd_list,
    cancellable,
    callback,
    user_data);
}

/**
 * grd_dbus_remote_desktop_configuration_rdp_server_call_import_certificate_finish:
 * @proxy: A #GrdDBusRemoteDesktopConfigurationRdpServerProxy.
 * @out_fd_list: (out) (optional) (nullable): Return location for a #GUnixFDList or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to grd_dbus_remote_desktop_configuration_rdp_server_call_import_certificate().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with grd_dbus_remote_desktop_configuration_rdp_server_call_import_certificate().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
grd_dbus_remote_desktop_configuration_rdp_server_call_import_certificate_finish (
    GrdDBusRemoteDesktopConfigurationRdpServer *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;
}

/**
 * grd_dbus_remote_desktop_configuration_rdp_server_call_import_certificate_sync:
 * @proxy: A #GrdDBusRemoteDesktopConfigurationRdpServerProxy.
 * @arg_Certificate: Argument to pass with the method invocation.
 * @arg_PrivateKey: 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-gnome-RemoteDesktop-Configuration-Rdp-Server.ImportCertificate">ImportCertificate()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See grd_dbus_remote_desktop_configuration_rdp_server_call_import_certificate() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
grd_dbus_remote_desktop_configuration_rdp_server_call_import_certificate_sync (
    GrdDBusRemoteDesktopConfigurationRdpServer *proxy,
    GVariant *arg_Certificate,
    GVariant *arg_PrivateKey,
    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),
    "ImportCertificate",
    g_variant_new ("(@(sh)@(sh))",
                   arg_Certificate,
                   arg_PrivateKey),
    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;
}

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

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

/**
 * grd_dbus_remote_desktop_configuration_rdp_server_complete_get_credentials:
 * @object: A #GrdDBusRemoteDesktopConfigurationRdpServer.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @credentials: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-gnome-RemoteDesktop-Configuration-Rdp-Server.GetCredentials">GetCredentials()</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
grd_dbus_remote_desktop_configuration_rdp_server_complete_get_credentials (
    GrdDBusRemoteDesktopConfigurationRdpServer *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    GVariant *credentials)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(@a{sv})",
                   credentials));
}

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

/**
 * grd_dbus_remote_desktop_configuration_rdp_server_complete_import_certificate:
 * @object: A #GrdDBusRemoteDesktopConfigurationRdpServer.
 * @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-gnome-RemoteDesktop-Configuration-Rdp-Server.ImportCertificate">ImportCertificate()</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
grd_dbus_remote_desktop_configuration_rdp_server_complete_import_certificate (
    GrdDBusRemoteDesktopConfigurationRdpServer *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);
}

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

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

/**
 * GrdDBusRemoteDesktopConfigurationRdpServerProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #GrdDBusRemoteDesktopConfigurationRdpServerProxy.
 */

struct _GrdDBusRemoteDesktopConfigurationRdpServerProxyPrivate
{
  GData *qdata;
};

static void grd_dbus_remote_desktop_configuration_rdp_server_proxy_iface_init (GrdDBusRemoteDesktopConfigurationRdpServerIface *iface);

#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (GrdDBusRemoteDesktopConfigurationRdpServerProxy, grd_dbus_remote_desktop_configuration_rdp_server_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (GrdDBusRemoteDesktopConfigurationRdpServerProxy)
                         G_IMPLEMENT_INTERFACE (GRD_DBUS_REMOTE_DESKTOP_TYPE_CONFIGURATION_RDP_SERVER, grd_dbus_remote_desktop_configuration_rdp_server_proxy_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (GrdDBusRemoteDesktopConfigurationRdpServerProxy, grd_dbus_remote_desktop_configuration_rdp_server_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (GRD_DBUS_REMOTE_DESKTOP_TYPE_CONFIGURATION_RDP_SERVER, grd_dbus_remote_desktop_configuration_rdp_server_proxy_iface_init))

#endif
static void
grd_dbus_remote_desktop_configuration_rdp_server_proxy_finalize (GObject *object)
{
  GrdDBusRemoteDesktopConfigurationRdpServerProxy *proxy = GRD_DBUS_REMOTE_DESKTOP_CONFIGURATION_RDP_SERVER_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (grd_dbus_remote_desktop_configuration_rdp_server_proxy_parent_class)->finalize (object);
}

static void
grd_dbus_remote_desktop_configuration_rdp_server_proxy_get_property (GObject      *object,
  guint         prop_id,
  GValue       *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  const _ExtendedGDBusPropertyInfo *info;
  GVariant *variant;
  g_assert (prop_id != 0 && prop_id - 1 < 7);
  info = (const _ExtendedGDBusPropertyInfo *) _grd_dbus_remote_desktop_configuration_rdp_server_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
grd_dbus_remote_desktop_configuration_rdp_server_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.gnome.RemoteDesktop.Configuration.Rdp.Server: %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
grd_dbus_remote_desktop_configuration_rdp_server_proxy_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  const _ExtendedGDBusPropertyInfo *info;
  GVariant *variant;
  g_assert (prop_id != 0 && prop_id - 1 < 7);
  info = (const _ExtendedGDBusPropertyInfo *) _grd_dbus_remote_desktop_configuration_rdp_server_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.gnome.RemoteDesktop.Configuration.Rdp.Server", info->parent_struct.name, variant),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    NULL, (GAsyncReadyCallback) grd_dbus_remote_desktop_configuration_rdp_server_proxy_set_property_cb, (GDBusPropertyInfo *) &info->parent_struct);
  g_variant_unref (variant);
}

static void
grd_dbus_remote_desktop_configuration_rdp_server_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 *) &_grd_dbus_remote_desktop_configuration_rdp_server_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], GRD_DBUS_REMOTE_DESKTOP_TYPE_CONFIGURATION_RDP_SERVER);
  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, GRD_DBUS_REMOTE_DESKTOP_TYPE_CONFIGURATION_RDP_SERVER);
  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
grd_dbus_remote_desktop_configuration_rdp_server_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  GrdDBusRemoteDesktopConfigurationRdpServerProxy *proxy = GRD_DBUS_REMOTE_DESKTOP_CONFIGURATION_RDP_SERVER_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 *) &_grd_dbus_remote_desktop_configuration_rdp_server_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 *) &_grd_dbus_remote_desktop_configuration_rdp_server_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 
grd_dbus_remote_desktop_configuration_rdp_server_proxy_get_enabled (GrdDBusRemoteDesktopConfigurationRdpServer *object)
{
  GrdDBusRemoteDesktopConfigurationRdpServerProxy *proxy = GRD_DBUS_REMOTE_DESKTOP_CONFIGURATION_RDP_SERVER_PROXY (object);
  GVariant *variant;
  gboolean value = FALSE;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Enabled");
  if (variant != NULL)
    {
      value = g_variant_get_boolean (variant);
      g_variant_unref (variant);
    }
  return value;
}

static gint 
grd_dbus_remote_desktop_configuration_rdp_server_proxy_get_port (GrdDBusRemoteDesktopConfigurationRdpServer *object)
{
  GrdDBusRemoteDesktopConfigurationRdpServerProxy *proxy = GRD_DBUS_REMOTE_DESKTOP_CONFIGURATION_RDP_SERVER_PROXY (object);
  GVariant *variant;
  gint value = 0;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Port");
  if (variant != NULL)
    {
      value = g_variant_get_int32 (variant);
      g_variant_unref (variant);
    }
  return value;
}

static const gchar *
grd_dbus_remote_desktop_configuration_rdp_server_proxy_get_tls_cert (GrdDBusRemoteDesktopConfigurationRdpServer *object)
{
  GrdDBusRemoteDesktopConfigurationRdpServerProxy *proxy = GRD_DBUS_REMOTE_DESKTOP_CONFIGURATION_RDP_SERVER_PROXY (object);
  GVariant *variant;
  const gchar *value = NULL;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "TlsCert");
  if (variant != NULL)
    {
      value = g_variant_get_string (variant, NULL);
      g_variant_unref (variant);
    }
  return value;
}

static const gchar *
grd_dbus_remote_desktop_configuration_rdp_server_proxy_get_tls_fingerprint (GrdDBusRemoteDesktopConfigurationRdpServer *object)
{
  GrdDBusRemoteDesktopConfigurationRdpServerProxy *proxy = GRD_DBUS_REMOTE_DESKTOP_CONFIGURATION_RDP_SERVER_PROXY (object);
  GVariant *variant;
  const gchar *value = NULL;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "TlsFingerprint");
  if (variant != NULL)
    {
      value = g_variant_get_string (variant, NULL);
      g_variant_unref (variant);
    }
  return value;
}

static const gchar *
grd_dbus_remote_desktop_configuration_rdp_server_proxy_get_tls_key (GrdDBusRemoteDesktopConfigurationRdpServer *object)
{
  GrdDBusRemoteDesktopConfigurationRdpServerProxy *proxy = GRD_DBUS_REMOTE_DESKTOP_CONFIGURATION_RDP_SERVER_PROXY (object);
  GVariant *variant;
  const gchar *value = NULL;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "TlsKey");
  if (variant != NULL)
    {
      value = g_variant_get_string (variant, NULL);
      g_variant_unref (variant);
    }
  return value;
}

static guint 
grd_dbus_remote_desktop_configuration_rdp_server_proxy_get_auth_methods (GrdDBusRemoteDesktopConfigurationRdpServer *object)
{
  GrdDBusRemoteDesktopConfigurationRdpServerProxy *proxy = GRD_DBUS_REMOTE_DESKTOP_CONFIGURATION_RDP_SERVER_PROXY (object);
  GVariant *variant;
  guint value = 0;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "AuthMethods");
  if (variant != NULL)
    {
      value = g_variant_get_uint32 (variant);
      g_variant_unref (variant);
    }
  return value;
}

static const gchar *
grd_dbus_remote_desktop_configuration_rdp_server_proxy_get_kerberos_keytab (GrdDBusRemoteDesktopConfigurationRdpServer *object)
{
  GrdDBusRemoteDesktopConfigurationRdpServerProxy *proxy = GRD_DBUS_REMOTE_DESKTOP_CONFIGURATION_RDP_SERVER_PROXY (object);
  GVariant *variant;
  const gchar *value = NULL;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "KerberosKeytab");
  if (variant != NULL)
    {
      value = g_variant_get_string (variant, NULL);
      g_variant_unref (variant);
    }
  return value;
}

static void
grd_dbus_remote_desktop_configuration_rdp_server_proxy_init (GrdDBusRemoteDesktopConfigurationRdpServerProxy *proxy)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  proxy->priv = grd_dbus_remote_desktop_configuration_rdp_server_proxy_get_instance_private (proxy);
#else
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, GRD_DBUS_REMOTE_DESKTOP_TYPE_CONFIGURATION_RDP_SERVER_PROXY, GrdDBusRemoteDesktopConfigurationRdpServerProxyPrivate);
#endif

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

static void
grd_dbus_remote_desktop_configuration_rdp_server_proxy_class_init (GrdDBusRemoteDesktopConfigurationRdpServerProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = grd_dbus_remote_desktop_configuration_rdp_server_proxy_finalize;
  gobject_class->get_property = grd_dbus_remote_desktop_configuration_rdp_server_proxy_get_property;
  gobject_class->set_property = grd_dbus_remote_desktop_configuration_rdp_server_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = grd_dbus_remote_desktop_configuration_rdp_server_proxy_g_signal;
  proxy_class->g_properties_changed = grd_dbus_remote_desktop_configuration_rdp_server_proxy_g_properties_changed;

  grd_dbus_remote_desktop_configuration_rdp_server_override_properties (gobject_class, 1);

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

static void
grd_dbus_remote_desktop_configuration_rdp_server_proxy_iface_init (GrdDBusRemoteDesktopConfigurationRdpServerIface *iface)
{
  iface->get_enabled = grd_dbus_remote_desktop_configuration_rdp_server_proxy_get_enabled;
  iface->get_port = grd_dbus_remote_desktop_configuration_rdp_server_proxy_get_port;
  iface->get_tls_cert = grd_dbus_remote_desktop_configuration_rdp_server_proxy_get_tls_cert;
  iface->get_tls_fingerprint = grd_dbus_remote_desktop_configuration_rdp_server_proxy_get_tls_fingerprint;
  iface->get_tls_key = grd_dbus_remote_desktop_configuration_rdp_server_proxy_get_tls_key;
  iface->get_auth_methods = grd_dbus_remote_desktop_configuration_rdp_server_proxy_get_auth_methods;
  iface->get_kerberos_keytab = grd_dbus_remote_desktop_configuration_rdp_server_proxy_get_kerberos_keytab;
}

/**
 * grd_dbus_remote_desktop_configuration_rdp_server_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-gnome-RemoteDesktop-Configuration-Rdp-Server.top_of_page">org.gnome.RemoteDesktop.Configuration.Rdp.Server</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 grd_dbus_remote_desktop_configuration_rdp_server_proxy_new_finish() to get the result of the operation.
 *
 * See grd_dbus_remote_desktop_configuration_rdp_server_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
grd_dbus_remote_desktop_configuration_rdp_server_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 (GRD_DBUS_REMOTE_DESKTOP_TYPE_CONFIGURATION_RDP_SERVER_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.gnome.RemoteDesktop.Configuration.Rdp.Server", NULL);
}

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

/**
 * grd_dbus_remote_desktop_configuration_rdp_server_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-gnome-RemoteDesktop-Configuration-Rdp-Server.top_of_page">org.gnome.RemoteDesktop.Configuration.Rdp.Server</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See grd_dbus_remote_desktop_configuration_rdp_server_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type GrdDBusRemoteDesktopConfigurationRdpServerProxy): The constructed proxy object or %NULL if @error is set.
 */
GrdDBusRemoteDesktopConfigurationRdpServer *
grd_dbus_remote_desktop_configuration_rdp_server_proxy_new_sync (
    GDBusConnection     *connection,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GError             **error)
{
  GInitable *ret;
  ret = g_initable_new (GRD_DBUS_REMOTE_DESKTOP_TYPE_CONFIGURATION_RDP_SERVER_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.gnome.RemoteDesktop.Configuration.Rdp.Server", NULL);
  if (ret != NULL)
    return GRD_DBUS_REMOTE_DESKTOP_CONFIGURATION_RDP_SERVER (ret);
  else
    return NULL;
}


/**
 * grd_dbus_remote_desktop_configuration_rdp_server_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 grd_dbus_remote_desktop_configuration_rdp_server_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 grd_dbus_remote_desktop_configuration_rdp_server_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See grd_dbus_remote_desktop_configuration_rdp_server_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
grd_dbus_remote_desktop_configuration_rdp_server_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 (GRD_DBUS_REMOTE_DESKTOP_TYPE_CONFIGURATION_RDP_SERVER_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.gnome.RemoteDesktop.Configuration.Rdp.Server", NULL);
}

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

/**
 * grd_dbus_remote_desktop_configuration_rdp_server_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 grd_dbus_remote_desktop_configuration_rdp_server_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See grd_dbus_remote_desktop_configuration_rdp_server_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type GrdDBusRemoteDesktopConfigurationRdpServerProxy): The constructed proxy object or %NULL if @error is set.
 */
GrdDBusRemoteDesktopConfigurationRdpServer *
grd_dbus_remote_desktop_configuration_rdp_server_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 (GRD_DBUS_REMOTE_DESKTOP_TYPE_CONFIGURATION_RDP_SERVER_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.gnome.RemoteDesktop.Configuration.Rdp.Server", NULL);
  if (ret != NULL)
    return GRD_DBUS_REMOTE_DESKTOP_CONFIGURATION_RDP_SERVER (ret);
  else
    return NULL;
}


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

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

/**
 * GrdDBusRemoteDesktopConfigurationRdpServerSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #GrdDBusRemoteDesktopConfigurationRdpServerSkeleton.
 */

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

static void
_grd_dbus_remote_desktop_configuration_rdp_server_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)
{
  GrdDBusRemoteDesktopConfigurationRdpServerSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_CONFIGURATION_RDP_SERVER_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], GRD_DBUS_REMOTE_DESKTOP_TYPE_CONFIGURATION_RDP_SERVER);
  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, GRD_DBUS_REMOTE_DESKTOP_TYPE_CONFIGURATION_RDP_SERVER);
  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 *
_grd_dbus_remote_desktop_configuration_rdp_server_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)
{
  GrdDBusRemoteDesktopConfigurationRdpServerSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_CONFIGURATION_RDP_SERVER_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 *) &_grd_dbus_remote_desktop_configuration_rdp_server_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
_grd_dbus_remote_desktop_configuration_rdp_server_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)
{
  GrdDBusRemoteDesktopConfigurationRdpServerSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_CONFIGURATION_RDP_SERVER_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 *) &_grd_dbus_remote_desktop_configuration_rdp_server_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 _grd_dbus_remote_desktop_configuration_rdp_server_skeleton_vtable =
{
  _grd_dbus_remote_desktop_configuration_rdp_server_skeleton_handle_method_call,
  _grd_dbus_remote_desktop_configuration_rdp_server_skeleton_handle_get_property,
  _grd_dbus_remote_desktop_configuration_rdp_server_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
grd_dbus_remote_desktop_configuration_rdp_server_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return grd_dbus_remote_desktop_configuration_rdp_server_interface_info ();
}

static GDBusInterfaceVTable *
grd_dbus_remote_desktop_configuration_rdp_server_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_grd_dbus_remote_desktop_configuration_rdp_server_skeleton_vtable;
}

static GVariant *
grd_dbus_remote_desktop_configuration_rdp_server_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  GrdDBusRemoteDesktopConfigurationRdpServerSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_CONFIGURATION_RDP_SERVER_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 (_grd_dbus_remote_desktop_configuration_rdp_server_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _grd_dbus_remote_desktop_configuration_rdp_server_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _grd_dbus_remote_desktop_configuration_rdp_server_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _grd_dbus_remote_desktop_configuration_rdp_server_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.gnome.RemoteDesktop.Configuration.Rdp.Server", 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 _grd_dbus_remote_desktop_configuration_rdp_server_emit_changed (gpointer user_data);

static void
grd_dbus_remote_desktop_configuration_rdp_server_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
{
  GrdDBusRemoteDesktopConfigurationRdpServerSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_CONFIGURATION_RDP_SERVER_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)
    _grd_dbus_remote_desktop_configuration_rdp_server_emit_changed (skeleton);
}

static void grd_dbus_remote_desktop_configuration_rdp_server_skeleton_iface_init (GrdDBusRemoteDesktopConfigurationRdpServerIface *iface);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (GrdDBusRemoteDesktopConfigurationRdpServerSkeleton, grd_dbus_remote_desktop_configuration_rdp_server_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (GrdDBusRemoteDesktopConfigurationRdpServerSkeleton)
                         G_IMPLEMENT_INTERFACE (GRD_DBUS_REMOTE_DESKTOP_TYPE_CONFIGURATION_RDP_SERVER, grd_dbus_remote_desktop_configuration_rdp_server_skeleton_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (GrdDBusRemoteDesktopConfigurationRdpServerSkeleton, grd_dbus_remote_desktop_configuration_rdp_server_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (GRD_DBUS_REMOTE_DESKTOP_TYPE_CONFIGURATION_RDP_SERVER, grd_dbus_remote_desktop_configuration_rdp_server_skeleton_iface_init))

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

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

static gboolean
_grd_dbus_remote_desktop_configuration_rdp_server_emit_changed (gpointer user_data)
{
  GrdDBusRemoteDesktopConfigurationRdpServerSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_CONFIGURATION_RDP_SERVER_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.gnome.RemoteDesktop.Configuration.Rdp.Server",
                                           &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
_grd_dbus_remote_desktop_configuration_rdp_server_schedule_emit_changed (GrdDBusRemoteDesktopConfigurationRdpServerSkeleton *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
grd_dbus_remote_desktop_configuration_rdp_server_skeleton_notify (GObject      *object,
  GParamSpec *pspec G_GNUC_UNUSED)
{
  GrdDBusRemoteDesktopConfigurationRdpServerSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_CONFIGURATION_RDP_SERVER_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, _grd_dbus_remote_desktop_configuration_rdp_server_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
      g_source_set_name (skeleton->priv->changed_properties_idle_source, "[generated] _grd_dbus_remote_desktop_configuration_rdp_server_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
grd_dbus_remote_desktop_configuration_rdp_server_skeleton_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec)
{
  const _ExtendedGDBusPropertyInfo *info;
  GrdDBusRemoteDesktopConfigurationRdpServerSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_CONFIGURATION_RDP_SERVER_SKELETON (object);
  g_assert (prop_id != 0 && prop_id - 1 < 7);
  info = (const _ExtendedGDBusPropertyInfo *) _grd_dbus_remote_desktop_configuration_rdp_server_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)
        _grd_dbus_remote_desktop_configuration_rdp_server_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
grd_dbus_remote_desktop_configuration_rdp_server_skeleton_init (GrdDBusRemoteDesktopConfigurationRdpServerSkeleton *skeleton)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  skeleton->priv = grd_dbus_remote_desktop_configuration_rdp_server_skeleton_get_instance_private (skeleton);
#else
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, GRD_DBUS_REMOTE_DESKTOP_TYPE_CONFIGURATION_RDP_SERVER_SKELETON, GrdDBusRemoteDesktopConfigurationRdpServerSkeletonPrivate);
#endif

  g_mutex_init (&skeleton->priv->lock);
  skeleton->priv->context = g_main_context_ref_thread_default ();
  skeleton->priv->properties = g_new0 (GValue, 7);
  g_value_init (&skeleton->priv->properties[0], G_TYPE_BOOLEAN);
  g_value_init (&skeleton->priv->properties[1], G_TYPE_INT);
  g_value_init (&skeleton->priv->properties[2], G_TYPE_STRING);
  g_value_init (&skeleton->priv->properties[3], G_TYPE_STRING);
  g_value_init (&skeleton->priv->properties[4], G_TYPE_STRING);
  g_value_init (&skeleton->priv->properties[5], G_TYPE_UINT);
  g_value_init (&skeleton->priv->properties[6], G_TYPE_STRING);
}

static gboolean 
grd_dbus_remote_desktop_configuration_rdp_server_skeleton_get_enabled (GrdDBusRemoteDesktopConfigurationRdpServer *object)
{
  GrdDBusRemoteDesktopConfigurationRdpServerSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_CONFIGURATION_RDP_SERVER_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 gint 
grd_dbus_remote_desktop_configuration_rdp_server_skeleton_get_port (GrdDBusRemoteDesktopConfigurationRdpServer *object)
{
  GrdDBusRemoteDesktopConfigurationRdpServerSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_CONFIGURATION_RDP_SERVER_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 const gchar *
grd_dbus_remote_desktop_configuration_rdp_server_skeleton_get_tls_cert (GrdDBusRemoteDesktopConfigurationRdpServer *object)
{
  GrdDBusRemoteDesktopConfigurationRdpServerSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_CONFIGURATION_RDP_SERVER_SKELETON (object);
  const gchar *value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_marshal_value_peek_string (&(skeleton->priv->properties[2]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static const gchar *
grd_dbus_remote_desktop_configuration_rdp_server_skeleton_get_tls_fingerprint (GrdDBusRemoteDesktopConfigurationRdpServer *object)
{
  GrdDBusRemoteDesktopConfigurationRdpServerSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_CONFIGURATION_RDP_SERVER_SKELETON (object);
  const gchar *value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_marshal_value_peek_string (&(skeleton->priv->properties[3]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static const gchar *
grd_dbus_remote_desktop_configuration_rdp_server_skeleton_get_tls_key (GrdDBusRemoteDesktopConfigurationRdpServer *object)
{
  GrdDBusRemoteDesktopConfigurationRdpServerSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_CONFIGURATION_RDP_SERVER_SKELETON (object);
  const gchar *value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_marshal_value_peek_string (&(skeleton->priv->properties[4]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static guint 
grd_dbus_remote_desktop_configuration_rdp_server_skeleton_get_auth_methods (GrdDBusRemoteDesktopConfigurationRdpServer *object)
{
  GrdDBusRemoteDesktopConfigurationRdpServerSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_CONFIGURATION_RDP_SERVER_SKELETON (object);
  guint value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_marshal_value_peek_uint (&(skeleton->priv->properties[5]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static const gchar *
grd_dbus_remote_desktop_configuration_rdp_server_skeleton_get_kerberos_keytab (GrdDBusRemoteDesktopConfigurationRdpServer *object)
{
  GrdDBusRemoteDesktopConfigurationRdpServerSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_CONFIGURATION_RDP_SERVER_SKELETON (object);
  const gchar *value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_marshal_value_peek_string (&(skeleton->priv->properties[6]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static void
grd_dbus_remote_desktop_configuration_rdp_server_skeleton_class_init (GrdDBusRemoteDesktopConfigurationRdpServerSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize = grd_dbus_remote_desktop_configuration_rdp_server_skeleton_finalize;
  gobject_class->get_property = grd_dbus_remote_desktop_configuration_rdp_server_skeleton_get_property;
  gobject_class->set_property = grd_dbus_remote_desktop_configuration_rdp_server_skeleton_set_property;
  gobject_class->notify       = grd_dbus_remote_desktop_configuration_rdp_server_skeleton_notify;


  grd_dbus_remote_desktop_configuration_rdp_server_override_properties (gobject_class, 1);

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = grd_dbus_remote_desktop_configuration_rdp_server_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = grd_dbus_remote_desktop_configuration_rdp_server_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = grd_dbus_remote_desktop_configuration_rdp_server_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = grd_dbus_remote_desktop_configuration_rdp_server_skeleton_dbus_interface_get_vtable;

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

static void
grd_dbus_remote_desktop_configuration_rdp_server_skeleton_iface_init (GrdDBusRemoteDesktopConfigurationRdpServerIface *iface)
{
  iface->get_enabled = grd_dbus_remote_desktop_configuration_rdp_server_skeleton_get_enabled;
  iface->get_port = grd_dbus_remote_desktop_configuration_rdp_server_skeleton_get_port;
  iface->get_tls_cert = grd_dbus_remote_desktop_configuration_rdp_server_skeleton_get_tls_cert;
  iface->get_tls_fingerprint = grd_dbus_remote_desktop_configuration_rdp_server_skeleton_get_tls_fingerprint;
  iface->get_tls_key = grd_dbus_remote_desktop_configuration_rdp_server_skeleton_get_tls_key;
  iface->get_auth_methods = grd_dbus_remote_desktop_configuration_rdp_server_skeleton_get_auth_methods;
  iface->get_kerberos_keytab = grd_dbus_remote_desktop_configuration_rdp_server_skeleton_get_kerberos_keytab;
}

/**
 * grd_dbus_remote_desktop_configuration_rdp_server_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-gnome-RemoteDesktop-Configuration-Rdp-Server.top_of_page">org.gnome.RemoteDesktop.Configuration.Rdp.Server</link>.
 *
 * Returns: (transfer full) (type GrdDBusRemoteDesktopConfigurationRdpServerSkeleton): The skeleton object.
 */
GrdDBusRemoteDesktopConfigurationRdpServer *
grd_dbus_remote_desktop_configuration_rdp_server_skeleton_new (void)
{
  return GRD_DBUS_REMOTE_DESKTOP_CONFIGURATION_RDP_SERVER (g_object_new (GRD_DBUS_REMOTE_DESKTOP_TYPE_CONFIGURATION_RDP_SERVER_SKELETON, NULL));
}

/* ------------------------------------------------------------------------
 * Code for interface org.gnome.RemoteDesktop.Vnc.Server
 * ------------------------------------------------------------------------
 */

/**
 * SECTION:GrdDBusRemoteDesktopVncServer
 * @title: GrdDBusRemoteDesktopVncServer
 * @short_description: Generated C code for the org.gnome.RemoteDesktop.Vnc.Server D-Bus interface
 *
 * This section contains code for working with the <link linkend="gdbus-interface-org-gnome-RemoteDesktop-Vnc-Server.top_of_page">org.gnome.RemoteDesktop.Vnc.Server</link> D-Bus interface in C.
 */

/* ---- Introspection data for org.gnome.RemoteDesktop.Vnc.Server ---- */

static const _ExtendedGDBusPropertyInfo _grd_dbus_remote_desktop_vnc_server_property_info_enabled =
{
  {
    -1,
    (gchar *) "Enabled",
    (gchar *) "b",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "enabled",
  FALSE,
  TRUE
};

static const _ExtendedGDBusPropertyInfo _grd_dbus_remote_desktop_vnc_server_property_info_port =
{
  {
    -1,
    (gchar *) "Port",
    (gchar *) "i",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "port",
  FALSE,
  TRUE
};

static const _ExtendedGDBusPropertyInfo _grd_dbus_remote_desktop_vnc_server_property_info_negotiate_port =
{
  {
    -1,
    (gchar *) "NegotiatePort",
    (gchar *) "b",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "negotiate-port",
  FALSE,
  TRUE
};

static const _ExtendedGDBusPropertyInfo _grd_dbus_remote_desktop_vnc_server_property_info_auth_method =
{
  {
    -1,
    (gchar *) "AuthMethod",
    (gchar *) "s",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "auth-method",
  FALSE,
  TRUE
};

static const _ExtendedGDBusPropertyInfo _grd_dbus_remote_desktop_vnc_server_property_info_view_only =
{
  {
    -1,
    (gchar *) "ViewOnly",
    (gchar *) "b",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "view-only",
  FALSE,
  TRUE
};

static const GDBusPropertyInfo * const _grd_dbus_remote_desktop_vnc_server_property_info_pointers[] =
{
  &_grd_dbus_remote_desktop_vnc_server_property_info_enabled.parent_struct,
  &_grd_dbus_remote_desktop_vnc_server_property_info_port.parent_struct,
  &_grd_dbus_remote_desktop_vnc_server_property_info_negotiate_port.parent_struct,
  &_grd_dbus_remote_desktop_vnc_server_property_info_auth_method.parent_struct,
  &_grd_dbus_remote_desktop_vnc_server_property_info_view_only.parent_struct,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _grd_dbus_remote_desktop_vnc_server_interface_info =
{
  {
    -1,
    (gchar *) "org.gnome.RemoteDesktop.Vnc.Server",
    NULL,
    NULL,
    (GDBusPropertyInfo **) &_grd_dbus_remote_desktop_vnc_server_property_info_pointers,
    NULL
  },
  "vnc-server",
};


/**
 * grd_dbus_remote_desktop_vnc_server_interface_info:
 *
 * Gets a machine-readable description of the <link linkend="gdbus-interface-org-gnome-RemoteDesktop-Vnc-Server.top_of_page">org.gnome.RemoteDesktop.Vnc.Server</link> D-Bus interface.
 *
 * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
 */
GDBusInterfaceInfo *
grd_dbus_remote_desktop_vnc_server_interface_info (void)
{
  return (GDBusInterfaceInfo *) &_grd_dbus_remote_desktop_vnc_server_interface_info.parent_struct;
}

/**
 * grd_dbus_remote_desktop_vnc_server_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 #GrdDBusRemoteDesktopVncServer interface for a concrete class.
 * The properties are overridden in the order they are defined.
 *
 * Returns: The last property id.
 */
guint
grd_dbus_remote_desktop_vnc_server_override_properties (GObjectClass *klass, guint property_id_begin)
{
  g_object_class_override_property (klass, property_id_begin++, "enabled");
  g_object_class_override_property (klass, property_id_begin++, "port");
  g_object_class_override_property (klass, property_id_begin++, "negotiate-port");
  g_object_class_override_property (klass, property_id_begin++, "auth-method");
  g_object_class_override_property (klass, property_id_begin++, "view-only");
  return property_id_begin - 1;
}



/**
 * GrdDBusRemoteDesktopVncServer:
 *
 * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-gnome-RemoteDesktop-Vnc-Server.top_of_page">org.gnome.RemoteDesktop.Vnc.Server</link>.
 */

/**
 * GrdDBusRemoteDesktopVncServerIface:
 * @parent_iface: The parent interface.
 * @get_auth_method: Getter for the #GrdDBusRemoteDesktopVncServer:auth-method property.
 * @get_enabled: Getter for the #GrdDBusRemoteDesktopVncServer:enabled property.
 * @get_negotiate_port: Getter for the #GrdDBusRemoteDesktopVncServer:negotiate-port property.
 * @get_port: Getter for the #GrdDBusRemoteDesktopVncServer:port property.
 * @get_view_only: Getter for the #GrdDBusRemoteDesktopVncServer:view-only property.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-gnome-RemoteDesktop-Vnc-Server.top_of_page">org.gnome.RemoteDesktop.Vnc.Server</link>.
 */

typedef GrdDBusRemoteDesktopVncServerIface GrdDBusRemoteDesktopVncServerInterface;
G_DEFINE_INTERFACE (GrdDBusRemoteDesktopVncServer, grd_dbus_remote_desktop_vnc_server, G_TYPE_OBJECT)

static void
grd_dbus_remote_desktop_vnc_server_default_init (GrdDBusRemoteDesktopVncServerIface *iface)
{
  /* GObject properties for D-Bus properties: */
  /**
   * GrdDBusRemoteDesktopVncServer:enabled:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-gnome-RemoteDesktop-Vnc-Server.Enabled">"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 ("enabled", "Enabled", "Enabled", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * GrdDBusRemoteDesktopVncServer:port:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-gnome-RemoteDesktop-Vnc-Server.Port">"Port"</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 ("port", "Port", "Port", G_MININT32, G_MAXINT32, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * GrdDBusRemoteDesktopVncServer:negotiate-port:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-gnome-RemoteDesktop-Vnc-Server.NegotiatePort">"NegotiatePort"</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 ("negotiate-port", "NegotiatePort", "NegotiatePort", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * GrdDBusRemoteDesktopVncServer:auth-method:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-gnome-RemoteDesktop-Vnc-Server.AuthMethod">"AuthMethod"</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_string ("auth-method", "AuthMethod", "AuthMethod", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * GrdDBusRemoteDesktopVncServer:view-only:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-gnome-RemoteDesktop-Vnc-Server.ViewOnly">"ViewOnly"</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 ("view-only", "ViewOnly", "ViewOnly", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
}

/**
 * grd_dbus_remote_desktop_vnc_server_get_enabled: (skip)
 * @object: A #GrdDBusRemoteDesktopVncServer.
 *
 * Gets the value of the <link linkend="gdbus-property-org-gnome-RemoteDesktop-Vnc-Server.Enabled">"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 
grd_dbus_remote_desktop_vnc_server_get_enabled (GrdDBusRemoteDesktopVncServer *object)
{
  g_return_val_if_fail (GRD_DBUS_REMOTE_DESKTOP_IS_VNC_SERVER (object), FALSE);

  return GRD_DBUS_REMOTE_DESKTOP_VNC_SERVER_GET_IFACE (object)->get_enabled (object);
}

/**
 * grd_dbus_remote_desktop_vnc_server_set_enabled: (skip)
 * @object: A #GrdDBusRemoteDesktopVncServer.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-gnome-RemoteDesktop-Vnc-Server.Enabled">"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
grd_dbus_remote_desktop_vnc_server_set_enabled (GrdDBusRemoteDesktopVncServer *object, gboolean value)
{
  g_object_set (G_OBJECT (object), "enabled", value, NULL);
}

/**
 * grd_dbus_remote_desktop_vnc_server_get_port: (skip)
 * @object: A #GrdDBusRemoteDesktopVncServer.
 *
 * Gets the value of the <link linkend="gdbus-property-org-gnome-RemoteDesktop-Vnc-Server.Port">"Port"</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 
grd_dbus_remote_desktop_vnc_server_get_port (GrdDBusRemoteDesktopVncServer *object)
{
  g_return_val_if_fail (GRD_DBUS_REMOTE_DESKTOP_IS_VNC_SERVER (object), 0);

  return GRD_DBUS_REMOTE_DESKTOP_VNC_SERVER_GET_IFACE (object)->get_port (object);
}

/**
 * grd_dbus_remote_desktop_vnc_server_set_port: (skip)
 * @object: A #GrdDBusRemoteDesktopVncServer.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-gnome-RemoteDesktop-Vnc-Server.Port">"Port"</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
grd_dbus_remote_desktop_vnc_server_set_port (GrdDBusRemoteDesktopVncServer *object, gint value)
{
  g_object_set (G_OBJECT (object), "port", value, NULL);
}

/**
 * grd_dbus_remote_desktop_vnc_server_get_negotiate_port: (skip)
 * @object: A #GrdDBusRemoteDesktopVncServer.
 *
 * Gets the value of the <link linkend="gdbus-property-org-gnome-RemoteDesktop-Vnc-Server.NegotiatePort">"NegotiatePort"</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 
grd_dbus_remote_desktop_vnc_server_get_negotiate_port (GrdDBusRemoteDesktopVncServer *object)
{
  g_return_val_if_fail (GRD_DBUS_REMOTE_DESKTOP_IS_VNC_SERVER (object), FALSE);

  return GRD_DBUS_REMOTE_DESKTOP_VNC_SERVER_GET_IFACE (object)->get_negotiate_port (object);
}

/**
 * grd_dbus_remote_desktop_vnc_server_set_negotiate_port: (skip)
 * @object: A #GrdDBusRemoteDesktopVncServer.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-gnome-RemoteDesktop-Vnc-Server.NegotiatePort">"NegotiatePort"</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
grd_dbus_remote_desktop_vnc_server_set_negotiate_port (GrdDBusRemoteDesktopVncServer *object, gboolean value)
{
  g_object_set (G_OBJECT (object), "negotiate-port", value, NULL);
}

/**
 * grd_dbus_remote_desktop_vnc_server_get_auth_method: (skip)
 * @object: A #GrdDBusRemoteDesktopVncServer.
 *
 * Gets the value of the <link linkend="gdbus-property-org-gnome-RemoteDesktop-Vnc-Server.AuthMethod">"AuthMethod"</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 grd_dbus_remote_desktop_vnc_server_dup_auth_method() 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.
 */
const gchar *
grd_dbus_remote_desktop_vnc_server_get_auth_method (GrdDBusRemoteDesktopVncServer *object)
{
  g_return_val_if_fail (GRD_DBUS_REMOTE_DESKTOP_IS_VNC_SERVER (object), NULL);

  return GRD_DBUS_REMOTE_DESKTOP_VNC_SERVER_GET_IFACE (object)->get_auth_method (object);
}

/**
 * grd_dbus_remote_desktop_vnc_server_dup_auth_method: (skip)
 * @object: A #GrdDBusRemoteDesktopVncServer.
 *
 * Gets a copy of the <link linkend="gdbus-property-org-gnome-RemoteDesktop-Vnc-Server.AuthMethod">"AuthMethod"</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_free().
 */
gchar *
grd_dbus_remote_desktop_vnc_server_dup_auth_method (GrdDBusRemoteDesktopVncServer *object)
{
  gchar *value;
  g_object_get (G_OBJECT (object), "auth-method", &value, NULL);
  return value;
}

/**
 * grd_dbus_remote_desktop_vnc_server_set_auth_method: (skip)
 * @object: A #GrdDBusRemoteDesktopVncServer.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-gnome-RemoteDesktop-Vnc-Server.AuthMethod">"AuthMethod"</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
grd_dbus_remote_desktop_vnc_server_set_auth_method (GrdDBusRemoteDesktopVncServer *object, const gchar *value)
{
  g_object_set (G_OBJECT (object), "auth-method", value, NULL);
}

/**
 * grd_dbus_remote_desktop_vnc_server_get_view_only: (skip)
 * @object: A #GrdDBusRemoteDesktopVncServer.
 *
 * Gets the value of the <link linkend="gdbus-property-org-gnome-RemoteDesktop-Vnc-Server.ViewOnly">"ViewOnly"</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 
grd_dbus_remote_desktop_vnc_server_get_view_only (GrdDBusRemoteDesktopVncServer *object)
{
  g_return_val_if_fail (GRD_DBUS_REMOTE_DESKTOP_IS_VNC_SERVER (object), FALSE);

  return GRD_DBUS_REMOTE_DESKTOP_VNC_SERVER_GET_IFACE (object)->get_view_only (object);
}

/**
 * grd_dbus_remote_desktop_vnc_server_set_view_only: (skip)
 * @object: A #GrdDBusRemoteDesktopVncServer.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-gnome-RemoteDesktop-Vnc-Server.ViewOnly">"ViewOnly"</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
grd_dbus_remote_desktop_vnc_server_set_view_only (GrdDBusRemoteDesktopVncServer *object, gboolean value)
{
  g_object_set (G_OBJECT (object), "view-only", value, NULL);
}

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

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

/**
 * GrdDBusRemoteDesktopVncServerProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #GrdDBusRemoteDesktopVncServerProxy.
 */

struct _GrdDBusRemoteDesktopVncServerProxyPrivate
{
  GData *qdata;
};

static void grd_dbus_remote_desktop_vnc_server_proxy_iface_init (GrdDBusRemoteDesktopVncServerIface *iface);

#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (GrdDBusRemoteDesktopVncServerProxy, grd_dbus_remote_desktop_vnc_server_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (GrdDBusRemoteDesktopVncServerProxy)
                         G_IMPLEMENT_INTERFACE (GRD_DBUS_REMOTE_DESKTOP_TYPE_VNC_SERVER, grd_dbus_remote_desktop_vnc_server_proxy_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (GrdDBusRemoteDesktopVncServerProxy, grd_dbus_remote_desktop_vnc_server_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (GRD_DBUS_REMOTE_DESKTOP_TYPE_VNC_SERVER, grd_dbus_remote_desktop_vnc_server_proxy_iface_init))

#endif
static void
grd_dbus_remote_desktop_vnc_server_proxy_finalize (GObject *object)
{
  GrdDBusRemoteDesktopVncServerProxy *proxy = GRD_DBUS_REMOTE_DESKTOP_VNC_SERVER_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (grd_dbus_remote_desktop_vnc_server_proxy_parent_class)->finalize (object);
}

static void
grd_dbus_remote_desktop_vnc_server_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 < 5);
  info = (const _ExtendedGDBusPropertyInfo *) _grd_dbus_remote_desktop_vnc_server_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
grd_dbus_remote_desktop_vnc_server_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.gnome.RemoteDesktop.Vnc.Server: %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
grd_dbus_remote_desktop_vnc_server_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 < 5);
  info = (const _ExtendedGDBusPropertyInfo *) _grd_dbus_remote_desktop_vnc_server_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.gnome.RemoteDesktop.Vnc.Server", info->parent_struct.name, variant),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    NULL, (GAsyncReadyCallback) grd_dbus_remote_desktop_vnc_server_proxy_set_property_cb, (GDBusPropertyInfo *) &info->parent_struct);
  g_variant_unref (variant);
}

static void
grd_dbus_remote_desktop_vnc_server_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 *) &_grd_dbus_remote_desktop_vnc_server_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], GRD_DBUS_REMOTE_DESKTOP_TYPE_VNC_SERVER);
  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, GRD_DBUS_REMOTE_DESKTOP_TYPE_VNC_SERVER);
  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
grd_dbus_remote_desktop_vnc_server_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  GrdDBusRemoteDesktopVncServerProxy *proxy = GRD_DBUS_REMOTE_DESKTOP_VNC_SERVER_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 *) &_grd_dbus_remote_desktop_vnc_server_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 *) &_grd_dbus_remote_desktop_vnc_server_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 
grd_dbus_remote_desktop_vnc_server_proxy_get_enabled (GrdDBusRemoteDesktopVncServer *object)
{
  GrdDBusRemoteDesktopVncServerProxy *proxy = GRD_DBUS_REMOTE_DESKTOP_VNC_SERVER_PROXY (object);
  GVariant *variant;
  gboolean value = FALSE;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Enabled");
  if (variant != NULL)
    {
      value = g_variant_get_boolean (variant);
      g_variant_unref (variant);
    }
  return value;
}

static gint 
grd_dbus_remote_desktop_vnc_server_proxy_get_port (GrdDBusRemoteDesktopVncServer *object)
{
  GrdDBusRemoteDesktopVncServerProxy *proxy = GRD_DBUS_REMOTE_DESKTOP_VNC_SERVER_PROXY (object);
  GVariant *variant;
  gint value = 0;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Port");
  if (variant != NULL)
    {
      value = g_variant_get_int32 (variant);
      g_variant_unref (variant);
    }
  return value;
}

static gboolean 
grd_dbus_remote_desktop_vnc_server_proxy_get_negotiate_port (GrdDBusRemoteDesktopVncServer *object)
{
  GrdDBusRemoteDesktopVncServerProxy *proxy = GRD_DBUS_REMOTE_DESKTOP_VNC_SERVER_PROXY (object);
  GVariant *variant;
  gboolean value = FALSE;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "NegotiatePort");
  if (variant != NULL)
    {
      value = g_variant_get_boolean (variant);
      g_variant_unref (variant);
    }
  return value;
}

static const gchar *
grd_dbus_remote_desktop_vnc_server_proxy_get_auth_method (GrdDBusRemoteDesktopVncServer *object)
{
  GrdDBusRemoteDesktopVncServerProxy *proxy = GRD_DBUS_REMOTE_DESKTOP_VNC_SERVER_PROXY (object);
  GVariant *variant;
  const gchar *value = NULL;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "AuthMethod");
  if (variant != NULL)
    {
      value = g_variant_get_string (variant, NULL);
      g_variant_unref (variant);
    }
  return value;
}

static gboolean 
grd_dbus_remote_desktop_vnc_server_proxy_get_view_only (GrdDBusRemoteDesktopVncServer *object)
{
  GrdDBusRemoteDesktopVncServerProxy *proxy = GRD_DBUS_REMOTE_DESKTOP_VNC_SERVER_PROXY (object);
  GVariant *variant;
  gboolean value = FALSE;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "ViewOnly");
  if (variant != NULL)
    {
      value = g_variant_get_boolean (variant);
      g_variant_unref (variant);
    }
  return value;
}

static void
grd_dbus_remote_desktop_vnc_server_proxy_init (GrdDBusRemoteDesktopVncServerProxy *proxy)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  proxy->priv = grd_dbus_remote_desktop_vnc_server_proxy_get_instance_private (proxy);
#else
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, GRD_DBUS_REMOTE_DESKTOP_TYPE_VNC_SERVER_PROXY, GrdDBusRemoteDesktopVncServerProxyPrivate);
#endif

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

static void
grd_dbus_remote_desktop_vnc_server_proxy_class_init (GrdDBusRemoteDesktopVncServerProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = grd_dbus_remote_desktop_vnc_server_proxy_finalize;
  gobject_class->get_property = grd_dbus_remote_desktop_vnc_server_proxy_get_property;
  gobject_class->set_property = grd_dbus_remote_desktop_vnc_server_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = grd_dbus_remote_desktop_vnc_server_proxy_g_signal;
  proxy_class->g_properties_changed = grd_dbus_remote_desktop_vnc_server_proxy_g_properties_changed;

  grd_dbus_remote_desktop_vnc_server_override_properties (gobject_class, 1);

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

static void
grd_dbus_remote_desktop_vnc_server_proxy_iface_init (GrdDBusRemoteDesktopVncServerIface *iface)
{
  iface->get_enabled = grd_dbus_remote_desktop_vnc_server_proxy_get_enabled;
  iface->get_port = grd_dbus_remote_desktop_vnc_server_proxy_get_port;
  iface->get_negotiate_port = grd_dbus_remote_desktop_vnc_server_proxy_get_negotiate_port;
  iface->get_auth_method = grd_dbus_remote_desktop_vnc_server_proxy_get_auth_method;
  iface->get_view_only = grd_dbus_remote_desktop_vnc_server_proxy_get_view_only;
}

/**
 * grd_dbus_remote_desktop_vnc_server_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-gnome-RemoteDesktop-Vnc-Server.top_of_page">org.gnome.RemoteDesktop.Vnc.Server</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 grd_dbus_remote_desktop_vnc_server_proxy_new_finish() to get the result of the operation.
 *
 * See grd_dbus_remote_desktop_vnc_server_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
grd_dbus_remote_desktop_vnc_server_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 (GRD_DBUS_REMOTE_DESKTOP_TYPE_VNC_SERVER_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.gnome.RemoteDesktop.Vnc.Server", NULL);
}

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

/**
 * grd_dbus_remote_desktop_vnc_server_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-gnome-RemoteDesktop-Vnc-Server.top_of_page">org.gnome.RemoteDesktop.Vnc.Server</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See grd_dbus_remote_desktop_vnc_server_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type GrdDBusRemoteDesktopVncServerProxy): The constructed proxy object or %NULL if @error is set.
 */
GrdDBusRemoteDesktopVncServer *
grd_dbus_remote_desktop_vnc_server_proxy_new_sync (
    GDBusConnection     *connection,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GError             **error)
{
  GInitable *ret;
  ret = g_initable_new (GRD_DBUS_REMOTE_DESKTOP_TYPE_VNC_SERVER_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.gnome.RemoteDesktop.Vnc.Server", NULL);
  if (ret != NULL)
    return GRD_DBUS_REMOTE_DESKTOP_VNC_SERVER (ret);
  else
    return NULL;
}


/**
 * grd_dbus_remote_desktop_vnc_server_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 grd_dbus_remote_desktop_vnc_server_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 grd_dbus_remote_desktop_vnc_server_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See grd_dbus_remote_desktop_vnc_server_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
grd_dbus_remote_desktop_vnc_server_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 (GRD_DBUS_REMOTE_DESKTOP_TYPE_VNC_SERVER_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.gnome.RemoteDesktop.Vnc.Server", NULL);
}

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

/**
 * grd_dbus_remote_desktop_vnc_server_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 grd_dbus_remote_desktop_vnc_server_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See grd_dbus_remote_desktop_vnc_server_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type GrdDBusRemoteDesktopVncServerProxy): The constructed proxy object or %NULL if @error is set.
 */
GrdDBusRemoteDesktopVncServer *
grd_dbus_remote_desktop_vnc_server_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 (GRD_DBUS_REMOTE_DESKTOP_TYPE_VNC_SERVER_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.gnome.RemoteDesktop.Vnc.Server", NULL);
  if (ret != NULL)
    return GRD_DBUS_REMOTE_DESKTOP_VNC_SERVER (ret);
  else
    return NULL;
}


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

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

/**
 * GrdDBusRemoteDesktopVncServerSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #GrdDBusRemoteDesktopVncServerSkeleton.
 */

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

static void
_grd_dbus_remote_desktop_vnc_server_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)
{
  GrdDBusRemoteDesktopVncServerSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_VNC_SERVER_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], GRD_DBUS_REMOTE_DESKTOP_TYPE_VNC_SERVER);
  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, GRD_DBUS_REMOTE_DESKTOP_TYPE_VNC_SERVER);
  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 *
_grd_dbus_remote_desktop_vnc_server_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)
{
  GrdDBusRemoteDesktopVncServerSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_VNC_SERVER_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 *) &_grd_dbus_remote_desktop_vnc_server_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
_grd_dbus_remote_desktop_vnc_server_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)
{
  GrdDBusRemoteDesktopVncServerSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_VNC_SERVER_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 *) &_grd_dbus_remote_desktop_vnc_server_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 _grd_dbus_remote_desktop_vnc_server_skeleton_vtable =
{
  _grd_dbus_remote_desktop_vnc_server_skeleton_handle_method_call,
  _grd_dbus_remote_desktop_vnc_server_skeleton_handle_get_property,
  _grd_dbus_remote_desktop_vnc_server_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
grd_dbus_remote_desktop_vnc_server_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return grd_dbus_remote_desktop_vnc_server_interface_info ();
}

static GDBusInterfaceVTable *
grd_dbus_remote_desktop_vnc_server_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_grd_dbus_remote_desktop_vnc_server_skeleton_vtable;
}

static GVariant *
grd_dbus_remote_desktop_vnc_server_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  GrdDBusRemoteDesktopVncServerSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_VNC_SERVER_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 (_grd_dbus_remote_desktop_vnc_server_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _grd_dbus_remote_desktop_vnc_server_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _grd_dbus_remote_desktop_vnc_server_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _grd_dbus_remote_desktop_vnc_server_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.gnome.RemoteDesktop.Vnc.Server", 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 _grd_dbus_remote_desktop_vnc_server_emit_changed (gpointer user_data);

static void
grd_dbus_remote_desktop_vnc_server_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
{
  GrdDBusRemoteDesktopVncServerSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_VNC_SERVER_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)
    _grd_dbus_remote_desktop_vnc_server_emit_changed (skeleton);
}

static void grd_dbus_remote_desktop_vnc_server_skeleton_iface_init (GrdDBusRemoteDesktopVncServerIface *iface);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (GrdDBusRemoteDesktopVncServerSkeleton, grd_dbus_remote_desktop_vnc_server_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (GrdDBusRemoteDesktopVncServerSkeleton)
                         G_IMPLEMENT_INTERFACE (GRD_DBUS_REMOTE_DESKTOP_TYPE_VNC_SERVER, grd_dbus_remote_desktop_vnc_server_skeleton_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (GrdDBusRemoteDesktopVncServerSkeleton, grd_dbus_remote_desktop_vnc_server_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (GRD_DBUS_REMOTE_DESKTOP_TYPE_VNC_SERVER, grd_dbus_remote_desktop_vnc_server_skeleton_iface_init))

#endif
static void
grd_dbus_remote_desktop_vnc_server_skeleton_finalize (GObject *object)
{
  GrdDBusRemoteDesktopVncServerSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_VNC_SERVER_SKELETON (object);
  guint n;
  for (n = 0; n < 5; 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 (grd_dbus_remote_desktop_vnc_server_skeleton_parent_class)->finalize (object);
}

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

static gboolean
_grd_dbus_remote_desktop_vnc_server_emit_changed (gpointer user_data)
{
  GrdDBusRemoteDesktopVncServerSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_VNC_SERVER_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.gnome.RemoteDesktop.Vnc.Server",
                                           &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
_grd_dbus_remote_desktop_vnc_server_schedule_emit_changed (GrdDBusRemoteDesktopVncServerSkeleton *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
grd_dbus_remote_desktop_vnc_server_skeleton_notify (GObject      *object,
  GParamSpec *pspec G_GNUC_UNUSED)
{
  GrdDBusRemoteDesktopVncServerSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_VNC_SERVER_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, _grd_dbus_remote_desktop_vnc_server_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
      g_source_set_name (skeleton->priv->changed_properties_idle_source, "[generated] _grd_dbus_remote_desktop_vnc_server_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
grd_dbus_remote_desktop_vnc_server_skeleton_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec)
{
  const _ExtendedGDBusPropertyInfo *info;
  GrdDBusRemoteDesktopVncServerSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_VNC_SERVER_SKELETON (object);
  g_assert (prop_id != 0 && prop_id - 1 < 5);
  info = (const _ExtendedGDBusPropertyInfo *) _grd_dbus_remote_desktop_vnc_server_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)
        _grd_dbus_remote_desktop_vnc_server_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
grd_dbus_remote_desktop_vnc_server_skeleton_init (GrdDBusRemoteDesktopVncServerSkeleton *skeleton)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  skeleton->priv = grd_dbus_remote_desktop_vnc_server_skeleton_get_instance_private (skeleton);
#else
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, GRD_DBUS_REMOTE_DESKTOP_TYPE_VNC_SERVER_SKELETON, GrdDBusRemoteDesktopVncServerSkeletonPrivate);
#endif

  g_mutex_init (&skeleton->priv->lock);
  skeleton->priv->context = g_main_context_ref_thread_default ();
  skeleton->priv->properties = g_new0 (GValue, 5);
  g_value_init (&skeleton->priv->properties[0], G_TYPE_BOOLEAN);
  g_value_init (&skeleton->priv->properties[1], G_TYPE_INT);
  g_value_init (&skeleton->priv->properties[2], G_TYPE_BOOLEAN);
  g_value_init (&skeleton->priv->properties[3], G_TYPE_STRING);
  g_value_init (&skeleton->priv->properties[4], G_TYPE_BOOLEAN);
}

static gboolean 
grd_dbus_remote_desktop_vnc_server_skeleton_get_enabled (GrdDBusRemoteDesktopVncServer *object)
{
  GrdDBusRemoteDesktopVncServerSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_VNC_SERVER_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 gint 
grd_dbus_remote_desktop_vnc_server_skeleton_get_port (GrdDBusRemoteDesktopVncServer *object)
{
  GrdDBusRemoteDesktopVncServerSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_VNC_SERVER_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 gboolean 
grd_dbus_remote_desktop_vnc_server_skeleton_get_negotiate_port (GrdDBusRemoteDesktopVncServer *object)
{
  GrdDBusRemoteDesktopVncServerSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_VNC_SERVER_SKELETON (object);
  gboolean value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_marshal_value_peek_boolean (&(skeleton->priv->properties[2]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static const gchar *
grd_dbus_remote_desktop_vnc_server_skeleton_get_auth_method (GrdDBusRemoteDesktopVncServer *object)
{
  GrdDBusRemoteDesktopVncServerSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_VNC_SERVER_SKELETON (object);
  const gchar *value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_marshal_value_peek_string (&(skeleton->priv->properties[3]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static gboolean 
grd_dbus_remote_desktop_vnc_server_skeleton_get_view_only (GrdDBusRemoteDesktopVncServer *object)
{
  GrdDBusRemoteDesktopVncServerSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_VNC_SERVER_SKELETON (object);
  gboolean value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_marshal_value_peek_boolean (&(skeleton->priv->properties[4]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static void
grd_dbus_remote_desktop_vnc_server_skeleton_class_init (GrdDBusRemoteDesktopVncServerSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize = grd_dbus_remote_desktop_vnc_server_skeleton_finalize;
  gobject_class->get_property = grd_dbus_remote_desktop_vnc_server_skeleton_get_property;
  gobject_class->set_property = grd_dbus_remote_desktop_vnc_server_skeleton_set_property;
  gobject_class->notify       = grd_dbus_remote_desktop_vnc_server_skeleton_notify;


  grd_dbus_remote_desktop_vnc_server_override_properties (gobject_class, 1);

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = grd_dbus_remote_desktop_vnc_server_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = grd_dbus_remote_desktop_vnc_server_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = grd_dbus_remote_desktop_vnc_server_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = grd_dbus_remote_desktop_vnc_server_skeleton_dbus_interface_get_vtable;

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

static void
grd_dbus_remote_desktop_vnc_server_skeleton_iface_init (GrdDBusRemoteDesktopVncServerIface *iface)
{
  iface->get_enabled = grd_dbus_remote_desktop_vnc_server_skeleton_get_enabled;
  iface->get_port = grd_dbus_remote_desktop_vnc_server_skeleton_get_port;
  iface->get_negotiate_port = grd_dbus_remote_desktop_vnc_server_skeleton_get_negotiate_port;
  iface->get_auth_method = grd_dbus_remote_desktop_vnc_server_skeleton_get_auth_method;
  iface->get_view_only = grd_dbus_remote_desktop_vnc_server_skeleton_get_view_only;
}

/**
 * grd_dbus_remote_desktop_vnc_server_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-gnome-RemoteDesktop-Vnc-Server.top_of_page">org.gnome.RemoteDesktop.Vnc.Server</link>.
 *
 * Returns: (transfer full) (type GrdDBusRemoteDesktopVncServerSkeleton): The skeleton object.
 */
GrdDBusRemoteDesktopVncServer *
grd_dbus_remote_desktop_vnc_server_skeleton_new (void)
{
  return GRD_DBUS_REMOTE_DESKTOP_VNC_SERVER (g_object_new (GRD_DBUS_REMOTE_DESKTOP_TYPE_VNC_SERVER_SKELETON, NULL));
}

/* ------------------------------------------------------------------------
 * Code for interface org.gnome.RemoteDesktop.Rdp.Dispatcher
 * ------------------------------------------------------------------------
 */

/**
 * SECTION:GrdDBusRemoteDesktopRdpDispatcher
 * @title: GrdDBusRemoteDesktopRdpDispatcher
 * @short_description: Generated C code for the org.gnome.RemoteDesktop.Rdp.Dispatcher D-Bus interface
 *
 * This section contains code for working with the <link linkend="gdbus-interface-org-gnome-RemoteDesktop-Rdp-Dispatcher.top_of_page">org.gnome.RemoteDesktop.Rdp.Dispatcher</link> D-Bus interface in C.
 */

/* ---- Introspection data for org.gnome.RemoteDesktop.Rdp.Dispatcher ---- */

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

static const GDBusArgInfo * const _grd_dbus_remote_desktop_rdp_dispatcher_method_info_request_handover_OUT_ARG_pointers[] =
{
  &_grd_dbus_remote_desktop_rdp_dispatcher_method_info_request_handover_OUT_ARG_handover.parent_struct,
  NULL
};

static const _ExtendedGDBusMethodInfo _grd_dbus_remote_desktop_rdp_dispatcher_method_info_request_handover =
{
  {
    -1,
    (gchar *) "RequestHandover",
    NULL,
    (GDBusArgInfo **) &_grd_dbus_remote_desktop_rdp_dispatcher_method_info_request_handover_OUT_ARG_pointers,
    NULL
  },
  "handle-request-handover",
  FALSE
};

static const GDBusMethodInfo * const _grd_dbus_remote_desktop_rdp_dispatcher_method_info_pointers[] =
{
  &_grd_dbus_remote_desktop_rdp_dispatcher_method_info_request_handover.parent_struct,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _grd_dbus_remote_desktop_rdp_dispatcher_interface_info =
{
  {
    -1,
    (gchar *) "org.gnome.RemoteDesktop.Rdp.Dispatcher",
    (GDBusMethodInfo **) &_grd_dbus_remote_desktop_rdp_dispatcher_method_info_pointers,
    NULL,
    NULL,
    NULL
  },
  "rdp-dispatcher",
};


/**
 * grd_dbus_remote_desktop_rdp_dispatcher_interface_info:
 *
 * Gets a machine-readable description of the <link linkend="gdbus-interface-org-gnome-RemoteDesktop-Rdp-Dispatcher.top_of_page">org.gnome.RemoteDesktop.Rdp.Dispatcher</link> D-Bus interface.
 *
 * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
 */
GDBusInterfaceInfo *
grd_dbus_remote_desktop_rdp_dispatcher_interface_info (void)
{
  return (GDBusInterfaceInfo *) &_grd_dbus_remote_desktop_rdp_dispatcher_interface_info.parent_struct;
}

/**
 * grd_dbus_remote_desktop_rdp_dispatcher_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 #GrdDBusRemoteDesktopRdpDispatcher interface for a concrete class.
 * The properties are overridden in the order they are defined.
 *
 * Returns: The last property id.
 */
guint
grd_dbus_remote_desktop_rdp_dispatcher_override_properties (GObjectClass *klass G_GNUC_UNUSED, guint property_id_begin)
{
  return property_id_begin - 1;
}


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


/**
 * GrdDBusRemoteDesktopRdpDispatcher:
 *
 * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-gnome-RemoteDesktop-Rdp-Dispatcher.top_of_page">org.gnome.RemoteDesktop.Rdp.Dispatcher</link>.
 */

/**
 * GrdDBusRemoteDesktopRdpDispatcherIface:
 * @parent_iface: The parent interface.
 * @handle_request_handover: Handler for the #GrdDBusRemoteDesktopRdpDispatcher::handle-request-handover signal.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-gnome-RemoteDesktop-Rdp-Dispatcher.top_of_page">org.gnome.RemoteDesktop.Rdp.Dispatcher</link>.
 */

typedef GrdDBusRemoteDesktopRdpDispatcherIface GrdDBusRemoteDesktopRdpDispatcherInterface;
G_DEFINE_INTERFACE (GrdDBusRemoteDesktopRdpDispatcher, grd_dbus_remote_desktop_rdp_dispatcher, G_TYPE_OBJECT)

static void
grd_dbus_remote_desktop_rdp_dispatcher_default_init (GrdDBusRemoteDesktopRdpDispatcherIface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * GrdDBusRemoteDesktopRdpDispatcher::handle-request-handover:
   * @object: A #GrdDBusRemoteDesktopRdpDispatcher.
   * @invocation: A #GDBusMethodInvocation.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-gnome-RemoteDesktop-Rdp-Dispatcher.RequestHandover">RequestHandover()</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 grd_dbus_remote_desktop_rdp_dispatcher_complete_request_handover() 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-handover",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (GrdDBusRemoteDesktopRdpDispatcherIface, handle_request_handover),
    g_signal_accumulator_true_handled,
    NULL,
      grd_dbus_remote_desktop_rdp_dispatcher_method_marshal_request_handover,
    G_TYPE_BOOLEAN,
    1,
    G_TYPE_DBUS_METHOD_INVOCATION);

}

/**
 * grd_dbus_remote_desktop_rdp_dispatcher_call_request_handover:
 * @proxy: A #GrdDBusRemoteDesktopRdpDispatcherProxy.
 * @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-gnome-RemoteDesktop-Rdp-Dispatcher.RequestHandover">RequestHandover()</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 grd_dbus_remote_desktop_rdp_dispatcher_call_request_handover_finish() to get the result of the operation.
 *
 * See grd_dbus_remote_desktop_rdp_dispatcher_call_request_handover_sync() for the synchronous, blocking version of this method.
 */
void
grd_dbus_remote_desktop_rdp_dispatcher_call_request_handover (
    GrdDBusRemoteDesktopRdpDispatcher *proxy,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "RequestHandover",
    g_variant_new ("()"),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

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

/**
 * grd_dbus_remote_desktop_rdp_dispatcher_call_request_handover_sync:
 * @proxy: A #GrdDBusRemoteDesktopRdpDispatcherProxy.
 * @out_handover: (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-gnome-RemoteDesktop-Rdp-Dispatcher.RequestHandover">RequestHandover()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See grd_dbus_remote_desktop_rdp_dispatcher_call_request_handover() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
grd_dbus_remote_desktop_rdp_dispatcher_call_request_handover_sync (
    GrdDBusRemoteDesktopRdpDispatcher *proxy,
    gchar ** out_handover,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "RequestHandover",
    g_variant_new ("()"),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(o)",
                 out_handover);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

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

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

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

/**
 * GrdDBusRemoteDesktopRdpDispatcherProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #GrdDBusRemoteDesktopRdpDispatcherProxy.
 */

struct _GrdDBusRemoteDesktopRdpDispatcherProxyPrivate
{
  GData *qdata;
};

static void grd_dbus_remote_desktop_rdp_dispatcher_proxy_iface_init (GrdDBusRemoteDesktopRdpDispatcherIface *iface);

#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (GrdDBusRemoteDesktopRdpDispatcherProxy, grd_dbus_remote_desktop_rdp_dispatcher_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (GrdDBusRemoteDesktopRdpDispatcherProxy)
                         G_IMPLEMENT_INTERFACE (GRD_DBUS_REMOTE_DESKTOP_TYPE_RDP_DISPATCHER, grd_dbus_remote_desktop_rdp_dispatcher_proxy_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (GrdDBusRemoteDesktopRdpDispatcherProxy, grd_dbus_remote_desktop_rdp_dispatcher_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (GRD_DBUS_REMOTE_DESKTOP_TYPE_RDP_DISPATCHER, grd_dbus_remote_desktop_rdp_dispatcher_proxy_iface_init))

#endif
static void
grd_dbus_remote_desktop_rdp_dispatcher_proxy_finalize (GObject *object)
{
  GrdDBusRemoteDesktopRdpDispatcherProxy *proxy = GRD_DBUS_REMOTE_DESKTOP_RDP_DISPATCHER_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (grd_dbus_remote_desktop_rdp_dispatcher_proxy_parent_class)->finalize (object);
}

static void
grd_dbus_remote_desktop_rdp_dispatcher_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
grd_dbus_remote_desktop_rdp_dispatcher_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
grd_dbus_remote_desktop_rdp_dispatcher_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 *) &_grd_dbus_remote_desktop_rdp_dispatcher_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], GRD_DBUS_REMOTE_DESKTOP_TYPE_RDP_DISPATCHER);
  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, GRD_DBUS_REMOTE_DESKTOP_TYPE_RDP_DISPATCHER);
  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
grd_dbus_remote_desktop_rdp_dispatcher_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  GrdDBusRemoteDesktopRdpDispatcherProxy *proxy = GRD_DBUS_REMOTE_DESKTOP_RDP_DISPATCHER_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 *) &_grd_dbus_remote_desktop_rdp_dispatcher_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 *) &_grd_dbus_remote_desktop_rdp_dispatcher_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
grd_dbus_remote_desktop_rdp_dispatcher_proxy_init (GrdDBusRemoteDesktopRdpDispatcherProxy *proxy)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  proxy->priv = grd_dbus_remote_desktop_rdp_dispatcher_proxy_get_instance_private (proxy);
#else
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, GRD_DBUS_REMOTE_DESKTOP_TYPE_RDP_DISPATCHER_PROXY, GrdDBusRemoteDesktopRdpDispatcherProxyPrivate);
#endif

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

static void
grd_dbus_remote_desktop_rdp_dispatcher_proxy_class_init (GrdDBusRemoteDesktopRdpDispatcherProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = grd_dbus_remote_desktop_rdp_dispatcher_proxy_finalize;
  gobject_class->get_property = grd_dbus_remote_desktop_rdp_dispatcher_proxy_get_property;
  gobject_class->set_property = grd_dbus_remote_desktop_rdp_dispatcher_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = grd_dbus_remote_desktop_rdp_dispatcher_proxy_g_signal;
  proxy_class->g_properties_changed = grd_dbus_remote_desktop_rdp_dispatcher_proxy_g_properties_changed;

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

static void
grd_dbus_remote_desktop_rdp_dispatcher_proxy_iface_init (GrdDBusRemoteDesktopRdpDispatcherIface *iface G_GNUC_UNUSED)
{
}

/**
 * grd_dbus_remote_desktop_rdp_dispatcher_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-gnome-RemoteDesktop-Rdp-Dispatcher.top_of_page">org.gnome.RemoteDesktop.Rdp.Dispatcher</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 grd_dbus_remote_desktop_rdp_dispatcher_proxy_new_finish() to get the result of the operation.
 *
 * See grd_dbus_remote_desktop_rdp_dispatcher_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
grd_dbus_remote_desktop_rdp_dispatcher_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 (GRD_DBUS_REMOTE_DESKTOP_TYPE_RDP_DISPATCHER_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.gnome.RemoteDesktop.Rdp.Dispatcher", NULL);
}

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

/**
 * grd_dbus_remote_desktop_rdp_dispatcher_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-gnome-RemoteDesktop-Rdp-Dispatcher.top_of_page">org.gnome.RemoteDesktop.Rdp.Dispatcher</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See grd_dbus_remote_desktop_rdp_dispatcher_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type GrdDBusRemoteDesktopRdpDispatcherProxy): The constructed proxy object or %NULL if @error is set.
 */
GrdDBusRemoteDesktopRdpDispatcher *
grd_dbus_remote_desktop_rdp_dispatcher_proxy_new_sync (
    GDBusConnection     *connection,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GError             **error)
{
  GInitable *ret;
  ret = g_initable_new (GRD_DBUS_REMOTE_DESKTOP_TYPE_RDP_DISPATCHER_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.gnome.RemoteDesktop.Rdp.Dispatcher", NULL);
  if (ret != NULL)
    return GRD_DBUS_REMOTE_DESKTOP_RDP_DISPATCHER (ret);
  else
    return NULL;
}


/**
 * grd_dbus_remote_desktop_rdp_dispatcher_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 grd_dbus_remote_desktop_rdp_dispatcher_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 grd_dbus_remote_desktop_rdp_dispatcher_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See grd_dbus_remote_desktop_rdp_dispatcher_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
grd_dbus_remote_desktop_rdp_dispatcher_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 (GRD_DBUS_REMOTE_DESKTOP_TYPE_RDP_DISPATCHER_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.gnome.RemoteDesktop.Rdp.Dispatcher", NULL);
}

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

/**
 * grd_dbus_remote_desktop_rdp_dispatcher_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 grd_dbus_remote_desktop_rdp_dispatcher_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See grd_dbus_remote_desktop_rdp_dispatcher_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type GrdDBusRemoteDesktopRdpDispatcherProxy): The constructed proxy object or %NULL if @error is set.
 */
GrdDBusRemoteDesktopRdpDispatcher *
grd_dbus_remote_desktop_rdp_dispatcher_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 (GRD_DBUS_REMOTE_DESKTOP_TYPE_RDP_DISPATCHER_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.gnome.RemoteDesktop.Rdp.Dispatcher", NULL);
  if (ret != NULL)
    return GRD_DBUS_REMOTE_DESKTOP_RDP_DISPATCHER (ret);
  else
    return NULL;
}


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

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

/**
 * GrdDBusRemoteDesktopRdpDispatcherSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #GrdDBusRemoteDesktopRdpDispatcherSkeleton.
 */

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

static void
_grd_dbus_remote_desktop_rdp_dispatcher_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)
{
  GrdDBusRemoteDesktopRdpDispatcherSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_RDP_DISPATCHER_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], GRD_DBUS_REMOTE_DESKTOP_TYPE_RDP_DISPATCHER);
  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, GRD_DBUS_REMOTE_DESKTOP_TYPE_RDP_DISPATCHER);
  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 *
_grd_dbus_remote_desktop_rdp_dispatcher_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)
{
  GrdDBusRemoteDesktopRdpDispatcherSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_RDP_DISPATCHER_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 *) &_grd_dbus_remote_desktop_rdp_dispatcher_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
_grd_dbus_remote_desktop_rdp_dispatcher_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)
{
  GrdDBusRemoteDesktopRdpDispatcherSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_RDP_DISPATCHER_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 *) &_grd_dbus_remote_desktop_rdp_dispatcher_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 _grd_dbus_remote_desktop_rdp_dispatcher_skeleton_vtable =
{
  _grd_dbus_remote_desktop_rdp_dispatcher_skeleton_handle_method_call,
  _grd_dbus_remote_desktop_rdp_dispatcher_skeleton_handle_get_property,
  _grd_dbus_remote_desktop_rdp_dispatcher_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
grd_dbus_remote_desktop_rdp_dispatcher_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return grd_dbus_remote_desktop_rdp_dispatcher_interface_info ();
}

static GDBusInterfaceVTable *
grd_dbus_remote_desktop_rdp_dispatcher_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_grd_dbus_remote_desktop_rdp_dispatcher_skeleton_vtable;
}

static GVariant *
grd_dbus_remote_desktop_rdp_dispatcher_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  GrdDBusRemoteDesktopRdpDispatcherSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_RDP_DISPATCHER_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 (_grd_dbus_remote_desktop_rdp_dispatcher_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _grd_dbus_remote_desktop_rdp_dispatcher_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _grd_dbus_remote_desktop_rdp_dispatcher_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _grd_dbus_remote_desktop_rdp_dispatcher_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.gnome.RemoteDesktop.Rdp.Dispatcher", 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
grd_dbus_remote_desktop_rdp_dispatcher_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton G_GNUC_UNUSED)
{
}

static void grd_dbus_remote_desktop_rdp_dispatcher_skeleton_iface_init (GrdDBusRemoteDesktopRdpDispatcherIface *iface);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (GrdDBusRemoteDesktopRdpDispatcherSkeleton, grd_dbus_remote_desktop_rdp_dispatcher_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (GrdDBusRemoteDesktopRdpDispatcherSkeleton)
                         G_IMPLEMENT_INTERFACE (GRD_DBUS_REMOTE_DESKTOP_TYPE_RDP_DISPATCHER, grd_dbus_remote_desktop_rdp_dispatcher_skeleton_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (GrdDBusRemoteDesktopRdpDispatcherSkeleton, grd_dbus_remote_desktop_rdp_dispatcher_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (GRD_DBUS_REMOTE_DESKTOP_TYPE_RDP_DISPATCHER, grd_dbus_remote_desktop_rdp_dispatcher_skeleton_iface_init))

#endif
static void
grd_dbus_remote_desktop_rdp_dispatcher_skeleton_finalize (GObject *object)
{
  GrdDBusRemoteDesktopRdpDispatcherSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_RDP_DISPATCHER_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 (grd_dbus_remote_desktop_rdp_dispatcher_skeleton_parent_class)->finalize (object);
}

static void
grd_dbus_remote_desktop_rdp_dispatcher_skeleton_init (GrdDBusRemoteDesktopRdpDispatcherSkeleton *skeleton)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  skeleton->priv = grd_dbus_remote_desktop_rdp_dispatcher_skeleton_get_instance_private (skeleton);
#else
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, GRD_DBUS_REMOTE_DESKTOP_TYPE_RDP_DISPATCHER_SKELETON, GrdDBusRemoteDesktopRdpDispatcherSkeletonPrivate);
#endif

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

static void
grd_dbus_remote_desktop_rdp_dispatcher_skeleton_class_init (GrdDBusRemoteDesktopRdpDispatcherSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

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

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = grd_dbus_remote_desktop_rdp_dispatcher_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = grd_dbus_remote_desktop_rdp_dispatcher_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = grd_dbus_remote_desktop_rdp_dispatcher_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = grd_dbus_remote_desktop_rdp_dispatcher_skeleton_dbus_interface_get_vtable;

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

static void
grd_dbus_remote_desktop_rdp_dispatcher_skeleton_iface_init (GrdDBusRemoteDesktopRdpDispatcherIface *iface G_GNUC_UNUSED)
{
}

/**
 * grd_dbus_remote_desktop_rdp_dispatcher_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-gnome-RemoteDesktop-Rdp-Dispatcher.top_of_page">org.gnome.RemoteDesktop.Rdp.Dispatcher</link>.
 *
 * Returns: (transfer full) (type GrdDBusRemoteDesktopRdpDispatcherSkeleton): The skeleton object.
 */
GrdDBusRemoteDesktopRdpDispatcher *
grd_dbus_remote_desktop_rdp_dispatcher_skeleton_new (void)
{
  return GRD_DBUS_REMOTE_DESKTOP_RDP_DISPATCHER (g_object_new (GRD_DBUS_REMOTE_DESKTOP_TYPE_RDP_DISPATCHER_SKELETON, NULL));
}

/* ------------------------------------------------------------------------
 * Code for interface org.gnome.RemoteDesktop.Rdp.Handover
 * ------------------------------------------------------------------------
 */

/**
 * SECTION:GrdDBusRemoteDesktopRdpHandover
 * @title: GrdDBusRemoteDesktopRdpHandover
 * @short_description: Generated C code for the org.gnome.RemoteDesktop.Rdp.Handover D-Bus interface
 *
 * This section contains code for working with the <link linkend="gdbus-interface-org-gnome-RemoteDesktop-Rdp-Handover.top_of_page">org.gnome.RemoteDesktop.Rdp.Handover</link> D-Bus interface in C.
 */

enum
{
  GRD_DBUS_REMOTE_DESKTOP__RDP_HANDOVER_REDIRECT_CLIENT,
  GRD_DBUS_REMOTE_DESKTOP__RDP_HANDOVER_TAKE_CLIENT_READY,
};

static unsigned GRD_DBUS_REMOTE_DESKTOP__RDP_HANDOVER_SIGNALS[2] = { 0 };

/* ---- Introspection data for org.gnome.RemoteDesktop.Rdp.Handover ---- */

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

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

static const GDBusArgInfo * const _grd_dbus_remote_desktop_rdp_handover_method_info_start_handover_IN_ARG_pointers[] =
{
  &_grd_dbus_remote_desktop_rdp_handover_method_info_start_handover_IN_ARG_username.parent_struct,
  &_grd_dbus_remote_desktop_rdp_handover_method_info_start_handover_IN_ARG_password.parent_struct,
  NULL
};

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

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

static const GDBusArgInfo * const _grd_dbus_remote_desktop_rdp_handover_method_info_start_handover_OUT_ARG_pointers[] =
{
  &_grd_dbus_remote_desktop_rdp_handover_method_info_start_handover_OUT_ARG_certificate.parent_struct,
  &_grd_dbus_remote_desktop_rdp_handover_method_info_start_handover_OUT_ARG_key.parent_struct,
  NULL
};

static const _ExtendedGDBusMethodInfo _grd_dbus_remote_desktop_rdp_handover_method_info_start_handover =
{
  {
    -1,
    (gchar *) "StartHandover",
    (GDBusArgInfo **) &_grd_dbus_remote_desktop_rdp_handover_method_info_start_handover_IN_ARG_pointers,
    (GDBusArgInfo **) &_grd_dbus_remote_desktop_rdp_handover_method_info_start_handover_OUT_ARG_pointers,
    NULL
  },
  "handle-start-handover",
  FALSE
};

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

static const GDBusArgInfo * const _grd_dbus_remote_desktop_rdp_handover_method_info_take_client_OUT_ARG_pointers[] =
{
  &_grd_dbus_remote_desktop_rdp_handover_method_info_take_client_OUT_ARG_fd.parent_struct,
  NULL
};

static const _ExtendedGDBusMethodInfo _grd_dbus_remote_desktop_rdp_handover_method_info_take_client =
{
  {
    -1,
    (gchar *) "TakeClient",
    NULL,
    (GDBusArgInfo **) &_grd_dbus_remote_desktop_rdp_handover_method_info_take_client_OUT_ARG_pointers,
    NULL
  },
  "handle-take-client",
  TRUE
};

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

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

static const GDBusArgInfo * const _grd_dbus_remote_desktop_rdp_handover_method_info_get_system_credentials_OUT_ARG_pointers[] =
{
  &_grd_dbus_remote_desktop_rdp_handover_method_info_get_system_credentials_OUT_ARG_username.parent_struct,
  &_grd_dbus_remote_desktop_rdp_handover_method_info_get_system_credentials_OUT_ARG_password.parent_struct,
  NULL
};

static const _ExtendedGDBusMethodInfo _grd_dbus_remote_desktop_rdp_handover_method_info_get_system_credentials =
{
  {
    -1,
    (gchar *) "GetSystemCredentials",
    NULL,
    (GDBusArgInfo **) &_grd_dbus_remote_desktop_rdp_handover_method_info_get_system_credentials_OUT_ARG_pointers,
    NULL
  },
  "handle-get-system-credentials",
  FALSE
};

static const GDBusMethodInfo * const _grd_dbus_remote_desktop_rdp_handover_method_info_pointers[] =
{
  &_grd_dbus_remote_desktop_rdp_handover_method_info_start_handover.parent_struct,
  &_grd_dbus_remote_desktop_rdp_handover_method_info_take_client.parent_struct,
  &_grd_dbus_remote_desktop_rdp_handover_method_info_get_system_credentials.parent_struct,
  NULL
};

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

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

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

static const GDBusArgInfo * const _grd_dbus_remote_desktop_rdp_handover_signal_info_redirect_client_ARG_pointers[] =
{
  &_grd_dbus_remote_desktop_rdp_handover_signal_info_redirect_client_ARG_routing_token.parent_struct,
  &_grd_dbus_remote_desktop_rdp_handover_signal_info_redirect_client_ARG_username.parent_struct,
  &_grd_dbus_remote_desktop_rdp_handover_signal_info_redirect_client_ARG_password.parent_struct,
  NULL
};

static const _ExtendedGDBusSignalInfo _grd_dbus_remote_desktop_rdp_handover_signal_info_redirect_client =
{
  {
    -1,
    (gchar *) "RedirectClient",
    (GDBusArgInfo **) &_grd_dbus_remote_desktop_rdp_handover_signal_info_redirect_client_ARG_pointers,
    NULL
  },
  "redirect-client"
};

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

static const GDBusArgInfo * const _grd_dbus_remote_desktop_rdp_handover_signal_info_take_client_ready_ARG_pointers[] =
{
  &_grd_dbus_remote_desktop_rdp_handover_signal_info_take_client_ready_ARG_use_system_credentials.parent_struct,
  NULL
};

static const _ExtendedGDBusSignalInfo _grd_dbus_remote_desktop_rdp_handover_signal_info_take_client_ready =
{
  {
    -1,
    (gchar *) "TakeClientReady",
    (GDBusArgInfo **) &_grd_dbus_remote_desktop_rdp_handover_signal_info_take_client_ready_ARG_pointers,
    NULL
  },
  "take-client-ready"
};

static const GDBusSignalInfo * const _grd_dbus_remote_desktop_rdp_handover_signal_info_pointers[] =
{
  &_grd_dbus_remote_desktop_rdp_handover_signal_info_redirect_client.parent_struct,
  &_grd_dbus_remote_desktop_rdp_handover_signal_info_take_client_ready.parent_struct,
  NULL
};

static const _ExtendedGDBusPropertyInfo _grd_dbus_remote_desktop_rdp_handover_property_info_handover_is_waiting =
{
  {
    -1,
    (gchar *) "HandoverIsWaiting",
    (gchar *) "b",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "handover-is-waiting",
  FALSE,
  TRUE
};

static const GDBusPropertyInfo * const _grd_dbus_remote_desktop_rdp_handover_property_info_pointers[] =
{
  &_grd_dbus_remote_desktop_rdp_handover_property_info_handover_is_waiting.parent_struct,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _grd_dbus_remote_desktop_rdp_handover_interface_info =
{
  {
    -1,
    (gchar *) "org.gnome.RemoteDesktop.Rdp.Handover",
    (GDBusMethodInfo **) &_grd_dbus_remote_desktop_rdp_handover_method_info_pointers,
    (GDBusSignalInfo **) &_grd_dbus_remote_desktop_rdp_handover_signal_info_pointers,
    (GDBusPropertyInfo **) &_grd_dbus_remote_desktop_rdp_handover_property_info_pointers,
    NULL
  },
  "rdp-handover",
};


/**
 * grd_dbus_remote_desktop_rdp_handover_interface_info:
 *
 * Gets a machine-readable description of the <link linkend="gdbus-interface-org-gnome-RemoteDesktop-Rdp-Handover.top_of_page">org.gnome.RemoteDesktop.Rdp.Handover</link> D-Bus interface.
 *
 * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
 */
GDBusInterfaceInfo *
grd_dbus_remote_desktop_rdp_handover_interface_info (void)
{
  return (GDBusInterfaceInfo *) &_grd_dbus_remote_desktop_rdp_handover_interface_info.parent_struct;
}

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


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

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

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

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


/**
 * GrdDBusRemoteDesktopRdpHandover:
 *
 * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-gnome-RemoteDesktop-Rdp-Handover.top_of_page">org.gnome.RemoteDesktop.Rdp.Handover</link>.
 */

/**
 * GrdDBusRemoteDesktopRdpHandoverIface:
 * @parent_iface: The parent interface.
 * @handle_get_system_credentials: Handler for the #GrdDBusRemoteDesktopRdpHandover::handle-get-system-credentials signal.
 * @handle_start_handover: Handler for the #GrdDBusRemoteDesktopRdpHandover::handle-start-handover signal.
 * @handle_take_client: Handler for the #GrdDBusRemoteDesktopRdpHandover::handle-take-client signal.
 * @get_handover_is_waiting: Getter for the #GrdDBusRemoteDesktopRdpHandover:handover-is-waiting property.
 * @redirect_client: Handler for the #GrdDBusRemoteDesktopRdpHandover::redirect-client signal.
 * @take_client_ready: Handler for the #GrdDBusRemoteDesktopRdpHandover::take-client-ready signal.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-gnome-RemoteDesktop-Rdp-Handover.top_of_page">org.gnome.RemoteDesktop.Rdp.Handover</link>.
 */

typedef GrdDBusRemoteDesktopRdpHandoverIface GrdDBusRemoteDesktopRdpHandoverInterface;
G_DEFINE_INTERFACE (GrdDBusRemoteDesktopRdpHandover, grd_dbus_remote_desktop_rdp_handover, G_TYPE_OBJECT)

static void
grd_dbus_remote_desktop_rdp_handover_default_init (GrdDBusRemoteDesktopRdpHandoverIface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * GrdDBusRemoteDesktopRdpHandover::handle-start-handover:
   * @object: A #GrdDBusRemoteDesktopRdpHandover.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_username: Argument passed by remote caller.
   * @arg_password: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-gnome-RemoteDesktop-Rdp-Handover.StartHandover">StartHandover()</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 grd_dbus_remote_desktop_rdp_handover_complete_start_handover() 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-handover",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (GrdDBusRemoteDesktopRdpHandoverIface, handle_start_handover),
    g_signal_accumulator_true_handled,
    NULL,
      grd_dbus_remote_desktop_rdp_handover_method_marshal_start_handover,
    G_TYPE_BOOLEAN,
    3,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_STRING);

  /**
   * GrdDBusRemoteDesktopRdpHandover::handle-take-client:
   * @object: A #GrdDBusRemoteDesktopRdpHandover.
   * @invocation: A #GDBusMethodInvocation.
   * @fd_list: (nullable): A #GUnixFDList or %NULL.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-gnome-RemoteDesktop-Rdp-Handover.TakeClient">TakeClient()</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 grd_dbus_remote_desktop_rdp_handover_complete_take_client() 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-take-client",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (GrdDBusRemoteDesktopRdpHandoverIface, handle_take_client),
    g_signal_accumulator_true_handled,
    NULL,
      grd_dbus_remote_desktop_rdp_handover_method_marshal_take_client,
    G_TYPE_BOOLEAN,
    2,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UNIX_FD_LIST);

  /**
   * GrdDBusRemoteDesktopRdpHandover::handle-get-system-credentials:
   * @object: A #GrdDBusRemoteDesktopRdpHandover.
   * @invocation: A #GDBusMethodInvocation.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-gnome-RemoteDesktop-Rdp-Handover.GetSystemCredentials">GetSystemCredentials()</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 grd_dbus_remote_desktop_rdp_handover_complete_get_system_credentials() 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-system-credentials",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (GrdDBusRemoteDesktopRdpHandoverIface, handle_get_system_credentials),
    g_signal_accumulator_true_handled,
    NULL,
      grd_dbus_remote_desktop_rdp_handover_method_marshal_get_system_credentials,
    G_TYPE_BOOLEAN,
    1,
    G_TYPE_DBUS_METHOD_INVOCATION);

  /* GObject signals for received D-Bus signals: */
  /**
   * GrdDBusRemoteDesktopRdpHandover::redirect-client:
   * @object: A #GrdDBusRemoteDesktopRdpHandover.
   * @arg_routing_token: Argument.
   * @arg_username: Argument.
   * @arg_password: Argument.
   *
   * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-gnome-RemoteDesktop-Rdp-Handover.RedirectClient">"RedirectClient"</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.
   */
  GRD_DBUS_REMOTE_DESKTOP__RDP_HANDOVER_SIGNALS[GRD_DBUS_REMOTE_DESKTOP__RDP_HANDOVER_REDIRECT_CLIENT] =
    g_signal_new ("redirect-client",
      G_TYPE_FROM_INTERFACE (iface),
      G_SIGNAL_RUN_LAST,
      G_STRUCT_OFFSET (GrdDBusRemoteDesktopRdpHandoverIface, redirect_client),
      NULL,
      NULL,
      grd_dbus_remote_desktop_rdp_handover_signal_marshal_redirect_client,
      G_TYPE_NONE,
      3, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING);

  /**
   * GrdDBusRemoteDesktopRdpHandover::take-client-ready:
   * @object: A #GrdDBusRemoteDesktopRdpHandover.
   * @arg_use_system_credentials: Argument.
   *
   * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-gnome-RemoteDesktop-Rdp-Handover.TakeClientReady">"TakeClientReady"</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.
   */
  GRD_DBUS_REMOTE_DESKTOP__RDP_HANDOVER_SIGNALS[GRD_DBUS_REMOTE_DESKTOP__RDP_HANDOVER_TAKE_CLIENT_READY] =
    g_signal_new ("take-client-ready",
      G_TYPE_FROM_INTERFACE (iface),
      G_SIGNAL_RUN_LAST,
      G_STRUCT_OFFSET (GrdDBusRemoteDesktopRdpHandoverIface, take_client_ready),
      NULL,
      NULL,
      grd_dbus_remote_desktop_rdp_handover_signal_marshal_take_client_ready,
      G_TYPE_NONE,
      1, G_TYPE_BOOLEAN);

  /* GObject properties for D-Bus properties: */
  /**
   * GrdDBusRemoteDesktopRdpHandover:handover-is-waiting:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-gnome-RemoteDesktop-Rdp-Handover.HandoverIsWaiting">"HandoverIsWaiting"</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 ("handover-is-waiting", "HandoverIsWaiting", "HandoverIsWaiting", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
}

/**
 * grd_dbus_remote_desktop_rdp_handover_get_handover_is_waiting: (skip)
 * @object: A #GrdDBusRemoteDesktopRdpHandover.
 *
 * Gets the value of the <link linkend="gdbus-property-org-gnome-RemoteDesktop-Rdp-Handover.HandoverIsWaiting">"HandoverIsWaiting"</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 
grd_dbus_remote_desktop_rdp_handover_get_handover_is_waiting (GrdDBusRemoteDesktopRdpHandover *object)
{
  g_return_val_if_fail (GRD_DBUS_REMOTE_DESKTOP_IS_RDP_HANDOVER (object), FALSE);

  return GRD_DBUS_REMOTE_DESKTOP_RDP_HANDOVER_GET_IFACE (object)->get_handover_is_waiting (object);
}

/**
 * grd_dbus_remote_desktop_rdp_handover_set_handover_is_waiting: (skip)
 * @object: A #GrdDBusRemoteDesktopRdpHandover.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-gnome-RemoteDesktop-Rdp-Handover.HandoverIsWaiting">"HandoverIsWaiting"</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
grd_dbus_remote_desktop_rdp_handover_set_handover_is_waiting (GrdDBusRemoteDesktopRdpHandover *object, gboolean value)
{
  g_object_set (G_OBJECT (object), "handover-is-waiting", value, NULL);
}

/**
 * grd_dbus_remote_desktop_rdp_handover_emit_redirect_client:
 * @object: A #GrdDBusRemoteDesktopRdpHandover.
 * @arg_routing_token: Argument to pass with the signal.
 * @arg_username: Argument to pass with the signal.
 * @arg_password: Argument to pass with the signal.
 *
 * Emits the <link linkend="gdbus-signal-org-gnome-RemoteDesktop-Rdp-Handover.RedirectClient">"RedirectClient"</link> D-Bus signal.
 */
void
grd_dbus_remote_desktop_rdp_handover_emit_redirect_client (
    GrdDBusRemoteDesktopRdpHandover *object,
    const gchar *arg_routing_token,
    const gchar *arg_username,
    const gchar *arg_password)
{
  g_signal_emit (object, GRD_DBUS_REMOTE_DESKTOP__RDP_HANDOVER_SIGNALS[GRD_DBUS_REMOTE_DESKTOP__RDP_HANDOVER_REDIRECT_CLIENT], 0, arg_routing_token, arg_username, arg_password);
}

/**
 * grd_dbus_remote_desktop_rdp_handover_emit_take_client_ready:
 * @object: A #GrdDBusRemoteDesktopRdpHandover.
 * @arg_use_system_credentials: Argument to pass with the signal.
 *
 * Emits the <link linkend="gdbus-signal-org-gnome-RemoteDesktop-Rdp-Handover.TakeClientReady">"TakeClientReady"</link> D-Bus signal.
 */
void
grd_dbus_remote_desktop_rdp_handover_emit_take_client_ready (
    GrdDBusRemoteDesktopRdpHandover *object,
    gboolean arg_use_system_credentials)
{
  g_signal_emit (object, GRD_DBUS_REMOTE_DESKTOP__RDP_HANDOVER_SIGNALS[GRD_DBUS_REMOTE_DESKTOP__RDP_HANDOVER_TAKE_CLIENT_READY], 0, arg_use_system_credentials);
}

/**
 * grd_dbus_remote_desktop_rdp_handover_call_start_handover:
 * @proxy: A #GrdDBusRemoteDesktopRdpHandoverProxy.
 * @arg_username: Argument to pass with the method invocation.
 * @arg_password: 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-gnome-RemoteDesktop-Rdp-Handover.StartHandover">StartHandover()</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 grd_dbus_remote_desktop_rdp_handover_call_start_handover_finish() to get the result of the operation.
 *
 * See grd_dbus_remote_desktop_rdp_handover_call_start_handover_sync() for the synchronous, blocking version of this method.
 */
void
grd_dbus_remote_desktop_rdp_handover_call_start_handover (
    GrdDBusRemoteDesktopRdpHandover *proxy,
    const gchar *arg_username,
    const gchar *arg_password,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "StartHandover",
    g_variant_new ("(ss)",
                   arg_username,
                   arg_password),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

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

/**
 * grd_dbus_remote_desktop_rdp_handover_call_start_handover_sync:
 * @proxy: A #GrdDBusRemoteDesktopRdpHandoverProxy.
 * @arg_username: Argument to pass with the method invocation.
 * @arg_password: Argument to pass with the method invocation.
 * @out_certificate: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @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-gnome-RemoteDesktop-Rdp-Handover.StartHandover">StartHandover()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See grd_dbus_remote_desktop_rdp_handover_call_start_handover() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
grd_dbus_remote_desktop_rdp_handover_call_start_handover_sync (
    GrdDBusRemoteDesktopRdpHandover *proxy,
    const gchar *arg_username,
    const gchar *arg_password,
    gchar ** out_certificate,
    gchar ** out_key,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "StartHandover",
    g_variant_new ("(ss)",
                   arg_username,
                   arg_password),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(ss)",
                 out_certificate,
                 out_key);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * grd_dbus_remote_desktop_rdp_handover_call_take_client:
 * @proxy: A #GrdDBusRemoteDesktopRdpHandoverProxy.
 * @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-gnome-RemoteDesktop-Rdp-Handover.TakeClient">TakeClient()</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 grd_dbus_remote_desktop_rdp_handover_call_take_client_finish() to get the result of the operation.
 *
 * See grd_dbus_remote_desktop_rdp_handover_call_take_client_sync() for the synchronous, blocking version of this method.
 */
void
grd_dbus_remote_desktop_rdp_handover_call_take_client (
    GrdDBusRemoteDesktopRdpHandover *proxy,
    GUnixFDList *fd_list,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call_with_unix_fd_list (G_DBUS_PROXY (proxy),
    "TakeClient",
    g_variant_new ("()"),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    fd_list,
    cancellable,
    callback,
    user_data);
}

/**
 * grd_dbus_remote_desktop_rdp_handover_call_take_client_finish:
 * @proxy: A #GrdDBusRemoteDesktopRdpHandoverProxy.
 * @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 grd_dbus_remote_desktop_rdp_handover_call_take_client().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with grd_dbus_remote_desktop_rdp_handover_call_take_client().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
grd_dbus_remote_desktop_rdp_handover_call_take_client_finish (
    GrdDBusRemoteDesktopRdpHandover *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;
}

/**
 * grd_dbus_remote_desktop_rdp_handover_call_take_client_sync:
 * @proxy: A #GrdDBusRemoteDesktopRdpHandoverProxy.
 * @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-gnome-RemoteDesktop-Rdp-Handover.TakeClient">TakeClient()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See grd_dbus_remote_desktop_rdp_handover_call_take_client() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
grd_dbus_remote_desktop_rdp_handover_call_take_client_sync (
    GrdDBusRemoteDesktopRdpHandover *proxy,
    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),
    "TakeClient",
    g_variant_new ("()"),
    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;
}

/**
 * grd_dbus_remote_desktop_rdp_handover_call_get_system_credentials:
 * @proxy: A #GrdDBusRemoteDesktopRdpHandoverProxy.
 * @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-gnome-RemoteDesktop-Rdp-Handover.GetSystemCredentials">GetSystemCredentials()</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 grd_dbus_remote_desktop_rdp_handover_call_get_system_credentials_finish() to get the result of the operation.
 *
 * See grd_dbus_remote_desktop_rdp_handover_call_get_system_credentials_sync() for the synchronous, blocking version of this method.
 */
void
grd_dbus_remote_desktop_rdp_handover_call_get_system_credentials (
    GrdDBusRemoteDesktopRdpHandover *proxy,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "GetSystemCredentials",
    g_variant_new ("()"),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

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

/**
 * grd_dbus_remote_desktop_rdp_handover_call_get_system_credentials_sync:
 * @proxy: A #GrdDBusRemoteDesktopRdpHandoverProxy.
 * @out_username: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_password: (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-gnome-RemoteDesktop-Rdp-Handover.GetSystemCredentials">GetSystemCredentials()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See grd_dbus_remote_desktop_rdp_handover_call_get_system_credentials() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
grd_dbus_remote_desktop_rdp_handover_call_get_system_credentials_sync (
    GrdDBusRemoteDesktopRdpHandover *proxy,
    gchar ** out_username,
    gchar ** out_password,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "GetSystemCredentials",
    g_variant_new ("()"),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(ss)",
                 out_username,
                 out_password);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * grd_dbus_remote_desktop_rdp_handover_complete_start_handover:
 * @object: A #GrdDBusRemoteDesktopRdpHandover.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @certificate: Parameter to return.
 * @key: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-gnome-RemoteDesktop-Rdp-Handover.StartHandover">StartHandover()</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
grd_dbus_remote_desktop_rdp_handover_complete_start_handover (
    GrdDBusRemoteDesktopRdpHandover *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    const gchar *certificate,
    const gchar *key)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(ss)",
                   certificate,
                   key));
}

/**
 * grd_dbus_remote_desktop_rdp_handover_complete_take_client:
 * @object: A #GrdDBusRemoteDesktopRdpHandover.
 * @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-gnome-RemoteDesktop-Rdp-Handover.TakeClient">TakeClient()</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
grd_dbus_remote_desktop_rdp_handover_complete_take_client (
    GrdDBusRemoteDesktopRdpHandover *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);
}

/**
 * grd_dbus_remote_desktop_rdp_handover_complete_get_system_credentials:
 * @object: A #GrdDBusRemoteDesktopRdpHandover.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @username: Parameter to return.
 * @password: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-gnome-RemoteDesktop-Rdp-Handover.GetSystemCredentials">GetSystemCredentials()</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
grd_dbus_remote_desktop_rdp_handover_complete_get_system_credentials (
    GrdDBusRemoteDesktopRdpHandover *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    const gchar *username,
    const gchar *password)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(ss)",
                   username,
                   password));
}

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

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

/**
 * GrdDBusRemoteDesktopRdpHandoverProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #GrdDBusRemoteDesktopRdpHandoverProxy.
 */

struct _GrdDBusRemoteDesktopRdpHandoverProxyPrivate
{
  GData *qdata;
};

static void grd_dbus_remote_desktop_rdp_handover_proxy_iface_init (GrdDBusRemoteDesktopRdpHandoverIface *iface);

#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (GrdDBusRemoteDesktopRdpHandoverProxy, grd_dbus_remote_desktop_rdp_handover_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (GrdDBusRemoteDesktopRdpHandoverProxy)
                         G_IMPLEMENT_INTERFACE (GRD_DBUS_REMOTE_DESKTOP_TYPE_RDP_HANDOVER, grd_dbus_remote_desktop_rdp_handover_proxy_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (GrdDBusRemoteDesktopRdpHandoverProxy, grd_dbus_remote_desktop_rdp_handover_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (GRD_DBUS_REMOTE_DESKTOP_TYPE_RDP_HANDOVER, grd_dbus_remote_desktop_rdp_handover_proxy_iface_init))

#endif
static void
grd_dbus_remote_desktop_rdp_handover_proxy_finalize (GObject *object)
{
  GrdDBusRemoteDesktopRdpHandoverProxy *proxy = GRD_DBUS_REMOTE_DESKTOP_RDP_HANDOVER_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (grd_dbus_remote_desktop_rdp_handover_proxy_parent_class)->finalize (object);
}

static void
grd_dbus_remote_desktop_rdp_handover_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 *) _grd_dbus_remote_desktop_rdp_handover_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
grd_dbus_remote_desktop_rdp_handover_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.gnome.RemoteDesktop.Rdp.Handover: %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
grd_dbus_remote_desktop_rdp_handover_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 *) _grd_dbus_remote_desktop_rdp_handover_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.gnome.RemoteDesktop.Rdp.Handover", info->parent_struct.name, variant),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    NULL, (GAsyncReadyCallback) grd_dbus_remote_desktop_rdp_handover_proxy_set_property_cb, (GDBusPropertyInfo *) &info->parent_struct);
  g_variant_unref (variant);
}

static void
grd_dbus_remote_desktop_rdp_handover_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 *) &_grd_dbus_remote_desktop_rdp_handover_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], GRD_DBUS_REMOTE_DESKTOP_TYPE_RDP_HANDOVER);
  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, GRD_DBUS_REMOTE_DESKTOP_TYPE_RDP_HANDOVER);
  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
grd_dbus_remote_desktop_rdp_handover_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  GrdDBusRemoteDesktopRdpHandoverProxy *proxy = GRD_DBUS_REMOTE_DESKTOP_RDP_HANDOVER_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 *) &_grd_dbus_remote_desktop_rdp_handover_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 *) &_grd_dbus_remote_desktop_rdp_handover_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 
grd_dbus_remote_desktop_rdp_handover_proxy_get_handover_is_waiting (GrdDBusRemoteDesktopRdpHandover *object)
{
  GrdDBusRemoteDesktopRdpHandoverProxy *proxy = GRD_DBUS_REMOTE_DESKTOP_RDP_HANDOVER_PROXY (object);
  GVariant *variant;
  gboolean value = FALSE;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "HandoverIsWaiting");
  if (variant != NULL)
    {
      value = g_variant_get_boolean (variant);
      g_variant_unref (variant);
    }
  return value;
}

static void
grd_dbus_remote_desktop_rdp_handover_proxy_init (GrdDBusRemoteDesktopRdpHandoverProxy *proxy)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  proxy->priv = grd_dbus_remote_desktop_rdp_handover_proxy_get_instance_private (proxy);
#else
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, GRD_DBUS_REMOTE_DESKTOP_TYPE_RDP_HANDOVER_PROXY, GrdDBusRemoteDesktopRdpHandoverProxyPrivate);
#endif

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

static void
grd_dbus_remote_desktop_rdp_handover_proxy_class_init (GrdDBusRemoteDesktopRdpHandoverProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = grd_dbus_remote_desktop_rdp_handover_proxy_finalize;
  gobject_class->get_property = grd_dbus_remote_desktop_rdp_handover_proxy_get_property;
  gobject_class->set_property = grd_dbus_remote_desktop_rdp_handover_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = grd_dbus_remote_desktop_rdp_handover_proxy_g_signal;
  proxy_class->g_properties_changed = grd_dbus_remote_desktop_rdp_handover_proxy_g_properties_changed;

  grd_dbus_remote_desktop_rdp_handover_override_properties (gobject_class, 1);

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

static void
grd_dbus_remote_desktop_rdp_handover_proxy_iface_init (GrdDBusRemoteDesktopRdpHandoverIface *iface)
{
  iface->get_handover_is_waiting = grd_dbus_remote_desktop_rdp_handover_proxy_get_handover_is_waiting;
}

/**
 * grd_dbus_remote_desktop_rdp_handover_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-gnome-RemoteDesktop-Rdp-Handover.top_of_page">org.gnome.RemoteDesktop.Rdp.Handover</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 grd_dbus_remote_desktop_rdp_handover_proxy_new_finish() to get the result of the operation.
 *
 * See grd_dbus_remote_desktop_rdp_handover_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
grd_dbus_remote_desktop_rdp_handover_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 (GRD_DBUS_REMOTE_DESKTOP_TYPE_RDP_HANDOVER_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.gnome.RemoteDesktop.Rdp.Handover", NULL);
}

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

/**
 * grd_dbus_remote_desktop_rdp_handover_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-gnome-RemoteDesktop-Rdp-Handover.top_of_page">org.gnome.RemoteDesktop.Rdp.Handover</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See grd_dbus_remote_desktop_rdp_handover_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type GrdDBusRemoteDesktopRdpHandoverProxy): The constructed proxy object or %NULL if @error is set.
 */
GrdDBusRemoteDesktopRdpHandover *
grd_dbus_remote_desktop_rdp_handover_proxy_new_sync (
    GDBusConnection     *connection,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GError             **error)
{
  GInitable *ret;
  ret = g_initable_new (GRD_DBUS_REMOTE_DESKTOP_TYPE_RDP_HANDOVER_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.gnome.RemoteDesktop.Rdp.Handover", NULL);
  if (ret != NULL)
    return GRD_DBUS_REMOTE_DESKTOP_RDP_HANDOVER (ret);
  else
    return NULL;
}


/**
 * grd_dbus_remote_desktop_rdp_handover_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 grd_dbus_remote_desktop_rdp_handover_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 grd_dbus_remote_desktop_rdp_handover_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See grd_dbus_remote_desktop_rdp_handover_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
grd_dbus_remote_desktop_rdp_handover_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 (GRD_DBUS_REMOTE_DESKTOP_TYPE_RDP_HANDOVER_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.gnome.RemoteDesktop.Rdp.Handover", NULL);
}

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

/**
 * grd_dbus_remote_desktop_rdp_handover_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 grd_dbus_remote_desktop_rdp_handover_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See grd_dbus_remote_desktop_rdp_handover_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type GrdDBusRemoteDesktopRdpHandoverProxy): The constructed proxy object or %NULL if @error is set.
 */
GrdDBusRemoteDesktopRdpHandover *
grd_dbus_remote_desktop_rdp_handover_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 (GRD_DBUS_REMOTE_DESKTOP_TYPE_RDP_HANDOVER_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.gnome.RemoteDesktop.Rdp.Handover", NULL);
  if (ret != NULL)
    return GRD_DBUS_REMOTE_DESKTOP_RDP_HANDOVER (ret);
  else
    return NULL;
}


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

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

/**
 * GrdDBusRemoteDesktopRdpHandoverSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #GrdDBusRemoteDesktopRdpHandoverSkeleton.
 */

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

static void
_grd_dbus_remote_desktop_rdp_handover_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)
{
  GrdDBusRemoteDesktopRdpHandoverSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_RDP_HANDOVER_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], GRD_DBUS_REMOTE_DESKTOP_TYPE_RDP_HANDOVER);
  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, GRD_DBUS_REMOTE_DESKTOP_TYPE_RDP_HANDOVER);
  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 *
_grd_dbus_remote_desktop_rdp_handover_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)
{
  GrdDBusRemoteDesktopRdpHandoverSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_RDP_HANDOVER_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 *) &_grd_dbus_remote_desktop_rdp_handover_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
_grd_dbus_remote_desktop_rdp_handover_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)
{
  GrdDBusRemoteDesktopRdpHandoverSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_RDP_HANDOVER_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 *) &_grd_dbus_remote_desktop_rdp_handover_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 _grd_dbus_remote_desktop_rdp_handover_skeleton_vtable =
{
  _grd_dbus_remote_desktop_rdp_handover_skeleton_handle_method_call,
  _grd_dbus_remote_desktop_rdp_handover_skeleton_handle_get_property,
  _grd_dbus_remote_desktop_rdp_handover_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
grd_dbus_remote_desktop_rdp_handover_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return grd_dbus_remote_desktop_rdp_handover_interface_info ();
}

static GDBusInterfaceVTable *
grd_dbus_remote_desktop_rdp_handover_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_grd_dbus_remote_desktop_rdp_handover_skeleton_vtable;
}

static GVariant *
grd_dbus_remote_desktop_rdp_handover_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  GrdDBusRemoteDesktopRdpHandoverSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_RDP_HANDOVER_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 (_grd_dbus_remote_desktop_rdp_handover_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _grd_dbus_remote_desktop_rdp_handover_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _grd_dbus_remote_desktop_rdp_handover_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _grd_dbus_remote_desktop_rdp_handover_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.gnome.RemoteDesktop.Rdp.Handover", 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 _grd_dbus_remote_desktop_rdp_handover_emit_changed (gpointer user_data);

static void
grd_dbus_remote_desktop_rdp_handover_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
{
  GrdDBusRemoteDesktopRdpHandoverSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_RDP_HANDOVER_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)
    _grd_dbus_remote_desktop_rdp_handover_emit_changed (skeleton);
}

static void
_grd_dbus_remote_desktop_rdp_handover_on_signal_redirect_client (
    GrdDBusRemoteDesktopRdpHandover *object,
    const gchar *arg_routing_token,
    const gchar *arg_username,
    const gchar *arg_password)
{
  GrdDBusRemoteDesktopRdpHandoverSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_RDP_HANDOVER_SKELETON (object);

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

  signal_variant = g_variant_ref_sink (g_variant_new ("(sss)",
                   arg_routing_token,
                   arg_username,
                   arg_password));
  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.gnome.RemoteDesktop.Rdp.Handover", "RedirectClient",
        signal_variant, NULL);
    }
  g_variant_unref (signal_variant);
  g_list_free_full (connections, g_object_unref);
}

static void
_grd_dbus_remote_desktop_rdp_handover_on_signal_take_client_ready (
    GrdDBusRemoteDesktopRdpHandover *object,
    gboolean arg_use_system_credentials)
{
  GrdDBusRemoteDesktopRdpHandoverSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_RDP_HANDOVER_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 ("(b)",
                   arg_use_system_credentials));
  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.gnome.RemoteDesktop.Rdp.Handover", "TakeClientReady",
        signal_variant, NULL);
    }
  g_variant_unref (signal_variant);
  g_list_free_full (connections, g_object_unref);
}

static void grd_dbus_remote_desktop_rdp_handover_skeleton_iface_init (GrdDBusRemoteDesktopRdpHandoverIface *iface);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (GrdDBusRemoteDesktopRdpHandoverSkeleton, grd_dbus_remote_desktop_rdp_handover_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (GrdDBusRemoteDesktopRdpHandoverSkeleton)
                         G_IMPLEMENT_INTERFACE (GRD_DBUS_REMOTE_DESKTOP_TYPE_RDP_HANDOVER, grd_dbus_remote_desktop_rdp_handover_skeleton_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (GrdDBusRemoteDesktopRdpHandoverSkeleton, grd_dbus_remote_desktop_rdp_handover_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (GRD_DBUS_REMOTE_DESKTOP_TYPE_RDP_HANDOVER, grd_dbus_remote_desktop_rdp_handover_skeleton_iface_init))

#endif
static void
grd_dbus_remote_desktop_rdp_handover_skeleton_finalize (GObject *object)
{
  GrdDBusRemoteDesktopRdpHandoverSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_RDP_HANDOVER_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 (grd_dbus_remote_desktop_rdp_handover_skeleton_parent_class)->finalize (object);
}

static void
grd_dbus_remote_desktop_rdp_handover_skeleton_get_property (GObject      *object,
  guint         prop_id,
  GValue       *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  GrdDBusRemoteDesktopRdpHandoverSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_RDP_HANDOVER_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
_grd_dbus_remote_desktop_rdp_handover_emit_changed (gpointer user_data)
{
  GrdDBusRemoteDesktopRdpHandoverSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_RDP_HANDOVER_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.gnome.RemoteDesktop.Rdp.Handover",
                                           &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
_grd_dbus_remote_desktop_rdp_handover_schedule_emit_changed (GrdDBusRemoteDesktopRdpHandoverSkeleton *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
grd_dbus_remote_desktop_rdp_handover_skeleton_notify (GObject      *object,
  GParamSpec *pspec G_GNUC_UNUSED)
{
  GrdDBusRemoteDesktopRdpHandoverSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_RDP_HANDOVER_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, _grd_dbus_remote_desktop_rdp_handover_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
      g_source_set_name (skeleton->priv->changed_properties_idle_source, "[generated] _grd_dbus_remote_desktop_rdp_handover_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
grd_dbus_remote_desktop_rdp_handover_skeleton_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec)
{
  const _ExtendedGDBusPropertyInfo *info;
  GrdDBusRemoteDesktopRdpHandoverSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_RDP_HANDOVER_SKELETON (object);
  g_assert (prop_id != 0 && prop_id - 1 < 1);
  info = (const _ExtendedGDBusPropertyInfo *) _grd_dbus_remote_desktop_rdp_handover_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)
        _grd_dbus_remote_desktop_rdp_handover_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
grd_dbus_remote_desktop_rdp_handover_skeleton_init (GrdDBusRemoteDesktopRdpHandoverSkeleton *skeleton)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  skeleton->priv = grd_dbus_remote_desktop_rdp_handover_skeleton_get_instance_private (skeleton);
#else
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, GRD_DBUS_REMOTE_DESKTOP_TYPE_RDP_HANDOVER_SKELETON, GrdDBusRemoteDesktopRdpHandoverSkeletonPrivate);
#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_BOOLEAN);
}

static gboolean 
grd_dbus_remote_desktop_rdp_handover_skeleton_get_handover_is_waiting (GrdDBusRemoteDesktopRdpHandover *object)
{
  GrdDBusRemoteDesktopRdpHandoverSkeleton *skeleton = GRD_DBUS_REMOTE_DESKTOP_RDP_HANDOVER_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 void
grd_dbus_remote_desktop_rdp_handover_skeleton_class_init (GrdDBusRemoteDesktopRdpHandoverSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize = grd_dbus_remote_desktop_rdp_handover_skeleton_finalize;
  gobject_class->get_property = grd_dbus_remote_desktop_rdp_handover_skeleton_get_property;
  gobject_class->set_property = grd_dbus_remote_desktop_rdp_handover_skeleton_set_property;
  gobject_class->notify       = grd_dbus_remote_desktop_rdp_handover_skeleton_notify;


  grd_dbus_remote_desktop_rdp_handover_override_properties (gobject_class, 1);

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = grd_dbus_remote_desktop_rdp_handover_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = grd_dbus_remote_desktop_rdp_handover_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = grd_dbus_remote_desktop_rdp_handover_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = grd_dbus_remote_desktop_rdp_handover_skeleton_dbus_interface_get_vtable;

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

static void
grd_dbus_remote_desktop_rdp_handover_skeleton_iface_init (GrdDBusRemoteDesktopRdpHandoverIface *iface)
{
  iface->redirect_client = _grd_dbus_remote_desktop_rdp_handover_on_signal_redirect_client;
  iface->take_client_ready = _grd_dbus_remote_desktop_rdp_handover_on_signal_take_client_ready;
  iface->get_handover_is_waiting = grd_dbus_remote_desktop_rdp_handover_skeleton_get_handover_is_waiting;
}

/**
 * grd_dbus_remote_desktop_rdp_handover_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-gnome-RemoteDesktop-Rdp-Handover.top_of_page">org.gnome.RemoteDesktop.Rdp.Handover</link>.
 *
 * Returns: (transfer full) (type GrdDBusRemoteDesktopRdpHandoverSkeleton): The skeleton object.
 */
GrdDBusRemoteDesktopRdpHandover *
grd_dbus_remote_desktop_rdp_handover_skeleton_new (void)
{
  return GRD_DBUS_REMOTE_DESKTOP_RDP_HANDOVER (g_object_new (GRD_DBUS_REMOTE_DESKTOP_TYPE_RDP_HANDOVER_SKELETON, NULL));
}

/* ------------------------------------------------------------------------
 * Code for Object, ObjectProxy and ObjectSkeleton
 * ------------------------------------------------------------------------
 */

/**
 * SECTION:GrdDBusRemoteDesktopObject
 * @title: GrdDBusRemoteDesktopObject
 * @short_description: Specialized GDBusObject types
 *
 * This section contains the #GrdDBusRemoteDesktopObject, #GrdDBusRemoteDesktopObjectProxy, and #GrdDBusRemoteDesktopObjectSkeleton types which make it easier to work with objects implementing generated types for D-Bus interfaces.
 */

/**
 * GrdDBusRemoteDesktopObject:
 *
 * The #GrdDBusRemoteDesktopObject type is a specialized container of interfaces.
 */

/**
 * GrdDBusRemoteDesktopObjectIface:
 * @parent_iface: The parent interface.
 *
 * Virtual table for the #GrdDBusRemoteDesktopObject interface.
 */

typedef GrdDBusRemoteDesktopObjectIface GrdDBusRemoteDesktopObjectInterface;
G_DEFINE_INTERFACE_WITH_CODE (GrdDBusRemoteDesktopObject, grd_dbus_remote_desktop_object, G_TYPE_OBJECT, g_type_interface_add_prerequisite (g_define_type_id, G_TYPE_DBUS_OBJECT);)

static void
grd_dbus_remote_desktop_object_default_init (GrdDBusRemoteDesktopObjectIface *iface)
{
  /**
   * GrdDBusRemoteDesktopObject:org-gnome-remote-desktop:
   *
   * The #GrdDBusRemoteDesktopOrgGnomeRemoteDesktop instance corresponding to the D-Bus interface <link linkend="gdbus-interface-org-gnome-RemoteDesktop.top_of_page">org.gnome.RemoteDesktop</link>, if any.
   *
   * Connect to the #GObject::notify signal to get informed of property changes.
   */
  g_object_interface_install_property (iface, g_param_spec_object ("org-gnome-remote-desktop", "org-gnome-remote-desktop", "org-gnome-remote-desktop", GRD_DBUS_REMOTE_DESKTOP_TYPE_ORG_GNOME_REMOTE_DESKTOP, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  /**
   * GrdDBusRemoteDesktopObject:rdp-server:
   *
   * The #GrdDBusRemoteDesktopRdpServer instance corresponding to the D-Bus interface <link linkend="gdbus-interface-org-gnome-RemoteDesktop-Rdp-Server.top_of_page">org.gnome.RemoteDesktop.Rdp.Server</link>, if any.
   *
   * Connect to the #GObject::notify signal to get informed of property changes.
   */
  g_object_interface_install_property (iface, g_param_spec_object ("rdp-server", "rdp-server", "rdp-server", GRD_DBUS_REMOTE_DESKTOP_TYPE_RDP_SERVER, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  /**
   * GrdDBusRemoteDesktopObject:configuration-rdp-server:
   *
   * The #GrdDBusRemoteDesktopConfigurationRdpServer instance corresponding to the D-Bus interface <link linkend="gdbus-interface-org-gnome-RemoteDesktop-Configuration-Rdp-Server.top_of_page">org.gnome.RemoteDesktop.Configuration.Rdp.Server</link>, if any.
   *
   * Connect to the #GObject::notify signal to get informed of property changes.
   */
  g_object_interface_install_property (iface, g_param_spec_object ("configuration-rdp-server", "configuration-rdp-server", "configuration-rdp-server", GRD_DBUS_REMOTE_DESKTOP_TYPE_CONFIGURATION_RDP_SERVER, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  /**
   * GrdDBusRemoteDesktopObject:vnc-server:
   *
   * The #GrdDBusRemoteDesktopVncServer instance corresponding to the D-Bus interface <link linkend="gdbus-interface-org-gnome-RemoteDesktop-Vnc-Server.top_of_page">org.gnome.RemoteDesktop.Vnc.Server</link>, if any.
   *
   * Connect to the #GObject::notify signal to get informed of property changes.
   */
  g_object_interface_install_property (iface, g_param_spec_object ("vnc-server", "vnc-server", "vnc-server", GRD_DBUS_REMOTE_DESKTOP_TYPE_VNC_SERVER, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  /**
   * GrdDBusRemoteDesktopObject:rdp-dispatcher:
   *
   * The #GrdDBusRemoteDesktopRdpDispatcher instance corresponding to the D-Bus interface <link linkend="gdbus-interface-org-gnome-RemoteDesktop-Rdp-Dispatcher.top_of_page">org.gnome.RemoteDesktop.Rdp.Dispatcher</link>, if any.
   *
   * Connect to the #GObject::notify signal to get informed of property changes.
   */
  g_object_interface_install_property (iface, g_param_spec_object ("rdp-dispatcher", "rdp-dispatcher", "rdp-dispatcher", GRD_DBUS_REMOTE_DESKTOP_TYPE_RDP_DISPATCHER, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  /**
   * GrdDBusRemoteDesktopObject:rdp-handover:
   *
   * The #GrdDBusRemoteDesktopRdpHandover instance corresponding to the D-Bus interface <link linkend="gdbus-interface-org-gnome-RemoteDesktop-Rdp-Handover.top_of_page">org.gnome.RemoteDesktop.Rdp.Handover</link>, if any.
   *
   * Connect to the #GObject::notify signal to get informed of property changes.
   */
  g_object_interface_install_property (iface, g_param_spec_object ("rdp-handover", "rdp-handover", "rdp-handover", GRD_DBUS_REMOTE_DESKTOP_TYPE_RDP_HANDOVER, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

}

/**
 * grd_dbus_remote_desktop_object_get_org_gnome_remote_desktop:
 * @object: A #GrdDBusRemoteDesktopObject.
 *
 * Gets the #GrdDBusRemoteDesktopOrgGnomeRemoteDesktop instance for the D-Bus interface <link linkend="gdbus-interface-org-gnome-RemoteDesktop.top_of_page">org.gnome.RemoteDesktop</link> on @object, if any.
 *
 * Returns: (transfer full) (nullable): A #GrdDBusRemoteDesktopOrgGnomeRemoteDesktop that must be freed with g_object_unref() or %NULL if @object does not implement the interface.
 */
GrdDBusRemoteDesktopOrgGnomeRemoteDesktop *grd_dbus_remote_desktop_object_get_org_gnome_remote_desktop (GrdDBusRemoteDesktopObject *object)
{
  GDBusInterface *ret;
  ret = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.gnome.RemoteDesktop");
  if (ret == NULL)
    return NULL;
  return GRD_DBUS_REMOTE_DESKTOP_ORG_GNOME_REMOTE_DESKTOP (ret);
}

/**
 * grd_dbus_remote_desktop_object_get_rdp_server:
 * @object: A #GrdDBusRemoteDesktopObject.
 *
 * Gets the #GrdDBusRemoteDesktopRdpServer instance for the D-Bus interface <link linkend="gdbus-interface-org-gnome-RemoteDesktop-Rdp-Server.top_of_page">org.gnome.RemoteDesktop.Rdp.Server</link> on @object, if any.
 *
 * Returns: (transfer full) (nullable): A #GrdDBusRemoteDesktopRdpServer that must be freed with g_object_unref() or %NULL if @object does not implement the interface.
 */
GrdDBusRemoteDesktopRdpServer *grd_dbus_remote_desktop_object_get_rdp_server (GrdDBusRemoteDesktopObject *object)
{
  GDBusInterface *ret;
  ret = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.gnome.RemoteDesktop.Rdp.Server");
  if (ret == NULL)
    return NULL;
  return GRD_DBUS_REMOTE_DESKTOP_RDP_SERVER (ret);
}

/**
 * grd_dbus_remote_desktop_object_get_configuration_rdp_server:
 * @object: A #GrdDBusRemoteDesktopObject.
 *
 * Gets the #GrdDBusRemoteDesktopConfigurationRdpServer instance for the D-Bus interface <link linkend="gdbus-interface-org-gnome-RemoteDesktop-Configuration-Rdp-Server.top_of_page">org.gnome.RemoteDesktop.Configuration.Rdp.Server</link> on @object, if any.
 *
 * Returns: (transfer full) (nullable): A #GrdDBusRemoteDesktopConfigurationRdpServer that must be freed with g_object_unref() or %NULL if @object does not implement the interface.
 */
GrdDBusRemoteDesktopConfigurationRdpServer *grd_dbus_remote_desktop_object_get_configuration_rdp_server (GrdDBusRemoteDesktopObject *object)
{
  GDBusInterface *ret;
  ret = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.gnome.RemoteDesktop.Configuration.Rdp.Server");
  if (ret == NULL)
    return NULL;
  return GRD_DBUS_REMOTE_DESKTOP_CONFIGURATION_RDP_SERVER (ret);
}

/**
 * grd_dbus_remote_desktop_object_get_vnc_server:
 * @object: A #GrdDBusRemoteDesktopObject.
 *
 * Gets the #GrdDBusRemoteDesktopVncServer instance for the D-Bus interface <link linkend="gdbus-interface-org-gnome-RemoteDesktop-Vnc-Server.top_of_page">org.gnome.RemoteDesktop.Vnc.Server</link> on @object, if any.
 *
 * Returns: (transfer full) (nullable): A #GrdDBusRemoteDesktopVncServer that must be freed with g_object_unref() or %NULL if @object does not implement the interface.
 */
GrdDBusRemoteDesktopVncServer *grd_dbus_remote_desktop_object_get_vnc_server (GrdDBusRemoteDesktopObject *object)
{
  GDBusInterface *ret;
  ret = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.gnome.RemoteDesktop.Vnc.Server");
  if (ret == NULL)
    return NULL;
  return GRD_DBUS_REMOTE_DESKTOP_VNC_SERVER (ret);
}

/**
 * grd_dbus_remote_desktop_object_get_rdp_dispatcher:
 * @object: A #GrdDBusRemoteDesktopObject.
 *
 * Gets the #GrdDBusRemoteDesktopRdpDispatcher instance for the D-Bus interface <link linkend="gdbus-interface-org-gnome-RemoteDesktop-Rdp-Dispatcher.top_of_page">org.gnome.RemoteDesktop.Rdp.Dispatcher</link> on @object, if any.
 *
 * Returns: (transfer full) (nullable): A #GrdDBusRemoteDesktopRdpDispatcher that must be freed with g_object_unref() or %NULL if @object does not implement the interface.
 */
GrdDBusRemoteDesktopRdpDispatcher *grd_dbus_remote_desktop_object_get_rdp_dispatcher (GrdDBusRemoteDesktopObject *object)
{
  GDBusInterface *ret;
  ret = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.gnome.RemoteDesktop.Rdp.Dispatcher");
  if (ret == NULL)
    return NULL;
  return GRD_DBUS_REMOTE_DESKTOP_RDP_DISPATCHER (ret);
}

/**
 * grd_dbus_remote_desktop_object_get_rdp_handover:
 * @object: A #GrdDBusRemoteDesktopObject.
 *
 * Gets the #GrdDBusRemoteDesktopRdpHandover instance for the D-Bus interface <link linkend="gdbus-interface-org-gnome-RemoteDesktop-Rdp-Handover.top_of_page">org.gnome.RemoteDesktop.Rdp.Handover</link> on @object, if any.
 *
 * Returns: (transfer full) (nullable): A #GrdDBusRemoteDesktopRdpHandover that must be freed with g_object_unref() or %NULL if @object does not implement the interface.
 */
GrdDBusRemoteDesktopRdpHandover *grd_dbus_remote_desktop_object_get_rdp_handover (GrdDBusRemoteDesktopObject *object)
{
  GDBusInterface *ret;
  ret = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.gnome.RemoteDesktop.Rdp.Handover");
  if (ret == NULL)
    return NULL;
  return GRD_DBUS_REMOTE_DESKTOP_RDP_HANDOVER (ret);
}


/**
 * grd_dbus_remote_desktop_object_peek_org_gnome_remote_desktop: (skip)
 * @object: A #GrdDBusRemoteDesktopObject.
 *
 * Like grd_dbus_remote_desktop_object_get_org_gnome_remote_desktop() but doesn't increase the reference count on the returned object.
 *
 * It is not safe to use the returned object if you are on another thread than the one where the #GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running.
 *
 * Returns: (transfer none) (nullable): A #GrdDBusRemoteDesktopOrgGnomeRemoteDesktop or %NULL if @object does not implement the interface. Do not free the returned object, it is owned by @object.
 */
GrdDBusRemoteDesktopOrgGnomeRemoteDesktop *grd_dbus_remote_desktop_object_peek_org_gnome_remote_desktop (GrdDBusRemoteDesktopObject *object)
{
  GDBusInterface *ret;
  ret = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.gnome.RemoteDesktop");
  if (ret == NULL)
    return NULL;
  g_object_unref (ret);
  return GRD_DBUS_REMOTE_DESKTOP_ORG_GNOME_REMOTE_DESKTOP (ret);
}

/**
 * grd_dbus_remote_desktop_object_peek_rdp_server: (skip)
 * @object: A #GrdDBusRemoteDesktopObject.
 *
 * Like grd_dbus_remote_desktop_object_get_rdp_server() but doesn't increase the reference count on the returned object.
 *
 * It is not safe to use the returned object if you are on another thread than the one where the #GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running.
 *
 * Returns: (transfer none) (nullable): A #GrdDBusRemoteDesktopRdpServer or %NULL if @object does not implement the interface. Do not free the returned object, it is owned by @object.
 */
GrdDBusRemoteDesktopRdpServer *grd_dbus_remote_desktop_object_peek_rdp_server (GrdDBusRemoteDesktopObject *object)
{
  GDBusInterface *ret;
  ret = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.gnome.RemoteDesktop.Rdp.Server");
  if (ret == NULL)
    return NULL;
  g_object_unref (ret);
  return GRD_DBUS_REMOTE_DESKTOP_RDP_SERVER (ret);
}

/**
 * grd_dbus_remote_desktop_object_peek_configuration_rdp_server: (skip)
 * @object: A #GrdDBusRemoteDesktopObject.
 *
 * Like grd_dbus_remote_desktop_object_get_configuration_rdp_server() but doesn't increase the reference count on the returned object.
 *
 * It is not safe to use the returned object if you are on another thread than the one where the #GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running.
 *
 * Returns: (transfer none) (nullable): A #GrdDBusRemoteDesktopConfigurationRdpServer or %NULL if @object does not implement the interface. Do not free the returned object, it is owned by @object.
 */
GrdDBusRemoteDesktopConfigurationRdpServer *grd_dbus_remote_desktop_object_peek_configuration_rdp_server (GrdDBusRemoteDesktopObject *object)
{
  GDBusInterface *ret;
  ret = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.gnome.RemoteDesktop.Configuration.Rdp.Server");
  if (ret == NULL)
    return NULL;
  g_object_unref (ret);
  return GRD_DBUS_REMOTE_DESKTOP_CONFIGURATION_RDP_SERVER (ret);
}

/**
 * grd_dbus_remote_desktop_object_peek_vnc_server: (skip)
 * @object: A #GrdDBusRemoteDesktopObject.
 *
 * Like grd_dbus_remote_desktop_object_get_vnc_server() but doesn't increase the reference count on the returned object.
 *
 * It is not safe to use the returned object if you are on another thread than the one where the #GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running.
 *
 * Returns: (transfer none) (nullable): A #GrdDBusRemoteDesktopVncServer or %NULL if @object does not implement the interface. Do not free the returned object, it is owned by @object.
 */
GrdDBusRemoteDesktopVncServer *grd_dbus_remote_desktop_object_peek_vnc_server (GrdDBusRemoteDesktopObject *object)
{
  GDBusInterface *ret;
  ret = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.gnome.RemoteDesktop.Vnc.Server");
  if (ret == NULL)
    return NULL;
  g_object_unref (ret);
  return GRD_DBUS_REMOTE_DESKTOP_VNC_SERVER (ret);
}

/**
 * grd_dbus_remote_desktop_object_peek_rdp_dispatcher: (skip)
 * @object: A #GrdDBusRemoteDesktopObject.
 *
 * Like grd_dbus_remote_desktop_object_get_rdp_dispatcher() but doesn't increase the reference count on the returned object.
 *
 * It is not safe to use the returned object if you are on another thread than the one where the #GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running.
 *
 * Returns: (transfer none) (nullable): A #GrdDBusRemoteDesktopRdpDispatcher or %NULL if @object does not implement the interface. Do not free the returned object, it is owned by @object.
 */
GrdDBusRemoteDesktopRdpDispatcher *grd_dbus_remote_desktop_object_peek_rdp_dispatcher (GrdDBusRemoteDesktopObject *object)
{
  GDBusInterface *ret;
  ret = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.gnome.RemoteDesktop.Rdp.Dispatcher");
  if (ret == NULL)
    return NULL;
  g_object_unref (ret);
  return GRD_DBUS_REMOTE_DESKTOP_RDP_DISPATCHER (ret);
}

/**
 * grd_dbus_remote_desktop_object_peek_rdp_handover: (skip)
 * @object: A #GrdDBusRemoteDesktopObject.
 *
 * Like grd_dbus_remote_desktop_object_get_rdp_handover() but doesn't increase the reference count on the returned object.
 *
 * It is not safe to use the returned object if you are on another thread than the one where the #GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running.
 *
 * Returns: (transfer none) (nullable): A #GrdDBusRemoteDesktopRdpHandover or %NULL if @object does not implement the interface. Do not free the returned object, it is owned by @object.
 */
GrdDBusRemoteDesktopRdpHandover *grd_dbus_remote_desktop_object_peek_rdp_handover (GrdDBusRemoteDesktopObject *object)
{
  GDBusInterface *ret;
  ret = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.gnome.RemoteDesktop.Rdp.Handover");
  if (ret == NULL)
    return NULL;
  g_object_unref (ret);
  return GRD_DBUS_REMOTE_DESKTOP_RDP_HANDOVER (ret);
}


static void
grd_dbus_remote_desktop_object_notify (GDBusObject *object, GDBusInterface *interface)
{
  _ExtendedGDBusInterfaceInfo *info = (_ExtendedGDBusInterfaceInfo *) g_dbus_interface_get_info (interface);
  /* info can be NULL if the other end is using a D-Bus interface we don't know
   * anything about, for example old generated code in this process talking to
   * newer generated code in the other process. */
  if (info != NULL)
    g_object_notify (G_OBJECT (object), info->hyphen_name);
}

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

/**
 * GrdDBusRemoteDesktopObjectProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #GrdDBusRemoteDesktopObjectProxy.
 */

static void
grd_dbus_remote_desktop_object_proxy__grd_dbus_remote_desktop_object_iface_init (GrdDBusRemoteDesktopObjectIface *iface G_GNUC_UNUSED)
{
}

static void
grd_dbus_remote_desktop_object_proxy__g_dbus_object_iface_init (GDBusObjectIface *iface)
{
  iface->interface_added = grd_dbus_remote_desktop_object_notify;
  iface->interface_removed = grd_dbus_remote_desktop_object_notify;
}


G_DEFINE_TYPE_WITH_CODE (GrdDBusRemoteDesktopObjectProxy, grd_dbus_remote_desktop_object_proxy, G_TYPE_DBUS_OBJECT_PROXY,
                         G_IMPLEMENT_INTERFACE (GRD_DBUS_REMOTE_DESKTOP_TYPE_OBJECT, grd_dbus_remote_desktop_object_proxy__grd_dbus_remote_desktop_object_iface_init)
                         G_IMPLEMENT_INTERFACE (G_TYPE_DBUS_OBJECT, grd_dbus_remote_desktop_object_proxy__g_dbus_object_iface_init))

static void
grd_dbus_remote_desktop_object_proxy_init (GrdDBusRemoteDesktopObjectProxy *object G_GNUC_UNUSED)
{
}

static void
grd_dbus_remote_desktop_object_proxy_set_property (GObject      *gobject,
  guint         prop_id,
  const GValue *value G_GNUC_UNUSED,
  GParamSpec   *pspec)
{
  G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec);
}

static void
grd_dbus_remote_desktop_object_proxy_get_property (GObject      *gobject,
  guint         prop_id,
  GValue       *value,
  GParamSpec   *pspec)
{
  GrdDBusRemoteDesktopObjectProxy *object = GRD_DBUS_REMOTE_DESKTOP_OBJECT_PROXY (gobject);
  GDBusInterface *interface;

  switch (prop_id)
    {
    case 1:
      interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.gnome.RemoteDesktop");
      g_value_take_object (value, interface);
      break;

    case 2:
      interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.gnome.RemoteDesktop.Rdp.Server");
      g_value_take_object (value, interface);
      break;

    case 3:
      interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.gnome.RemoteDesktop.Configuration.Rdp.Server");
      g_value_take_object (value, interface);
      break;

    case 4:
      interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.gnome.RemoteDesktop.Vnc.Server");
      g_value_take_object (value, interface);
      break;

    case 5:
      interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.gnome.RemoteDesktop.Rdp.Dispatcher");
      g_value_take_object (value, interface);
      break;

    case 6:
      interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.gnome.RemoteDesktop.Rdp.Handover");
      g_value_take_object (value, interface);
      break;

    default:
      G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec);
      break;
  }
}

static void
grd_dbus_remote_desktop_object_proxy_class_init (GrdDBusRemoteDesktopObjectProxyClass *klass)
{
  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);

  gobject_class->set_property = grd_dbus_remote_desktop_object_proxy_set_property;
  gobject_class->get_property = grd_dbus_remote_desktop_object_proxy_get_property;

  g_object_class_override_property (gobject_class, 1, "org-gnome-remote-desktop");
  g_object_class_override_property (gobject_class, 2, "rdp-server");
  g_object_class_override_property (gobject_class, 3, "configuration-rdp-server");
  g_object_class_override_property (gobject_class, 4, "vnc-server");
  g_object_class_override_property (gobject_class, 5, "rdp-dispatcher");
  g_object_class_override_property (gobject_class, 6, "rdp-handover");
}

/**
 * grd_dbus_remote_desktop_object_proxy_new:
 * @connection: A #GDBusConnection.
 * @object_path: An object path.
 *
 * Creates a new proxy object.
 *
 * Returns: (transfer full): The proxy object.
 */
GrdDBusRemoteDesktopObjectProxy *
grd_dbus_remote_desktop_object_proxy_new (GDBusConnection *connection,
  const gchar *object_path)
{
  g_return_val_if_fail (G_IS_DBUS_CONNECTION (connection), NULL);
  g_return_val_if_fail (g_variant_is_object_path (object_path), NULL);
  return GRD_DBUS_REMOTE_DESKTOP_OBJECT_PROXY (g_object_new (GRD_DBUS_REMOTE_DESKTOP_TYPE_OBJECT_PROXY, "g-connection", connection, "g-object-path", object_path, NULL));
}

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

/**
 * GrdDBusRemoteDesktopObjectSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #GrdDBusRemoteDesktopObjectSkeleton.
 */

static void
grd_dbus_remote_desktop_object_skeleton__grd_dbus_remote_desktop_object_iface_init (GrdDBusRemoteDesktopObjectIface *iface G_GNUC_UNUSED)
{
}


static void
grd_dbus_remote_desktop_object_skeleton__g_dbus_object_iface_init (GDBusObjectIface *iface)
{
  iface->interface_added = grd_dbus_remote_desktop_object_notify;
  iface->interface_removed = grd_dbus_remote_desktop_object_notify;
}

G_DEFINE_TYPE_WITH_CODE (GrdDBusRemoteDesktopObjectSkeleton, grd_dbus_remote_desktop_object_skeleton, G_TYPE_DBUS_OBJECT_SKELETON,
                         G_IMPLEMENT_INTERFACE (GRD_DBUS_REMOTE_DESKTOP_TYPE_OBJECT, grd_dbus_remote_desktop_object_skeleton__grd_dbus_remote_desktop_object_iface_init)
                         G_IMPLEMENT_INTERFACE (G_TYPE_DBUS_OBJECT, grd_dbus_remote_desktop_object_skeleton__g_dbus_object_iface_init))

static void
grd_dbus_remote_desktop_object_skeleton_init (GrdDBusRemoteDesktopObjectSkeleton *object G_GNUC_UNUSED)
{
}

static void
grd_dbus_remote_desktop_object_skeleton_set_property (GObject      *gobject,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec)
{
  GrdDBusRemoteDesktopObjectSkeleton *object = GRD_DBUS_REMOTE_DESKTOP_OBJECT_SKELETON (gobject);
  GDBusInterfaceSkeleton *interface;

  switch (prop_id)
    {
    case 1:
      interface = g_value_get_object (value);
      if (interface != NULL)
        {
          g_warn_if_fail (GRD_DBUS_REMOTE_DESKTOP_IS_ORG_GNOME_REMOTE_DESKTOP (interface));
          g_dbus_object_skeleton_add_interface (G_DBUS_OBJECT_SKELETON (object), interface);
        }
      else
        {
          g_dbus_object_skeleton_remove_interface_by_name (G_DBUS_OBJECT_SKELETON (object), "org.gnome.RemoteDesktop");
        }
      break;

    case 2:
      interface = g_value_get_object (value);
      if (interface != NULL)
        {
          g_warn_if_fail (GRD_DBUS_REMOTE_DESKTOP_IS_RDP_SERVER (interface));
          g_dbus_object_skeleton_add_interface (G_DBUS_OBJECT_SKELETON (object), interface);
        }
      else
        {
          g_dbus_object_skeleton_remove_interface_by_name (G_DBUS_OBJECT_SKELETON (object), "org.gnome.RemoteDesktop.Rdp.Server");
        }
      break;

    case 3:
      interface = g_value_get_object (value);
      if (interface != NULL)
        {
          g_warn_if_fail (GRD_DBUS_REMOTE_DESKTOP_IS_CONFIGURATION_RDP_SERVER (interface));
          g_dbus_object_skeleton_add_interface (G_DBUS_OBJECT_SKELETON (object), interface);
        }
      else
        {
          g_dbus_object_skeleton_remove_interface_by_name (G_DBUS_OBJECT_SKELETON (object), "org.gnome.RemoteDesktop.Configuration.Rdp.Server");
        }
      break;

    case 4:
      interface = g_value_get_object (value);
      if (interface != NULL)
        {
          g_warn_if_fail (GRD_DBUS_REMOTE_DESKTOP_IS_VNC_SERVER (interface));
          g_dbus_object_skeleton_add_interface (G_DBUS_OBJECT_SKELETON (object), interface);
        }
      else
        {
          g_dbus_object_skeleton_remove_interface_by_name (G_DBUS_OBJECT_SKELETON (object), "org.gnome.RemoteDesktop.Vnc.Server");
        }
      break;

    case 5:
      interface = g_value_get_object (value);
      if (interface != NULL)
        {
          g_warn_if_fail (GRD_DBUS_REMOTE_DESKTOP_IS_RDP_DISPATCHER (interface));
          g_dbus_object_skeleton_add_interface (G_DBUS_OBJECT_SKELETON (object), interface);
        }
      else
        {
          g_dbus_object_skeleton_remove_interface_by_name (G_DBUS_OBJECT_SKELETON (object), "org.gnome.RemoteDesktop.Rdp.Dispatcher");
        }
      break;

    case 6:
      interface = g_value_get_object (value);
      if (interface != NULL)
        {
          g_warn_if_fail (GRD_DBUS_REMOTE_DESKTOP_IS_RDP_HANDOVER (interface));
          g_dbus_object_skeleton_add_interface (G_DBUS_OBJECT_SKELETON (object), interface);
        }
      else
        {
          g_dbus_object_skeleton_remove_interface_by_name (G_DBUS_OBJECT_SKELETON (object), "org.gnome.RemoteDesktop.Rdp.Handover");
        }
      break;

    default:
      G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec);
      break;
  }
}

static void
grd_dbus_remote_desktop_object_skeleton_get_property (GObject      *gobject,
  guint         prop_id,
  GValue       *value,
  GParamSpec   *pspec)
{
  GrdDBusRemoteDesktopObjectSkeleton *object = GRD_DBUS_REMOTE_DESKTOP_OBJECT_SKELETON (gobject);
  GDBusInterface *interface;

  switch (prop_id)
    {
    case 1:
      interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.gnome.RemoteDesktop");
      g_value_take_object (value, interface);
      break;

    case 2:
      interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.gnome.RemoteDesktop.Rdp.Server");
      g_value_take_object (value, interface);
      break;

    case 3:
      interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.gnome.RemoteDesktop.Configuration.Rdp.Server");
      g_value_take_object (value, interface);
      break;

    case 4:
      interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.gnome.RemoteDesktop.Vnc.Server");
      g_value_take_object (value, interface);
      break;

    case 5:
      interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.gnome.RemoteDesktop.Rdp.Dispatcher");
      g_value_take_object (value, interface);
      break;

    case 6:
      interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.gnome.RemoteDesktop.Rdp.Handover");
      g_value_take_object (value, interface);
      break;

    default:
      G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec);
      break;
  }
}

static void
grd_dbus_remote_desktop_object_skeleton_class_init (GrdDBusRemoteDesktopObjectSkeletonClass *klass)
{
  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);

  gobject_class->set_property = grd_dbus_remote_desktop_object_skeleton_set_property;
  gobject_class->get_property = grd_dbus_remote_desktop_object_skeleton_get_property;

  g_object_class_override_property (gobject_class, 1, "org-gnome-remote-desktop");
  g_object_class_override_property (gobject_class, 2, "rdp-server");
  g_object_class_override_property (gobject_class, 3, "configuration-rdp-server");
  g_object_class_override_property (gobject_class, 4, "vnc-server");
  g_object_class_override_property (gobject_class, 5, "rdp-dispatcher");
  g_object_class_override_property (gobject_class, 6, "rdp-handover");
}

/**
 * grd_dbus_remote_desktop_object_skeleton_new:
 * @object_path: An object path.
 *
 * Creates a new skeleton object.
 *
 * Returns: (transfer full): The skeleton object.
 */
GrdDBusRemoteDesktopObjectSkeleton *
grd_dbus_remote_desktop_object_skeleton_new (const gchar *object_path)
{
  g_return_val_if_fail (g_variant_is_object_path (object_path), NULL);
  return GRD_DBUS_REMOTE_DESKTOP_OBJECT_SKELETON (g_object_new (GRD_DBUS_REMOTE_DESKTOP_TYPE_OBJECT_SKELETON, "g-object-path", object_path, NULL));
}

/**
 * grd_dbus_remote_desktop_object_skeleton_set_org_gnome_remote_desktop:
 * @object: A #GrdDBusRemoteDesktopObjectSkeleton.
 * @interface_: (nullable): A #GrdDBusRemoteDesktopOrgGnomeRemoteDesktop or %NULL to clear the interface.
 *
 * Sets the #GrdDBusRemoteDesktopOrgGnomeRemoteDesktop instance for the D-Bus interface <link linkend="gdbus-interface-org-gnome-RemoteDesktop.top_of_page">org.gnome.RemoteDesktop</link> on @object.
 */
void grd_dbus_remote_desktop_object_skeleton_set_org_gnome_remote_desktop (GrdDBusRemoteDesktopObjectSkeleton *object, GrdDBusRemoteDesktopOrgGnomeRemoteDesktop *interface_)
{
  g_object_set (G_OBJECT (object), "org-gnome-remote-desktop", interface_, NULL);
}

/**
 * grd_dbus_remote_desktop_object_skeleton_set_rdp_server:
 * @object: A #GrdDBusRemoteDesktopObjectSkeleton.
 * @interface_: (nullable): A #GrdDBusRemoteDesktopRdpServer or %NULL to clear the interface.
 *
 * Sets the #GrdDBusRemoteDesktopRdpServer instance for the D-Bus interface <link linkend="gdbus-interface-org-gnome-RemoteDesktop-Rdp-Server.top_of_page">org.gnome.RemoteDesktop.Rdp.Server</link> on @object.
 */
void grd_dbus_remote_desktop_object_skeleton_set_rdp_server (GrdDBusRemoteDesktopObjectSkeleton *object, GrdDBusRemoteDesktopRdpServer *interface_)
{
  g_object_set (G_OBJECT (object), "rdp-server", interface_, NULL);
}

/**
 * grd_dbus_remote_desktop_object_skeleton_set_configuration_rdp_server:
 * @object: A #GrdDBusRemoteDesktopObjectSkeleton.
 * @interface_: (nullable): A #GrdDBusRemoteDesktopConfigurationRdpServer or %NULL to clear the interface.
 *
 * Sets the #GrdDBusRemoteDesktopConfigurationRdpServer instance for the D-Bus interface <link linkend="gdbus-interface-org-gnome-RemoteDesktop-Configuration-Rdp-Server.top_of_page">org.gnome.RemoteDesktop.Configuration.Rdp.Server</link> on @object.
 */
void grd_dbus_remote_desktop_object_skeleton_set_configuration_rdp_server (GrdDBusRemoteDesktopObjectSkeleton *object, GrdDBusRemoteDesktopConfigurationRdpServer *interface_)
{
  g_object_set (G_OBJECT (object), "configuration-rdp-server", interface_, NULL);
}

/**
 * grd_dbus_remote_desktop_object_skeleton_set_vnc_server:
 * @object: A #GrdDBusRemoteDesktopObjectSkeleton.
 * @interface_: (nullable): A #GrdDBusRemoteDesktopVncServer or %NULL to clear the interface.
 *
 * Sets the #GrdDBusRemoteDesktopVncServer instance for the D-Bus interface <link linkend="gdbus-interface-org-gnome-RemoteDesktop-Vnc-Server.top_of_page">org.gnome.RemoteDesktop.Vnc.Server</link> on @object.
 */
void grd_dbus_remote_desktop_object_skeleton_set_vnc_server (GrdDBusRemoteDesktopObjectSkeleton *object, GrdDBusRemoteDesktopVncServer *interface_)
{
  g_object_set (G_OBJECT (object), "vnc-server", interface_, NULL);
}

/**
 * grd_dbus_remote_desktop_object_skeleton_set_rdp_dispatcher:
 * @object: A #GrdDBusRemoteDesktopObjectSkeleton.
 * @interface_: (nullable): A #GrdDBusRemoteDesktopRdpDispatcher or %NULL to clear the interface.
 *
 * Sets the #GrdDBusRemoteDesktopRdpDispatcher instance for the D-Bus interface <link linkend="gdbus-interface-org-gnome-RemoteDesktop-Rdp-Dispatcher.top_of_page">org.gnome.RemoteDesktop.Rdp.Dispatcher</link> on @object.
 */
void grd_dbus_remote_desktop_object_skeleton_set_rdp_dispatcher (GrdDBusRemoteDesktopObjectSkeleton *object, GrdDBusRemoteDesktopRdpDispatcher *interface_)
{
  g_object_set (G_OBJECT (object), "rdp-dispatcher", interface_, NULL);
}

/**
 * grd_dbus_remote_desktop_object_skeleton_set_rdp_handover:
 * @object: A #GrdDBusRemoteDesktopObjectSkeleton.
 * @interface_: (nullable): A #GrdDBusRemoteDesktopRdpHandover or %NULL to clear the interface.
 *
 * Sets the #GrdDBusRemoteDesktopRdpHandover instance for the D-Bus interface <link linkend="gdbus-interface-org-gnome-RemoteDesktop-Rdp-Handover.top_of_page">org.gnome.RemoteDesktop.Rdp.Handover</link> on @object.
 */
void grd_dbus_remote_desktop_object_skeleton_set_rdp_handover (GrdDBusRemoteDesktopObjectSkeleton *object, GrdDBusRemoteDesktopRdpHandover *interface_)
{
  g_object_set (G_OBJECT (object), "rdp-handover", interface_, NULL);
}


/* ------------------------------------------------------------------------
 * Code for ObjectManager client
 * ------------------------------------------------------------------------
 */

/**
 * SECTION:GrdDBusRemoteDesktopObjectManagerClient
 * @title: GrdDBusRemoteDesktopObjectManagerClient
 * @short_description: Generated GDBusObjectManagerClient type
 *
 * This section contains a #GDBusObjectManagerClient that uses grd_dbus_remote_desktop_object_manager_client_get_proxy_type() as the #GDBusProxyTypeFunc.
 */

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

/**
 * GrdDBusRemoteDesktopObjectManagerClientClass:
 * @parent_class: The parent class.
 *
 * Class structure for #GrdDBusRemoteDesktopObjectManagerClient.
 */

G_DEFINE_TYPE (GrdDBusRemoteDesktopObjectManagerClient, grd_dbus_remote_desktop_object_manager_client, G_TYPE_DBUS_OBJECT_MANAGER_CLIENT)

static void
grd_dbus_remote_desktop_object_manager_client_init (GrdDBusRemoteDesktopObjectManagerClient *manager G_GNUC_UNUSED)
{
}

static void
grd_dbus_remote_desktop_object_manager_client_class_init (GrdDBusRemoteDesktopObjectManagerClientClass *klass G_GNUC_UNUSED)
{
}

/**
 * grd_dbus_remote_desktop_object_manager_client_get_proxy_type:
 * @manager: A #GDBusObjectManagerClient.
 * @object_path: The object path of the remote object (unused).
 * @interface_name: (nullable): Interface name of the remote object or %NULL to get the object proxy #GType.
 * @user_data: User data (unused).
 *
 * A #GDBusProxyTypeFunc that maps @interface_name to the generated #GDBusObjectProxy derived and #GDBusProxy derived types.
 *
 * Returns: A #GDBusProxy derived #GType if @interface_name is not %NULL, otherwise the #GType for #GrdDBusRemoteDesktopObjectProxy.
 */
GType
grd_dbus_remote_desktop_object_manager_client_get_proxy_type (GDBusObjectManagerClient *manager G_GNUC_UNUSED, const gchar *object_path G_GNUC_UNUSED, const gchar *interface_name, gpointer user_data G_GNUC_UNUSED)
{
  static gsize once_init_value = 0;
  static GHashTable *lookup_hash;
  GType ret;

  if (interface_name == NULL)
    return GRD_DBUS_REMOTE_DESKTOP_TYPE_OBJECT_PROXY;
  if (g_once_init_enter (&once_init_value))
    {
      lookup_hash = g_hash_table_new (g_str_hash, g_str_equal);
      g_hash_table_insert (lookup_hash, (gpointer) "org.gnome.RemoteDesktop", (gpointer) (guintptr) (GRD_DBUS_REMOTE_DESKTOP_TYPE_ORG_GNOME_REMOTE_DESKTOP_PROXY));
      g_hash_table_insert (lookup_hash, (gpointer) "org.gnome.RemoteDesktop.Rdp.Server", (gpointer) (guintptr) (GRD_DBUS_REMOTE_DESKTOP_TYPE_RDP_SERVER_PROXY));
      g_hash_table_insert (lookup_hash, (gpointer) "org.gnome.RemoteDesktop.Configuration.Rdp.Server", (gpointer) (guintptr) (GRD_DBUS_REMOTE_DESKTOP_TYPE_CONFIGURATION_RDP_SERVER_PROXY));
      g_hash_table_insert (lookup_hash, (gpointer) "org.gnome.RemoteDesktop.Vnc.Server", (gpointer) (guintptr) (GRD_DBUS_REMOTE_DESKTOP_TYPE_VNC_SERVER_PROXY));
      g_hash_table_insert (lookup_hash, (gpointer) "org.gnome.RemoteDesktop.Rdp.Dispatcher", (gpointer) (guintptr) (GRD_DBUS_REMOTE_DESKTOP_TYPE_RDP_DISPATCHER_PROXY));
      g_hash_table_insert (lookup_hash, (gpointer) "org.gnome.RemoteDesktop.Rdp.Handover", (gpointer) (guintptr) (GRD_DBUS_REMOTE_DESKTOP_TYPE_RDP_HANDOVER_PROXY));
      g_once_init_leave (&once_init_value, 1);
    }
  ret = (GType) (guintptr) (g_hash_table_lookup (lookup_hash, interface_name));
  if (ret == (GType) 0)
    ret = G_TYPE_DBUS_PROXY;
  return ret;
}

/**
 * grd_dbus_remote_desktop_object_manager_client_new:
 * @connection: A #GDBusConnection.
 * @flags: Flags from the #GDBusObjectManagerClientFlags 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 #GDBusObjectManagerClient using grd_dbus_remote_desktop_object_manager_client_get_proxy_type() as the #GDBusProxyTypeFunc. See g_dbus_object_manager_client_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 grd_dbus_remote_desktop_object_manager_client_new_finish() to get the result of the operation.
 *
 * See grd_dbus_remote_desktop_object_manager_client_new_sync() for the synchronous, blocking version of this constructor.
 */
void
grd_dbus_remote_desktop_object_manager_client_new (
    GDBusConnection        *connection,
    GDBusObjectManagerClientFlags  flags,
    const gchar            *name,
    const gchar            *object_path,
    GCancellable           *cancellable,
    GAsyncReadyCallback     callback,
    gpointer                user_data)
{
  g_async_initable_new_async (GRD_DBUS_REMOTE_DESKTOP_TYPE_OBJECT_MANAGER_CLIENT, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "flags", flags, "name", name, "connection", connection, "object-path", object_path, "get-proxy-type-func", grd_dbus_remote_desktop_object_manager_client_get_proxy_type, NULL);
}

/**
 * grd_dbus_remote_desktop_object_manager_client_new_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to grd_dbus_remote_desktop_object_manager_client_new().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with grd_dbus_remote_desktop_object_manager_client_new().
 *
 * Returns: (transfer full) (type GrdDBusRemoteDesktopObjectManagerClient): The constructed object manager client or %NULL if @error is set.
 */
GDBusObjectManager *
grd_dbus_remote_desktop_object_manager_client_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 G_DBUS_OBJECT_MANAGER (ret);
  else
    return NULL;
}

/**
 * grd_dbus_remote_desktop_object_manager_client_new_sync:
 * @connection: A #GDBusConnection.
 * @flags: Flags from the #GDBusObjectManagerClientFlags 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 #GDBusObjectManagerClient using grd_dbus_remote_desktop_object_manager_client_get_proxy_type() as the #GDBusProxyTypeFunc. See g_dbus_object_manager_client_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See grd_dbus_remote_desktop_object_manager_client_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type GrdDBusRemoteDesktopObjectManagerClient): The constructed object manager client or %NULL if @error is set.
 */
GDBusObjectManager *
grd_dbus_remote_desktop_object_manager_client_new_sync (
    GDBusConnection        *connection,
    GDBusObjectManagerClientFlags  flags,
    const gchar            *name,
    const gchar            *object_path,
    GCancellable           *cancellable,
    GError                **error)
{
  GInitable *ret;
  ret = g_initable_new (GRD_DBUS_REMOTE_DESKTOP_TYPE_OBJECT_MANAGER_CLIENT, cancellable, error, "flags", flags, "name", name, "connection", connection, "object-path", object_path, "get-proxy-type-func", grd_dbus_remote_desktop_object_manager_client_get_proxy_type, NULL);
  if (ret != NULL)
    return G_DBUS_OBJECT_MANAGER (ret);
  else
    return NULL;
}


/**
 * grd_dbus_remote_desktop_object_manager_client_new_for_bus:
 * @bus_type: A #GBusType.
 * @flags: Flags from the #GDBusObjectManagerClientFlags 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 grd_dbus_remote_desktop_object_manager_client_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 grd_dbus_remote_desktop_object_manager_client_new_for_bus_finish() to get the result of the operation.
 *
 * See grd_dbus_remote_desktop_object_manager_client_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
grd_dbus_remote_desktop_object_manager_client_new_for_bus (
    GBusType                bus_type,
    GDBusObjectManagerClientFlags  flags,
    const gchar            *name,
    const gchar            *object_path,
    GCancellable           *cancellable,
    GAsyncReadyCallback     callback,
    gpointer                user_data)
{
  g_async_initable_new_async (GRD_DBUS_REMOTE_DESKTOP_TYPE_OBJECT_MANAGER_CLIENT, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "flags", flags, "name", name, "bus-type", bus_type, "object-path", object_path, "get-proxy-type-func", grd_dbus_remote_desktop_object_manager_client_get_proxy_type, NULL);
}

/**
 * grd_dbus_remote_desktop_object_manager_client_new_for_bus_finish:
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to grd_dbus_remote_desktop_object_manager_client_new_for_bus().
 * @error: Return location for error or %NULL
 *
 * Finishes an operation started with grd_dbus_remote_desktop_object_manager_client_new_for_bus().
 *
 * Returns: (transfer full) (type GrdDBusRemoteDesktopObjectManagerClient): The constructed object manager client or %NULL if @error is set.
 */
GDBusObjectManager *
grd_dbus_remote_desktop_object_manager_client_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 G_DBUS_OBJECT_MANAGER (ret);
  else
    return NULL;
}

/**
 * grd_dbus_remote_desktop_object_manager_client_new_for_bus_sync:
 * @bus_type: A #GBusType.
 * @flags: Flags from the #GDBusObjectManagerClientFlags 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 grd_dbus_remote_desktop_object_manager_client_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See grd_dbus_remote_desktop_object_manager_client_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type GrdDBusRemoteDesktopObjectManagerClient): The constructed object manager client or %NULL if @error is set.
 */
GDBusObjectManager *
grd_dbus_remote_desktop_object_manager_client_new_for_bus_sync (
    GBusType                bus_type,
    GDBusObjectManagerClientFlags  flags,
    const gchar            *name,
    const gchar            *object_path,
    GCancellable           *cancellable,
    GError                **error)
{
  GInitable *ret;
  ret = g_initable_new (GRD_DBUS_REMOTE_DESKTOP_TYPE_OBJECT_MANAGER_CLIENT, cancellable, error, "flags", flags, "name", name, "bus-type", bus_type, "object-path", object_path, "get-proxy-type-func", grd_dbus_remote_desktop_object_manager_client_get_proxy_type, NULL);
  if (ret != NULL)
    return G_DBUS_OBJECT_MANAGER (ret);
  else
    return NULL;
}


